diff --git a/composer.json b/composer.json index 762a08d..5e01532 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,10 @@ { "type": "vcs", "url": "https://github.com/pipindex/core" + }, + { + "type":"vcs", + "url": "https://github.com/romanzpolski/flarum-ext-shawTheme" } ], "support": { @@ -59,11 +63,5 @@ "preferred-install": "dist" }, "minimum-stability": "dev", - "prefer-stable": true, - "repositories": { - "workbench": { - "type": "path", - "url": "workbench/*/" - } - } + "prefer-stable": true } diff --git a/workbench/flarum-ext-shawTheme/bootstrap.php b/workbench/flarum-ext-shawTheme/bootstrap.php deleted file mode 100644 index 5525d98..0000000 --- a/workbench/flarum-ext-shawTheme/bootstrap.php +++ /dev/null @@ -1,19 +0,0 @@ -listen(ConfigureClientView::class, function (ConfigureClientView $event) { - if ($event->isForum()) { - $event->addAssets([ - __DIR__ . '/js/forum/dist/extension.js', - __DIR__ . '/less/forum/extension.less', - ]); - $event->addBootstrapper('romanzpolski/shawTheme/main'); - } - }); - $events->listen(PostWillBeSaved::class, function (PostWillBeSaved $event) { - $event->post->content = 'This is not what I wrote!'; - }); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/composer.json b/workbench/flarum-ext-shawTheme/composer.json deleted file mode 100644 index 9a23ae6..0000000 --- a/workbench/flarum-ext-shawTheme/composer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "romanzpolski/flarum-ext-shawTheme", - "description": "Custom Theme for Shaw Academy", - "type": "flarum-extension", - "require": { - "flarum/core": "^0.1.0-beta.6" - }, - "extra": { - "flarum-extension": { - "title": "Shaw Theme", - "icon": { - "name": "star", - "backgroundColor": "#000", - "color": "#fff" - } - } - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/Gulpfile.js b/workbench/flarum-ext-shawTheme/js/forum/Gulpfile.js deleted file mode 100644 index 3f4265b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/Gulpfile.js +++ /dev/null @@ -1,9 +0,0 @@ -var flarum = require('flarum-gulp'); - -flarum({ - modules: { - 'romanzpolski/shawTheme': [ - 'src/**/*.js' - ] - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/dist/extension.js b/workbench/flarum-ext-shawTheme/js/forum/dist/extension.js deleted file mode 100644 index 5a4d050..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/dist/extension.js +++ /dev/null @@ -1,400 +0,0 @@ -'use strict'; - -System.register('romanzpolski/shawTheme/listInline', ['flarum/extend', 'flarum/Component', 'flarum/helpers/listItems'], function (_export, _context) { - "use strict"; - - var extend, Component, listItems, listInline; - return { - setters: [function (_flarumExtend) { - extend = _flarumExtend.extend; - }, function (_flarumComponent) { - Component = _flarumComponent.default; - }, function (_flarumHelpersListItems) { - listItems = _flarumHelpersListItems.default; - }], - execute: function () { - listInline = function (_Component) { - babelHelpers.inherits(listInline, _Component); - - function listInline() { - babelHelpers.classCallCheck(this, listInline); - return babelHelpers.possibleConstructorReturn(this, (listInline.__proto__ || Object.getPrototypeOf(listInline)).apply(this, arguments)); - } - - babelHelpers.createClass(listInline, [{ - key: 'init', - value: function init() { - this.showing = false; - } - }, { - key: 'view', - value: function view() { - var items = this.props.children ? listItems(this.props.children) : []; - - return m( - 'div', - { className: 'viewNavInline ' + this.props.className + ' itemCount' + items.length + (this.showing ? ' open' : '') }, - this.getMenu(items) - ); - } - }, { - key: 'getMenu', - value: function getMenu(items) { - return m( - 'ul', - { className: 'listInline ' + this.props.menuClassName }, - items - ); - } - }], [{ - key: 'initProps', - value: function initProps(props) { - babelHelpers.get(listInline.__proto__ || Object.getPrototypeOf(listInline), 'initProps', this).call(this, props); - props.className = props.className || ''; - props.buttonClassName = props.buttonClassName || ''; - props.menuClassName = props.menuClassName || ''; - props.label = props.label || ''; - props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'caret-down'; - } - }]); - return listInline; - }(Component); - - _export('default', listInline); - } - }; -});; -'use strict'; - -System.register('romanzpolski/shawTheme/main', ['flarum/extend', 'flarum/components/Post', 'flarum/Component', 'flarum/components/Page', 'flarum/components/HeaderSecondary', 'flarum/components/SessionDropdown', 'flarum/components/Dropdown', 'flarum/components/IndexPage', 'flarum/helpers/listItems', 'flarum/utils/ItemList', 'flarum/components/Button', 'flarum/components/LinkButton', 'flarum/components/SelectDropdown', 'flarum/tags/helpers/tagLabel', 'flarum/tags/utils/sortTags', 'flarum/tags/components/TagsPage', 'flarum/helpers/humanTime', 'flarum/helpers/icon', 'flarum/helpers/avatar', 'flarum/helpers/username', 'romanzpolski/shawTheme/listInline'], function (_export, _context) { - "use strict"; - - var extend, Post, Component, Page, HeaderSecondary, SessionDropdown, Dropdown, IndexPage, listItems, ItemList, Button, LinkButton, SelectDropdown, tagLabel, sortTags, TagsPage, humanTime, icon, avatar, username, listInline; - return { - setters: [function (_flarumExtend) { - extend = _flarumExtend.extend; - }, function (_flarumComponentsPost) { - Post = _flarumComponentsPost.default; - }, function (_flarumComponent) { - Component = _flarumComponent.default; - }, function (_flarumComponentsPage) { - Page = _flarumComponentsPage.default; - }, function (_flarumComponentsHeaderSecondary) { - HeaderSecondary = _flarumComponentsHeaderSecondary.default; - }, function (_flarumComponentsSessionDropdown) { - SessionDropdown = _flarumComponentsSessionDropdown.default; - }, function (_flarumComponentsDropdown) { - Dropdown = _flarumComponentsDropdown.default; - }, function (_flarumComponentsIndexPage) { - IndexPage = _flarumComponentsIndexPage.default; - }, function (_flarumHelpersListItems) { - listItems = _flarumHelpersListItems.default; - }, function (_flarumUtilsItemList) { - ItemList = _flarumUtilsItemList.default; - }, function (_flarumComponentsButton) { - Button = _flarumComponentsButton.default; - }, function (_flarumComponentsLinkButton) { - LinkButton = _flarumComponentsLinkButton.default; - }, function (_flarumComponentsSelectDropdown) { - SelectDropdown = _flarumComponentsSelectDropdown.default; - }, function (_flarumTagsHelpersTagLabel) { - tagLabel = _flarumTagsHelpersTagLabel.default; - }, function (_flarumTagsUtilsSortTags) { - sortTags = _flarumTagsUtilsSortTags.default; - }, function (_flarumTagsComponentsTagsPage) { - TagsPage = _flarumTagsComponentsTagsPage.default; - }, function (_flarumHelpersHumanTime) { - humanTime = _flarumHelpersHumanTime.default; - }, function (_flarumHelpersIcon) { - icon = _flarumHelpersIcon.default; - }, function (_flarumHelpersAvatar) { - avatar = _flarumHelpersAvatar.default; - }, function (_flarumHelpersUsername) { - username = _flarumHelpersUsername.default; - }, function (_romanzpolskiShawThemeListInline) { - listInline = _romanzpolskiShawThemeListInline.default; - }], - execute: function () { - - app.initializers.add('romanzpolski/shawTheme', function () { - - SessionDropdown.prototype.getButtonContent = function () { - var user = app.session.user; - var attrs = {}; - attrs.style = { background: '#000' }; - return [m( - 'span', - { className: 'Button-label' }, - username(user) - ), avatar(user), ' ']; - }; - - IndexPage.prototype.viewItems = function () { - var _this = this; - - var items = new ItemList(); - var sortMap = app.cache.discussionList.sortMap(); - - var sortOptions = {}; - for (var i in sortMap) { - sortOptions[i] = app.translator.trans('core.forum.index_sort.' + i + '_button'); - } - - items.add('sort', listInline.component({ - buttonClassName: 'Button', - label: sortOptions[this.params().sort] || Object.keys(sortMap).map(function (key) { - return sortOptions[key]; - })[0], - children: Object.keys(sortOptions).map(function (value) { - var label = sortOptions[value]; - var active = (_this.params().sort || Object.keys(sortMap)[0]) === value; - - return Button.component({ - className: 'Button', - children: label, - icon: active ? 'check' : true, - onclick: _this.changeSort.bind(_this, value), - active: active - }); - }) - })); - - return items; - }; - - IndexPage.prototype.sidebarItems = function () { - var items = new ItemList(); - var canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user; - - items.add('newDiscussion', Button.component({ - children: app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button'), - icon: 'edit', - className: 'Button Button--primary IndexPage-newDiscussion', - itemClassName: 'App-primaryControl', - onclick: this.newDiscussion.bind(this), - disabled: !canStartDiscussion - })); - - items.add('nav', SelectDropdown.component({ - children: this.navItems(this).toArray(), - buttonClassName: 'Button', - className: 'App-titleControl' - })); - return items; - }; - - TagsPage.prototype.view = function () { - var pinned = this.tags.filter(function (tag) { - return tag.position() !== null; - }); - var cloud = this.tags.filter(function (tag) { - return tag.position() === null; - }); - - return m( - 'div', - { className: 'TagsPage' }, - IndexPage.prototype.hero(), - m( - 'div', - { className: 'container' }, - m( - 'nav', - { className: 'TagsPage-nav IndexPage-nav sideNav', config: IndexPage.prototype.affixSidebar }, - m( - 'ul', - null, - listItems(IndexPage.prototype.sidebarItems().toArray()) - ) - ), - m( - 'div', - { className: 'TagsPage-content sideNavOffset' }, - m( - 'ul', - { className: 'TagTiles' }, - pinned.map(function (tag) { - var lastDiscussion = tag.lastDiscussion(); - var children = sortTags(app.store.all('tags').filter(function (child) { - return child.parent() === tag; - })); - return m( - 'li', - { className: 'TagTile bgImg ' + tag.data.attributes.slug + (tag.color() ? ' colored' : ''), - style: { backgroundColor: tag.color() } }, - m( - 'a', - { className: 'TagTile-info', href: app.route.tag(tag), config: m.route }, - m( - 'h3', - { className: 'TagTile-name' }, - tag.name() - ), - m( - 'p', - { className: 'TagTile-description' }, - tag.description() - ), - children ? m( - 'div', - { className: 'TagTile-children' }, - children.map(function (child) { - return [m( - 'a', - { href: app.route.tag(child), config: function config(element, isInitialized) { - if (isInitialized) return; - $(element).on('click', function (e) { - return e.stopPropagation(); - }); - m.route.apply(this, arguments); - } }, - child.name() - ), ' ']; - }) - ) : '' - ), - lastDiscussion ? m( - 'a', - { className: 'TagTile-lastDiscussion', - href: app.route.discussion(lastDiscussion, lastDiscussion.lastPostNumber()), - config: m.route }, - m( - 'span', - { className: 'TagTile-lastDiscussion-title' }, - lastDiscussion.title() - ), - humanTime(lastDiscussion.lastTime()) - ) : m('span', { className: 'TagTile-lastDiscussion' }) - ); - }) - ), - cloud.length ? m( - 'div', - { className: 'TagCloud' }, - cloud.map(function (tag) { - var color = tag.color(); - - return [tagLabel(tag, { link: true }), ' ']; - }) - ) : '' - ) - ) - ); - }; - - IndexPage.prototype.view = function () { - console.log(this.sidebarItems().toArray()); - // console.log(this.viewItems().toArray()); - return m( - 'div', - { className: 'IndexPage' }, - this.hero(), - m( - 'div', - { className: 'container' }, - m( - 'nav', - { className: 'IndexPage-nav sideNav' }, - m( - 'ul', - null, - listItems(this.sidebarItems().toArray()) - ) - ), - m( - 'div', - { className: 'IndexPage-results sideNavOffset' }, - m( - 'div', - { className: 'IndexPage-toolbar' }, - m( - 'ul', - { className: 'IndexPage-toolbar-view kutas' }, - listItems(this.viewItems().toArray()) - ), - m( - 'ul', - { className: 'IndexPage-toolbar-action' }, - listItems(this.actionItems().toArray()) - ) - ), - app.cache.discussionList.render() - ) - ) - ); - }; - - /* extend(Post.prototype, 'view', function(vdom) { - // vdom.children.push('

this is some stuff to add after each post

'); - vdom.attrs.style = 'background-color: #fafafa; border-bottom: 1px solid #000'; - });*/ - }); - } - }; -});; -'use strict'; - -System.register('romanzpolski/shawTheme/newComponent', ['flarum/extend', 'flarum/Component', 'flarum/helpers/listItems'], function (_export, _context) { - "use strict"; - - var extend, Component, listItems, NewComponent; - return { - setters: [function (_flarumExtend) { - extend = _flarumExtend.extend; - }, function (_flarumComponent) { - Component = _flarumComponent.default; - }, function (_flarumHelpersListItems) { - listItems = _flarumHelpersListItems.default; - }], - execute: function () { - NewComponent = function (_Component) { - babelHelpers.inherits(NewComponent, _Component); - - function NewComponent() { - babelHelpers.classCallCheck(this, NewComponent); - return babelHelpers.possibleConstructorReturn(this, (NewComponent.__proto__ || Object.getPrototypeOf(NewComponent)).apply(this, arguments)); - } - - babelHelpers.createClass(NewComponent, [{ - key: 'init', - value: function init() { - this.showing = false; - } - }, { - key: 'view', - value: function view() { - var items = this.props.children ? listItems(this.props.children) : []; - - return m( - 'div', - { className: 'viewNavInline ' + this.props.className + ' itemCount' + items.length + (this.showing ? ' open' : '') }, - this.getMenu(items) - ); - } - }, { - key: 'getMenu', - value: function getMenu(items) { - return m( - 'ul', - { className: 'listInline ' + this.props.menuClassName }, - items - ); - } - }], [{ - key: 'initProps', - value: function initProps(props) { - babelHelpers.get(NewComponent.__proto__ || Object.getPrototypeOf(NewComponent), 'initProps', this).call(this, props); - props.className = props.className || ''; - props.buttonClassName = props.buttonClassName || ''; - props.menuClassName = props.menuClassName || ''; - props.label = props.label || ''; - props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'caret-down'; - } - }]); - return NewComponent; - }(Component); - - _export('default', NewComponent); - } - }; -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/babylon b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/babylon deleted file mode 120000 index c2adc01..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../babylon/bin/babylon.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/gulp b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/gulp deleted file mode 120000 index 5de7332..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/gulp +++ /dev/null @@ -1 +0,0 @@ -../gulp/bin/gulp.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/jsesc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/jsesc deleted file mode 120000 index 7237604..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/jsesc +++ /dev/null @@ -1 +0,0 @@ -../jsesc/bin/jsesc \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/json5 b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/json5 deleted file mode 120000 index 217f379..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/json5 +++ /dev/null @@ -1 +0,0 @@ -../json5/lib/cli.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/loose-envify b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/loose-envify deleted file mode 120000 index ed9009c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/loose-envify +++ /dev/null @@ -1 +0,0 @@ -../loose-envify/cli.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/mkdirp b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/mkdirp deleted file mode 120000 index 017896c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/regjsparser b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/regjsparser deleted file mode 120000 index 91cec77..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/regjsparser +++ /dev/null @@ -1 +0,0 @@ -../regjsparser/bin/parser \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/semver b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/semver deleted file mode 120000 index 317eb29..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/strip-indent b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/strip-indent deleted file mode 120000 index dddee7e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/strip-indent +++ /dev/null @@ -1 +0,0 @@ -../strip-indent/cli.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/user-home b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/user-home deleted file mode 120000 index d72d76b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/user-home +++ /dev/null @@ -1 +0,0 @@ -../user-home/cli.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/which b/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/which deleted file mode 120000 index f62471c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/index.js deleted file mode 100644 index b9574ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/package.json deleted file mode 100644 index 8d4b010..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "_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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/has-ansi" - ] - ], - "_from": "ansi-regex@>=2.0.0 <3.0.0", - "_id": "ansi-regex@2.1.1", - "_inCache": true, - "_location": "/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": [ - "/has-ansi", - "/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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/readme.md deleted file mode 100644 index 6a928ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# 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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/index.js deleted file mode 100644 index 7894527..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,65 +0,0 @@ -'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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/package.json deleted file mode 100644 index c4f0332..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/chalk" - ] - ], - "_from": "ansi-styles@>=2.2.1 <3.0.0", - "_id": "ansi-styles@2.2.1", - "_inCache": true, - "_location": "/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": [ - "/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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/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/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3f933f6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# 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/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/beep.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/beep.js deleted file mode 100644 index 9c07047..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/beep.js +++ /dev/null @@ -1,24 +0,0 @@ -var archy = require('../'); -var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party\ntime!' - ] - } - ] -}); -console.log(s); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/multi_line.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/multi_line.js deleted file mode 100644 index 8afdfad..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/examples/multi_line.js +++ /dev/null @@ -1,25 +0,0 @@ -var archy = require('../'); - -var s = archy({ - label : 'beep\none\ntwo', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O\nwheee', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny\nmeat' ] - }, - 'creature' - ] - }, - 'party\ntime!' - ] - } - ] -}); -console.log(s); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/index.js deleted file mode 100644 index 869d64e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/index.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = function archy (obj, prefix, opts) { - if (prefix === undefined) prefix = ''; - if (!opts) opts = {}; - var chr = function (s) { - var chars = { - '│' : '|', - '└' : '`', - '├' : '+', - '─' : '-', - '┬' : '-' - }; - return opts.unicode === false ? chars[s] : s; - }; - - if (typeof obj === 'string') obj = { label : obj }; - - var nodes = obj.nodes || []; - var lines = (obj.label || '').split('\n'); - var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; - - return prefix - + lines.join(splitter) + '\n' - + nodes.map(function (node, ix) { - var last = ix === nodes.length - 1; - var more = node.nodes && node.nodes.length; - var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; - - return prefix - + (last ? chr('└') : chr('├')) + chr('─') - + (more ? chr('┬') : chr('─')) + ' ' - + archy(node, prefix_, opts).slice(prefix.length + 2) - ; - }).join('') - ; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/package.json deleted file mode 100644 index cac2782..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "archy@^1.0.0", - "scope": null, - "escapedName": "archy", - "name": "archy", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp" - ] - ], - "_from": "archy@>=1.0.0 <2.0.0", - "_id": "archy@1.0.0", - "_inCache": true, - "_location": "/archy", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "_npmVersion": "1.4.25", - "_phantomChildren": {}, - "_requested": { - "raw": "archy@^1.0.0", - "scope": null, - "escapedName": "archy", - "name": "archy", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp" - ], - "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", - "_shrinkwrap": null, - "_spec": "archy@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-archy/issues" - }, - "dependencies": {}, - "description": "render nested hierarchies `npm ls` style with unicode pipes", - "devDependencies": { - "tap": "~0.3.3", - "tape": "~0.1.1" - }, - "directories": {}, - "dist": { - "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", - "tarball": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" - }, - "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84", - "homepage": "https://github.com/substack/node-archy", - "keywords": [ - "hierarchy", - "npm ls", - "unicode", - "pretty", - "print" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "name": "archy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/node-archy.git" - }, - "scripts": { - "test": "tap test" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "iexplore": [ - "6.0", - "7.0", - "8.0", - "9.0" - ], - "chrome": [ - "20.0" - ], - "firefox": [ - "10.0", - "15.0" - ], - "safari": [ - "5.1" - ], - "opera": [ - "12.0" - ] - } - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/readme.markdown b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/readme.markdown deleted file mode 100644 index ef7a5cf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/readme.markdown +++ /dev/null @@ -1,88 +0,0 @@ -# archy - -Render nested hierarchies `npm ls` style with unicode pipes. - -[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) - -[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) - -# example - -``` js -var archy = require('archy'); -var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party\ntime!' - ] - } - ] -}); -console.log(s); -``` - -output - -``` -beep -├── ity -└─┬ boop - ├─┬ o_O - │ ├─┬ oh - │ │ ├── hello - │ │ └── puny - │ └── human - └── party - time! -``` - -# methods - -var archy = require('archy') - -## archy(obj, prefix='', opts={}) - -Return a string representation of `obj` with unicode pipe characters like how -`npm ls` looks. - -`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields. -`'label'` is a string of text to display at a node level and `'nodes'` is an -array of the descendents of the current node. - -If a node is a string, that string will be used as the `'label'` and an empty -array of `'nodes'` will be used. - -`prefix` gets prepended to all the lines and is used by the algorithm to -recursively update. - -If `'label'` has newlines they will be indented at the present indentation level -with the current prefix. - -To disable unicode results in favor of all-ansi output set `opts.unicode` to -`false`. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install archy -``` - -# license - -MIT diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/beep.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/beep.js deleted file mode 100644 index 4ea74f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/beep.js +++ /dev/null @@ -1,40 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('beep', function (t) { - var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party!' - ] - } - ] - }); - t.equal(s, [ - 'beep', - '├── ity', - '└─┬ boop', - ' ├─┬ o_O', - ' │ ├─┬ oh', - ' │ │ ├── hello', - ' │ │ └── puny', - ' │ └── human', - ' └── party!', - '' - ].join('\n')); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/multi_line.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/multi_line.js deleted file mode 100644 index 2cf2154..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/multi_line.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('multi-line', function (t) { - var s = archy({ - label : 'beep\none\ntwo', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O\nwheee', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny\nmeat' ] - }, - 'creature' - ] - }, - 'party\ntime!' - ] - } - ] - }); - t.equal(s, [ - 'beep', - '│ one', - '│ two', - '├── ity', - '└─┬ boop', - ' ├─┬ o_O', - ' │ │ wheee', - ' │ ├─┬ oh', - ' │ │ ├── hello', - ' │ │ └── puny', - ' │ │ meat', - ' │ └── creature', - ' └── party', - ' time!', - '' - ].join('\n')); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/non_unicode.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/non_unicode.js deleted file mode 100644 index 7204d33..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/archy/test/non_unicode.js +++ /dev/null @@ -1,40 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('beep', function (t) { - var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party!' - ] - } - ] - }, '', { unicode : false }); - t.equal(s, [ - 'beep', - '+-- ity', - '`-- boop', - ' +-- o_O', - ' | +-- oh', - ' | | +-- hello', - ' | | `-- puny', - ' | `-- human', - ' `-- party!', - '' - ].join('\n')); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/LICENSE deleted file mode 100755 index fa30c4c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/README.md deleted file mode 100644 index 7705c6c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) - -> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i arr-diff --save -``` -Install with [bower](http://bower.io/) - -```sh -$ bower install arr-diff --save -``` - -## API - -### [diff](index.js#L33) - -Return the difference between the first array and additional arrays. - -**Params** - -* `a` **{Array}** -* `b` **{Array}** -* `returns` **{Array}** - -**Example** - -```js -var diff = require('arr-diff'); - -var a = ['a', 'b', 'c', 'd']; -var b = ['b', 'c']; - -console.log(diff(a, b)) -//=> ['a', 'd'] -``` - -## Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) -* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter) -* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) -Released under the MIT license. - -*** - -_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/index.js deleted file mode 100644 index bc7200d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/index.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * arr-diff - * - * Copyright (c) 2014 Jon Schlinkert, contributors. - * Licensed under the MIT License - */ - -'use strict'; - -var flatten = require('arr-flatten'); -var slice = [].slice; - -/** - * Return the difference between the first array and - * additional arrays. - * - * ```js - * var diff = require('{%= name %}'); - * - * var a = ['a', 'b', 'c', 'd']; - * var b = ['b', 'c']; - * - * console.log(diff(a, b)) - * //=> ['a', 'd'] - * ``` - * - * @param {Array} `a` - * @param {Array} `b` - * @return {Array} - * @api public - */ - -function diff(arr, arrays) { - var argsLen = arguments.length; - var len = arr.length, i = -1; - var res = [], arrays; - - if (argsLen === 1) { - return arr; - } - - if (argsLen > 2) { - arrays = flatten(slice.call(arguments, 1)); - } - - while (++i < len) { - if (!~arrays.indexOf(arr[i])) { - res.push(arr[i]); - } - } - return res; -} - -/** - * Expose `diff` - */ - -module.exports = diff; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/package.json deleted file mode 100644 index 4e332d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "arr-diff@^2.0.0", - "scope": null, - "escapedName": "arr-diff", - "name": "arr-diff", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch" - ] - ], - "_from": "arr-diff@>=2.0.0 <3.0.0", - "_id": "arr-diff@2.0.0", - "_inCache": true, - "_location": "/arr-diff", - "_nodeVersion": "5.0.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "raw": "arr-diff@^2.0.0", - "scope": null, - "escapedName": "arr-diff", - "name": "arr-diff", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", - "_shrinkwrap": null, - "_spec": "arr-diff@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/arr-diff/issues" - }, - "dependencies": { - "arr-flatten": "^1.0.1" - }, - "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", - "devDependencies": { - "array-differ": "^1.0.0", - "array-slice": "^0.2.3", - "benchmarked": "^0.1.4", - "chalk": "^1.1.1", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", - "tarball": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27", - "homepage": "https://github.com/jonschlinkert/arr-diff", - "keywords": [ - "arr", - "array", - "diff", - "differ", - "difference" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "paulmillr", - "email": "paul@paulmillr.com" - } - ], - "name": "arr-diff", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/arr-diff.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "arr-flatten", - "array-filter", - "array-intersection" - ] - } - }, - "version": "2.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/LICENSE deleted file mode 100755 index 3f2eca1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/README.md deleted file mode 100755 index 7dc7a97..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten) - -> Recursively flatten an array or arrays. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save arr-flatten -``` - -## Install - -Install with [bower](https://bower.io/) - -```sh -$ bower install arr-flatten --save -``` - -## Usage - -```js -var flatten = require('arr-flatten'); - -flatten(['a', ['b', ['c']], 'd', ['e']]); -//=> ['a', 'b', 'c', 'd', 'e'] -``` - -## Why another flatten utility? - -I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. - -## About - -### Related projects - -* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") -* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") -* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") -* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 20 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [lukeed](https://github.com/lukeed) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/index.js deleted file mode 100644 index 0cb4ea4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * arr-flatten - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function (arr) { - return flat(arr, []); -}; - -function flat(arr, res) { - var i = 0, cur; - var len = arr.length; - for (; i < len; i++) { - cur = arr[i]; - Array.isArray(cur) ? flat(cur, res) : res.push(cur); - } - return res; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/package.json deleted file mode 100644 index 0bf0034..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-flatten/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "arr-flatten@^1.0.1", - "scope": null, - "escapedName": "arr-flatten", - "name": "arr-flatten", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff" - ] - ], - "_from": "arr-flatten@>=1.0.1 <2.0.0", - "_id": "arr-flatten@1.1.0", - "_inCache": true, - "_location": "/arr-flatten", - "_nodeVersion": "7.7.3", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/arr-flatten-1.1.0.tgz_1499280630530_0.4138362631201744" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "5.0.4", - "_phantomChildren": {}, - "_requested": { - "raw": "arr-flatten@^1.0.1", - "scope": null, - "escapedName": "arr-flatten", - "name": "arr-flatten", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/arr-diff" - ], - "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1", - "_shrinkwrap": null, - "_spec": "arr-flatten@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/arr-diff", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/arr-flatten/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Luke Edwards", - "url": "https://lukeed.com" - } - ], - "dependencies": {}, - "description": "Recursively flatten an array or arrays.", - "devDependencies": { - "ansi-bold": "^0.1.1", - "array-flatten": "^2.1.1", - "array-slice": "^1.0.0", - "benchmarked": "^1.0.0", - "compute-flatten": "^1.0.0", - "flatit": "^1.1.1", - "flatten": "^1.0.2", - "flatten-array": "^1.0.0", - "glob": "^7.1.1", - "gulp-format-md": "^0.1.12", - "just-flatten-it": "^1.1.23", - "lodash.flattendeep": "^4.4.0", - "m_flattened": "^1.0.1", - "mocha": "^3.2.0", - "utils-flatten": "^1.0.0", - "write": "^0.3.3" - }, - "directories": {}, - "dist": { - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1", - "tarball": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "76a1ae28b03fdb1cbe5d49fa521bc4807b9f94d3", - "homepage": "https://github.com/jonschlinkert/arr-flatten", - "keywords": [ - "arr", - "array", - "elements", - "flat", - "flatten", - "nested", - "recurse", - "recursive", - "recursively" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "arr-flatten", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/arr-flatten.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-filter", - "arr-union", - "array-each", - "array-unique" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "1.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/index.js deleted file mode 100644 index fbe2ed2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -module.exports = function (arr) { - var rest = [].concat.apply([], [].slice.call(arguments, 1)); - return arr.filter(function (el) { - return rest.indexOf(el) === -1; - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/package.json deleted file mode 100644 index 0c52250..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "array-differ@^1.0.0", - "scope": null, - "escapedName": "array-differ", - "name": "array-differ", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "array-differ@>=1.0.0 <2.0.0", - "_id": "array-differ@1.0.0", - "_inCache": true, - "_location": "/array-differ", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.14", - "_phantomChildren": {}, - "_requested": { - "raw": "array-differ@^1.0.0", - "scope": null, - "escapedName": "array-differ", - "name": "array-differ", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "_shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031", - "_shrinkwrap": null, - "_spec": "array-differ@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/array-differ/issues" - }, - "dependencies": {}, - "description": "Create an array with values that are present in the first input array but not additional ones", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031", - "tarball": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "e91802976c4710eef8dea2090d48e48525cf41b1", - "homepage": "https://github.com/sindresorhus/array-differ", - "keywords": [ - "array", - "difference", - "diff", - "differ", - "filter", - "exclude" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "array-differ", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/array-differ.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/readme.md deleted file mode 100644 index 68f5d36..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-differ/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# array-differ [![Build Status](https://travis-ci.org/sindresorhus/array-differ.svg?branch=master)](https://travis-ci.org/sindresorhus/array-differ) - -> Create an array with values that are present in the first input array but not additional ones - - -## Install - -```sh -$ npm install --save array-differ -``` - - -## Usage - -```js -var arrayDiffer = require('array-differ'); - -arrayDiffer([2, 3, 4], [3, 50]); -//=> [2, 4] -``` - -## API - -### arrayDiffer(input, values, [values, ...]) - -Returns the new array. - -#### input - -Type: `array` - -#### values - -Type: `array` - -Arrays of values to exclude. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/LICENSE deleted file mode 100644 index ec85897..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, 2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/README.md deleted file mode 100644 index e8602a1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# array-each [![NPM version](https://img.shields.io/npm/v/array-each.svg?style=flat)](https://www.npmjs.com/package/array-each) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![NPM total downloads](https://img.shields.io/npm/dt/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-each.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-each) - -> Loop over each item in an array and call the given function on every element. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save array-each -``` - -## Usage - -### [each](index.js#L34) - -Loop over each item in an array and call the given function on every element. - -**Params** - -* `array` **{Array}** -* `fn` **{Function}** -* `thisArg` **{Object}**: (optional) pass a `thisArg` to be used as the context in which to call the function. -* `returns` **{undefined}** - -**Example** - -```js -each(['a', 'b', 'c'], function(ele) { - return ele + ele; -}); -//=> ['aa', 'bb', 'cc'] - -each(['a', 'b', 'c'], function(ele, i) { - return i + ele; -}); -//=> ['0a', '1b', '2c'] -``` - -## About - -### Related projects - -* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") -* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") -* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/index.js deleted file mode 100644 index 12afef4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/index.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * array-each - * - * Copyright (c) 2015, 2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -/** - * Loop over each item in an array and call the given function on every element. - * - * ```js - * each(['a', 'b', 'c'], function(ele) { - * return ele + ele; - * }); - * //=> ['aa', 'bb', 'cc'] - * - * each(['a', 'b', 'c'], function(ele, i) { - * return i + ele; - * }); - * //=> ['0a', '1b', '2c'] - * ``` - * - * @name each - * @alias forEach - * @param {Array} `array` - * @param {Function} `fn` - * @param {Object} `thisArg` (optional) pass a `thisArg` to be used as the context in which to call the function. - * @return {undefined} - * @api public - */ - -module.exports = function each(arr, cb, thisArg) { - if (arr == null) return; - - var len = arr.length; - var idx = -1; - - while (++idx < len) { - var ele = arr[idx]; - if (cb.call(thisArg, ele, idx, arr) === false) { - break; - } - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/package.json deleted file mode 100644 index 84859e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-each/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "array-each@^1.0.1", - "scope": null, - "escapedName": "array-each", - "name": "array-each", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.defaults" - ] - ], - "_from": "array-each@>=1.0.1 <2.0.0", - "_id": "array-each@1.0.1", - "_inCache": true, - "_location": "/array-each", - "_nodeVersion": "7.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/array-each-1.0.1.tgz_1488156048457_0.42185514722950757" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.1.2", - "_phantomChildren": {}, - "_requested": { - "raw": "array-each@^1.0.1", - "scope": null, - "escapedName": "array-each", - "name": "array-each", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/object.defaults" - ], - "_resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "_shasum": "a794af0c05ab1752846ee753a1f211a05ba0c44f", - "_shrinkwrap": null, - "_spec": "array-each@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.defaults", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/array-each/issues" - }, - "dependencies": {}, - "description": "Loop over each item in an array and call the given function on every element.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "directories": {}, - "dist": { - "shasum": "a794af0c05ab1752846ee753a1f211a05ba0c44f", - "tarball": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "a752d70897f25abfd38bfb51bb1b3a06ffcd2aed", - "homepage": "https://github.com/jonschlinkert/array-each", - "keywords": [ - "array", - "each" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "array-each", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/array-each.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "collection-map", - "arr-filter", - "arr-map" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "1.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/index.js deleted file mode 100644 index e2dcd9a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -'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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/package.json deleted file mode 100644 index b65ad52..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/currently-unhandled" - ] - ], - "_from": "array-find-index@>=1.0.1 <2.0.0", - "_id": "array-find-index@1.0.2", - "_inCache": true, - "_location": "/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": [ - "/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/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/readme.md deleted file mode 100644 index 3166341..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-find-index/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/LICENSE deleted file mode 100755 index d290fe0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, 2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/README.md deleted file mode 100755 index b65f79b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# array-slice [![NPM version](https://img.shields.io/npm/v/array-slice.svg?style=flat)](https://www.npmjs.com/package/array-slice) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![NPM total downloads](https://img.shields.io/npm/dt/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-slice.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-slice) - -> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save array-slice -``` - -This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned. This is also faster than native slice in some cases. - -## Usage - -```js -var slice = require('array-slice'); -var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; - -slice(arr, 3, 6); -//=> ['e', 'f', 'g'] -``` - -## About - -### Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") -* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") -* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor "Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in all given arrays and not in their intersections).") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 02, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/index.js deleted file mode 100755 index 6adb0b0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * array-slice - * - * Copyright (c) 2014-2015, 2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function slice(arr, start, end) { - var len = arr.length; - var range = []; - - start = idx(arr, start); - end = idx(arr, end, len); - - while (start < end) { - range.push(arr[start++]); - } - return range; -}; - -function idx(arr, pos, end) { - var len = arr.length; - - if (pos == null) { - pos = end || 0; - } else if (pos < 0) { - pos = Math.max(len + pos, 0); - } else { - pos = Math.min(pos, len); - } - - return pos; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/package.json deleted file mode 100644 index 77048c1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-slice/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "array-slice@^1.0.0", - "scope": null, - "escapedName": "array-slice", - "name": "array-slice", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.defaults" - ] - ], - "_from": "array-slice@>=1.0.0 <2.0.0", - "_id": "array-slice@1.0.0", - "_inCache": true, - "_location": "/array-slice", - "_nodeVersion": "7.6.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/array-slice-1.0.0.tgz_1488482499689_0.4508651338983327" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.1.2", - "_phantomChildren": {}, - "_requested": { - "raw": "array-slice@^1.0.0", - "scope": null, - "escapedName": "array-slice", - "name": "array-slice", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/object.defaults" - ], - "_resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", - "_shasum": "e73034f00dcc1f40876008fd20feae77bd4b7c2f", - "_shrinkwrap": null, - "_spec": "array-slice@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.defaults", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/array-slice/issues" - }, - "dependencies": {}, - "description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "directories": {}, - "dist": { - "shasum": "e73034f00dcc1f40876008fd20feae77bd4b7c2f", - "tarball": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "834333ad84ed4d354532d43350a8b9cd48b5751b", - "homepage": "https://github.com/jonschlinkert/array-slice", - "keywords": [ - "array", - "javascript", - "js", - "slice", - "util", - "utils" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "array-slice", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/array-slice.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-flatten", - "array-unique", - "array-xor" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/index.js deleted file mode 100644 index edd09f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/package.json deleted file mode 100644 index 4c8cf2e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "array-uniq@^1.0.2", - "scope": null, - "escapedName": "array-uniq", - "name": "array-uniq", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "array-uniq@>=1.0.2 <2.0.0", - "_id": "array-uniq@1.0.3", - "_inCache": true, - "_location": "/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.2", - "scope": null, - "escapedName": "array-uniq", - "name": "array-uniq", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", - "_shrinkwrap": null, - "_spec": "array-uniq@^1.0.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/readme.md deleted file mode 100644 index f0bd98c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-uniq/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/LICENSE deleted file mode 100755 index fa30c4c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/README.md deleted file mode 100755 index 2e28774..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique) - -> Return an array free of duplicate values. Fastest ES5 implementation. - -## Install with [npm](npmjs.org) - -```bash -npm i array-unique --save -``` - -## Usage - -```js -var unique = require('array-unique'); - -unique(['a', 'b', 'c', 'c']); -//=> ['a', 'b', 'c'] -``` - -## Related -* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. -* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons. -* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. -* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements. -* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map. -* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection. - -## Run tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/index.js deleted file mode 100755 index 7fa75af..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! - * array-unique - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -module.exports = function unique(arr) { - if (!Array.isArray(arr)) { - throw new TypeError('array-unique expects an array.'); - } - - var len = arr.length; - var i = -1; - - while (i++ < len) { - var j = i + 1; - - for (; j < arr.length; ++j) { - if (arr[i] === arr[j]) { - arr.splice(j--, 1); - } - } - } - return arr; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/package.json deleted file mode 100755 index 3fc57eb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/array-unique/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "array-unique@^0.2.1", - "scope": null, - "escapedName": "array-unique", - "name": "array-unique", - "rawSpec": "^0.2.1", - "spec": ">=0.2.1 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch" - ] - ], - "_from": "array-unique@>=0.2.1 <0.3.0", - "_id": "array-unique@0.2.1", - "_inCache": true, - "_location": "/array-unique", - "_nodeVersion": "1.6.2", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "2.7.1", - "_phantomChildren": {}, - "_requested": { - "raw": "array-unique@^0.2.1", - "scope": null, - "escapedName": "array-unique", - "name": "array-unique", - "rawSpec": "^0.2.1", - "spec": ">=0.2.1 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "_shrinkwrap": null, - "_spec": "array-unique@^0.2.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/array-unique/issues" - }, - "dependencies": {}, - "description": "Return an array free of duplicate values. Fastest ES5 implementation.", - "devDependencies": { - "array-uniq": "^1.0.2", - "benchmarked": "^0.1.3", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "tarball": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85", - "homepage": "https://github.com/jonschlinkert/array-unique", - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "array-unique", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/array-unique.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.2.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/README.md deleted file mode 100644 index 7ef5368..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# babel-code-frame - -> Generate errors that contain a code frame that point to source locations. - -## Install - -```sh -npm install --save-dev babel-code-frame -``` - -## Usage - -```js -import codeFrame from 'babel-code-frame'; - -const rawLines = `class Foo { - constructor() -}`; -const lineNumber = 2; -const colNumber = 16; - -const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ }); - -console.log(result); -``` - -```sh - 1 | class Foo { -> 2 | constructor() - | ^ - 3 | } -``` - -If the column number is not known, you may pass `null` instead. - -## Options - -### `highlightCode` - -`boolean`, defaults to `false`. - -Toggles syntax highlighting the code as JavaScript for terminals. - -### `linesAbove` - -`number`, defaults to `2`. - -Adjust the number of lines to show above the error. - -### `linesBelow` - -`number`, defaults to `3`. - -Adjust the number of lines to show below the error. - -### `forceColor` - -`boolean`, defaults to `false`. - -Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/lib/index.js deleted file mode 100644 index ff49b90..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-code-frame/lib/index.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (rawLines, lineNumber, colNumber) { - var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - colNumber = Math.max(colNumber, 0); - - var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; - var chalk = _chalk2.default; - if (opts.forceColor) { - chalk = new _chalk2.default.constructor({ enabled: true }); - } - var maybeHighlight = function maybeHighlight(chalkFn, string) { - return highlighted ? chalkFn(string) : string; - }; - var defs = getDefs(chalk); - if (highlighted) rawLines = highlight(defs, rawLines); - - var linesAbove = opts.linesAbove || 2; - var linesBelow = opts.linesBelow || 3; - - var lines = rawLines.split(NEWLINE); - var start = Math.max(lineNumber - (linesAbove + 1), 0); - var end = Math.min(lines.length, lineNumber + linesBelow); - - if (!lineNumber && !colNumber) { - start = 0; - end = lines.length; - } - - var numberMaxWidth = String(end).length; - - var frame = lines.slice(start, end).map(function (line, index) { - var number = start + 1 + index; - var paddedNumber = (" " + number).slice(-numberMaxWidth); - var gutter = " " + paddedNumber + " | "; - if (number === lineNumber) { - var markerLine = ""; - if (colNumber) { - var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " "); - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join(""); - } - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return " " + maybeHighlight(defs.gutter, gutter) + line; - } - }).join("\n"); - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } -}; - -var _jsTokens = require("js-tokens"); - -var _jsTokens2 = _interopRequireDefault(_jsTokens); - -var _esutils = require("esutils"); - -var _esutils2 = _interopRequireDefault(_esutils); - -var _chalk = require("chalk"); - -var _chalk2 = _interopRequireDefault(_chalk); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsx_tag: chalk.yellow, - punctuator: chalk.yellow, - - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold, - gutter: chalk.grey, - marker: chalk.red.bold - }; -} - -var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - -var JSX_TAG = /^[a-z][\w-]*$/i; - -var BRACKET = /^[()\[\]{}]$/; - -function getTokenType(match) { - var _match$slice = match.slice(-2), - offset = _match$slice[0], - text = _match$slice[1]; - - var token = (0, _jsTokens.matchToToken)(match); - - if (token.type === "name") { - if (_esutils2.default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-code-frame@>=6.26.0 <7.0.0", - "_id": "babel-code-frame@6.26.0", - "_inCache": true, - "_location": "/babel-code-frame", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-code-frame-6.26.0.tgz_1502898849653_0.8458143274765462" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-code-frame@^6.26.0", - "scope": null, - "escapedName": "babel-code-frame", - "name": "babel-code-frame", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-traverse" - ], - "_resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "_shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b", - "_shrinkwrap": null, - "_spec": "babel-code-frame@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "description": "Generate errors that contain a code frame that point to source locations.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b", - "tarball": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-code-frame", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/README.md deleted file mode 100644 index ebff1f1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# babel-core - -> Babel compiler core. - - -```javascript -var babel = require("babel-core"); -import { transform } from 'babel-core'; -import * as babel from 'babel-core'; -``` - -All transformations will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it. - -## babel.transform(code: string, [options?](#options): Object) - -Transforms the passed in `code`. Returning an object with the generated code, -source map, and AST. - -```js -babel.transform(code, options) // => { code, map, ast } -``` - -**Example** - -```js -var result = babel.transform("code();", options); -result.code; -result.map; -result.ast; -``` - -## babel.transformFile(filename: string, [options?](#options): Object, callback: Function) - -Asynchronously transforms the entire contents of a file. - -```js -babel.transformFile(filename, options, callback) -``` - -**Example** - -```js -babel.transformFile("filename.js", options, function (err, result) { - result; // => { code, map, ast } -}); -``` - -## babel.transformFileSync(filename: string, [options?](#options): Object) - -Synchronous version of `babel.transformFile`. Returns the transformed contents of -the `filename`. - -```js -babel.transformFileSync(filename, options) // => { code, map, ast } -``` - -**Example** - -```js -babel.transformFileSync("filename.js", options).code; -``` - -## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object) - -Given, an [AST](https://astexplorer.net/), transform it. - -```js -const code = "if (true) return;"; -const ast = babylon.parse(code, { allowReturnOutsideFunction: true }); -const { code, map, ast } = babel.transformFromAst(ast, code, options); -``` - -## Options - -
-

Babel CLI

-

- You can pass these options from the Babel CLI like so: -

-

- babel --name=value -

-
- -Following is a table of the options you can use: - -| Option | Default | Description | -| ------------------------ | -------------------- | ------------------------------- | -| `ast` | `true` | Include the AST in the returned object | -| `auxiliaryCommentAfter` | `null` | Attach a comment after all non-user injected code. | -| `auxiliaryCommentBefore` | `null` | Attach a comment before all non-user injected code. | -| `babelrc` | `true` | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc). | -| `code` | `true` | Enable code generation | -| `comments` | `true` | Output comments in generated output. | -| `compact` | `"auto"` | Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB. | -| `env` | `{}` | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the environment variable `BABEL_ENV` is set to `"production"`. If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `"development"` | -| `extends` | `null` | A path to an `.babelrc` file to extend | -| `filename` | `"unknown"` | Filename for use in errors etc. | -| `filenameRelative` | `(filename)` | Filename relative to `sourceRoot`. | -| `generatorOpts` | `{}` | An object containing the options to be passed down to the babel code generator, babel-generator | -| `getModuleId` | `null` | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used. | -| `highlightCode` | `true` | ANSI highlight syntax error code frames | -| `ignore` | `null` | Opposite to the `only` option. `ignore` is disregarded if `only` is specified. | -| `inputSourceMap` | `null` | A source map object that the output source map will be based on. | -| `minified` | `false` | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) | -| `moduleId` | `null` | Specify a custom name for module ids. | -| `moduleIds` | `false` | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) | -| `moduleRoot` | `(sourceRoot)` | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. | -| `only` | `null` | A [glob](https://github.com/isaacs/minimatch), regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. | -| `parserOpts` | `{}` | An object containing the options to be passed down to the babel parser, babylon | -| `plugins` | `[]` | List of [plugins](https://babeljs.io/docs/plugins/) to load and use. | -| `presets` | `[]` | List of [presets](https://babeljs.io/docs/plugins/#presets) (a set of plugins) to load and use. | -| `retainLines` | `false` | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) | -| `resolveModuleSource` | `null` | Resolve a module source ie. `import "SOURCE";` to a custom value. Called as `resolveModuleSource(source, filename)`. | -| `shouldPrintComment` | `null` | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used. | -| `sourceFileName` | `(filenameRelative)` | Set `sources[0]` on returned source map. | -| `sourceMaps` | `false` | If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option. | -| `sourceMapTarget` | `(filenameRelative)` | Set `file` on returned source map. | -| `sourceRoot` | `(moduleRoot)` | The root from which all sources are relative. | -| `sourceType` | `"module"` | Indicate the mode the code should be parsed in. Can be either "script" or "module". | -| `wrapPluginVisitorMethod`| `null` | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/index.js deleted file mode 100644 index e8f0477..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/api/node.js"); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/browser.js deleted file mode 100644 index 4d373d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/browser.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.transformFileSync = exports.transformFile = exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.Plugin = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined; - -var _node = require("./node"); - -Object.defineProperty(exports, "File", { - enumerable: true, - get: function get() { - return _node.File; - } -}); -Object.defineProperty(exports, "options", { - enumerable: true, - get: function get() { - return _node.options; - } -}); -Object.defineProperty(exports, "buildExternalHelpers", { - enumerable: true, - get: function get() { - return _node.buildExternalHelpers; - } -}); -Object.defineProperty(exports, "template", { - enumerable: true, - get: function get() { - return _node.template; - } -}); -Object.defineProperty(exports, "version", { - enumerable: true, - get: function get() { - return _node.version; - } -}); -Object.defineProperty(exports, "util", { - enumerable: true, - get: function get() { - return _node.util; - } -}); -Object.defineProperty(exports, "messages", { - enumerable: true, - get: function get() { - return _node.messages; - } -}); -Object.defineProperty(exports, "types", { - enumerable: true, - get: function get() { - return _node.types; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function get() { - return _node.traverse; - } -}); -Object.defineProperty(exports, "OptionManager", { - enumerable: true, - get: function get() { - return _node.OptionManager; - } -}); -Object.defineProperty(exports, "Plugin", { - enumerable: true, - get: function get() { - return _node.Plugin; - } -}); -Object.defineProperty(exports, "Pipeline", { - enumerable: true, - get: function get() { - return _node.Pipeline; - } -}); -Object.defineProperty(exports, "analyse", { - enumerable: true, - get: function get() { - return _node.analyse; - } -}); -Object.defineProperty(exports, "transform", { - enumerable: true, - get: function get() { - return _node.transform; - } -}); -Object.defineProperty(exports, "transformFromAst", { - enumerable: true, - get: function get() { - return _node.transformFromAst; - } -}); -Object.defineProperty(exports, "transformFile", { - enumerable: true, - get: function get() { - return _node.transformFile; - } -}); -Object.defineProperty(exports, "transformFileSync", { - enumerable: true, - get: function get() { - return _node.transformFileSync; - } -}); -exports.run = run; -exports.load = load; -function run(code) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return new Function((0, _node.transform)(code, opts).code)(); -} - -function load(url, callback) { - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var hold = arguments[3]; - - opts.filename = opts.filename || url; - - var xhr = global.ActiveXObject ? new global.ActiveXObject("Microsoft.XMLHTTP") : new global.XMLHttpRequest(); - xhr.open("GET", url, true); - if ("overrideMimeType" in xhr) xhr.overrideMimeType("text/plain"); - - xhr.onreadystatechange = function () { - if (xhr.readyState !== 4) return; - - var status = xhr.status; - if (status === 0 || status === 200) { - var param = [xhr.responseText, opts]; - if (!hold) run(param); - if (callback) callback(param); - } else { - throw new Error("Could not load " + url); - } - }; - - xhr.send(null); -} - -function runScripts() { - var scripts = []; - var types = ["text/ecmascript-6", "text/6to5", "text/babel", "module"]; - var index = 0; - - function exec() { - var param = scripts[index]; - if (param instanceof Array) { - run(param, index); - index++; - exec(); - } - } - - function run(script, i) { - var opts = {}; - - if (script.src) { - load(script.src, function (param) { - scripts[i] = param; - exec(); - }, opts, true); - } else { - opts.filename = "embedded"; - scripts[i] = [script.innerHTML, opts]; - } - } - - var _scripts = global.document.getElementsByTagName("script"); - - for (var i = 0; i < _scripts.length; ++i) { - var _script = _scripts[i]; - if (types.indexOf(_script.type) >= 0) scripts.push(_script); - } - - for (var _i = 0; _i < scripts.length; _i++) { - run(scripts[_i], _i); - } - - exec(); -} - -if (global.addEventListener) { - global.addEventListener("DOMContentLoaded", runScripts, false); -} else if (global.attachEvent) { - global.attachEvent("onload", runScripts); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/node.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/node.js deleted file mode 100644 index b1ab721..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/api/node.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.resolvePreset = exports.resolvePlugin = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined; - -var _file = require("../transformation/file"); - -Object.defineProperty(exports, "File", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_file).default; - } -}); - -var _config = require("../transformation/file/options/config"); - -Object.defineProperty(exports, "options", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_config).default; - } -}); - -var _buildExternalHelpers = require("../tools/build-external-helpers"); - -Object.defineProperty(exports, "buildExternalHelpers", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_buildExternalHelpers).default; - } -}); - -var _babelTemplate = require("babel-template"); - -Object.defineProperty(exports, "template", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_babelTemplate).default; - } -}); - -var _resolvePlugin = require("../helpers/resolve-plugin"); - -Object.defineProperty(exports, "resolvePlugin", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_resolvePlugin).default; - } -}); - -var _resolvePreset = require("../helpers/resolve-preset"); - -Object.defineProperty(exports, "resolvePreset", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_resolvePreset).default; - } -}); - -var _package = require("../../package"); - -Object.defineProperty(exports, "version", { - enumerable: true, - get: function get() { - return _package.version; - } -}); -exports.Plugin = Plugin; -exports.transformFile = transformFile; -exports.transformFileSync = transformFileSync; - -var _fs = require("fs"); - -var _fs2 = _interopRequireDefault(_fs); - -var _util = require("../util"); - -var util = _interopRequireWildcard(_util); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _babelTraverse = require("babel-traverse"); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _optionManager = require("../transformation/file/options/option-manager"); - -var _optionManager2 = _interopRequireDefault(_optionManager); - -var _pipeline = require("../transformation/pipeline"); - -var _pipeline2 = _interopRequireDefault(_pipeline); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.util = util; -exports.messages = messages; -exports.types = t; -exports.traverse = _babelTraverse2.default; -exports.OptionManager = _optionManager2.default; -function Plugin(alias) { - throw new Error("The (" + alias + ") Babel 5 plugin is being run with Babel 6."); -} - -exports.Pipeline = _pipeline2.default; - - -var pipeline = new _pipeline2.default(); -var analyse = exports.analyse = pipeline.analyse.bind(pipeline); -var transform = exports.transform = pipeline.transform.bind(pipeline); -var transformFromAst = exports.transformFromAst = pipeline.transformFromAst.bind(pipeline); - -function transformFile(filename, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = {}; - } - - opts.filename = filename; - - _fs2.default.readFile(filename, function (err, code) { - var result = void 0; - - if (!err) { - try { - result = transform(code, opts); - } catch (_err) { - err = _err; - } - } - - if (err) { - callback(err); - } else { - callback(null, result); - } - }); -} - -function transformFileSync(filename) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - opts.filename = filename; - return transform(_fs2.default.readFileSync(filename, "utf8"), opts); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-plugin-names.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-plugin-names.js deleted file mode 100644 index 4c01835..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-plugin-names.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = getPossiblePluginNames; -function getPossiblePluginNames(pluginName) { - return ["babel-plugin-" + pluginName, pluginName]; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-preset-names.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-preset-names.js deleted file mode 100644 index 00fe1d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/get-possible-preset-names.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = getPossiblePresetNames; -function getPossiblePresetNames(presetName) { - var possibleNames = ["babel-preset-" + presetName, presetName]; - - var matches = presetName.match(/^(@[^/]+)\/(.+)$/); - if (matches) { - var orgName = matches[1], - presetPath = matches[2]; - - possibleNames.push(orgName + "/babel-preset-" + presetPath); - } - - return possibleNames; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/merge.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/merge.js deleted file mode 100644 index 634395b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/merge.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (dest, src) { - if (!dest || !src) return; - - return (0, _mergeWith2.default)(dest, src, function (a, b) { - if (b && Array.isArray(a)) { - var newArray = b.slice(0); - - for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var item = _ref; - - if (newArray.indexOf(item) < 0) { - newArray.push(item); - } - } - - return newArray; - } - }); -}; - -var _mergeWith = require("lodash/mergeWith"); - -var _mergeWith2 = _interopRequireDefault(_mergeWith); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/normalize-ast.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/normalize-ast.js deleted file mode 100644 index 83927e7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/normalize-ast.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (ast, comments, tokens) { - if (ast) { - if (ast.type === "Program") { - return t.file(ast, comments || [], tokens || []); - } else if (ast.type === "File") { - return ast; - } - } - - throw new Error("Not a valid ast?"); -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-from-possible-names.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-from-possible-names.js deleted file mode 100644 index 926ddaf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-from-possible-names.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = resolveFromPossibleNames; - -var _resolve = require("./resolve"); - -var _resolve2 = _interopRequireDefault(_resolve); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function resolveFromPossibleNames(possibleNames, dirname) { - return possibleNames.reduce(function (accum, curr) { - return accum || (0, _resolve2.default)(curr, dirname); - }, null); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-plugin.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-plugin.js deleted file mode 100644 index 0c0a30c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-plugin.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = resolvePlugin; - -var _resolveFromPossibleNames = require("./resolve-from-possible-names"); - -var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames); - -var _getPossiblePluginNames = require("./get-possible-plugin-names"); - -var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function resolvePlugin(pluginName) { - var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-preset.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-preset.js deleted file mode 100644 index 0a5449e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve-preset.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = resolvePreset; - -var _resolveFromPossibleNames = require("./resolve-from-possible-names"); - -var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames); - -var _getPossiblePresetNames = require("./get-possible-preset-names"); - -var _getPossiblePresetNames2 = _interopRequireDefault(_getPossiblePresetNames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function resolvePreset(presetName) { - var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePresetNames2.default)(presetName), dirname); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve.js deleted file mode 100644 index adec3a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/helpers/resolve.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -exports.default = function (loc) { - var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd(); - - if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null; - - var relativeMod = relativeModules[relative]; - - if (!relativeMod) { - relativeMod = new _module2.default(); - - var filename = _path2.default.join(relative, ".babelrc"); - relativeMod.id = filename; - relativeMod.filename = filename; - - relativeMod.paths = _module2.default._nodeModulePaths(relative); - relativeModules[relative] = relativeMod; - } - - try { - return _module2.default._resolveFilename(loc, relativeMod); - } catch (err) { - return null; - } -}; - -var _module = require("module"); - -var _module2 = _interopRequireDefault(_module); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var relativeModules = {}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/store.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/store.js deleted file mode 100644 index 00a9629..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/store.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _map = require("babel-runtime/core-js/map"); - -var _map2 = _interopRequireDefault(_map); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Store = function (_Map) { - (0, _inherits3.default)(Store, _Map); - - function Store() { - (0, _classCallCheck3.default)(this, Store); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Map.call(this)); - - _this.dynamicData = {}; - return _this; - } - - Store.prototype.setDynamic = function setDynamic(key, fn) { - this.dynamicData[key] = fn; - }; - - Store.prototype.get = function get(key) { - if (this.has(key)) { - return _Map.prototype.get.call(this, key); - } else { - if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) { - var val = this.dynamicData[key](); - this.set(key, val); - return val; - } - } - }; - - return Store; -}(_map2.default); - -exports.default = Store; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/tools/build-external-helpers.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/tools/build-external-helpers.js deleted file mode 100644 index c397b27..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/tools/build-external-helpers.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (whitelist) { - var outputType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "global"; - - var namespace = t.identifier("babelHelpers"); - - var builder = function builder(body) { - return buildHelpers(body, namespace, whitelist); - }; - - var tree = void 0; - - var build = { - global: buildGlobal, - umd: buildUmd, - var: buildVar - }[outputType]; - - if (build) { - tree = build(namespace, builder); - } else { - throw new Error(messages.get("unsupportedOutputType", outputType)); - } - - return (0, _babelGenerator2.default)(tree).code; -}; - -var _babelHelpers = require("babel-helpers"); - -var helpers = _interopRequireWildcard(_babelHelpers); - -var _babelGenerator = require("babel-generator"); - -var _babelGenerator2 = _interopRequireDefault(_babelGenerator); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var buildUmdWrapper = (0, _babelTemplate2.default)("\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n"); - -function buildGlobal(namespace, builder) { - var body = []; - var container = t.functionExpression(null, [t.identifier("global")], t.blockStatement(body)); - var tree = t.program([t.expressionStatement(t.callExpression(container, [helpers.get("selfGlobal")]))]); - - body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.assignmentExpression("=", t.memberExpression(t.identifier("global"), namespace), t.objectExpression([])))])); - - builder(body); - - return tree; -} - -function buildUmd(namespace, builder) { - var body = []; - body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.identifier("global"))])); - - builder(body); - - return t.program([buildUmdWrapper({ - FACTORY_PARAMETERS: t.identifier("global"), - BROWSER_ARGUMENTS: t.assignmentExpression("=", t.memberExpression(t.identifier("root"), namespace), t.objectExpression([])), - COMMON_ARGUMENTS: t.identifier("exports"), - AMD_ARGUMENTS: t.arrayExpression([t.stringLiteral("exports")]), - FACTORY_BODY: body, - UMD_ROOT: t.identifier("this") - })]); -} - -function buildVar(namespace, builder) { - var body = []; - body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.objectExpression([]))])); - builder(body); - body.push(t.expressionStatement(namespace)); - return t.program(body); -} - -function buildHelpers(body, namespace, whitelist) { - helpers.list.forEach(function (name) { - if (whitelist && whitelist.indexOf(name) < 0) return; - - var key = t.identifier(name); - body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(namespace, key), helpers.get(name)))); - }); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/index.js deleted file mode 100644 index 76dc7c5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/index.js +++ /dev/null @@ -1,737 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.File = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _assign = require("babel-runtime/core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _babelHelpers = require("babel-helpers"); - -var _babelHelpers2 = _interopRequireDefault(_babelHelpers); - -var _metadata = require("./metadata"); - -var metadataVisitor = _interopRequireWildcard(_metadata); - -var _convertSourceMap = require("convert-source-map"); - -var _convertSourceMap2 = _interopRequireDefault(_convertSourceMap); - -var _optionManager = require("./options/option-manager"); - -var _optionManager2 = _interopRequireDefault(_optionManager); - -var _pluginPass = require("../plugin-pass"); - -var _pluginPass2 = _interopRequireDefault(_pluginPass); - -var _babelTraverse = require("babel-traverse"); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _sourceMap = require("source-map"); - -var _sourceMap2 = _interopRequireDefault(_sourceMap); - -var _babelGenerator = require("babel-generator"); - -var _babelGenerator2 = _interopRequireDefault(_babelGenerator); - -var _babelCodeFrame = require("babel-code-frame"); - -var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); - -var _defaults = require("lodash/defaults"); - -var _defaults2 = _interopRequireDefault(_defaults); - -var _logger = require("./logger"); - -var _logger2 = _interopRequireDefault(_logger); - -var _store = require("../../store"); - -var _store2 = _interopRequireDefault(_store); - -var _babylon = require("babylon"); - -var _util = require("../../util"); - -var util = _interopRequireWildcard(_util); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _resolve = require("../../helpers/resolve"); - -var _resolve2 = _interopRequireDefault(_resolve); - -var _blockHoist = require("../internal-plugins/block-hoist"); - -var _blockHoist2 = _interopRequireDefault(_blockHoist); - -var _shadowFunctions = require("../internal-plugins/shadow-functions"); - -var _shadowFunctions2 = _interopRequireDefault(_shadowFunctions); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var shebangRegex = /^#!.*/; - -var INTERNAL_PLUGINS = [[_blockHoist2.default], [_shadowFunctions2.default]]; - -var errorVisitor = { - enter: function enter(path, state) { - var loc = path.node.loc; - if (loc) { - state.loc = loc; - path.stop(); - } - } -}; - -var File = function (_Store) { - (0, _inherits3.default)(File, _Store); - - function File() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var pipeline = arguments[1]; - (0, _classCallCheck3.default)(this, File); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this)); - - _this.pipeline = pipeline; - - _this.log = new _logger2.default(_this, opts.filename || "unknown"); - _this.opts = _this.initOptions(opts); - - _this.parserOpts = { - sourceType: _this.opts.sourceType, - sourceFileName: _this.opts.filename, - plugins: [] - }; - - _this.pluginVisitors = []; - _this.pluginPasses = []; - - _this.buildPluginsForOptions(_this.opts); - - if (_this.opts.passPerPreset) { - _this.perPresetOpts = []; - _this.opts.presets.forEach(function (presetOpts) { - var perPresetOpts = (0, _assign2.default)((0, _create2.default)(_this.opts), presetOpts); - _this.perPresetOpts.push(perPresetOpts); - _this.buildPluginsForOptions(perPresetOpts); - }); - } - - _this.metadata = { - usedHelpers: [], - marked: [], - modules: { - imports: [], - exports: { - exported: [], - specifiers: [] - } - } - }; - - _this.dynamicImportTypes = {}; - _this.dynamicImportIds = {}; - _this.dynamicImports = []; - _this.declarations = {}; - _this.usedHelpers = {}; - - _this.path = null; - _this.ast = {}; - - _this.code = ""; - _this.shebang = ""; - - _this.hub = new _babelTraverse.Hub(_this); - return _this; - } - - File.prototype.getMetadata = function getMetadata() { - var has = false; - for (var _iterator = this.ast.program.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var node = _ref; - - if (t.isModuleDeclaration(node)) { - has = true; - break; - } - } - if (has) { - this.path.traverse(metadataVisitor, this); - } - }; - - File.prototype.initOptions = function initOptions(opts) { - opts = new _optionManager2.default(this.log, this.pipeline).init(opts); - - if (opts.inputSourceMap) { - opts.sourceMaps = true; - } - - if (opts.moduleId) { - opts.moduleIds = true; - } - - opts.basename = _path2.default.basename(opts.filename, _path2.default.extname(opts.filename)); - - opts.ignore = util.arrayify(opts.ignore, util.regexify); - - if (opts.only) opts.only = util.arrayify(opts.only, util.regexify); - - (0, _defaults2.default)(opts, { - moduleRoot: opts.sourceRoot - }); - - (0, _defaults2.default)(opts, { - sourceRoot: opts.moduleRoot - }); - - (0, _defaults2.default)(opts, { - filenameRelative: opts.filename - }); - - var basenameRelative = _path2.default.basename(opts.filenameRelative); - - (0, _defaults2.default)(opts, { - sourceFileName: basenameRelative, - sourceMapTarget: basenameRelative - }); - - return opts; - }; - - File.prototype.buildPluginsForOptions = function buildPluginsForOptions(opts) { - if (!Array.isArray(opts.plugins)) { - return; - } - - var plugins = opts.plugins.concat(INTERNAL_PLUGINS); - var currentPluginVisitors = []; - var currentPluginPasses = []; - - for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var ref = _ref2; - var plugin = ref[0], - pluginOpts = ref[1]; - - - currentPluginVisitors.push(plugin.visitor); - currentPluginPasses.push(new _pluginPass2.default(this, plugin, pluginOpts)); - - if (plugin.manipulateOptions) { - plugin.manipulateOptions(opts, this.parserOpts, this); - } - } - - this.pluginVisitors.push(currentPluginVisitors); - this.pluginPasses.push(currentPluginPasses); - }; - - File.prototype.getModuleName = function getModuleName() { - var opts = this.opts; - if (!opts.moduleIds) { - return null; - } - - if (opts.moduleId != null && !opts.getModuleId) { - return opts.moduleId; - } - - var filenameRelative = opts.filenameRelative; - var moduleName = ""; - - if (opts.moduleRoot != null) { - moduleName = opts.moduleRoot + "/"; - } - - if (!opts.filenameRelative) { - return moduleName + opts.filename.replace(/^\//, ""); - } - - if (opts.sourceRoot != null) { - var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?"); - filenameRelative = filenameRelative.replace(sourceRootRegEx, ""); - } - - filenameRelative = filenameRelative.replace(/\.(\w*?)$/, ""); - - moduleName += filenameRelative; - - moduleName = moduleName.replace(/\\/g, "/"); - - if (opts.getModuleId) { - return opts.getModuleId(moduleName) || moduleName; - } else { - return moduleName; - } - }; - - File.prototype.resolveModuleSource = function resolveModuleSource(source) { - var resolveModuleSource = this.opts.resolveModuleSource; - if (resolveModuleSource) source = resolveModuleSource(source, this.opts.filename); - return source; - }; - - File.prototype.addImport = function addImport(source, imported) { - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : imported; - - var alias = source + ":" + imported; - var id = this.dynamicImportIds[alias]; - - if (!id) { - source = this.resolveModuleSource(source); - id = this.dynamicImportIds[alias] = this.scope.generateUidIdentifier(name); - - var specifiers = []; - - if (imported === "*") { - specifiers.push(t.importNamespaceSpecifier(id)); - } else if (imported === "default") { - specifiers.push(t.importDefaultSpecifier(id)); - } else { - specifiers.push(t.importSpecifier(id, t.identifier(imported))); - } - - var declar = t.importDeclaration(specifiers, t.stringLiteral(source)); - declar._blockHoist = 3; - - this.path.unshiftContainer("body", declar); - } - - return id; - }; - - File.prototype.addHelper = function addHelper(name) { - var declar = this.declarations[name]; - if (declar) return declar; - - if (!this.usedHelpers[name]) { - this.metadata.usedHelpers.push(name); - this.usedHelpers[name] = true; - } - - var generator = this.get("helperGenerator"); - var runtime = this.get("helpersNamespace"); - if (generator) { - var res = generator(name); - if (res) return res; - } else if (runtime) { - return t.memberExpression(runtime, t.identifier(name)); - } - - var ref = (0, _babelHelpers2.default)(name); - var uid = this.declarations[name] = this.scope.generateUidIdentifier(name); - - if (t.isFunctionExpression(ref) && !ref.id) { - ref.body._compact = true; - ref._generated = true; - ref.id = uid; - ref.type = "FunctionDeclaration"; - this.path.unshiftContainer("body", ref); - } else { - ref._compact = true; - this.scope.push({ - id: uid, - init: ref, - unique: true - }); - } - - return uid; - }; - - File.prototype.addTemplateObject = function addTemplateObject(helperName, strings, raw) { - var stringIds = raw.elements.map(function (string) { - return string.value; - }); - var name = helperName + "_" + raw.elements.length + "_" + stringIds.join(","); - - var declar = this.declarations[name]; - if (declar) return declar; - - var uid = this.declarations[name] = this.scope.generateUidIdentifier("templateObject"); - - var helperId = this.addHelper(helperName); - var init = t.callExpression(helperId, [strings, raw]); - init._compact = true; - this.scope.push({ - id: uid, - init: init, - _blockHoist: 1.9 }); - return uid; - }; - - File.prototype.buildCodeFrameError = function buildCodeFrameError(node, msg) { - var Error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SyntaxError; - - var loc = node && (node.loc || node._loc); - - var err = new Error(msg); - - if (loc) { - err.loc = loc.start; - } else { - (0, _babelTraverse2.default)(node, errorVisitor, this.scope, err); - - err.message += " (This is an error on an internal node. Probably an internal error"; - - if (err.loc) { - err.message += ". Location has been estimated."; - } - - err.message += ")"; - } - - return err; - }; - - File.prototype.mergeSourceMap = function mergeSourceMap(map) { - var inputMap = this.opts.inputSourceMap; - - if (inputMap) { - var inputMapConsumer = new _sourceMap2.default.SourceMapConsumer(inputMap); - var outputMapConsumer = new _sourceMap2.default.SourceMapConsumer(map); - - var mergedGenerator = new _sourceMap2.default.SourceMapGenerator({ - file: inputMapConsumer.file, - sourceRoot: inputMapConsumer.sourceRoot - }); - - var source = outputMapConsumer.sources[0]; - - inputMapConsumer.eachMapping(function (mapping) { - var generatedPosition = outputMapConsumer.generatedPositionFor({ - line: mapping.generatedLine, - column: mapping.generatedColumn, - source: source - }); - if (generatedPosition.column != null) { - mergedGenerator.addMapping({ - source: mapping.source, - - original: mapping.source == null ? null : { - line: mapping.originalLine, - column: mapping.originalColumn - }, - - generated: generatedPosition - }); - } - }); - - var mergedMap = mergedGenerator.toJSON(); - inputMap.mappings = mergedMap.mappings; - return inputMap; - } else { - return map; - } - }; - - File.prototype.parse = function parse(code) { - var parseCode = _babylon.parse; - var parserOpts = this.opts.parserOpts; - - if (parserOpts) { - parserOpts = (0, _assign2.default)({}, this.parserOpts, parserOpts); - - if (parserOpts.parser) { - if (typeof parserOpts.parser === "string") { - var dirname = _path2.default.dirname(this.opts.filename) || process.cwd(); - var parser = (0, _resolve2.default)(parserOpts.parser, dirname); - if (parser) { - parseCode = require(parser).parse; - } else { - throw new Error("Couldn't find parser " + parserOpts.parser + " with \"parse\" method " + ("relative to directory " + dirname)); - } - } else { - parseCode = parserOpts.parser; - } - - parserOpts.parser = { - parse: function parse(source) { - return (0, _babylon.parse)(source, parserOpts); - } - }; - } - } - - this.log.debug("Parse start"); - var ast = parseCode(code, parserOpts || this.parserOpts); - this.log.debug("Parse stop"); - return ast; - }; - - File.prototype._addAst = function _addAst(ast) { - this.path = _babelTraverse.NodePath.get({ - hub: this.hub, - parentPath: null, - parent: ast, - container: ast, - key: "program" - }).setContext(); - this.scope = this.path.scope; - this.ast = ast; - this.getMetadata(); - }; - - File.prototype.addAst = function addAst(ast) { - this.log.debug("Start set AST"); - this._addAst(ast); - this.log.debug("End set AST"); - }; - - File.prototype.transform = function transform() { - for (var i = 0; i < this.pluginPasses.length; i++) { - var pluginPasses = this.pluginPasses[i]; - this.call("pre", pluginPasses); - this.log.debug("Start transform traverse"); - - var visitor = _babelTraverse2.default.visitors.merge(this.pluginVisitors[i], pluginPasses, this.opts.wrapPluginVisitorMethod); - (0, _babelTraverse2.default)(this.ast, visitor, this.scope); - - this.log.debug("End transform traverse"); - this.call("post", pluginPasses); - } - - return this.generate(); - }; - - File.prototype.wrap = function wrap(code, callback) { - code = code + ""; - - try { - if (this.shouldIgnore()) { - return this.makeResult({ code: code, ignored: true }); - } else { - return callback(); - } - } catch (err) { - if (err._babel) { - throw err; - } else { - err._babel = true; - } - - var message = err.message = this.opts.filename + ": " + err.message; - - var loc = err.loc; - if (loc) { - err.codeFrame = (0, _babelCodeFrame2.default)(code, loc.line, loc.column + 1, this.opts); - message += "\n" + err.codeFrame; - } - - if (process.browser) { - err.message = message; - } - - if (err.stack) { - var newStack = err.stack.replace(err.message, message); - err.stack = newStack; - } - - throw err; - } - }; - - File.prototype.addCode = function addCode(code) { - code = (code || "") + ""; - code = this.parseInputSourceMap(code); - this.code = code; - }; - - File.prototype.parseCode = function parseCode() { - this.parseShebang(); - var ast = this.parse(this.code); - this.addAst(ast); - }; - - File.prototype.shouldIgnore = function shouldIgnore() { - var opts = this.opts; - return util.shouldIgnore(opts.filename, opts.ignore, opts.only); - }; - - File.prototype.call = function call(key, pluginPasses) { - for (var _iterator3 = pluginPasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var pass = _ref3; - - var plugin = pass.plugin; - var fn = plugin[key]; - if (fn) fn.call(pass, this); - } - }; - - File.prototype.parseInputSourceMap = function parseInputSourceMap(code) { - var opts = this.opts; - - if (opts.inputSourceMap !== false) { - var inputMap = _convertSourceMap2.default.fromSource(code); - if (inputMap) { - opts.inputSourceMap = inputMap.toObject(); - code = _convertSourceMap2.default.removeComments(code); - } - } - - return code; - }; - - File.prototype.parseShebang = function parseShebang() { - var shebangMatch = shebangRegex.exec(this.code); - if (shebangMatch) { - this.shebang = shebangMatch[0]; - this.code = this.code.replace(shebangRegex, ""); - } - }; - - File.prototype.makeResult = function makeResult(_ref4) { - var code = _ref4.code, - map = _ref4.map, - ast = _ref4.ast, - ignored = _ref4.ignored; - - var result = { - metadata: null, - options: this.opts, - ignored: !!ignored, - code: null, - ast: null, - map: map || null - }; - - if (this.opts.code) { - result.code = code; - } - - if (this.opts.ast) { - result.ast = ast; - } - - if (this.opts.metadata) { - result.metadata = this.metadata; - } - - return result; - }; - - File.prototype.generate = function generate() { - var opts = this.opts; - var ast = this.ast; - - var result = { ast: ast }; - if (!opts.code) return this.makeResult(result); - - var gen = _babelGenerator2.default; - if (opts.generatorOpts.generator) { - gen = opts.generatorOpts.generator; - - if (typeof gen === "string") { - var dirname = _path2.default.dirname(this.opts.filename) || process.cwd(); - var generator = (0, _resolve2.default)(gen, dirname); - if (generator) { - gen = require(generator).print; - } else { - throw new Error("Couldn't find generator " + gen + " with \"print\" method relative " + ("to directory " + dirname)); - } - } - } - - this.log.debug("Generation start"); - - var _result = gen(ast, opts.generatorOpts ? (0, _assign2.default)(opts, opts.generatorOpts) : opts, this.code); - result.code = _result.code; - result.map = _result.map; - - this.log.debug("Generation end"); - - if (this.shebang) { - result.code = this.shebang + "\n" + result.code; - } - - if (result.map) { - result.map = this.mergeSourceMap(result.map); - } - - if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { - result.code += "\n" + _convertSourceMap2.default.fromObject(result.map).toComment(); - } - - if (opts.sourceMaps === "inline") { - result.map = null; - } - - return this.makeResult(result); - }; - - return File; -}(_store2.default); - -exports.default = File; -exports.File = File; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/logger.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/logger.js deleted file mode 100644 index c8af222..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/logger.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _node = require("debug/node"); - -var _node2 = _interopRequireDefault(_node); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var verboseDebug = (0, _node2.default)("babel:verbose"); -var generalDebug = (0, _node2.default)("babel"); - -var seenDeprecatedMessages = []; - -var Logger = function () { - function Logger(file, filename) { - (0, _classCallCheck3.default)(this, Logger); - - this.filename = filename; - this.file = file; - } - - Logger.prototype._buildMessage = function _buildMessage(msg) { - var parts = "[BABEL] " + this.filename; - if (msg) parts += ": " + msg; - return parts; - }; - - Logger.prototype.warn = function warn(msg) { - console.warn(this._buildMessage(msg)); - }; - - Logger.prototype.error = function error(msg) { - var Constructor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error; - - throw new Constructor(this._buildMessage(msg)); - }; - - Logger.prototype.deprecate = function deprecate(msg) { - if (this.file.opts && this.file.opts.suppressDeprecationMessages) return; - - msg = this._buildMessage(msg); - - if (seenDeprecatedMessages.indexOf(msg) >= 0) return; - - seenDeprecatedMessages.push(msg); - - console.error(msg); - }; - - Logger.prototype.verbose = function verbose(msg) { - if (verboseDebug.enabled) verboseDebug(this._buildMessage(msg)); - }; - - Logger.prototype.debug = function debug(msg) { - if (generalDebug.enabled) generalDebug(this._buildMessage(msg)); - }; - - Logger.prototype.deopt = function deopt(node, msg) { - this.debug(msg); - }; - - return Logger; -}(); - -exports.default = Logger; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/metadata.js deleted file mode 100644 index e76f223..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/metadata.js +++ /dev/null @@ -1,178 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ImportDeclaration = exports.ModuleDeclaration = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.ExportDeclaration = ExportDeclaration; -exports.Scope = Scope; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ModuleDeclaration = exports.ModuleDeclaration = { - enter: function enter(path, file) { - var node = path.node; - - if (node.source) { - node.source.value = file.resolveModuleSource(node.source.value); - } - } -}; - -var ImportDeclaration = exports.ImportDeclaration = { - exit: function exit(path, file) { - var node = path.node; - - - var specifiers = []; - var imported = []; - file.metadata.modules.imports.push({ - source: node.source.value, - imported: imported, - specifiers: specifiers - }); - - for (var _iterator = path.get("specifiers"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var specifier = _ref; - - var local = specifier.node.local.name; - - if (specifier.isImportDefaultSpecifier()) { - imported.push("default"); - specifiers.push({ - kind: "named", - imported: "default", - local: local - }); - } - - if (specifier.isImportSpecifier()) { - var importedName = specifier.node.imported.name; - imported.push(importedName); - specifiers.push({ - kind: "named", - imported: importedName, - local: local - }); - } - - if (specifier.isImportNamespaceSpecifier()) { - imported.push("*"); - specifiers.push({ - kind: "namespace", - local: local - }); - } - } - } -}; - -function ExportDeclaration(path, file) { - var node = path.node; - - - var source = node.source ? node.source.value : null; - var exports = file.metadata.modules.exports; - - var declar = path.get("declaration"); - if (declar.isStatement()) { - var bindings = declar.getBindingIdentifiers(); - - for (var name in bindings) { - exports.exported.push(name); - exports.specifiers.push({ - kind: "local", - local: name, - exported: path.isExportDefaultDeclaration() ? "default" : name - }); - } - } - - if (path.isExportNamedDeclaration() && node.specifiers) { - for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var specifier = _ref2; - - var exported = specifier.exported.name; - exports.exported.push(exported); - - if (t.isExportDefaultSpecifier(specifier)) { - exports.specifiers.push({ - kind: "external", - local: exported, - exported: exported, - source: source - }); - } - - if (t.isExportNamespaceSpecifier(specifier)) { - exports.specifiers.push({ - kind: "external-namespace", - exported: exported, - source: source - }); - } - - var local = specifier.local; - if (!local) continue; - - if (source) { - exports.specifiers.push({ - kind: "external", - local: local.name, - exported: exported, - source: source - }); - } - - if (!source) { - exports.specifiers.push({ - kind: "local", - local: local.name, - exported: exported - }); - } - } - } - - if (path.isExportAllDeclaration()) { - exports.specifiers.push({ - kind: "external-all", - source: source - }); - } -} - -function Scope(path) { - path.skip(); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/build-config-chain.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/build-config-chain.js deleted file mode 100644 index ef02d65..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/build-config-chain.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _assign = require("babel-runtime/core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -exports.default = buildConfigChain; - -var _resolve = require("../../../helpers/resolve"); - -var _resolve2 = _interopRequireDefault(_resolve); - -var _json = require("json5"); - -var _json2 = _interopRequireDefault(_json); - -var _pathIsAbsolute = require("path-is-absolute"); - -var _pathIsAbsolute2 = _interopRequireDefault(_pathIsAbsolute); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -var _fs = require("fs"); - -var _fs2 = _interopRequireDefault(_fs); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var existsCache = {}; -var jsonCache = {}; - -var BABELIGNORE_FILENAME = ".babelignore"; -var BABELRC_FILENAME = ".babelrc"; -var PACKAGE_FILENAME = "package.json"; - -function exists(filename) { - var cached = existsCache[filename]; - if (cached == null) { - return existsCache[filename] = _fs2.default.existsSync(filename); - } else { - return cached; - } -} - -function buildConfigChain() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var log = arguments[1]; - - var filename = opts.filename; - var builder = new ConfigChainBuilder(log); - - if (opts.babelrc !== false) { - builder.findConfigs(filename); - } - - builder.mergeConfig({ - options: opts, - alias: "base", - dirname: filename && _path2.default.dirname(filename) - }); - - return builder.configs; -} - -var ConfigChainBuilder = function () { - function ConfigChainBuilder(log) { - (0, _classCallCheck3.default)(this, ConfigChainBuilder); - - this.resolvedConfigs = []; - this.configs = []; - this.log = log; - } - - ConfigChainBuilder.prototype.findConfigs = function findConfigs(loc) { - if (!loc) return; - - if (!(0, _pathIsAbsolute2.default)(loc)) { - loc = _path2.default.join(process.cwd(), loc); - } - - var foundConfig = false; - var foundIgnore = false; - - while (loc !== (loc = _path2.default.dirname(loc))) { - if (!foundConfig) { - var configLoc = _path2.default.join(loc, BABELRC_FILENAME); - if (exists(configLoc)) { - this.addConfig(configLoc); - foundConfig = true; - } - - var pkgLoc = _path2.default.join(loc, PACKAGE_FILENAME); - if (!foundConfig && exists(pkgLoc)) { - foundConfig = this.addConfig(pkgLoc, "babel", JSON); - } - } - - if (!foundIgnore) { - var ignoreLoc = _path2.default.join(loc, BABELIGNORE_FILENAME); - if (exists(ignoreLoc)) { - this.addIgnoreConfig(ignoreLoc); - foundIgnore = true; - } - } - - if (foundIgnore && foundConfig) return; - } - }; - - ConfigChainBuilder.prototype.addIgnoreConfig = function addIgnoreConfig(loc) { - var file = _fs2.default.readFileSync(loc, "utf8"); - var lines = file.split("\n"); - - lines = lines.map(function (line) { - return line.replace(/#(.*?)$/, "").trim(); - }).filter(function (line) { - return !!line; - }); - - if (lines.length) { - this.mergeConfig({ - options: { ignore: lines }, - alias: loc, - dirname: _path2.default.dirname(loc) - }); - } - }; - - ConfigChainBuilder.prototype.addConfig = function addConfig(loc, key) { - var json = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _json2.default; - - if (this.resolvedConfigs.indexOf(loc) >= 0) { - return false; - } - - this.resolvedConfigs.push(loc); - - var content = _fs2.default.readFileSync(loc, "utf8"); - var options = void 0; - - try { - options = jsonCache[content] = jsonCache[content] || json.parse(content); - if (key) options = options[key]; - } catch (err) { - err.message = loc + ": Error while parsing JSON - " + err.message; - throw err; - } - - this.mergeConfig({ - options: options, - alias: loc, - dirname: _path2.default.dirname(loc) - }); - - return !!options; - }; - - ConfigChainBuilder.prototype.mergeConfig = function mergeConfig(_ref) { - var options = _ref.options, - alias = _ref.alias, - loc = _ref.loc, - dirname = _ref.dirname; - - if (!options) { - return false; - } - - options = (0, _assign2.default)({}, options); - - dirname = dirname || process.cwd(); - loc = loc || alias; - - if (options.extends) { - var extendsLoc = (0, _resolve2.default)(options.extends, dirname); - if (extendsLoc) { - this.addConfig(extendsLoc); - } else { - if (this.log) this.log.error("Couldn't resolve extends clause of " + options.extends + " in " + alias); - } - delete options.extends; - } - - this.configs.push({ - options: options, - alias: alias, - loc: loc, - dirname: dirname - }); - - var envOpts = void 0; - var envKey = process.env.BABEL_ENV || process.env.NODE_ENV || "development"; - if (options.env) { - envOpts = options.env[envKey]; - delete options.env; - } - - this.mergeConfig({ - options: envOpts, - alias: alias + ".env." + envKey, - dirname: dirname - }); - }; - - return ConfigChainBuilder; -}(); - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/config.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/config.js deleted file mode 100644 index e890947..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/config.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; - -module.exports = { - filename: { - type: "filename", - description: "filename to use when reading from stdin - this will be used in source-maps, errors etc", - default: "unknown", - shorthand: "f" - }, - - filenameRelative: { - hidden: true, - type: "string" - }, - - inputSourceMap: { - hidden: true - }, - - env: { - hidden: true, - default: {} - }, - - mode: { - description: "", - hidden: true - }, - - retainLines: { - type: "boolean", - default: false, - description: "retain line numbers - will result in really ugly code" - }, - - highlightCode: { - description: "enable/disable ANSI syntax highlighting of code frames (on by default)", - type: "boolean", - default: true - }, - - suppressDeprecationMessages: { - type: "boolean", - default: false, - hidden: true - }, - - presets: { - type: "list", - description: "", - default: [] - }, - - plugins: { - type: "list", - default: [], - description: "" - }, - - ignore: { - type: "list", - description: "list of glob paths to **not** compile", - default: [] - }, - - only: { - type: "list", - description: "list of glob paths to **only** compile" - }, - - code: { - hidden: true, - default: true, - type: "boolean" - }, - - metadata: { - hidden: true, - default: true, - type: "boolean" - }, - - ast: { - hidden: true, - default: true, - type: "boolean" - }, - - extends: { - type: "string", - hidden: true - }, - - comments: { - type: "boolean", - default: true, - description: "write comments to generated output (true by default)" - }, - - shouldPrintComment: { - hidden: true, - description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored" - }, - - wrapPluginVisitorMethod: { - hidden: true, - description: "optional callback to wrap all visitor methods" - }, - - compact: { - type: "booleanString", - default: "auto", - description: "do not include superfluous whitespace characters and line terminators [true|false|auto]" - }, - - minified: { - type: "boolean", - default: false, - description: "save as much bytes when printing [true|false]" - }, - - sourceMap: { - alias: "sourceMaps", - hidden: true - }, - - sourceMaps: { - type: "booleanString", - description: "[true|false|inline]", - default: false, - shorthand: "s" - }, - - sourceMapTarget: { - type: "string", - description: "set `file` on returned source map" - }, - - sourceFileName: { - type: "string", - description: "set `sources[0]` on returned source map" - }, - - sourceRoot: { - type: "filename", - description: "the root from which all sources are relative" - }, - - babelrc: { - description: "Whether or not to look up .babelrc and .babelignore files", - type: "boolean", - default: true - }, - - sourceType: { - description: "", - default: "module" - }, - - auxiliaryCommentBefore: { - type: "string", - description: "print a comment before any injected non-user code" - }, - - auxiliaryCommentAfter: { - type: "string", - description: "print a comment after any injected non-user code" - }, - - resolveModuleSource: { - hidden: true - }, - - getModuleId: { - hidden: true - }, - - moduleRoot: { - type: "filename", - description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions" - }, - - moduleIds: { - type: "boolean", - default: false, - shorthand: "M", - description: "insert an explicit id for modules" - }, - - moduleId: { - description: "specify a custom name for module ids", - type: "string" - }, - - passPerPreset: { - description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.", - type: "boolean", - default: false, - hidden: true - }, - - parserOpts: { - description: "Options to pass into the parser, or to change parsers (parserOpts.parser)", - default: false - }, - - generatorOpts: { - description: "Options to pass into the generator, or to change generators (generatorOpts.generator)", - default: false - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/index.js deleted file mode 100644 index ba8e200..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.config = undefined; -exports.normaliseOptions = normaliseOptions; - -var _parsers = require("./parsers"); - -var parsers = _interopRequireWildcard(_parsers); - -var _config = require("./config"); - -var _config2 = _interopRequireDefault(_config); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -exports.config = _config2.default; -function normaliseOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - for (var key in options) { - var val = options[key]; - if (val == null) continue; - - var opt = _config2.default[key]; - if (opt && opt.alias) opt = _config2.default[opt.alias]; - if (!opt) continue; - - var parser = parsers[opt.type]; - if (parser) val = parser(val); - - options[key] = val; - } - - return options; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/option-manager.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/option-manager.js deleted file mode 100644 index 571c834..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/option-manager.js +++ /dev/null @@ -1,383 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _objectWithoutProperties2 = require("babel-runtime/helpers/objectWithoutProperties"); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _assign = require("babel-runtime/core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _node = require("../../../api/node"); - -var context = _interopRequireWildcard(_node); - -var _plugin2 = require("../../plugin"); - -var _plugin3 = _interopRequireDefault(_plugin2); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _index = require("./index"); - -var _resolvePlugin = require("../../../helpers/resolve-plugin"); - -var _resolvePlugin2 = _interopRequireDefault(_resolvePlugin); - -var _resolvePreset = require("../../../helpers/resolve-preset"); - -var _resolvePreset2 = _interopRequireDefault(_resolvePreset); - -var _cloneDeepWith = require("lodash/cloneDeepWith"); - -var _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith); - -var _clone = require("lodash/clone"); - -var _clone2 = _interopRequireDefault(_clone); - -var _merge = require("../../../helpers/merge"); - -var _merge2 = _interopRequireDefault(_merge); - -var _config2 = require("./config"); - -var _config3 = _interopRequireDefault(_config2); - -var _removed = require("./removed"); - -var _removed2 = _interopRequireDefault(_removed); - -var _buildConfigChain = require("./build-config-chain"); - -var _buildConfigChain2 = _interopRequireDefault(_buildConfigChain); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var OptionManager = function () { - function OptionManager(log) { - (0, _classCallCheck3.default)(this, OptionManager); - - this.resolvedConfigs = []; - this.options = OptionManager.createBareOptions(); - this.log = log; - } - - OptionManager.memoisePluginContainer = function memoisePluginContainer(fn, loc, i, alias) { - for (var _iterator = OptionManager.memoisedPlugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var cache = _ref; - - if (cache.container === fn) return cache.plugin; - } - - var obj = void 0; - - if (typeof fn === "function") { - obj = fn(context); - } else { - obj = fn; - } - - if ((typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object") { - var _plugin = new _plugin3.default(obj, alias); - OptionManager.memoisedPlugins.push({ - container: fn, - plugin: _plugin - }); - return _plugin; - } else { - throw new TypeError(messages.get("pluginNotObject", loc, i, typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) + loc + i); - } - }; - - OptionManager.createBareOptions = function createBareOptions() { - var opts = {}; - - for (var _key in _config3.default) { - var opt = _config3.default[_key]; - opts[_key] = (0, _clone2.default)(opt.default); - } - - return opts; - }; - - OptionManager.normalisePlugin = function normalisePlugin(plugin, loc, i, alias) { - plugin = plugin.__esModule ? plugin.default : plugin; - - if (!(plugin instanceof _plugin3.default)) { - if (typeof plugin === "function" || (typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)) === "object") { - plugin = OptionManager.memoisePluginContainer(plugin, loc, i, alias); - } else { - throw new TypeError(messages.get("pluginNotFunction", loc, i, typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin))); - } - } - - plugin.init(loc, i); - - return plugin; - }; - - OptionManager.normalisePlugins = function normalisePlugins(loc, dirname, plugins) { - return plugins.map(function (val, i) { - var plugin = void 0, - options = void 0; - - if (!val) { - throw new TypeError("Falsy value found in plugins"); - } - - if (Array.isArray(val)) { - plugin = val[0]; - options = val[1]; - } else { - plugin = val; - } - - var alias = typeof plugin === "string" ? plugin : loc + "$" + i; - - if (typeof plugin === "string") { - var pluginLoc = (0, _resolvePlugin2.default)(plugin, dirname); - if (pluginLoc) { - plugin = require(pluginLoc); - } else { - throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname)); - } - } - - plugin = OptionManager.normalisePlugin(plugin, loc, i, alias); - - return [plugin, options]; - }); - }; - - OptionManager.prototype.mergeOptions = function mergeOptions(_ref2) { - var _this = this; - - var rawOpts = _ref2.options, - extendingOpts = _ref2.extending, - alias = _ref2.alias, - loc = _ref2.loc, - dirname = _ref2.dirname; - - alias = alias || "foreign"; - if (!rawOpts) return; - - if ((typeof rawOpts === "undefined" ? "undefined" : (0, _typeof3.default)(rawOpts)) !== "object" || Array.isArray(rawOpts)) { - this.log.error("Invalid options type for " + alias, TypeError); - } - - var opts = (0, _cloneDeepWith2.default)(rawOpts, function (val) { - if (val instanceof _plugin3.default) { - return val; - } - }); - - dirname = dirname || process.cwd(); - loc = loc || alias; - - for (var _key2 in opts) { - var option = _config3.default[_key2]; - - if (!option && this.log) { - if (_removed2.default[_key2]) { - this.log.error("Using removed Babel 5 option: " + alias + "." + _key2 + " - " + _removed2.default[_key2].message, ReferenceError); - } else { - var unknownOptErr = "Unknown option: " + alias + "." + _key2 + ". Check out http://babeljs.io/docs/usage/options/ for more information about options."; - var presetConfigErr = "A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options."; - - - this.log.error(unknownOptErr + "\n\n" + presetConfigErr, ReferenceError); - } - } - } - - (0, _index.normaliseOptions)(opts); - - if (opts.plugins) { - opts.plugins = OptionManager.normalisePlugins(loc, dirname, opts.plugins); - } - - if (opts.presets) { - if (opts.passPerPreset) { - opts.presets = this.resolvePresets(opts.presets, dirname, function (preset, presetLoc) { - _this.mergeOptions({ - options: preset, - extending: preset, - alias: presetLoc, - loc: presetLoc, - dirname: dirname - }); - }); - } else { - this.mergePresets(opts.presets, dirname); - delete opts.presets; - } - } - - if (rawOpts === extendingOpts) { - (0, _assign2.default)(extendingOpts, opts); - } else { - (0, _merge2.default)(extendingOpts || this.options, opts); - } - }; - - OptionManager.prototype.mergePresets = function mergePresets(presets, dirname) { - var _this2 = this; - - this.resolvePresets(presets, dirname, function (presetOpts, presetLoc) { - _this2.mergeOptions({ - options: presetOpts, - alias: presetLoc, - loc: presetLoc, - dirname: _path2.default.dirname(presetLoc || "") - }); - }); - }; - - OptionManager.prototype.resolvePresets = function resolvePresets(presets, dirname, onResolve) { - return presets.map(function (val) { - var options = void 0; - if (Array.isArray(val)) { - if (val.length > 2) { - throw new Error("Unexpected extra options " + (0, _stringify2.default)(val.slice(2)) + " passed to preset."); - } - - var _val = val; - val = _val[0]; - options = _val[1]; - } - - var presetLoc = void 0; - try { - if (typeof val === "string") { - presetLoc = (0, _resolvePreset2.default)(val, dirname); - - if (!presetLoc) { - throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname)); - } - - val = require(presetLoc); - } - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.__esModule) { - if (val.default) { - val = val.default; - } else { - var _val2 = val, - __esModule = _val2.__esModule, - rest = (0, _objectWithoutProperties3.default)(_val2, ["__esModule"]); - - val = rest; - } - } - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.buildPreset) val = val.buildPreset; - - if (typeof val !== "function" && options !== undefined) { - throw new Error("Options " + (0, _stringify2.default)(options) + " passed to " + (presetLoc || "a preset") + " which does not accept options."); - } - - if (typeof val === "function") val = val(context, options, { dirname: dirname }); - - if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) !== "object") { - throw new Error("Unsupported preset format: " + val + "."); - } - - onResolve && onResolve(val, presetLoc); - } catch (e) { - if (presetLoc) { - e.message += " (While processing preset: " + (0, _stringify2.default)(presetLoc) + ")"; - } - throw e; - } - return val; - }); - }; - - OptionManager.prototype.normaliseOptions = function normaliseOptions() { - var opts = this.options; - - for (var _key3 in _config3.default) { - var option = _config3.default[_key3]; - var val = opts[_key3]; - - if (!val && option.optional) continue; - - if (option.alias) { - opts[option.alias] = opts[option.alias] || val; - } else { - opts[_key3] = val; - } - } - }; - - OptionManager.prototype.init = function init() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - for (var _iterator2 = (0, _buildConfigChain2.default)(opts, this.log), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var _config = _ref3; - - this.mergeOptions(_config); - } - - this.normaliseOptions(opts); - - return this.options; - }; - - return OptionManager; -}(); - -exports.default = OptionManager; - - -OptionManager.memoisedPlugins = []; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/parsers.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/parsers.js deleted file mode 100644 index 499b754..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/parsers.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.filename = undefined; -exports.boolean = boolean; -exports.booleanString = booleanString; -exports.list = list; - -var _slash = require("slash"); - -var _slash2 = _interopRequireDefault(_slash); - -var _util = require("../../../util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var filename = exports.filename = _slash2.default; - -function boolean(val) { - return !!val; -} - -function booleanString(val) { - return util.booleanify(val); -} - -function list(val) { - return util.list(val); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/removed.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/removed.js deleted file mode 100644 index 0fecbf6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/file/options/removed.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; - -module.exports = { - "auxiliaryComment": { - "message": "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" - }, - "blacklist": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "breakConfig": { - "message": "This is not a necessary option in Babel 6" - }, - "experimental": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "externalHelpers": { - "message": "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/" - }, - "extra": { - "message": "" - }, - "jsxPragma": { - "message": "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/" - }, - - "loose": { - "message": "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option." - }, - "metadataUsedHelpers": { - "message": "Not required anymore as this is enabled by default" - }, - "modules": { - "message": "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules" - }, - "nonStandard": { - "message": "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/" - }, - "optional": { - "message": "Put the specific transforms you want in the `plugins` option" - }, - "sourceMapName": { - "message": "Use the `sourceMapTarget` option" - }, - "stage": { - "message": "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets" - }, - "whitelist": { - "message": "Put the specific transforms you want in the `plugins` option" - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/block-hoist.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/block-hoist.js deleted file mode 100644 index 9630847..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/block-hoist.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _plugin = require("../plugin"); - -var _plugin2 = _interopRequireDefault(_plugin); - -var _sortBy = require("lodash/sortBy"); - -var _sortBy2 = _interopRequireDefault(_sortBy); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = new _plugin2.default({ - - name: "internal.blockHoist", - - visitor: { - Block: { - exit: function exit(_ref) { - var node = _ref.node; - - var hasChange = false; - for (var i = 0; i < node.body.length; i++) { - var bodyNode = node.body[i]; - if (bodyNode && bodyNode._blockHoist != null) { - hasChange = true; - break; - } - } - if (!hasChange) return; - - node.body = (0, _sortBy2.default)(node.body, function (bodyNode) { - var priority = bodyNode && bodyNode._blockHoist; - if (priority == null) priority = 1; - if (priority === true) priority = 2; - - return -1 * priority; - }); - } - } - } -}); -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/shadow-functions.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/shadow-functions.js deleted file mode 100644 index ae1d7b3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/internal-plugins/shadow-functions.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _plugin = require("../plugin"); - -var _plugin2 = _interopRequireDefault(_plugin); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SUPER_THIS_BOUND = (0, _symbol2.default)("super this bound"); - -var superVisitor = { - CallExpression: function CallExpression(path) { - if (!path.get("callee").isSuper()) return; - - var node = path.node; - - if (node[SUPER_THIS_BOUND]) return; - node[SUPER_THIS_BOUND] = true; - - path.replaceWith(t.assignmentExpression("=", this.id, node)); - } -}; - -exports.default = new _plugin2.default({ - name: "internal.shadowFunctions", - - visitor: { - ThisExpression: function ThisExpression(path) { - remap(path, "this"); - }, - ReferencedIdentifier: function ReferencedIdentifier(path) { - if (path.node.name === "arguments") { - remap(path, "arguments"); - } - } - } -}); - - -function shouldShadow(path, shadowPath) { - if (path.is("_forceShadow")) { - return true; - } else { - return shadowPath; - } -} - -function remap(path, key) { - var shadowPath = path.inShadow(key); - if (!shouldShadow(path, shadowPath)) return; - - var shadowFunction = path.node._shadowedFunctionLiteral; - - var currentFunction = void 0; - var passedShadowFunction = false; - - var fnPath = path.find(function (innerPath) { - if (innerPath.parentPath && innerPath.parentPath.isClassProperty() && innerPath.key === "value") { - return true; - } - if (path === innerPath) return false; - if (innerPath.isProgram() || innerPath.isFunction()) { - currentFunction = currentFunction || innerPath; - } - - if (innerPath.isProgram()) { - passedShadowFunction = true; - - return true; - } else if (innerPath.isFunction() && !innerPath.isArrowFunctionExpression()) { - if (shadowFunction) { - if (innerPath === shadowFunction || innerPath.node === shadowFunction.node) return true; - } else { - if (!innerPath.is("shadow")) return true; - } - - passedShadowFunction = true; - return false; - } - - return false; - }); - - if (shadowFunction && fnPath.isProgram() && !shadowFunction.isProgram()) { - fnPath = path.findParent(function (p) { - return p.isProgram() || p.isFunction(); - }); - } - - if (fnPath === currentFunction) return; - - if (!passedShadowFunction) return; - - var cached = fnPath.getData(key); - if (cached) return path.replaceWith(cached); - - var id = path.scope.generateUidIdentifier(key); - - fnPath.setData(key, id); - - var classPath = fnPath.findParent(function (p) { - return p.isClass(); - }); - var hasSuperClass = !!(classPath && classPath.node && classPath.node.superClass); - - if (key === "this" && fnPath.isMethod({ kind: "constructor" }) && hasSuperClass) { - fnPath.scope.push({ id: id }); - - fnPath.traverse(superVisitor, { id: id }); - } else { - var init = key === "this" ? t.thisExpression() : t.identifier(key); - - if (shadowFunction) init._shadowedFunctionLiteral = shadowFunction; - - fnPath.scope.push({ id: id, init: init }); - } - - return path.replaceWith(id); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/pipeline.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/pipeline.js deleted file mode 100644 index 0bb44db..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/pipeline.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _normalizeAst = require("../helpers/normalize-ast"); - -var _normalizeAst2 = _interopRequireDefault(_normalizeAst); - -var _plugin = require("./plugin"); - -var _plugin2 = _interopRequireDefault(_plugin); - -var _file = require("./file"); - -var _file2 = _interopRequireDefault(_file); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Pipeline = function () { - function Pipeline() { - (0, _classCallCheck3.default)(this, Pipeline); - } - - Pipeline.prototype.lint = function lint(code) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - opts.code = false; - opts.mode = "lint"; - return this.transform(code, opts); - }; - - Pipeline.prototype.pretransform = function pretransform(code, opts) { - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.parseCode(code); - return file; - }); - }; - - Pipeline.prototype.transform = function transform(code, opts) { - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.parseCode(code); - return file.transform(); - }); - }; - - Pipeline.prototype.analyse = function analyse(code) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var visitor = arguments[2]; - - opts.code = false; - if (visitor) { - opts.plugins = opts.plugins || []; - opts.plugins.push(new _plugin2.default({ visitor: visitor })); - } - return this.transform(code, opts).metadata; - }; - - Pipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) { - ast = (0, _normalizeAst2.default)(ast); - - var file = new _file2.default(opts, this); - return file.wrap(code, function () { - file.addCode(code); - file.addAst(ast); - return file.transform(); - }); - }; - - return Pipeline; -}(); - -exports.default = Pipeline; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin-pass.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin-pass.js deleted file mode 100644 index a0ae5d9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin-pass.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _store = require("../store"); - -var _store2 = _interopRequireDefault(_store); - -var _file5 = require("./file"); - -var _file6 = _interopRequireDefault(_file5); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var PluginPass = function (_Store) { - (0, _inherits3.default)(PluginPass, _Store); - - function PluginPass(file, plugin) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - (0, _classCallCheck3.default)(this, PluginPass); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this)); - - _this.plugin = plugin; - _this.key = plugin.key; - _this.file = file; - _this.opts = options; - return _this; - } - - PluginPass.prototype.addHelper = function addHelper() { - var _file; - - return (_file = this.file).addHelper.apply(_file, arguments); - }; - - PluginPass.prototype.addImport = function addImport() { - var _file2; - - return (_file2 = this.file).addImport.apply(_file2, arguments); - }; - - PluginPass.prototype.getModuleName = function getModuleName() { - var _file3; - - return (_file3 = this.file).getModuleName.apply(_file3, arguments); - }; - - PluginPass.prototype.buildCodeFrameError = function buildCodeFrameError() { - var _file4; - - return (_file4 = this.file).buildCodeFrameError.apply(_file4, arguments); - }; - - return PluginPass; -}(_store2.default); - -exports.default = PluginPass; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin.js deleted file mode 100644 index 4d39a23..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/transformation/plugin.js +++ /dev/null @@ -1,163 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _optionManager = require("./file/options/option-manager"); - -var _optionManager2 = _interopRequireDefault(_optionManager); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _store = require("../store"); - -var _store2 = _interopRequireDefault(_store); - -var _babelTraverse = require("babel-traverse"); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _assign = require("lodash/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _clone = require("lodash/clone"); - -var _clone2 = _interopRequireDefault(_clone); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var GLOBAL_VISITOR_PROPS = ["enter", "exit"]; - -var Plugin = function (_Store) { - (0, _inherits3.default)(Plugin, _Store); - - function Plugin(plugin, key) { - (0, _classCallCheck3.default)(this, Plugin); - - var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this)); - - _this.initialized = false; - _this.raw = (0, _assign2.default)({}, plugin); - _this.key = _this.take("name") || key; - - _this.manipulateOptions = _this.take("manipulateOptions"); - _this.post = _this.take("post"); - _this.pre = _this.take("pre"); - _this.visitor = _this.normaliseVisitor((0, _clone2.default)(_this.take("visitor")) || {}); - return _this; - } - - Plugin.prototype.take = function take(key) { - var val = this.raw[key]; - delete this.raw[key]; - return val; - }; - - Plugin.prototype.chain = function chain(target, key) { - if (!target[key]) return this[key]; - if (!this[key]) return target[key]; - - var fns = [target[key], this[key]]; - - return function () { - var val = void 0; - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (fn) { - var ret = fn.apply(this, args); - if (ret != null) val = ret; - } - } - return val; - }; - }; - - Plugin.prototype.maybeInherit = function maybeInherit(loc) { - var inherits = this.take("inherits"); - if (!inherits) return; - - inherits = _optionManager2.default.normalisePlugin(inherits, loc, "inherits"); - - this.manipulateOptions = this.chain(inherits, "manipulateOptions"); - this.post = this.chain(inherits, "post"); - this.pre = this.chain(inherits, "pre"); - this.visitor = _babelTraverse2.default.visitors.merge([inherits.visitor, this.visitor]); - }; - - Plugin.prototype.init = function init(loc, i) { - if (this.initialized) return; - this.initialized = true; - - this.maybeInherit(loc); - - for (var key in this.raw) { - throw new Error(messages.get("pluginInvalidProperty", loc, i, key)); - } - }; - - Plugin.prototype.normaliseVisitor = function normaliseVisitor(visitor) { - for (var _iterator2 = GLOBAL_VISITOR_PROPS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var key = _ref2; - - if (visitor[key]) { - throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. " + "Please target individual nodes."); - } - } - - _babelTraverse2.default.explode(visitor); - return visitor; - }; - - return Plugin; -}(_store2.default); - -exports.default = Plugin; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/util.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/util.js deleted file mode 100644 index b35bbc3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/lib/util.js +++ /dev/null @@ -1,184 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.inspect = exports.inherits = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _util = require("util"); - -Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function get() { - return _util.inherits; - } -}); -Object.defineProperty(exports, "inspect", { - enumerable: true, - get: function get() { - return _util.inspect; - } -}); -exports.canCompile = canCompile; -exports.list = list; -exports.regexify = regexify; -exports.arrayify = arrayify; -exports.booleanify = booleanify; -exports.shouldIgnore = shouldIgnore; - -var _escapeRegExp = require("lodash/escapeRegExp"); - -var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); - -var _startsWith = require("lodash/startsWith"); - -var _startsWith2 = _interopRequireDefault(_startsWith); - -var _minimatch = require("minimatch"); - -var _minimatch2 = _interopRequireDefault(_minimatch); - -var _includes = require("lodash/includes"); - -var _includes2 = _interopRequireDefault(_includes); - -var _isRegExp = require("lodash/isRegExp"); - -var _isRegExp2 = _interopRequireDefault(_isRegExp); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -var _slash = require("slash"); - -var _slash2 = _interopRequireDefault(_slash); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function canCompile(filename, altExts) { - var exts = altExts || canCompile.EXTENSIONS; - var ext = _path2.default.extname(filename); - return (0, _includes2.default)(exts, ext); -} - -canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"]; - -function list(val) { - if (!val) { - return []; - } else if (Array.isArray(val)) { - return val; - } else if (typeof val === "string") { - return val.split(","); - } else { - return [val]; - } -} - -function regexify(val) { - if (!val) { - return new RegExp(/.^/); - } - - if (Array.isArray(val)) { - val = new RegExp(val.map(_escapeRegExp2.default).join("|"), "i"); - } - - if (typeof val === "string") { - val = (0, _slash2.default)(val); - - if ((0, _startsWith2.default)(val, "./") || (0, _startsWith2.default)(val, "*/")) val = val.slice(2); - if ((0, _startsWith2.default)(val, "**/")) val = val.slice(3); - - var regex = _minimatch2.default.makeRe(val, { nocase: true }); - return new RegExp(regex.source.slice(1, -1), "i"); - } - - if ((0, _isRegExp2.default)(val)) { - return val; - } - - throw new TypeError("illegal type for regexify"); -} - -function arrayify(val, mapFn) { - if (!val) return []; - if (typeof val === "boolean") return arrayify([val], mapFn); - if (typeof val === "string") return arrayify(list(val), mapFn); - - if (Array.isArray(val)) { - if (mapFn) val = val.map(mapFn); - return val; - } - - return [val]; -} - -function booleanify(val) { - if (val === "true" || val == 1) { - return true; - } - - if (val === "false" || val == 0 || !val) { - return false; - } - - return val; -} - -function shouldIgnore(filename) { - var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var only = arguments[2]; - - filename = filename.replace(/\\/g, "/"); - - if (only) { - for (var _iterator = only, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var pattern = _ref; - - if (_shouldIgnore(pattern, filename)) return false; - } - return true; - } else if (ignore.length) { - for (var _iterator2 = ignore, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _pattern = _ref2; - - if (_shouldIgnore(_pattern, filename)) return true; - } - } - - return false; -} - -function _shouldIgnore(pattern, filename) { - if (typeof pattern === "function") { - return pattern(filename); - } else { - return pattern.test(filename); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package-lock.json deleted file mode 100644 index c5932cc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package-lock.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "babel-core", - "version": "6.25.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "convert-source-map": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" - }, - "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "requires": { - "ms": "2.0.0" - } - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "private": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package.json deleted file mode 100644 index a375ba7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/package.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-core@^6.5.0", - "scope": null, - "escapedName": "babel-core", - "name": "babel-core", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-core@>=6.5.0 <7.0.0", - "_id": "babel-core@6.26.0", - "_inCache": true, - "_location": "/babel-core", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-core-6.26.0.tgz_1502898861183_0.43529116874560714" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-core@^6.5.0", - "scope": null, - "escapedName": "babel-core", - "name": "babel-core", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-register", - "/flarum-gulp", - "/gulp-babel" - ], - "_resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "_shasum": "af32f78b31a6fcef119c87b0fd8d9753f03a0bb8", - "_shrinkwrap": null, - "_spec": "babel-core@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.0", - "debug": "^2.6.8", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.7", - "slash": "^1.0.0", - "source-map": "^0.5.6" - }, - "description": "Babel compiler core.", - "devDependencies": { - "babel-helper-fixtures": "^6.26.0", - "babel-helper-transform-fixture-test-runner": "^6.26.0", - "babel-polyfill": "^6.26.0" - }, - "directories": {}, - "dist": { - "shasum": "af32f78b31a6fcef119c87b0fd8d9753f03a0bb8", - "tarball": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz" - }, - "homepage": "https://babeljs.io/", - "keywords": [ - "6to5", - "babel", - "classes", - "const", - "es6", - "harmony", - "let", - "modules", - "transpile", - "transpiler", - "var", - "babel-core", - "compiler" - ], - "license": "MIT", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-core", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-core" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/register.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/register.js deleted file mode 100644 index 97d35f2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core/register.js +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint max-len: 0 */ -// TODO: eventually deprecate this console.trace("use the `babel-register` package instead of `babel-core/register`"); -module.exports = require("babel-register"); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/README.md deleted file mode 100644 index ff215b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# babel-generator - -> Turns an AST into code. - -## Install - -```sh -npm install --save-dev babel-generator -``` - -## Usage - -```js -import {parse} from 'babylon'; -import generate from 'babel-generator'; - -const code = 'class Example {}'; -const ast = parse(code); - -const output = generate(ast, { /* options */ }, code); -``` - -## Options - -Options for formatting output: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -auxiliaryCommentBefore | string | | Optional string to add as a block comment at the start of the output file -auxiliaryCommentAfter | string | | Optional string to add as a block comment at the end of the output file -shouldPrintComment | function | `opts.comments` | Function that takes a comment (as a string) and returns `true` if the comment should be included in the output. By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment contains `@preserve` or `@license` -retainLines | boolean | `false` | Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces) -retainFunctionParens | boolean | `false` | Retain parens around function expressions (could be used to change engine parsing behavior) -comments | boolean | `true` | Should comments be included in output -compact | boolean or `'auto'` | `opts.minified` | Set to `true` to avoid adding whitespace for formatting -minified | boolean | `false` | Should the output be minified -concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`) -quotes | `'single'` or `'double'` | autodetect based on `ast.tokens` | The type of quote to use in the output -filename | string | | Used in warning messages -flowCommaSeparator | boolean | `false` | Set to `true` to use commas instead of semicolons as Flow property separators -jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©"; - -Options for source maps: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -sourceMaps | boolean | `false` | Enable generating source maps -sourceMapTarget | string | | The filename of the generated code that the source map will be associated with -sourceRoot | string | | A root for all relative URLs in the source map -sourceFileName | string | | The filename for the source code (i.e. the code in the `code` argument). This will only be used if `code` is a string. - -## AST from Multiple Sources - -In most cases, Babel does a 1:1 transformation of input-file to output-file. However, -you may be dealing with AST constructed from multiple sources - JS files, templates, etc. -If this is the case, and you want the sourcemaps to reflect the correct sources, you'll need -to pass an object to `generate` as the `code` parameter. Keys -should be the source filenames, and values should be the source content. - -Here's an example of what that might look like: - -```js -import {parse} from 'babylon'; -import generate from 'babel-generator'; - -const a = 'var a = 1;'; -const b = 'var b = 2;'; -const astA = parse(a, { sourceFilename: 'a.js' }); -const astB = parse(b, { sourceFilename: 'b.js' }); -const ast = { - type: 'Program', - body: [].concat(astA.program.body, astB.program.body) -}; - -const { code, map } = generate(ast, { sourceMaps: true }, { - 'a.js': a, - 'b.js': b -}); - -// Sourcemap will point to both a.js and b.js where appropriate. -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/buffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/buffer.js deleted file mode 100644 index 40b6c25..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/buffer.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _trimRight = require("trim-right"); - -var _trimRight2 = _interopRequireDefault(_trimRight); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SPACES_RE = /^[ \t]+$/; - -var Buffer = function () { - function Buffer(map) { - (0, _classCallCheck3.default)(this, Buffer); - this._map = null; - this._buf = []; - this._last = ""; - this._queue = []; - this._position = { - line: 1, - column: 0 - }; - this._sourcePosition = { - identifierName: null, - line: null, - column: null, - filename: null - }; - - this._map = map; - } - - Buffer.prototype.get = function get() { - this._flush(); - - var map = this._map; - var result = { - code: (0, _trimRight2.default)(this._buf.join("")), - map: null, - rawMappings: map && map.getRawMappings() - }; - - if (map) { - Object.defineProperty(result, "map", { - configurable: true, - enumerable: true, - get: function get() { - return this.map = map.get(); - }, - set: function set(value) { - Object.defineProperty(this, "map", { value: value, writable: true }); - } - }); - } - - return result; - }; - - Buffer.prototype.append = function append(str) { - this._flush(); - var _sourcePosition = this._sourcePosition, - line = _sourcePosition.line, - column = _sourcePosition.column, - filename = _sourcePosition.filename, - identifierName = _sourcePosition.identifierName; - - this._append(str, line, column, identifierName, filename); - }; - - Buffer.prototype.queue = function queue(str) { - if (str === "\n") while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { - this._queue.shift(); - }var _sourcePosition2 = this._sourcePosition, - line = _sourcePosition2.line, - column = _sourcePosition2.column, - filename = _sourcePosition2.filename, - identifierName = _sourcePosition2.identifierName; - - this._queue.unshift([str, line, column, identifierName, filename]); - }; - - Buffer.prototype._flush = function _flush() { - var item = void 0; - while (item = this._queue.pop()) { - this._append.apply(this, item); - } - }; - - Buffer.prototype._append = function _append(str, line, column, identifierName, filename) { - if (this._map && str[0] !== "\n") { - this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename); - } - - this._buf.push(str); - this._last = str[str.length - 1]; - - for (var i = 0; i < str.length; i++) { - if (str[i] === "\n") { - this._position.line++; - this._position.column = 0; - } else { - this._position.column++; - } - } - }; - - Buffer.prototype.removeTrailingNewline = function removeTrailingNewline() { - if (this._queue.length > 0 && this._queue[0][0] === "\n") this._queue.shift(); - }; - - Buffer.prototype.removeLastSemicolon = function removeLastSemicolon() { - if (this._queue.length > 0 && this._queue[0][0] === ";") this._queue.shift(); - }; - - Buffer.prototype.endsWith = function endsWith(suffix) { - if (suffix.length === 1) { - var last = void 0; - if (this._queue.length > 0) { - var str = this._queue[0][0]; - last = str[str.length - 1]; - } else { - last = this._last; - } - - return last === suffix; - } - - var end = this._last + this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - if (suffix.length <= end.length) { - return end.slice(-suffix.length) === suffix; - } - - return false; - }; - - Buffer.prototype.hasContent = function hasContent() { - return this._queue.length > 0 || !!this._last; - }; - - Buffer.prototype.source = function source(prop, loc) { - if (prop && !loc) return; - - var pos = loc ? loc[prop] : null; - - this._sourcePosition.identifierName = loc && loc.identifierName || null; - this._sourcePosition.line = pos ? pos.line : null; - this._sourcePosition.column = pos ? pos.column : null; - this._sourcePosition.filename = loc && loc.filename || null; - }; - - Buffer.prototype.withSource = function withSource(prop, loc, cb) { - if (!this._map) return cb(); - - var originalLine = this._sourcePosition.line; - var originalColumn = this._sourcePosition.column; - var originalFilename = this._sourcePosition.filename; - var originalIdentifierName = this._sourcePosition.identifierName; - - this.source(prop, loc); - - cb(); - - this._sourcePosition.line = originalLine; - this._sourcePosition.column = originalColumn; - this._sourcePosition.filename = originalFilename; - this._sourcePosition.identifierName = originalIdentifierName; - }; - - Buffer.prototype.getCurrentColumn = function getCurrentColumn() { - var extra = this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - var lastIndex = extra.lastIndexOf("\n"); - - return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; - }; - - Buffer.prototype.getCurrentLine = function getCurrentLine() { - var extra = this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - - var count = 0; - for (var i = 0; i < extra.length; i++) { - if (extra[i] === "\n") count++; - } - - return this._position.line + count; - }; - - return Buffer; -}(); - -exports.default = Buffer; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/base.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/base.js deleted file mode 100644 index 938022f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/base.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.File = File; -exports.Program = Program; -exports.BlockStatement = BlockStatement; -exports.Noop = Noop; -exports.Directive = Directive; - -var _types = require("./types"); - -Object.defineProperty(exports, "DirectiveLiteral", { - enumerable: true, - get: function get() { - return _types.StringLiteral; - } -}); -function File(node) { - this.print(node.program, node); -} - -function Program(node) { - this.printInnerComments(node, false); - - this.printSequence(node.directives, node); - if (node.directives && node.directives.length) this.newline(); - - this.printSequence(node.body, node); -} - -function BlockStatement(node) { - this.token("{"); - this.printInnerComments(node); - - var hasDirectives = node.directives && node.directives.length; - - if (node.body.length || hasDirectives) { - this.newline(); - - this.printSequence(node.directives, node, { indent: true }); - if (hasDirectives) this.newline(); - - this.printSequence(node.body, node, { indent: true }); - this.removeTrailingNewline(); - - this.source("end", node.loc); - - if (!this.endsWith("\n")) this.newline(); - - this.rightBrace(); - } else { - this.source("end", node.loc); - this.token("}"); - } -} - -function Noop() {} - -function Directive(node) { - this.print(node.value, node); - this.semicolon(); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/classes.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/classes.js deleted file mode 100644 index 73f9cc3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/classes.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ClassDeclaration = ClassDeclaration; -exports.ClassBody = ClassBody; -exports.ClassProperty = ClassProperty; -exports.ClassMethod = ClassMethod; -function ClassDeclaration(node) { - this.printJoin(node.decorators, node); - this.word("class"); - - if (node.id) { - this.space(); - this.print(node.id, node); - } - - this.print(node.typeParameters, node); - - if (node.superClass) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.superClass, node); - this.print(node.superTypeParameters, node); - } - - if (node.implements) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -exports.ClassExpression = ClassDeclaration; -function ClassBody(node) { - this.token("{"); - this.printInnerComments(node); - if (node.body.length === 0) { - this.token("}"); - } else { - this.newline(); - - this.indent(); - this.printSequence(node.body, node); - this.dedent(); - - if (!this.endsWith("\n")) this.newline(); - - this.rightBrace(); - } -} - -function ClassProperty(node) { - this.printJoin(node.decorators, node); - - if (node.static) { - this.word("static"); - this.space(); - } - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - this._variance(node); - this.print(node.key, node); - } - this.print(node.typeAnnotation, node); - if (node.value) { - this.space(); - this.token("="); - this.space(); - this.print(node.value, node); - } - this.semicolon(); -} - -function ClassMethod(node) { - this.printJoin(node.decorators, node); - - if (node.static) { - this.word("static"); - this.space(); - } - - if (node.kind === "constructorCall") { - this.word("call"); - this.space(); - } - - this._method(node); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/expressions.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/expressions.js deleted file mode 100644 index d65fa78..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/expressions.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.LogicalExpression = exports.BinaryExpression = exports.AwaitExpression = exports.YieldExpression = undefined; -exports.UnaryExpression = UnaryExpression; -exports.DoExpression = DoExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.UpdateExpression = UpdateExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.NewExpression = NewExpression; -exports.SequenceExpression = SequenceExpression; -exports.ThisExpression = ThisExpression; -exports.Super = Super; -exports.Decorator = Decorator; -exports.CallExpression = CallExpression; -exports.Import = Import; -exports.EmptyStatement = EmptyStatement; -exports.ExpressionStatement = ExpressionStatement; -exports.AssignmentPattern = AssignmentPattern; -exports.AssignmentExpression = AssignmentExpression; -exports.BindExpression = BindExpression; -exports.MemberExpression = MemberExpression; -exports.MetaProperty = MetaProperty; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _node = require("../node"); - -var n = _interopRequireWildcard(_node); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function UnaryExpression(node) { - if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") { - this.word(node.operator); - this.space(); - } else { - this.token(node.operator); - } - - this.print(node.argument, node); -} - -function DoExpression(node) { - this.word("do"); - this.space(); - this.print(node.body, node); -} - -function ParenthesizedExpression(node) { - this.token("("); - this.print(node.expression, node); - this.token(")"); -} - -function UpdateExpression(node) { - if (node.prefix) { - this.token(node.operator); - this.print(node.argument, node); - } else { - this.print(node.argument, node); - this.token(node.operator); - } -} - -function ConditionalExpression(node) { - this.print(node.test, node); - this.space(); - this.token("?"); - this.space(); - this.print(node.consequent, node); - this.space(); - this.token(":"); - this.space(); - this.print(node.alternate, node); -} - -function NewExpression(node, parent) { - this.word("new"); - this.space(); - this.print(node.callee, node); - if (node.arguments.length === 0 && this.format.minified && !t.isCallExpression(parent, { callee: node }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) return; - - this.token("("); - this.printList(node.arguments, node); - this.token(")"); -} - -function SequenceExpression(node) { - this.printList(node.expressions, node); -} - -function ThisExpression() { - this.word("this"); -} - -function Super() { - this.word("super"); -} - -function Decorator(node) { - this.token("@"); - this.print(node.expression, node); - this.newline(); -} - -function commaSeparatorNewline() { - this.token(","); - this.newline(); - - if (!this.endsWith("\n")) this.space(); -} - -function CallExpression(node) { - this.print(node.callee, node); - - this.token("("); - - var isPrettyCall = node._prettyCall; - - var separator = void 0; - if (isPrettyCall) { - separator = commaSeparatorNewline; - this.newline(); - this.indent(); - } - - this.printList(node.arguments, node, { separator: separator }); - - if (isPrettyCall) { - this.newline(); - this.dedent(); - } - - this.token(")"); -} - -function Import() { - this.word("import"); -} - -function buildYieldAwait(keyword) { - return function (node) { - this.word(keyword); - - if (node.delegate) { - this.token("*"); - } - - if (node.argument) { - this.space(); - var terminatorState = this.startTerminatorless(); - this.print(node.argument, node); - this.endTerminatorless(terminatorState); - } - }; -} - -var YieldExpression = exports.YieldExpression = buildYieldAwait("yield"); -var AwaitExpression = exports.AwaitExpression = buildYieldAwait("await"); - -function EmptyStatement() { - this.semicolon(true); -} - -function ExpressionStatement(node) { - this.print(node.expression, node); - this.semicolon(); -} - -function AssignmentPattern(node) { - this.print(node.left, node); - if (node.left.optional) this.token("?"); - this.print(node.left.typeAnnotation, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); -} - -function AssignmentExpression(node, parent) { - var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); - - if (parens) { - this.token("("); - } - - this.print(node.left, node); - - this.space(); - if (node.operator === "in" || node.operator === "instanceof") { - this.word(node.operator); - } else { - this.token(node.operator); - } - this.space(); - - this.print(node.right, node); - - if (parens) { - this.token(")"); - } -} - -function BindExpression(node) { - this.print(node.object, node); - this.token("::"); - this.print(node.callee, node); -} - -exports.BinaryExpression = AssignmentExpression; -exports.LogicalExpression = AssignmentExpression; -function MemberExpression(node) { - this.print(node.object, node); - - if (!node.computed && t.isMemberExpression(node.property)) { - throw new TypeError("Got a MemberExpression for MemberExpression property"); - } - - var computed = node.computed; - if (t.isLiteral(node.property) && typeof node.property.value === "number") { - computed = true; - } - - if (computed) { - this.token("["); - this.print(node.property, node); - this.token("]"); - } else { - this.token("."); - this.print(node.property, node); - } -} - -function MetaProperty(node) { - this.print(node.meta, node); - this.token("."); - this.print(node.property, node); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/flow.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/flow.js deleted file mode 100644 index 819c26e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/flow.js +++ /dev/null @@ -1,504 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.TypeParameterDeclaration = exports.StringLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = exports.GenericTypeAnnotation = exports.ClassImplements = undefined; -exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.DeclareClass = DeclareClass; -exports.DeclareFunction = DeclareFunction; -exports.DeclareInterface = DeclareInterface; -exports.DeclareModule = DeclareModule; -exports.DeclareModuleExports = DeclareModuleExports; -exports.DeclareTypeAlias = DeclareTypeAlias; -exports.DeclareOpaqueType = DeclareOpaqueType; -exports.DeclareVariable = DeclareVariable; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.ExistentialTypeParam = ExistentialTypeParam; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.FunctionTypeParam = FunctionTypeParam; -exports.InterfaceExtends = InterfaceExtends; -exports._interfaceish = _interfaceish; -exports._variance = _variance; -exports.InterfaceDeclaration = InterfaceDeclaration; -exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.NullableTypeAnnotation = NullableTypeAnnotation; - -var _types = require("./types"); - -Object.defineProperty(exports, "NumericLiteralTypeAnnotation", { - enumerable: true, - get: function get() { - return _types.NumericLiteral; - } -}); -Object.defineProperty(exports, "StringLiteralTypeAnnotation", { - enumerable: true, - get: function get() { - return _types.StringLiteral; - } -}); -exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.StringTypeAnnotation = StringTypeAnnotation; -exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.TypeAlias = TypeAlias; -exports.OpaqueType = OpaqueType; -exports.TypeAnnotation = TypeAnnotation; -exports.TypeParameter = TypeParameter; -exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.ObjectTypeProperty = ObjectTypeProperty; -exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TypeCastExpression = TypeCastExpression; -exports.VoidTypeAnnotation = VoidTypeAnnotation; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function AnyTypeAnnotation() { - this.word("any"); -} - -function ArrayTypeAnnotation(node) { - this.print(node.elementType, node); - this.token("["); - this.token("]"); -} - -function BooleanTypeAnnotation() { - this.word("boolean"); -} - -function BooleanLiteralTypeAnnotation(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteralTypeAnnotation() { - this.word("null"); -} - -function DeclareClass(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("class"); - this.space(); - this._interfaceish(node); -} - -function DeclareFunction(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("function"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation.typeAnnotation, node); - this.semicolon(); -} - -function DeclareInterface(node) { - this.word("declare"); - this.space(); - this.InterfaceDeclaration(node); -} - -function DeclareModule(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.space(); - this.print(node.id, node); - this.space(); - this.print(node.body, node); -} - -function DeclareModuleExports(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.token("."); - this.word("exports"); - this.print(node.typeAnnotation, node); -} - -function DeclareTypeAlias(node) { - this.word("declare"); - this.space(); - this.TypeAlias(node); -} - -function DeclareOpaqueType(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.OpaqueType(node); -} - -function DeclareVariable(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("var"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); - this.semicolon(); -} - -function DeclareExportDeclaration(node) { - this.word("declare"); - this.space(); - this.word("export"); - this.space(); - if (node.default) { - this.word("default"); - this.space(); - } - - FlowExportDeclaration.apply(this, arguments); -} - -function FlowExportDeclaration(node) { - if (node.declaration) { - var declar = node.declaration; - this.print(declar, node); - if (!t.isStatement(declar)) this.semicolon(); - } else { - this.token("{"); - if (node.specifiers.length) { - this.space(); - this.printList(node.specifiers, node); - this.space(); - } - this.token("}"); - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ExistentialTypeParam() { - this.token("*"); -} - -function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.params, node); - - if (node.rest) { - if (node.params.length) { - this.token(","); - this.space(); - } - this.token("..."); - this.print(node.rest, node); - } - - this.token(")"); - - if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction") { - this.token(":"); - } else { - this.space(); - this.token("=>"); - } - - this.space(); - this.print(node.returnType, node); -} - -function FunctionTypeParam(node) { - this.print(node.name, node); - if (node.optional) this.token("?"); - this.token(":"); - this.space(); - this.print(node.typeAnnotation, node); -} - -function InterfaceExtends(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); -} - -exports.ClassImplements = InterfaceExtends; -exports.GenericTypeAnnotation = InterfaceExtends; -function _interfaceish(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); - if (node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - if (node.mixins && node.mixins.length) { - this.space(); - this.word("mixins"); - this.space(); - this.printList(node.mixins, node); - } - this.space(); - this.print(node.body, node); -} - -function _variance(node) { - if (node.variance === "plus") { - this.token("+"); - } else if (node.variance === "minus") { - this.token("-"); - } -} - -function InterfaceDeclaration(node) { - this.word("interface"); - this.space(); - this._interfaceish(node); -} - -function andSeparator() { - this.space(); - this.token("&"); - this.space(); -} - -function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, node, { separator: andSeparator }); -} - -function MixedTypeAnnotation() { - this.word("mixed"); -} - -function EmptyTypeAnnotation() { - this.word("empty"); -} - -function NullableTypeAnnotation(node) { - this.token("?"); - this.print(node.typeAnnotation, node); -} - -function NumberTypeAnnotation() { - this.word("number"); -} - -function StringTypeAnnotation() { - this.word("string"); -} - -function ThisTypeAnnotation() { - this.word("this"); -} - -function TupleTypeAnnotation(node) { - this.token("["); - this.printList(node.types, node); - this.token("]"); -} - -function TypeofTypeAnnotation(node) { - this.word("typeof"); - this.space(); - this.print(node.argument, node); -} - -function TypeAlias(node) { - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); - this.semicolon(); -} -function OpaqueType(node) { - this.word("opaque"); - this.space(); - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - if (node.supertype) { - this.token(":"); - this.space(); - this.print(node.supertype, node); - } - if (node.impltype) { - this.space(); - this.token("="); - this.space(); - this.print(node.impltype, node); - } - this.semicolon(); -} - -function TypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TypeParameter(node) { - this._variance(node); - - this.word(node.name); - - if (node.bound) { - this.print(node.bound, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function TypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -exports.TypeParameterDeclaration = TypeParameterInstantiation; -function ObjectTypeAnnotation(node) { - var _this = this; - - if (node.exact) { - this.token("{|"); - } else { - this.token("{"); - } - - var props = node.properties.concat(node.callProperties, node.indexers); - - if (props.length) { - this.space(); - - this.printJoin(props, node, { - addNewlines: function addNewlines(leading) { - if (leading && !props[0]) return 1; - }, - - indent: true, - statement: true, - iterator: function iterator() { - if (props.length !== 1) { - if (_this.format.flowCommaSeparator) { - _this.token(","); - } else { - _this.semicolon(); - } - _this.space(); - } - } - }); - - this.space(); - } - - if (node.exact) { - this.token("|}"); - } else { - this.token("}"); - } -} - -function ObjectTypeCallProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - this.print(node.value, node); -} - -function ObjectTypeIndexer(node) { - if (node.static) { - this.word("static"); - this.space(); - } - this._variance(node); - this.token("["); - this.print(node.id, node); - this.token(":"); - this.space(); - this.print(node.key, node); - this.token("]"); - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ObjectTypeProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - this._variance(node); - this.print(node.key, node); - if (node.optional) this.token("?"); - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ObjectTypeSpreadProperty(node) { - this.token("..."); - this.print(node.argument, node); -} - -function QualifiedTypeIdentifier(node) { - this.print(node.qualification, node); - this.token("."); - this.print(node.id, node); -} - -function orSeparator() { - this.space(); - this.token("|"); - this.space(); -} - -function UnionTypeAnnotation(node) { - this.printJoin(node.types, node, { separator: orSeparator }); -} - -function TypeCastExpression(node) { - this.token("("); - this.print(node.expression, node); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function VoidTypeAnnotation() { - this.word("void"); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/jsx.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/jsx.js deleted file mode 100644 index 6632db1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/jsx.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.JSXAttribute = JSXAttribute; -exports.JSXIdentifier = JSXIdentifier; -exports.JSXNamespacedName = JSXNamespacedName; -exports.JSXMemberExpression = JSXMemberExpression; -exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.JSXExpressionContainer = JSXExpressionContainer; -exports.JSXSpreadChild = JSXSpreadChild; -exports.JSXText = JSXText; -exports.JSXElement = JSXElement; -exports.JSXOpeningElement = JSXOpeningElement; -exports.JSXClosingElement = JSXClosingElement; -exports.JSXEmptyExpression = JSXEmptyExpression; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function JSXAttribute(node) { - this.print(node.name, node); - if (node.value) { - this.token("="); - this.print(node.value, node); - } -} - -function JSXIdentifier(node) { - this.word(node.name); -} - -function JSXNamespacedName(node) { - this.print(node.namespace, node); - this.token(":"); - this.print(node.name, node); -} - -function JSXMemberExpression(node) { - this.print(node.object, node); - this.token("."); - this.print(node.property, node); -} - -function JSXSpreadAttribute(node) { - this.token("{"); - this.token("..."); - this.print(node.argument, node); - this.token("}"); -} - -function JSXExpressionContainer(node) { - this.token("{"); - this.print(node.expression, node); - this.token("}"); -} - -function JSXSpreadChild(node) { - this.token("{"); - this.token("..."); - this.print(node.expression, node); - this.token("}"); -} - -function JSXText(node) { - this.token(node.value); -} - -function JSXElement(node) { - var open = node.openingElement; - this.print(open, node); - if (open.selfClosing) return; - - this.indent(); - for (var _iterator = node.children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var child = _ref; - - this.print(child, node); - } - this.dedent(); - - this.print(node.closingElement, node); -} - -function spaceSeparator() { - this.space(); -} - -function JSXOpeningElement(node) { - this.token("<"); - this.print(node.name, node); - if (node.attributes.length > 0) { - this.space(); - this.printJoin(node.attributes, node, { separator: spaceSeparator }); - } - if (node.selfClosing) { - this.space(); - this.token("/>"); - } else { - this.token(">"); - } -} - -function JSXClosingElement(node) { - this.token(""); -} - -function JSXEmptyExpression() {} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/methods.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/methods.js deleted file mode 100644 index 6a0dfe7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/methods.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.FunctionDeclaration = undefined; -exports._params = _params; -exports._method = _method; -exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _params(node) { - var _this = this; - - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.params, node, { - iterator: function iterator(node) { - if (node.optional) _this.token("?"); - _this.print(node.typeAnnotation, node); - } - }); - this.token(")"); - - if (node.returnType) { - this.print(node.returnType, node); - } -} - -function _method(node) { - var kind = node.kind; - var key = node.key; - - if (kind === "method" || kind === "init") { - if (node.generator) { - this.token("*"); - } - } - - if (kind === "get" || kind === "set") { - this.word(kind); - this.space(); - } - - if (node.async) { - this.word("async"); - this.space(); - } - - if (node.computed) { - this.token("["); - this.print(key, node); - this.token("]"); - } else { - this.print(key, node); - } - - this._params(node); - this.space(); - this.print(node.body, node); -} - -function FunctionExpression(node) { - if (node.async) { - this.word("async"); - this.space(); - } - this.word("function"); - if (node.generator) this.token("*"); - - if (node.id) { - this.space(); - this.print(node.id, node); - } else { - this.space(); - } - - this._params(node); - this.space(); - this.print(node.body, node); -} - -exports.FunctionDeclaration = FunctionExpression; -function ArrowFunctionExpression(node) { - if (node.async) { - this.word("async"); - this.space(); - } - - var firstParam = node.params[0]; - - if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) { - this.print(firstParam, node); - } else { - this._params(node); - } - - this.space(); - this.token("=>"); - this.space(); - - this.print(node.body, node); -} - -function hasTypes(node, param) { - return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/modules.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/modules.js deleted file mode 100644 index 6080535..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/modules.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ImportSpecifier = ImportSpecifier; -exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.ExportSpecifier = ExportSpecifier; -exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.ExportAllDeclaration = ExportAllDeclaration; -exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.ImportDeclaration = ImportDeclaration; -exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function ImportSpecifier(node) { - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - this.print(node.imported, node); - if (node.local && node.local.name !== node.imported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); - } -} - -function ImportDefaultSpecifier(node) { - this.print(node.local, node); -} - -function ExportDefaultSpecifier(node) { - this.print(node.exported, node); -} - -function ExportSpecifier(node) { - this.print(node.local, node); - if (node.exported && node.local.name !== node.exported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); - } -} - -function ExportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); -} - -function ExportAllDeclaration(node) { - this.word("export"); - this.space(); - this.token("*"); - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - this.semicolon(); -} - -function ExportNamedDeclaration() { - this.word("export"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDefaultDeclaration() { - this.word("export"); - this.space(); - this.word("default"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDeclaration(node) { - if (node.declaration) { - var declar = node.declaration; - this.print(declar, node); - if (!t.isStatement(declar)) this.semicolon(); - } else { - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - - var specifiers = node.specifiers.slice(0); - - var hasSpecial = false; - while (true) { - var first = specifiers[0]; - if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) { - hasSpecial = true; - this.print(specifiers.shift(), node); - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length || !specifiers.length && !hasSpecial) { - this.token("{"); - if (specifiers.length) { - this.space(); - this.printList(specifiers, node); - this.space(); - } - this.token("}"); - } - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ImportDeclaration(node) { - this.word("import"); - this.space(); - - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - var specifiers = node.specifiers.slice(0); - if (specifiers && specifiers.length) { - while (true) { - var first = specifiers[0]; - if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift(), node); - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length) { - this.token("{"); - this.space(); - this.printList(specifiers, node); - this.space(); - this.token("}"); - } - - this.space(); - this.word("from"); - this.space(); - } - - this.print(node.source, node); - this.semicolon(); -} - -function ImportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/statements.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/statements.js deleted file mode 100644 index d74b191..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/statements.js +++ /dev/null @@ -1,316 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForAwaitStatement = exports.ForOfStatement = exports.ForInStatement = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.WithStatement = WithStatement; -exports.IfStatement = IfStatement; -exports.ForStatement = ForStatement; -exports.WhileStatement = WhileStatement; -exports.DoWhileStatement = DoWhileStatement; -exports.LabeledStatement = LabeledStatement; -exports.TryStatement = TryStatement; -exports.CatchClause = CatchClause; -exports.SwitchStatement = SwitchStatement; -exports.SwitchCase = SwitchCase; -exports.DebuggerStatement = DebuggerStatement; -exports.VariableDeclaration = VariableDeclaration; -exports.VariableDeclarator = VariableDeclarator; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function WithStatement(node) { - this.word("with"); - this.space(); - this.token("("); - this.print(node.object, node); - this.token(")"); - this.printBlock(node); -} - -function IfStatement(node) { - this.word("if"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.space(); - - var needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent)); - if (needsBlock) { - this.token("{"); - this.newline(); - this.indent(); - } - - this.printAndIndentOnComments(node.consequent, node); - - if (needsBlock) { - this.dedent(); - this.newline(); - this.token("}"); - } - - if (node.alternate) { - if (this.endsWith("}")) this.space(); - this.word("else"); - this.space(); - this.printAndIndentOnComments(node.alternate, node); - } -} - -function getLastStatement(statement) { - if (!t.isStatement(statement.body)) return statement; - return getLastStatement(statement.body); -} - -function ForStatement(node) { - this.word("for"); - this.space(); - this.token("("); - - this.inForStatementInitCounter++; - this.print(node.init, node); - this.inForStatementInitCounter--; - this.token(";"); - - if (node.test) { - this.space(); - this.print(node.test, node); - } - this.token(";"); - - if (node.update) { - this.space(); - this.print(node.update, node); - } - - this.token(")"); - this.printBlock(node); -} - -function WhileStatement(node) { - this.word("while"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.printBlock(node); -} - -var buildForXStatement = function buildForXStatement(op) { - return function (node) { - this.word("for"); - this.space(); - if (op === "await") { - this.word("await"); - this.space(); - } - this.token("("); - - this.print(node.left, node); - this.space(); - this.word(op === "await" ? "of" : op); - this.space(); - this.print(node.right, node); - this.token(")"); - this.printBlock(node); - }; -}; - -var ForInStatement = exports.ForInStatement = buildForXStatement("in"); -var ForOfStatement = exports.ForOfStatement = buildForXStatement("of"); -var ForAwaitStatement = exports.ForAwaitStatement = buildForXStatement("await"); - -function DoWhileStatement(node) { - this.word("do"); - this.space(); - this.print(node.body, node); - this.space(); - this.word("while"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.semicolon(); -} - -function buildLabelStatement(prefix) { - var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "label"; - - return function (node) { - this.word(prefix); - - var label = node[key]; - if (label) { - this.space(); - - var terminatorState = this.startTerminatorless(); - this.print(label, node); - this.endTerminatorless(terminatorState); - } - - this.semicolon(); - }; -} - -var ContinueStatement = exports.ContinueStatement = buildLabelStatement("continue"); -var ReturnStatement = exports.ReturnStatement = buildLabelStatement("return", "argument"); -var BreakStatement = exports.BreakStatement = buildLabelStatement("break"); -var ThrowStatement = exports.ThrowStatement = buildLabelStatement("throw", "argument"); - -function LabeledStatement(node) { - this.print(node.label, node); - this.token(":"); - this.space(); - this.print(node.body, node); -} - -function TryStatement(node) { - this.word("try"); - this.space(); - this.print(node.block, node); - this.space(); - - if (node.handlers) { - this.print(node.handlers[0], node); - } else { - this.print(node.handler, node); - } - - if (node.finalizer) { - this.space(); - this.word("finally"); - this.space(); - this.print(node.finalizer, node); - } -} - -function CatchClause(node) { - this.word("catch"); - this.space(); - this.token("("); - this.print(node.param, node); - this.token(")"); - this.space(); - this.print(node.body, node); -} - -function SwitchStatement(node) { - this.word("switch"); - this.space(); - this.token("("); - this.print(node.discriminant, node); - this.token(")"); - this.space(); - this.token("{"); - - this.printSequence(node.cases, node, { - indent: true, - addNewlines: function addNewlines(leading, cas) { - if (!leading && node.cases[node.cases.length - 1] === cas) return -1; - } - }); - - this.token("}"); -} - -function SwitchCase(node) { - if (node.test) { - this.word("case"); - this.space(); - this.print(node.test, node); - this.token(":"); - } else { - this.word("default"); - this.token(":"); - } - - if (node.consequent.length) { - this.newline(); - this.printSequence(node.consequent, node, { indent: true }); - } -} - -function DebuggerStatement() { - this.word("debugger"); - this.semicolon(); -} - -function variableDeclarationIdent() { - this.token(","); - this.newline(); - if (this.endsWith("\n")) for (var i = 0; i < 4; i++) { - this.space(true); - } -} - -function constDeclarationIdent() { - this.token(","); - this.newline(); - if (this.endsWith("\n")) for (var i = 0; i < 6; i++) { - this.space(true); - } -} - -function VariableDeclaration(node, parent) { - this.word(node.kind); - this.space(); - - var hasInits = false; - - if (!t.isFor(parent)) { - for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var declar = _ref; - - if (declar.init) { - hasInits = true; - } - } - } - - var separator = void 0; - if (hasInits) { - separator = node.kind === "const" ? constDeclarationIdent : variableDeclarationIdent; - } - - this.printList(node.declarations, node, { separator: separator }); - - if (t.isFor(parent)) { - if (parent.left === node || parent.init === node) return; - } - - this.semicolon(); -} - -function VariableDeclarator(node) { - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); - if (node.init) { - this.space(); - this.token("="); - this.space(); - this.print(node.init, node); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/template-literals.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/template-literals.js deleted file mode 100644 index 32467eb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/template-literals.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.TemplateElement = TemplateElement; -exports.TemplateLiteral = TemplateLiteral; -function TaggedTemplateExpression(node) { - this.print(node.tag, node); - this.print(node.quasi, node); -} - -function TemplateElement(node, parent) { - var isFirst = parent.quasis[0] === node; - var isLast = parent.quasis[parent.quasis.length - 1] === node; - - var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); - - this.token(value); -} - -function TemplateLiteral(node) { - var quasis = node.quasis; - - for (var i = 0; i < quasis.length; i++) { - this.print(quasis[i], node); - - if (i + 1 < quasis.length) { - this.print(node.expressions[i], node); - } - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/types.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/types.js deleted file mode 100644 index d5e081f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/generators/types.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ArrayPattern = exports.ObjectPattern = exports.RestProperty = exports.SpreadProperty = exports.SpreadElement = undefined; -exports.Identifier = Identifier; -exports.RestElement = RestElement; -exports.ObjectExpression = ObjectExpression; -exports.ObjectMethod = ObjectMethod; -exports.ObjectProperty = ObjectProperty; -exports.ArrayExpression = ArrayExpression; -exports.RegExpLiteral = RegExpLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.NumericLiteral = NumericLiteral; -exports.StringLiteral = StringLiteral; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _jsesc = require("jsesc"); - -var _jsesc2 = _interopRequireDefault(_jsesc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function Identifier(node) { - if (node.variance) { - if (node.variance === "plus") { - this.token("+"); - } else if (node.variance === "minus") { - this.token("-"); - } - } - - this.word(node.name); -} - -function RestElement(node) { - this.token("..."); - this.print(node.argument, node); -} - -exports.SpreadElement = RestElement; -exports.SpreadProperty = RestElement; -exports.RestProperty = RestElement; -function ObjectExpression(node) { - var props = node.properties; - - this.token("{"); - this.printInnerComments(node); - - if (props.length) { - this.space(); - this.printList(props, node, { indent: true, statement: true }); - this.space(); - } - - this.token("}"); -} - -exports.ObjectPattern = ObjectExpression; -function ObjectMethod(node) { - this.printJoin(node.decorators, node); - this._method(node); -} - -function ObjectProperty(node) { - this.printJoin(node.decorators, node); - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value, node); - return; - } - - this.print(node.key, node); - - if (node.shorthand && t.isIdentifier(node.key) && t.isIdentifier(node.value) && node.key.name === node.value.name) { - return; - } - } - - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ArrayExpression(node) { - var elems = node.elements; - var len = elems.length; - - this.token("["); - this.printInnerComments(node); - - for (var i = 0; i < elems.length; i++) { - var elem = elems[i]; - if (elem) { - if (i > 0) this.space(); - this.print(elem, node); - if (i < len - 1) this.token(","); - } else { - this.token(","); - } - } - - this.token("]"); -} - -exports.ArrayPattern = ArrayExpression; -function RegExpLiteral(node) { - this.word("/" + node.pattern + "/" + node.flags); -} - -function BooleanLiteral(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteral() { - this.word("null"); -} - -function NumericLiteral(node) { - var raw = this.getPossibleRaw(node); - var value = node.value + ""; - if (raw == null) { - this.number(value); - } else if (this.format.minified) { - this.number(raw.length < value.length ? raw : value); - } else { - this.number(raw); - } -} - -function StringLiteral(node, parent) { - var raw = this.getPossibleRaw(node); - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - var opts = { - quotes: t.isJSX(parent) ? "double" : this.format.quotes, - wrap: true - }; - if (this.format.jsonCompatibleStrings) { - opts.json = true; - } - var val = (0, _jsesc2.default)(node.value, opts); - - return this.token(val); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/index.js deleted file mode 100644 index e8da09e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/index.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.CodeGenerator = undefined; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -exports.default = function (ast, opts, code) { - var gen = new Generator(ast, opts, code); - return gen.generate(); -}; - -var _detectIndent = require("detect-indent"); - -var _detectIndent2 = _interopRequireDefault(_detectIndent); - -var _sourceMap = require("./source-map"); - -var _sourceMap2 = _interopRequireDefault(_sourceMap); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _printer = require("./printer"); - -var _printer2 = _interopRequireDefault(_printer); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Generator = function (_Printer) { - (0, _inherits3.default)(Generator, _Printer); - - function Generator(ast) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var code = arguments[2]; - (0, _classCallCheck3.default)(this, Generator); - - var tokens = ast.tokens || []; - var format = normalizeOptions(code, opts, tokens); - var map = opts.sourceMaps ? new _sourceMap2.default(opts, code) : null; - - var _this = (0, _possibleConstructorReturn3.default)(this, _Printer.call(this, format, map, tokens)); - - _this.ast = ast; - return _this; - } - - Generator.prototype.generate = function generate() { - return _Printer.prototype.generate.call(this, this.ast); - }; - - return Generator; -}(_printer2.default); - -function normalizeOptions(code, opts, tokens) { - var style = " "; - if (code && typeof code === "string") { - var indent = (0, _detectIndent2.default)(code).indent; - if (indent && indent !== " ") style = indent; - } - - var format = { - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - shouldPrintComment: opts.shouldPrintComment, - retainLines: opts.retainLines, - retainFunctionParens: opts.retainFunctionParens, - comments: opts.comments == null || opts.comments, - compact: opts.compact, - minified: opts.minified, - concise: opts.concise, - quotes: opts.quotes || findCommonStringDelimiter(code, tokens), - jsonCompatibleStrings: opts.jsonCompatibleStrings, - indent: { - adjustMultilineComment: true, - style: style, - base: 0 - }, - flowCommaSeparator: opts.flowCommaSeparator - }; - - if (format.minified) { - format.compact = true; - - format.shouldPrintComment = format.shouldPrintComment || function () { - return format.comments; - }; - } else { - format.shouldPrintComment = format.shouldPrintComment || function (value) { - return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0; - }; - } - - if (format.compact === "auto") { - format.compact = code.length > 500000; - - if (format.compact) { - console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB")); - } - } - - if (format.compact) { - format.indent.adjustMultilineComment = false; - } - - return format; -} - -function findCommonStringDelimiter(code, tokens) { - var DEFAULT_STRING_DELIMITER = "double"; - if (!code) { - return DEFAULT_STRING_DELIMITER; - } - - var occurrences = { - single: 0, - double: 0 - }; - - var checked = 0; - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (token.type.label !== "string") continue; - - var raw = code.slice(token.start, token.end); - if (raw[0] === "'") { - occurrences.single++; - } else { - occurrences.double++; - } - - checked++; - if (checked >= 3) break; - } - if (occurrences.single > occurrences.double) { - return "single"; - } else { - return "double"; - } -} - -var CodeGenerator = exports.CodeGenerator = function () { - function CodeGenerator(ast, opts, code) { - (0, _classCallCheck3.default)(this, CodeGenerator); - - this._generator = new Generator(ast, opts, code); - } - - CodeGenerator.prototype.generate = function generate() { - return this._generator.generate(); - }; - - return CodeGenerator; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/index.js deleted file mode 100644 index be5d347..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/index.js +++ /dev/null @@ -1,146 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -exports.needsWhitespace = needsWhitespace; -exports.needsWhitespaceBefore = needsWhitespaceBefore; -exports.needsWhitespaceAfter = needsWhitespaceAfter; -exports.needsParens = needsParens; - -var _whitespace = require("./whitespace"); - -var _whitespace2 = _interopRequireDefault(_whitespace); - -var _parentheses = require("./parentheses"); - -var parens = _interopRequireWildcard(_parentheses); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function expandAliases(obj) { - var newObj = {}; - - function add(type, func) { - var fn = newObj[type]; - newObj[type] = fn ? function (node, parent, stack) { - var result = fn(node, parent, stack); - - return result == null ? func(node, parent, stack) : result; - } : func; - } - - for (var _iterator = (0, _keys2.default)(obj), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var type = _ref; - - - var aliases = t.FLIPPED_ALIAS_KEYS[type]; - if (aliases) { - for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var alias = _ref2; - - add(alias, obj[type]); - } - } else { - add(type, obj[type]); - } - } - - return newObj; -} - -var expandedParens = expandAliases(parens); -var expandedWhitespaceNodes = expandAliases(_whitespace2.default.nodes); -var expandedWhitespaceList = expandAliases(_whitespace2.default.list); - -function find(obj, node, parent, printStack) { - var fn = obj[node.type]; - return fn ? fn(node, parent, printStack) : null; -} - -function isOrHasCallExpression(node) { - if (t.isCallExpression(node)) { - return true; - } - - if (t.isMemberExpression(node)) { - return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); - } else { - return false; - } -} - -function needsWhitespace(node, parent, type) { - if (!node) return 0; - - if (t.isExpressionStatement(node)) { - node = node.expression; - } - - var linesInfo = find(expandedWhitespaceNodes, node, parent); - - if (!linesInfo) { - var items = find(expandedWhitespaceList, node, parent); - if (items) { - for (var i = 0; i < items.length; i++) { - linesInfo = needsWhitespace(items[i], node, type); - if (linesInfo) break; - } - } - } - - return linesInfo && linesInfo[type] || 0; -} - -function needsWhitespaceBefore(node, parent) { - return needsWhitespace(node, parent, "before"); -} - -function needsWhitespaceAfter(node, parent) { - return needsWhitespace(node, parent, "after"); -} - -function needsParens(node, parent, printStack) { - if (!parent) return false; - - if (t.isNewExpression(parent) && parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - - return find(expandedParens, node, parent, printStack); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/parentheses.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/parentheses.js deleted file mode 100644 index 471af71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/parentheses.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.AwaitExpression = exports.FunctionTypeAnnotation = undefined; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.UpdateExpression = UpdateExpression; -exports.ObjectExpression = ObjectExpression; -exports.DoExpression = DoExpression; -exports.Binary = Binary; -exports.BinaryExpression = BinaryExpression; -exports.SequenceExpression = SequenceExpression; -exports.YieldExpression = YieldExpression; -exports.ClassExpression = ClassExpression; -exports.UnaryLike = UnaryLike; -exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.AssignmentExpression = AssignmentExpression; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var PRECEDENCE = { - "||": 0, - "&&": 1, - "|": 2, - "^": 3, - "&": 4, - "==": 5, - "===": 5, - "!=": 5, - "!==": 5, - "<": 6, - ">": 6, - "<=": 6, - ">=": 6, - in: 6, - instanceof: 6, - ">>": 7, - "<<": 7, - ">>>": 7, - "+": 8, - "-": 8, - "*": 9, - "/": 9, - "%": 9, - "**": 10 -}; - -function NullableTypeAnnotation(node, parent) { - return t.isArrayTypeAnnotation(parent); -} - -exports.FunctionTypeAnnotation = NullableTypeAnnotation; -function UpdateExpression(node, parent) { - return t.isMemberExpression(parent) && parent.object === node; -} - -function ObjectExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { considerArrow: true }); -} - -function DoExpression(node, parent, printStack) { - return isFirstInStatement(printStack); -} - -function Binary(node, parent) { - if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isUnaryLike(parent) || t.isMemberExpression(parent) && parent.object === node || t.isAwaitExpression(parent)) { - return true; - } - - if (t.isBinary(parent)) { - var parentOp = parent.operator; - var parentPos = PRECEDENCE[parentOp]; - - var nodeOp = node.operator; - var nodePos = PRECEDENCE[nodeOp]; - - if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) { - return true; - } - } - - return false; -} - -function BinaryExpression(node, parent) { - return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent)); -} - -function SequenceExpression(node, parent) { - - if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) { - return false; - } - - return true; -} - -function YieldExpression(node, parent) { - return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) && node === parent.test; -} - -exports.AwaitExpression = YieldExpression; -function ClassExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { considerDefaultExports: true }); -} - -function UnaryLike(node, parent) { - return t.isMemberExpression(parent, { object: node }) || t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node }); -} - -function FunctionExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { considerDefaultExports: true }); -} - -function ArrowFunctionExpression(node, parent) { - if (t.isExportDeclaration(parent) || t.isBinaryExpression(parent) || t.isLogicalExpression(parent) || t.isUnaryExpression(parent) || t.isTaggedTemplateExpression(parent)) { - return true; - } - - return UnaryLike(node, parent); -} - -function ConditionalExpression(node, parent) { - if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent)) { - return true; - } - - return UnaryLike(node, parent); -} - -function AssignmentExpression(node) { - if (t.isObjectPattern(node.left)) { - return true; - } else { - return ConditionalExpression.apply(undefined, arguments); - } -} - -function isFirstInStatement(printStack) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$considerArrow = _ref.considerArrow, - considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow, - _ref$considerDefaultE = _ref.considerDefaultExports, - considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE; - - var i = printStack.length - 1; - var node = printStack[i]; - i--; - var parent = printStack[i]; - while (i > 0) { - if (t.isExpressionStatement(parent, { expression: node }) || t.isTaggedTemplateExpression(parent) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node }) || considerArrow && t.isArrowFunctionExpression(parent, { body: node })) { - return true; - } - - if (t.isCallExpression(parent, { callee: node }) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isMemberExpression(parent, { object: node }) || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, { left: node })) { - node = parent; - i--; - parent = printStack[i]; - } else { - return false; - } - } - - return false; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/whitespace.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/whitespace.js deleted file mode 100644 index f39e755..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/node/whitespace.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; - -var _map = require("lodash/map"); - -var _map2 = _interopRequireDefault(_map); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function crawl(node) { - var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (t.isMemberExpression(node)) { - crawl(node.object, state); - if (node.computed) crawl(node.property, state); - } else if (t.isBinary(node) || t.isAssignmentExpression(node)) { - crawl(node.left, state); - crawl(node.right, state); - } else if (t.isCallExpression(node)) { - state.hasCall = true; - crawl(node.callee, state); - } else if (t.isFunction(node)) { - state.hasFunction = true; - } else if (t.isIdentifier(node)) { - state.hasHelper = state.hasHelper || isHelper(node.callee); - } - - return state; -} - -function isHelper(node) { - if (t.isMemberExpression(node)) { - return isHelper(node.object) || isHelper(node.property); - } else if (t.isIdentifier(node)) { - return node.name === "require" || node.name[0] === "_"; - } else if (t.isCallExpression(node)) { - return isHelper(node.callee); - } else if (t.isBinary(node) || t.isAssignmentExpression(node)) { - return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); - } else { - return false; - } -} - -function isType(node) { - return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node); -} - -exports.nodes = { - AssignmentExpression: function AssignmentExpression(node) { - var state = crawl(node.right); - if (state.hasCall && state.hasHelper || state.hasFunction) { - return { - before: state.hasFunction, - after: true - }; - } - }, - SwitchCase: function SwitchCase(node, parent) { - return { - before: node.consequent.length || parent.cases[0] === node - }; - }, - LogicalExpression: function LogicalExpression(node) { - if (t.isFunction(node.left) || t.isFunction(node.right)) { - return { - after: true - }; - } - }, - Literal: function Literal(node) { - if (node.value === "use strict") { - return { - after: true - }; - } - }, - CallExpression: function CallExpression(node) { - if (t.isFunction(node.callee) || isHelper(node)) { - return { - before: true, - after: true - }; - } - }, - VariableDeclaration: function VariableDeclaration(node) { - for (var i = 0; i < node.declarations.length; i++) { - var declar = node.declarations[i]; - - var enabled = isHelper(declar.id) && !isType(declar.init); - if (!enabled) { - var state = crawl(declar.init); - enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; - } - - if (enabled) { - return { - before: true, - after: true - }; - } - } - }, - IfStatement: function IfStatement(node) { - if (t.isBlockStatement(node.consequent)) { - return { - before: true, - after: true - }; - } - } -}; - -exports.nodes.ObjectProperty = exports.nodes.ObjectTypeProperty = exports.nodes.ObjectMethod = exports.nodes.SpreadProperty = function (node, parent) { - if (parent.properties[0] === node) { - return { - before: true - }; - } -}; - -exports.list = { - VariableDeclaration: function VariableDeclaration(node) { - return (0, _map2.default)(node.declarations, "init"); - }, - ArrayExpression: function ArrayExpression(node) { - return node.elements; - }, - ObjectExpression: function ObjectExpression(node) { - return node.properties; - } -}; - -[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) { - var type = _ref[0], - amounts = _ref[1]; - - if (typeof amounts === "boolean") { - amounts = { after: amounts, before: amounts }; - } - [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { - exports.nodes[type] = function () { - return amounts; - }; - }); -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/printer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/printer.js deleted file mode 100644 index 8eb3edd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/printer.js +++ /dev/null @@ -1,555 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _assign = require("babel-runtime/core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _weakSet = require("babel-runtime/core-js/weak-set"); - -var _weakSet2 = _interopRequireDefault(_weakSet); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _find = require("lodash/find"); - -var _find2 = _interopRequireDefault(_find); - -var _findLast = require("lodash/findLast"); - -var _findLast2 = _interopRequireDefault(_findLast); - -var _isInteger = require("lodash/isInteger"); - -var _isInteger2 = _interopRequireDefault(_isInteger); - -var _repeat = require("lodash/repeat"); - -var _repeat2 = _interopRequireDefault(_repeat); - -var _buffer = require("./buffer"); - -var _buffer2 = _interopRequireDefault(_buffer); - -var _node = require("./node"); - -var n = _interopRequireWildcard(_node); - -var _whitespace = require("./whitespace"); - -var _whitespace2 = _interopRequireDefault(_whitespace); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SCIENTIFIC_NOTATION = /e/i; -var ZERO_DECIMAL_INTEGER = /\.0+$/; -var NON_DECIMAL_LITERAL = /^0[box]/; - -var Printer = function () { - function Printer(format, map, tokens) { - (0, _classCallCheck3.default)(this, Printer); - this.inForStatementInitCounter = 0; - this._printStack = []; - this._indent = 0; - this._insideAux = false; - this._printedCommentStarts = {}; - this._parenPushNewlineState = null; - this._printAuxAfterOnNextUserNode = false; - this._printedComments = new _weakSet2.default(); - this._endsWithInteger = false; - this._endsWithWord = false; - - this.format = format || {}; - this._buf = new _buffer2.default(map); - this._whitespace = tokens.length > 0 ? new _whitespace2.default(tokens) : null; - } - - Printer.prototype.generate = function generate(ast) { - this.print(ast); - this._maybeAddAuxComment(); - - return this._buf.get(); - }; - - Printer.prototype.indent = function indent() { - if (this.format.compact || this.format.concise) return; - - this._indent++; - }; - - Printer.prototype.dedent = function dedent() { - if (this.format.compact || this.format.concise) return; - - this._indent--; - }; - - Printer.prototype.semicolon = function semicolon() { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - this._maybeAddAuxComment(); - this._append(";", !force); - }; - - Printer.prototype.rightBrace = function rightBrace() { - if (this.format.minified) { - this._buf.removeLastSemicolon(); - } - this.token("}"); - }; - - Printer.prototype.space = function space() { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (this.format.compact) return; - - if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { - this._space(); - } - }; - - Printer.prototype.word = function word(str) { - if (this._endsWithWord) this._space(); - - this._maybeAddAuxComment(); - this._append(str); - - this._endsWithWord = true; - }; - - Printer.prototype.number = function number(str) { - this.word(str); - - this._endsWithInteger = (0, _isInteger2.default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; - }; - - Printer.prototype.token = function token(str) { - if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { - this._space(); - } - - this._maybeAddAuxComment(); - this._append(str); - }; - - Printer.prototype.newline = function newline(i) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - if (this.endsWith("\n\n")) return; - - if (typeof i !== "number") i = 1; - - i = Math.min(2, i); - if (this.endsWith("{\n") || this.endsWith(":\n")) i--; - if (i <= 0) return; - - for (var j = 0; j < i; j++) { - this._newline(); - } - }; - - Printer.prototype.endsWith = function endsWith(str) { - return this._buf.endsWith(str); - }; - - Printer.prototype.removeTrailingNewline = function removeTrailingNewline() { - this._buf.removeTrailingNewline(); - }; - - Printer.prototype.source = function source(prop, loc) { - this._catchUp(prop, loc); - - this._buf.source(prop, loc); - }; - - Printer.prototype.withSource = function withSource(prop, loc, cb) { - this._catchUp(prop, loc); - - this._buf.withSource(prop, loc, cb); - }; - - Printer.prototype._space = function _space() { - this._append(" ", true); - }; - - Printer.prototype._newline = function _newline() { - this._append("\n", true); - }; - - Printer.prototype._append = function _append(str) { - var queue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - this._maybeAddParen(str); - this._maybeIndent(str); - - if (queue) this._buf.queue(str);else this._buf.append(str); - - this._endsWithWord = false; - this._endsWithInteger = false; - }; - - Printer.prototype._maybeIndent = function _maybeIndent(str) { - if (this._indent && this.endsWith("\n") && str[0] !== "\n") { - this._buf.queue(this._getIndent()); - } - }; - - Printer.prototype._maybeAddParen = function _maybeAddParen(str) { - var parenPushNewlineState = this._parenPushNewlineState; - if (!parenPushNewlineState) return; - this._parenPushNewlineState = null; - - var i = void 0; - for (i = 0; i < str.length && str[i] === " "; i++) { - continue; - }if (i === str.length) return; - - var cha = str[i]; - if (cha === "\n" || cha === "/") { - this.token("("); - this.indent(); - parenPushNewlineState.printed = true; - } - }; - - Printer.prototype._catchUp = function _catchUp(prop, loc) { - if (!this.format.retainLines) return; - - var pos = loc ? loc[prop] : null; - if (pos && pos.line !== null) { - var count = pos.line - this._buf.getCurrentLine(); - - for (var i = 0; i < count; i++) { - this._newline(); - } - } - }; - - Printer.prototype._getIndent = function _getIndent() { - return (0, _repeat2.default)(this.format.indent.style, this._indent); - }; - - Printer.prototype.startTerminatorless = function startTerminatorless() { - return this._parenPushNewlineState = { - printed: false - }; - }; - - Printer.prototype.endTerminatorless = function endTerminatorless(state) { - if (state.printed) { - this.dedent(); - this.newline(); - this.token(")"); - } - }; - - Printer.prototype.print = function print(node, parent) { - var _this = this; - - if (!node) return; - - var oldConcise = this.format.concise; - if (node._compact) { - this.format.concise = true; - } - - var printMethod = this[node.type]; - if (!printMethod) { - throw new ReferenceError("unknown node of type " + (0, _stringify2.default)(node.type) + " with constructor " + (0, _stringify2.default)(node && node.constructor.name)); - } - - this._printStack.push(node); - - var oldInAux = this._insideAux; - this._insideAux = !node.loc; - this._maybeAddAuxComment(this._insideAux && !oldInAux); - - var needsParens = n.needsParens(node, parent, this._printStack); - if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { - needsParens = true; - } - if (needsParens) this.token("("); - - this._printLeadingComments(node, parent); - - var loc = t.isProgram(node) || t.isFile(node) ? null : node.loc; - this.withSource("start", loc, function () { - _this[node.type](node, parent); - }); - - this._printTrailingComments(node, parent); - - if (needsParens) this.token(")"); - - this._printStack.pop(); - - this.format.concise = oldConcise; - this._insideAux = oldInAux; - }; - - Printer.prototype._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) { - if (enteredPositionlessNode) this._printAuxBeforeComment(); - if (!this._insideAux) this._printAuxAfterComment(); - }; - - Printer.prototype._printAuxBeforeComment = function _printAuxBeforeComment() { - if (this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = true; - - var comment = this.format.auxiliaryCommentBefore; - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - }; - - Printer.prototype._printAuxAfterComment = function _printAuxAfterComment() { - if (!this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = false; - - var comment = this.format.auxiliaryCommentAfter; - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - }; - - Printer.prototype.getPossibleRaw = function getPossibleRaw(node) { - var extra = node.extra; - if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { - return extra.raw; - } - }; - - Printer.prototype.printJoin = function printJoin(nodes, parent) { - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (!nodes || !nodes.length) return; - - if (opts.indent) this.indent(); - - var newlineOpts = { - addNewlines: opts.addNewlines - }; - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - if (!node) continue; - - if (opts.statement) this._printNewline(true, node, parent, newlineOpts); - - this.print(node, parent); - - if (opts.iterator) { - opts.iterator(node, i); - } - - if (opts.separator && i < nodes.length - 1) { - opts.separator.call(this); - } - - if (opts.statement) this._printNewline(false, node, parent, newlineOpts); - } - - if (opts.indent) this.dedent(); - }; - - Printer.prototype.printAndIndentOnComments = function printAndIndentOnComments(node, parent) { - var indent = !!node.leadingComments; - if (indent) this.indent(); - this.print(node, parent); - if (indent) this.dedent(); - }; - - Printer.prototype.printBlock = function printBlock(parent) { - var node = parent.body; - - if (!t.isEmptyStatement(node)) { - this.space(); - } - - this.print(node, parent); - }; - - Printer.prototype._printTrailingComments = function _printTrailingComments(node, parent) { - this._printComments(this._getComments(false, node, parent)); - }; - - Printer.prototype._printLeadingComments = function _printLeadingComments(node, parent) { - this._printComments(this._getComments(true, node, parent)); - }; - - Printer.prototype.printInnerComments = function printInnerComments(node) { - var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (!node.innerComments) return; - if (indent) this.indent(); - this._printComments(node.innerComments); - if (indent) this.dedent(); - }; - - Printer.prototype.printSequence = function printSequence(nodes, parent) { - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - opts.statement = true; - return this.printJoin(nodes, parent, opts); - }; - - Printer.prototype.printList = function printList(items, parent) { - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (opts.separator == null) { - opts.separator = commaSeparator; - } - - return this.printJoin(items, parent, opts); - }; - - Printer.prototype._printNewline = function _printNewline(leading, node, parent, opts) { - var _this2 = this; - - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - var lines = 0; - - if (node.start != null && !node._ignoreUserWhitespace && this._whitespace) { - if (leading) { - var _comments = node.leadingComments; - var _comment = _comments && (0, _find2.default)(_comments, function (comment) { - return !!comment.loc && _this2.format.shouldPrintComment(comment.value); - }); - - lines = this._whitespace.getNewlinesBefore(_comment || node); - } else { - var _comments2 = node.trailingComments; - var _comment2 = _comments2 && (0, _findLast2.default)(_comments2, function (comment) { - return !!comment.loc && _this2.format.shouldPrintComment(comment.value); - }); - - lines = this._whitespace.getNewlinesAfter(_comment2 || node); - } - } else { - if (!leading) lines++; - if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; - - var needs = n.needsWhitespaceAfter; - if (leading) needs = n.needsWhitespaceBefore; - if (needs(node, parent)) lines++; - - if (!this._buf.hasContent()) lines = 0; - } - - this.newline(lines); - }; - - Printer.prototype._getComments = function _getComments(leading, node) { - return node && (leading ? node.leadingComments : node.trailingComments) || []; - }; - - Printer.prototype._printComment = function _printComment(comment) { - var _this3 = this; - - if (!this.format.shouldPrintComment(comment.value)) return; - - if (comment.ignore) return; - - if (this._printedComments.has(comment)) return; - this._printedComments.add(comment); - - if (comment.start != null) { - if (this._printedCommentStarts[comment.start]) return; - this._printedCommentStarts[comment.start] = true; - } - - this.newline(this._whitespace ? this._whitespace.getNewlinesBefore(comment) : 0); - - if (!this.endsWith("[") && !this.endsWith("{")) this.space(); - - var val = comment.type === "CommentLine" ? "//" + comment.value + "\n" : "/*" + comment.value + "*/"; - - if (comment.type === "CommentBlock" && this.format.indent.adjustMultilineComment) { - var offset = comment.loc && comment.loc.start.column; - if (offset) { - var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); - } - - var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); - val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat2.default)(" ", indentSize)); - } - - this.withSource("start", comment.loc, function () { - _this3._append(val); - }); - - this.newline((this._whitespace ? this._whitespace.getNewlinesAfter(comment) : 0) + (comment.type === "CommentLine" ? -1 : 0)); - }; - - Printer.prototype._printComments = function _printComments(comments) { - if (!comments || !comments.length) return; - - for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _comment3 = _ref; - - this._printComment(_comment3); - } - }; - - return Printer; -}(); - -exports.default = Printer; - - -function commaSeparator() { - this.token(","); - this.space(); -} - -var _arr = [require("./generators/template-literals"), require("./generators/expressions"), require("./generators/statements"), require("./generators/classes"), require("./generators/methods"), require("./generators/modules"), require("./generators/types"), require("./generators/flow"), require("./generators/base"), require("./generators/jsx")]; -for (var _i2 = 0; _i2 < _arr.length; _i2++) { - var generator = _arr[_i2]; - (0, _assign2.default)(Printer.prototype, generator); -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/source-map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/source-map.js deleted file mode 100644 index b44d1f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/source-map.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _sourceMap = require("source-map"); - -var _sourceMap2 = _interopRequireDefault(_sourceMap); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SourceMap = function () { - function SourceMap(opts, code) { - (0, _classCallCheck3.default)(this, SourceMap); - - this._cachedMap = null; - this._code = code; - this._opts = opts; - this._rawMappings = []; - } - - SourceMap.prototype.get = function get() { - if (!this._cachedMap) { - var map = this._cachedMap = new _sourceMap2.default.SourceMapGenerator({ - file: this._opts.sourceMapTarget, - sourceRoot: this._opts.sourceRoot - }); - - var code = this._code; - if (typeof code === "string") { - map.setSourceContent(this._opts.sourceFileName, code); - } else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") { - (0, _keys2.default)(code).forEach(function (sourceFileName) { - map.setSourceContent(sourceFileName, code[sourceFileName]); - }); - } - - this._rawMappings.forEach(map.addMapping, map); - } - - return this._cachedMap.toJSON(); - }; - - SourceMap.prototype.getRawMappings = function getRawMappings() { - return this._rawMappings.slice(); - }; - - SourceMap.prototype.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) { - if (this._lastGenLine !== generatedLine && line === null) return; - - if (this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { - return; - } - - this._cachedMap = null; - this._lastGenLine = generatedLine; - this._lastSourceLine = line; - this._lastSourceColumn = column; - - this._rawMappings.push({ - name: identifierName || undefined, - generated: { - line: generatedLine, - column: generatedColumn - }, - source: line == null ? undefined : filename || this._opts.sourceFileName, - original: line == null ? undefined : { - line: line, - column: column - } - }); - }; - - return SourceMap; -}(); - -exports.default = SourceMap; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/whitespace.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/whitespace.js deleted file mode 100644 index cbb3bc5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/lib/whitespace.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Whitespace = function () { - function Whitespace(tokens) { - (0, _classCallCheck3.default)(this, Whitespace); - - this.tokens = tokens; - this.used = {}; - } - - Whitespace.prototype.getNewlinesBefore = function getNewlinesBefore(node) { - var startToken = void 0; - var endToken = void 0; - var tokens = this.tokens; - - var index = this._findToken(function (token) { - return token.start - node.start; - }, 0, tokens.length); - if (index >= 0) { - while (index && node.start === tokens[index - 1].start) { - --index; - }startToken = tokens[index - 1]; - endToken = tokens[index]; - } - - return this._getNewlinesBetween(startToken, endToken); - }; - - Whitespace.prototype.getNewlinesAfter = function getNewlinesAfter(node) { - var startToken = void 0; - var endToken = void 0; - var tokens = this.tokens; - - var index = this._findToken(function (token) { - return token.end - node.end; - }, 0, tokens.length); - if (index >= 0) { - while (index && node.end === tokens[index - 1].end) { - --index; - }startToken = tokens[index]; - endToken = tokens[index + 1]; - if (endToken.type.label === ",") endToken = tokens[index + 2]; - } - - if (endToken && endToken.type.label === "eof") { - return 1; - } else { - return this._getNewlinesBetween(startToken, endToken); - } - }; - - Whitespace.prototype._getNewlinesBetween = function _getNewlinesBetween(startToken, endToken) { - if (!endToken || !endToken.loc) return 0; - - var start = startToken ? startToken.loc.end.line : 1; - var end = endToken.loc.start.line; - var lines = 0; - - for (var line = start; line < end; line++) { - if (typeof this.used[line] === "undefined") { - this.used[line] = true; - lines++; - } - } - - return lines; - }; - - Whitespace.prototype._findToken = function _findToken(test, start, end) { - if (start >= end) return -1; - var middle = start + end >>> 1; - var match = test(this.tokens[middle]); - if (match < 0) { - return this._findToken(test, middle + 1, end); - } else if (match > 0) { - return this._findToken(test, start, middle); - } else if (match === 0) { - return middle; - } - return -1; - }; - - return Whitespace; -}(); - -exports.default = Whitespace; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/package.json deleted file mode 100644 index 5f73ce0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-generator@^6.26.0", - "scope": null, - "escapedName": "babel-generator", - "name": "babel-generator", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-generator@>=6.26.0 <7.0.0", - "_id": "babel-generator@6.26.0", - "_inCache": true, - "_location": "/babel-generator", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-generator-6.26.0.tgz_1502898854668_0.4309290638193488" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-generator@^6.26.0", - "scope": null, - "escapedName": "babel-generator", - "name": "babel-generator", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core" - ], - "_resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "_shasum": "ac1ae20070b79f6e3ca1d3269613053774f20dc5", - "_shrinkwrap": null, - "_spec": "babel-generator@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.6", - "trim-right": "^1.0.1" - }, - "description": "Turns an AST into code.", - "devDependencies": { - "babel-helper-fixtures": "^6.26.0", - "babylon": "^6.18.0" - }, - "directories": {}, - "dist": { - "shasum": "ac1ae20070b79f6e3ca1d3269613053774f20dc5", - "tarball": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz" - }, - "files": [ - "lib" - ], - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-generator", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-generator" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/README.md deleted file mode 100644 index 895857e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# babel-helper-builder-react-jsx - -## Usage - -```javascript -type ElementState = { - tagExpr: Object; // tag node - tagName: string; // raw string tag name - args: Array; // array of call arguments - call?: Object; // optional call property that can be set to override the call expression returned - pre?: Function; // function called with (state: ElementState) before building attribs - post?: Function; // function called with (state: ElementState) after building attribs -}; - -require("babel-helper-builder-react-jsx")({ - pre: function (state: ElementState) { - // called before building the element - }, - - post: function (state: ElementState) { - // called after building the element - } -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/lib/index.js deleted file mode 100644 index fd7c7f7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/lib/index.js +++ /dev/null @@ -1,163 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (opts) { - var visitor = {}; - - visitor.JSXNamespacedName = function (path) { - throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML."); - }; - - visitor.JSXElement = { - exit: function exit(path, file) { - var callExpr = buildElementCall(path.get("openingElement"), file); - - callExpr.arguments = callExpr.arguments.concat(path.node.children); - - if (callExpr.arguments.length >= 3) { - callExpr._prettyCall = true; - } - - path.replaceWith(t.inherits(callExpr, path.node)); - } - }; - - return visitor; - - function convertJSXIdentifier(node, parent) { - if (t.isJSXIdentifier(node)) { - if (node.name === "this" && t.isReferenced(node, parent)) { - return t.thisExpression(); - } else if (_esutils2.default.keyword.isIdentifierNameES6(node.name)) { - node.type = "Identifier"; - } else { - return t.stringLiteral(node.name); - } - } else if (t.isJSXMemberExpression(node)) { - return t.memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node)); - } - - return node; - } - - function convertAttributeValue(node) { - if (t.isJSXExpressionContainer(node)) { - return node.expression; - } else { - return node; - } - } - - function convertAttribute(node) { - var value = convertAttributeValue(node.value || t.booleanLiteral(true)); - - if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) { - value.value = value.value.replace(/\n\s+/g, " "); - } - - if (t.isValidIdentifier(node.name.name)) { - node.name.type = "Identifier"; - } else { - node.name = t.stringLiteral(node.name.name); - } - - return t.inherits(t.objectProperty(node.name, value), node); - } - - function buildElementCall(path, file) { - path.parent.children = t.react.buildChildren(path.parent); - - var tagExpr = convertJSXIdentifier(path.node.name, path.node); - var args = []; - - var tagName = void 0; - if (t.isIdentifier(tagExpr)) { - tagName = tagExpr.name; - } else if (t.isLiteral(tagExpr)) { - tagName = tagExpr.value; - } - - var state = { - tagExpr: tagExpr, - tagName: tagName, - args: args - }; - - if (opts.pre) { - opts.pre(state, file); - } - - var attribs = path.node.attributes; - if (attribs.length) { - attribs = buildOpeningElementAttributes(attribs, file); - } else { - attribs = t.nullLiteral(); - } - - args.push(attribs); - - if (opts.post) { - opts.post(state, file); - } - - return state.call || t.callExpression(state.callee, args); - } - - function buildOpeningElementAttributes(attribs, file) { - var _props = []; - var objs = []; - - var useBuiltIns = file.opts.useBuiltIns || false; - if (typeof useBuiltIns !== "boolean") { - throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)"); - } - - function pushProps() { - if (!_props.length) return; - - objs.push(t.objectExpression(_props)); - _props = []; - } - - while (attribs.length) { - var prop = attribs.shift(); - if (t.isJSXSpreadAttribute(prop)) { - pushProps(); - objs.push(prop.argument); - } else { - _props.push(convertAttribute(prop)); - } - } - - pushProps(); - - if (objs.length === 1) { - attribs = objs[0]; - } else { - if (!t.isObjectExpression(objs[0])) { - objs.unshift(t.objectExpression([])); - } - - var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends"); - - attribs = t.callExpression(helper, objs); - } - - return attribs; - } -}; - -var _esutils = require("esutils"); - -var _esutils2 = _interopRequireDefault(_esutils); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package-lock.json deleted file mode 100644 index 904af74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package-lock.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-helper-builder-react-jsx", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package.json deleted file mode 100644 index 2fc7a79..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-builder-react-jsx/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-builder-react-jsx@^6.24.1", - "scope": null, - "escapedName": "babel-helper-builder-react-jsx", - "name": "babel-helper-builder-react-jsx", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx" - ] - ], - "_from": "babel-helper-builder-react-jsx@>=6.24.1 <7.0.0", - "_id": "babel-helper-builder-react-jsx@6.26.0", - "_inCache": true, - "_location": "/babel-helper-builder-react-jsx", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-helper-builder-react-jsx-6.26.0.tgz_1502898854587_0.9402090664952993" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-builder-react-jsx@^6.24.1", - "scope": null, - "escapedName": "babel-helper-builder-react-jsx", - "name": "babel-helper-builder-react-jsx", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-react-jsx" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", - "_shasum": "39ff8313b75c8b65dceff1f31d383e0ff2a408a0", - "_shrinkwrap": null, - "_spec": "babel-helper-builder-react-jsx@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "esutils": "^2.0.2" - }, - "description": "Helper function to build react jsx", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "39ff8313b75c8b65dceff1f31d383e0ff2a408a0", - "tarball": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-helper-builder-react-jsx", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/README.md deleted file mode 100644 index 0841d07..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-call-delegate - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/lib/index.js deleted file mode 100644 index 62c9217..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/lib/index.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (path) { - var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : path.scope; - var node = path.node; - - var container = t.functionExpression(null, [], node.body, node.generator, node.async); - - var callee = container; - var args = []; - - (0, _babelHelperHoistVariables2.default)(path, function (id) { - return scope.push({ id: id }); - }); - - var state = { - foundThis: false, - foundArguments: false - }; - - path.traverse(visitor, state); - - if (state.foundArguments) { - callee = t.memberExpression(container, t.identifier("apply")); - args = []; - - if (state.foundThis) { - args.push(t.thisExpression()); - } - - if (state.foundArguments) { - if (!state.foundThis) args.push(t.nullLiteral()); - args.push(t.identifier("arguments")); - } - } - - var call = t.callExpression(callee, args); - if (node.generator) call = t.yieldExpression(call, true); - - return t.returnStatement(call); -}; - -var _babelHelperHoistVariables = require("babel-helper-hoist-variables"); - -var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var visitor = { - enter: function enter(path, state) { - if (path.isThisExpression()) { - state.foundThis = true; - } - - if (path.isReferencedIdentifier({ name: "arguments" })) { - state.foundArguments = true; - } - }, - Function: function Function(path) { - path.skip(); - } -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/package.json deleted file mode 100644 index 8a1e47c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-call-delegate/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-call-delegate@^6.24.1", - "scope": null, - "escapedName": "babel-helper-call-delegate", - "name": "babel-helper-call-delegate", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters" - ] - ], - "_from": "babel-helper-call-delegate@>=6.24.1 <7.0.0", - "_id": "babel-helper-call-delegate@6.24.1", - "_inCache": true, - "_location": "/babel-helper-call-delegate", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-helper-call-delegate-6.24.1.tgz_1491578352467_0.025481328601017594" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-call-delegate@^6.24.1", - "scope": null, - "escapedName": "babel-helper-call-delegate", - "name": "babel-helper-call-delegate", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-parameters" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "_shasum": "ece6aacddc76e41c3461f88bfc575bd0daa2df8d", - "_shrinkwrap": null, - "_spec": "babel-helper-call-delegate@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters", - "dependencies": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - }, - "description": "Helper function to call delegate", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ece6aacddc76e41c3461f88bfc575bd0daa2df8d", - "tarball": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-call-delegate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-call-delegate" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/README.md deleted file mode 100644 index 3818351..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-define-map - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/lib/index.js deleted file mode 100644 index 95b6c85..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/lib/index.js +++ /dev/null @@ -1,159 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -exports.push = push; -exports.hasComputed = hasComputed; -exports.toComputedObjectFromClass = toComputedObjectFromClass; -exports.toClassObject = toClassObject; -exports.toDefineObject = toDefineObject; - -var _babelHelperFunctionName = require("babel-helper-function-name"); - -var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - -var _has = require("lodash/has"); - -var _has2 = _interopRequireDefault(_has); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toKind(node) { - if (t.isClassMethod(node) || t.isObjectMethod(node)) { - if (node.kind === "get" || node.kind === "set") { - return node.kind; - } - } - - return "value"; -} - -function push(mutatorMap, node, kind, file, scope) { - var alias = t.toKeyAlias(node); - - var map = {}; - if ((0, _has2.default)(mutatorMap, alias)) map = mutatorMap[alias]; - mutatorMap[alias] = map; - - map._inherits = map._inherits || []; - map._inherits.push(node); - - map._key = node.key; - - if (node.computed) { - map._computed = true; - } - - if (node.decorators) { - var decorators = map.decorators = map.decorators || t.arrayExpression([]); - decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) { - return dec.expression; - }).reverse()); - } - - if (map.value || map.initializer) { - throw file.buildCodeFrameError(node, "Key conflict with sibling node"); - } - - var key = void 0, - value = void 0; - - if (t.isObjectProperty(node) || t.isObjectMethod(node) || t.isClassMethod(node)) { - key = t.toComputedKey(node, node.key); - } - - if (t.isObjectProperty(node) || t.isClassProperty(node)) { - value = node.value; - } else if (t.isObjectMethod(node) || t.isClassMethod(node)) { - value = t.functionExpression(null, node.params, node.body, node.generator, node.async); - value.returnType = node.returnType; - } - - var inheritedKind = toKind(node); - if (!kind || inheritedKind !== "value") { - kind = inheritedKind; - } - - if (scope && t.isStringLiteral(key) && (kind === "value" || kind === "initializer") && t.isFunctionExpression(value)) { - value = (0, _babelHelperFunctionName2.default)({ id: key, node: value, scope: scope }); - } - - if (value) { - t.inheritsComments(value, node); - map[kind] = value; - } - - return map; -} - -function hasComputed(mutatorMap) { - for (var key in mutatorMap) { - if (mutatorMap[key]._computed) { - return true; - } - } - return false; -} - -function toComputedObjectFromClass(obj) { - var objExpr = t.arrayExpression([]); - - for (var i = 0; i < obj.properties.length; i++) { - var prop = obj.properties[i]; - var val = prop.value; - val.properties.unshift(t.objectProperty(t.identifier("key"), t.toComputedKey(prop))); - objExpr.elements.push(val); - } - - return objExpr; -} - -function toClassObject(mutatorMap) { - var objExpr = t.objectExpression([]); - - (0, _keys2.default)(mutatorMap).forEach(function (mutatorMapKey) { - var map = mutatorMap[mutatorMapKey]; - var mapNode = t.objectExpression([]); - - var propNode = t.objectProperty(map._key, mapNode, map._computed); - - (0, _keys2.default)(map).forEach(function (key) { - var node = map[key]; - if (key[0] === "_") return; - - var inheritNode = node; - if (t.isClassMethod(node) || t.isClassProperty(node)) node = node.value; - - var prop = t.objectProperty(t.identifier(key), node); - t.inheritsComments(prop, inheritNode); - t.removeComments(inheritNode); - - mapNode.properties.push(prop); - }); - - objExpr.properties.push(propNode); - }); - - return objExpr; -} - -function toDefineObject(mutatorMap) { - (0, _keys2.default)(mutatorMap).forEach(function (key) { - var map = mutatorMap[key]; - if (map.value) map.writable = t.booleanLiteral(true); - map.configurable = t.booleanLiteral(true); - map.enumerable = t.booleanLiteral(true); - }); - - return toClassObject(mutatorMap); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package-lock.json deleted file mode 100644 index cd7085e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package-lock.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-helper-define-map", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package.json deleted file mode 100644 index bce3c2e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-define-map/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-define-map@^6.24.1", - "scope": null, - "escapedName": "babel-helper-define-map", - "name": "babel-helper-define-map", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes" - ] - ], - "_from": "babel-helper-define-map@>=6.24.1 <7.0.0", - "_id": "babel-helper-define-map@6.26.0", - "_inCache": true, - "_location": "/babel-helper-define-map", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-helper-define-map-6.26.0.tgz_1502898854562_0.8471690623555332" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-define-map@^6.24.1", - "scope": null, - "escapedName": "babel-helper-define-map", - "name": "babel-helper-define-map", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-classes" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "_shasum": "a5f56dab41a25f97ecb498c7ebaca9819f95be5f", - "_shrinkwrap": null, - "_spec": "babel-helper-define-map@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes", - "dependencies": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - }, - "description": "Helper function to define a map", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "a5f56dab41a25f97ecb498c7ebaca9819f95be5f", - "tarball": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-helper-define-map", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-define-map" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/README.md deleted file mode 100644 index 96a4c65..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-function-name - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/lib/index.js deleted file mode 100644 index bde7c8a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/lib/index.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var node = _ref.node, - parent = _ref.parent, - scope = _ref.scope, - id = _ref.id; - - if (node.id) return; - - if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { kind: "method" })) && (!parent.computed || t.isLiteral(parent.key))) { - id = parent.key; - } else if (t.isVariableDeclarator(parent)) { - id = parent.id; - - if (t.isIdentifier(id)) { - var binding = scope.parent.getBinding(id.name); - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - node.id = id; - node.id[t.NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t.isAssignmentExpression(parent)) { - id = parent.left; - } else if (!id) { - return; - } - - var name = void 0; - if (id && t.isLiteral(id)) { - name = id.value; - } else if (id && t.isIdentifier(id)) { - name = id.name; - } else { - return; - } - - name = t.toBindingIdentifierName(name); - id = t.identifier(name); - - id[t.NOT_LOCAL_BINDING] = true; - - var state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; -}; - -var _babelHelperGetFunctionArity = require("babel-helper-get-function-arity"); - -var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); - -var buildGeneratorPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); - -var visitor = { - "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) { - if (path.node.name !== state.name) return; - - var localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; - - state.selfReference = true; - path.stop(); - } -}; - -function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - scope.rename(id.name); - } else { - if (!t.isFunction(method)) return; - - var build = buildPropertyMethodAssignmentWrapper; - if (method.generator) build = buildGeneratorPropertyMethodAssignmentWrapper; - var _template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - _template.callee._skipModulesRemap = true; - - var params = _template.callee.body.body[0].params; - for (var i = 0, len = (0, _babelHelperGetFunctionArity2.default)(method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } - - return _template; - } - } - - method.id = id; - scope.getProgramParent().references[id.name] = true; -} - -function visit(node, name, scope) { - var state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; - - var binding = scope.getOwnBinding(name); - - if (binding) { - if (binding.kind === "param") { - state.selfReference = true; - } else {} - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } - - return state; -} - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/package.json deleted file mode 100644 index cd27c0d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-function-name@^6.24.1", - "scope": null, - "escapedName": "babel-helper-function-name", - "name": "babel-helper-function-name", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes" - ] - ], - "_from": "babel-helper-function-name@>=6.24.1 <7.0.0", - "_id": "babel-helper-function-name@6.24.1", - "_inCache": true, - "_location": "/babel-helper-function-name", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-helper-function-name-6.24.1.tgz_1491578368478_0.6828097116667777" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-function-name@^6.24.1", - "scope": null, - "escapedName": "babel-helper-function-name", - "name": "babel-helper-function-name", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-helper-define-map", - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-function-name" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "_shasum": "d3475b8c03ed98242a25b48351ab18399d3580a9", - "_shrinkwrap": null, - "_spec": "babel-helper-function-name@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes", - "dependencies": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - }, - "description": "Helper function to change the property 'name' of every function", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d3475b8c03ed98242a25b48351ab18399d3580a9", - "tarball": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-function-name", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/README.md deleted file mode 100644 index 2263230..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-get-function-arity - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/lib/index.js deleted file mode 100644 index 929dc41..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/lib/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (node) { - var params = node.params; - for (var i = 0; i < params.length; i++) { - var param = params[i]; - if (t.isAssignmentPattern(param) || t.isRestElement(param)) { - return i; - } - } - return params.length; -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/package.json deleted file mode 100644 index bbc4a31..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-get-function-arity/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-get-function-arity@^6.24.1", - "scope": null, - "escapedName": "babel-helper-get-function-arity", - "name": "babel-helper-get-function-arity", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name" - ] - ], - "_from": "babel-helper-get-function-arity@>=6.24.1 <7.0.0", - "_id": "babel-helper-get-function-arity@6.24.1", - "_inCache": true, - "_location": "/babel-helper-get-function-arity", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-helper-get-function-arity-6.24.1.tgz_1491578346809_0.3132424324285239" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-get-function-arity@^6.24.1", - "scope": null, - "escapedName": "babel-helper-get-function-arity", - "name": "babel-helper-get-function-arity", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-helper-function-name", - "/babel-plugin-transform-es2015-parameters" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "_shasum": "8f7782aa93407c41d3aa50908f89b031b1b6853d", - "_shrinkwrap": null, - "_spec": "babel-helper-get-function-arity@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-function-name", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Helper function to get function arity", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "8f7782aa93407c41d3aa50908f89b031b1b6853d", - "tarball": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-get-function-arity", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/README.md deleted file mode 100644 index 5b85097..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-hoist-variables - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/lib/index.js deleted file mode 100644 index ba00137..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/lib/index.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (path, emit) { - var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "var"; - - path.traverse(visitor, { kind: kind, emit: emit }); -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var visitor = { - Scope: function Scope(path, state) { - if (state.kind === "let") path.skip(); - }, - Function: function Function(path) { - path.skip(); - }, - VariableDeclaration: function VariableDeclaration(path, state) { - if (state.kind && path.node.kind !== state.kind) return; - - var nodes = []; - - var declarations = path.get("declarations"); - var firstId = void 0; - - for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var declar = _ref; - - firstId = declar.node.id; - - if (declar.node.init) { - nodes.push(t.expressionStatement(t.assignmentExpression("=", declar.node.id, declar.node.init))); - } - - for (var name in declar.getBindingIdentifiers()) { - state.emit(t.identifier(name), name); - } - } - - if (path.parentPath.isFor({ left: path.node })) { - path.replaceWith(firstId); - } else { - path.replaceWithMultiple(nodes); - } - } -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/package.json deleted file mode 100644 index 82a5449..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-hoist-variables/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-hoist-variables@^6.24.1", - "scope": null, - "escapedName": "babel-helper-hoist-variables", - "name": "babel-helper-hoist-variables", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs" - ] - ], - "_from": "babel-helper-hoist-variables@>=6.24.1 <7.0.0", - "_id": "babel-helper-hoist-variables@6.24.1", - "_inCache": true, - "_location": "/babel-helper-hoist-variables", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-helper-hoist-variables-6.24.1.tgz_1491578346811_0.8418492812197655" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-hoist-variables@^6.24.1", - "scope": null, - "escapedName": "babel-helper-hoist-variables", - "name": "babel-helper-hoist-variables", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-helper-call-delegate", - "/babel-plugin-transform-es2015-modules-systemjs" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "_shasum": "1ecb27689c9d25513eadbc9914a73f5408be7a76", - "_shrinkwrap": null, - "_spec": "babel-helper-hoist-variables@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Helper function to hoist variables", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "1ecb27689c9d25513eadbc9914a73f5408be7a76", - "tarball": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-hoist-variables", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-hoist-variables" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/README.md deleted file mode 100644 index f6847bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-optimise-call-expression - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/lib/index.js deleted file mode 100644 index 8bff7b8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/lib/index.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (callee, thisNode, args) { - if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) { - return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]); - } else { - return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode].concat(args)); - } -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/package.json deleted file mode 100644 index bd8f14d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-optimise-call-expression/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-optimise-call-expression@^6.24.1", - "scope": null, - "escapedName": "babel-helper-optimise-call-expression", - "name": "babel-helper-optimise-call-expression", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes" - ] - ], - "_from": "babel-helper-optimise-call-expression@>=6.24.1 <7.0.0", - "_id": "babel-helper-optimise-call-expression@6.24.1", - "_inCache": true, - "_location": "/babel-helper-optimise-call-expression", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-helper-optimise-call-expression-6.24.1.tgz_1491578347908_0.49800555338151753" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-optimise-call-expression@^6.24.1", - "scope": null, - "escapedName": "babel-helper-optimise-call-expression", - "name": "babel-helper-optimise-call-expression", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-helper-replace-supers", - "/babel-plugin-transform-es2015-classes" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "_shasum": "f7a13427ba9f73f8f4fa993c54a97882d1244257", - "_shrinkwrap": null, - "_spec": "babel-helper-optimise-call-expression@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Helper function to optimise call expression", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "f7a13427ba9f73f8f4fa993c54a97882d1244257", - "tarball": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-optimise-call-expression", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-optimise-call-expression" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/README.md deleted file mode 100644 index bcdfccb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-regex - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/lib/index.js deleted file mode 100644 index 803ae56..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/lib/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.is = is; -exports.pullFlag = pullFlag; - -var _pull = require("lodash/pull"); - -var _pull2 = _interopRequireDefault(_pull); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function is(node, flag) { - return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0; -} - -function pullFlag(node, flag) { - var flags = node.flags.split(""); - if (node.flags.indexOf(flag) < 0) return; - (0, _pull2.default)(flags, flag); - node.flags = flags.join(""); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package-lock.json deleted file mode 100644 index e84844e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package-lock.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-helper-regex", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package.json deleted file mode 100644 index d72f8bc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-regex/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-regex@^6.24.1", - "scope": null, - "escapedName": "babel-helper-regex", - "name": "babel-helper-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex" - ] - ], - "_from": "babel-helper-regex@>=6.24.1 <7.0.0", - "_id": "babel-helper-regex@6.26.0", - "_inCache": true, - "_location": "/babel-helper-regex", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-helper-regex-6.26.0.tgz_1502898854536_0.5022453737910837" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-regex@^6.24.1", - "scope": null, - "escapedName": "babel-helper-regex", - "name": "babel-helper-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-sticky-regex", - "/babel-plugin-transform-es2015-unicode-regex" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "_shasum": "325c59f902f82f24b74faceed0363954f6495e72", - "_shrinkwrap": null, - "_spec": "babel-helper-regex@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - }, - "description": "Helper function to check for literal RegEx", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "325c59f902f82f24b74faceed0363954f6495e72", - "tarball": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-helper-regex", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-regex" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/README.md deleted file mode 100644 index a6515da..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# babel-helper-replace-supers - -## Usage - -TODO diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/lib/index.js deleted file mode 100644 index d0e1452..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/lib/index.js +++ /dev/null @@ -1,228 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _babelHelperOptimiseCallExpression = require("babel-helper-optimise-call-expression"); - -var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var HARDCORE_THIS_REF = (0, _symbol2.default)(); - -function isIllegalBareSuper(node, parent) { - if (!t.isSuper(node)) return false; - if (t.isMemberExpression(parent, { computed: false })) return false; - if (t.isCallExpression(parent, { callee: node })) return false; - return true; -} - -function isMemberExpressionSuper(node) { - return t.isMemberExpression(node) && t.isSuper(node.object); -} - -function getPrototypeOfExpression(objectRef, isStatic) { - var targetRef = isStatic ? objectRef : t.memberExpression(objectRef, t.identifier("prototype")); - - return t.logicalExpression("||", t.memberExpression(targetRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [targetRef])); -} - -var visitor = { - Function: function Function(path) { - if (!path.inShadow("this")) { - path.skip(); - } - }, - ReturnStatement: function ReturnStatement(path, state) { - if (!path.inShadow("this")) { - state.returns.push(path); - } - }, - ThisExpression: function ThisExpression(path, state) { - if (!path.node[HARDCORE_THIS_REF]) { - state.thises.push(path); - } - }, - enter: function enter(path, state) { - var callback = state.specHandle; - if (state.isLoose) callback = state.looseHandle; - - var isBareSuper = path.isCallExpression() && path.get("callee").isSuper(); - - var result = callback.call(state, path); - - if (result) { - state.hasSuper = true; - } - - if (isBareSuper) { - state.bareSupers.push(path); - } - - if (result === true) { - path.requeue(); - } - - if (result !== true && result) { - if (Array.isArray(result)) { - path.replaceWithMultiple(result); - } else { - path.replaceWith(result); - } - } - } -}; - -var ReplaceSupers = function () { - function ReplaceSupers(opts) { - var inClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - (0, _classCallCheck3.default)(this, ReplaceSupers); - - this.forceSuperMemoisation = opts.forceSuperMemoisation; - this.methodPath = opts.methodPath; - this.methodNode = opts.methodNode; - this.superRef = opts.superRef; - this.isStatic = opts.isStatic; - this.hasSuper = false; - this.inClass = inClass; - this.isLoose = opts.isLoose; - this.scope = this.methodPath.scope; - this.file = opts.file; - this.opts = opts; - - this.bareSupers = []; - this.returns = []; - this.thises = []; - } - - ReplaceSupers.prototype.getObjectRef = function getObjectRef() { - return this.opts.objectRef || this.opts.getObjectRef(); - }; - - ReplaceSupers.prototype.setSuperProperty = function setSuperProperty(property, value, isComputed) { - return t.callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), value, t.thisExpression()]); - }; - - ReplaceSupers.prototype.getSuperProperty = function getSuperProperty(property, isComputed) { - return t.callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), t.thisExpression()]); - }; - - ReplaceSupers.prototype.replace = function replace() { - this.methodPath.traverse(visitor, this); - }; - - ReplaceSupers.prototype.getLooseSuperProperty = function getLooseSuperProperty(id, parent) { - var methodNode = this.methodNode; - var superRef = this.superRef || t.identifier("Function"); - - if (parent.property === id) { - return; - } else if (t.isCallExpression(parent, { callee: id })) { - return; - } else if (t.isMemberExpression(parent) && !methodNode.static) { - return t.memberExpression(superRef, t.identifier("prototype")); - } else { - return superRef; - } - }; - - ReplaceSupers.prototype.looseHandle = function looseHandle(path) { - var node = path.node; - if (path.isSuper()) { - return this.getLooseSuperProperty(node, path.parent); - } else if (path.isCallExpression()) { - var callee = node.callee; - if (!t.isMemberExpression(callee)) return; - if (!t.isSuper(callee.object)) return; - - t.appendToMemberExpression(callee, t.identifier("call")); - node.arguments.unshift(t.thisExpression()); - return true; - } - }; - - ReplaceSupers.prototype.specHandleAssignmentExpression = function specHandleAssignmentExpression(ref, path, node) { - if (node.operator === "=") { - return this.setSuperProperty(node.left.property, node.right, node.left.computed); - } else { - ref = ref || path.scope.generateUidIdentifier("ref"); - return [t.variableDeclaration("var", [t.variableDeclarator(ref, node.left)]), t.expressionStatement(t.assignmentExpression("=", node.left, t.binaryExpression(node.operator[0], ref, node.right)))]; - } - }; - - ReplaceSupers.prototype.specHandle = function specHandle(path) { - var property = void 0; - var computed = void 0; - var args = void 0; - - var parent = path.parent; - var node = path.node; - - if (isIllegalBareSuper(node, parent)) { - throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper")); - } - - if (t.isCallExpression(node)) { - var callee = node.callee; - if (t.isSuper(callee)) { - return; - } else if (isMemberExpressionSuper(callee)) { - property = callee.property; - computed = callee.computed; - args = node.arguments; - } - } else if (t.isMemberExpression(node) && t.isSuper(node.object)) { - property = node.property; - computed = node.computed; - } else if (t.isUpdateExpression(node) && isMemberExpressionSuper(node.argument)) { - var binary = t.binaryExpression(node.operator[0], node.argument, t.numericLiteral(1)); - if (node.prefix) { - return this.specHandleAssignmentExpression(null, path, binary); - } else { - var ref = path.scope.generateUidIdentifier("ref"); - return this.specHandleAssignmentExpression(ref, path, binary).concat(t.expressionStatement(ref)); - } - } else if (t.isAssignmentExpression(node) && isMemberExpressionSuper(node.left)) { - return this.specHandleAssignmentExpression(null, path, node); - } - - if (!property) return; - - var superProperty = this.getSuperProperty(property, computed); - - if (args) { - return this.optimiseCall(superProperty, args); - } else { - return superProperty; - } - }; - - ReplaceSupers.prototype.optimiseCall = function optimiseCall(callee, args) { - var thisNode = t.thisExpression(); - thisNode[HARDCORE_THIS_REF] = true; - return (0, _babelHelperOptimiseCallExpression2.default)(callee, thisNode, args); - }; - - return ReplaceSupers; -}(); - -exports.default = ReplaceSupers; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/package.json deleted file mode 100644 index 45364c0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helper-replace-supers/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helper-replace-supers@^6.24.1", - "scope": null, - "escapedName": "babel-helper-replace-supers", - "name": "babel-helper-replace-supers", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes" - ] - ], - "_from": "babel-helper-replace-supers@>=6.24.1 <7.0.0", - "_id": "babel-helper-replace-supers@6.24.1", - "_inCache": true, - "_location": "/babel-helper-replace-supers", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-helper-replace-supers-6.24.1.tgz_1491578359376_0.7481327280402184" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helper-replace-supers@^6.24.1", - "scope": null, - "escapedName": "babel-helper-replace-supers", - "name": "babel-helper-replace-supers", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-object-super" - ], - "_resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "_shasum": "bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a", - "_shrinkwrap": null, - "_spec": "babel-helper-replace-supers@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes", - "dependencies": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - }, - "description": "Helper function to replace supers", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a", - "tarball": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz" - }, - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helper-replace-supers", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/README.md deleted file mode 100644 index 2614f11..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# babel-helpers - -> Collection of helper functions used by Babel transforms. - -## Install - -```sh -npm install --save-dev babel-helpers -``` - -## Usage - -```js -import * as helpers from 'babel-helpers'; -import * as t from 'babel-types'; - -const typeofHelper = helpers.get('typeof'); - -t.isExpressionStatement(typeofHelper); -// true -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/helpers.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/helpers.js deleted file mode 100644 index f85c372..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/helpers.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var helpers = {}; -exports.default = helpers; - - -helpers.typeof = (0, _babelTemplate2.default)("\n (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n"); - -helpers.jsx = (0, _babelTemplate2.default)("\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n"); - -helpers.asyncIterator = (0, _babelTemplate2.default)("\n (function (iterable) {\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n })\n"); - -helpers.asyncGenerator = (0, _babelTemplate2.default)("\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume(\"next\", arg); },\n function (arg) { resume(\"throw\", arg); });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n"); - -helpers.asyncGeneratorDelegate = (0, _babelTemplate2.default)("\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n })\n"); - -helpers.asyncToGenerator = (0, _babelTemplate2.default)("\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n })\n"); - -helpers.classCallCheck = (0, _babelTemplate2.default)("\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n });\n"); - -helpers.createClass = (0, _babelTemplate2.default)("\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n"); - -helpers.defineEnumerableProperties = (0, _babelTemplate2.default)("\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n"); - -helpers.defaults = (0, _babelTemplate2.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"); - -helpers.defineProperty = (0, _babelTemplate2.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"); - -helpers.extends = (0, _babelTemplate2.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"); - -helpers.get = (0, _babelTemplate2.default)("\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n"); - -helpers.inherits = (0, _babelTemplate2.default)("\n (function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n"); - -helpers.instanceof = (0, _babelTemplate2.default)("\n (function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n"); - -helpers.interopRequireDefault = (0, _babelTemplate2.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"); - -helpers.interopRequireWildcard = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"); - -helpers.newArrowCheck = (0, _babelTemplate2.default)("\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n });\n"); - -helpers.objectDestructuringEmpty = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n });\n"); - -helpers.objectWithoutProperties = (0, _babelTemplate2.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"); - -helpers.possibleConstructorReturn = (0, _babelTemplate2.default)("\n (function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n });\n"); - -helpers.selfGlobal = (0, _babelTemplate2.default)("\n typeof global === \"undefined\" ? self : global\n"); - -helpers.set = (0, _babelTemplate2.default)("\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n"); - -helpers.slicedToArray = (0, _babelTemplate2.default)("\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n })();\n"); - -helpers.slicedToArrayLoose = (0, _babelTemplate2.default)("\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n });\n"); - -helpers.taggedTemplateLiteral = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"); - -helpers.taggedTemplateLiteralLoose = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"); - -helpers.temporalRef = (0, _babelTemplate2.default)("\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n })\n"); - -helpers.temporalUndefined = (0, _babelTemplate2.default)("\n ({})\n"); - -helpers.toArray = (0, _babelTemplate2.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"); - -helpers.toConsumableArray = (0, _babelTemplate2.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"); -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/index.js deleted file mode 100644 index 54697eb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/lib/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.list = undefined; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -exports.get = get; - -var _helpers = require("./helpers"); - -var _helpers2 = _interopRequireDefault(_helpers); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function get(name) { - var fn = _helpers2.default[name]; - if (!fn) throw new ReferenceError("Unknown helper " + name); - - return fn().expression; -} - -var list = exports.list = (0, _keys2.default)(_helpers2.default).map(function (name) { - return name.replace(/^_/, ""); -}).filter(function (name) { - return name !== "__esModule"; -}); - -exports.default = get; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/package.json deleted file mode 100644 index c9ad2a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-helpers/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-helpers@^6.24.1", - "scope": null, - "escapedName": "babel-helpers", - "name": "babel-helpers", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-helpers@>=6.24.1 <7.0.0", - "_id": "babel-helpers@6.24.1", - "_inCache": true, - "_location": "/babel-helpers", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-helpers-6.24.1.tgz_1491578360795_0.7688647950999439" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-helpers@^6.24.1", - "scope": null, - "escapedName": "babel-helpers", - "name": "babel-helpers", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core" - ], - "_resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "_shasum": "3471de9caec388e5c850e597e58a26ddf37602b2", - "_shrinkwrap": null, - "_spec": "babel-helpers@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - }, - "description": "Collection of helper functions used by Babel transforms.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3471de9caec388e5c850e597e58a26ddf37602b2", - "tarball": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-helpers", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helpers" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/README.md deleted file mode 100644 index 98ecf8b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# babel-messages - -> Collection of debug messages used by Babel. - -## Install - -```sh -npm install --save-dev babel-messages -``` - -## Usage - -```js -import * as messages from 'babel-messages'; - -messages.get('tailCallReassignmentDeopt'); -// > "Function reference has been..." -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/lib/index.js deleted file mode 100644 index 39e023e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/lib/index.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.MESSAGES = undefined; - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -exports.get = get; -exports.parseArgs = parseArgs; - -var _util = require("util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var MESSAGES = exports.MESSAGES = { - tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", - classesIllegalBareSuper: "Illegal use of bare super", - classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead", - scopeDuplicateDeclaration: "Duplicate declaration $1", - settersNoRest: "Setters aren't allowed to have a rest", - noAssignmentsInForHead: "No assignments allowed in for-in/of head", - expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier", - invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue", - readOnly: "$1 is read-only", - unknownForHead: "Unknown node type $1 in ForStatement", - didYouMean: "Did you mean $1?", - codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", - missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", - unsupportedOutputType: "Unsupported output type $1", - illegalMethodName: "Illegal method name $1", - lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated", - - modulesIllegalExportName: "Illegal export $1", - modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes", - - undeclaredVariable: "Reference to undeclared variable $1", - undeclaredVariableType: "Referencing a type alias outside of a type annotation", - undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?", - - traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", - traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", - traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", - traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type", - - pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", - pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3", - pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", - pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3" -}; - -function get(key) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var msg = MESSAGES[key]; - if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key)); - - args = parseArgs(args); - - return msg.replace(/\$(\d+)/g, function (str, i) { - return args[i - 1]; - }); -} - -function parseArgs(args) { - return args.map(function (val) { - if (val != null && val.inspect) { - return val.inspect(); - } else { - try { - return (0, _stringify2.default)(val) || val + ""; - } catch (e) { - return util.inspect(val); - } - } - }); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/package.json deleted file mode 100644 index f12e631..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-messages/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-messages@^6.23.0", - "scope": null, - "escapedName": "babel-messages", - "name": "babel-messages", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-messages@>=6.23.0 <7.0.0", - "_id": "babel-messages@6.23.0", - "_inCache": true, - "_location": "/babel-messages", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-messages-6.23.0.tgz_1487027061100_0.7234047667589039" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-messages@^6.23.0", - "scope": null, - "escapedName": "babel-messages", - "name": "babel-messages", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-generator", - "/babel-helper-replace-supers", - "/babel-plugin-transform-es2015-classes", - "/babel-traverse" - ], - "_resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "_shasum": "f3cdf4703858035b2a2951c6ec5edf6c62f2630e", - "_shrinkwrap": null, - "_spec": "babel-messages@^6.23.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Collection of debug messages used by Babel.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "f3cdf4703858035b2a2951c6ec5edf6c62f2630e", - "tarball": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-messages", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-messages" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/README.md deleted file mode 100644 index 608891b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# babel-plugin-check-es2015-constants - -Validate ES2015 constants (prevents reassignment of const variables). - -## Example - -**In** - -```js -const a = 1; -a = 2; -``` - -**Out** - -```bash -repl: "a" is read-only - 1 | const a = 1; -> 2 | a = 2; - | ^ -``` - -[Try in REPL](http://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015&experimental=false&loose=false&spec=false&code=const%20a%20%3D%201%3B%0Aa%20%3D%202%3B&playground=true) - -## Installation - -```sh -npm install --save-dev babel-plugin-check-es2015-constants -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["check-es2015-constants"] -} -``` - -### Via CLI - -```sh -babel --plugins check-es2015-constants script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["check-es2015-constants"] -}); -``` - -## Note - -This check will only validate consts. If you need it to compile down to `var` then you must also install and enable [`transform-es2015-block-scoping`](http://babeljs.io/docs/plugins/transform-es2015-block-scoping/). diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/lib/index.js deleted file mode 100644 index f4a43ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/lib/index.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var messages = _ref.messages; - - return { - visitor: { - Scope: function Scope(_ref2) { - var scope = _ref2.scope; - - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - if (binding.kind !== "const" && binding.kind !== "module") continue; - - for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var violation = _ref3; - - throw violation.buildCodeFrameError(messages.get("readOnly", name)); - } - } - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/package.json deleted file mode 100644 index 07164e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-check-es2015-constants/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-check-es2015-constants@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-check-es2015-constants", - "name": "babel-plugin-check-es2015-constants", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-check-es2015-constants@>=6.22.0 <7.0.0", - "_id": "babel-plugin-check-es2015-constants@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-check-es2015-constants", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-check-es2015-constants-6.22.0.tgz_1484872418811_0.9349760548211634" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-check-es2015-constants@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-check-es2015-constants", - "name": "babel-plugin-check-es2015-constants", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "_shasum": "35157b101426fd2ffd3da3f75c7d1e91835bbf8a", - "_shrinkwrap": null, - "_spec": "babel-plugin-check-es2015-constants@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 constants to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "35157b101426fd2ffd3da3f75c7d1e91835bbf8a", - "tarball": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-check-es2015-constants", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-check-es2015-constants" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/.npmignore deleted file mode 100644 index cace0d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -src diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/README.md deleted file mode 100644 index 4bb1e18..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-plugin-external-helpers - -## Installation - -```sh -npm install --save-dev babel-plugin-external-helpers -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["external-helpers"] -} -``` - -### Via CLI - -```sh -babel --plugins external-helpers script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["external-helpers"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/lib/index.js deleted file mode 100644 index 2397150..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - return { - pre: function pre(file) { - file.set("helpersNamespace", t.identifier("babelHelpers")); - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/package.json deleted file mode 100644 index 22d82d2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-external-helpers/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-external-helpers@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-external-helpers", - "name": "babel-plugin-external-helpers", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-plugin-external-helpers@>=6.5.0 <7.0.0", - "_id": "babel-plugin-external-helpers@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-external-helpers", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-external-helpers-6.22.0.tgz_1484872420715_0.27984497509896755" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-external-helpers@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-external-helpers", - "name": "babel-plugin-external-helpers", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz", - "_shasum": "2285f48b02bd5dede85175caf8c62e86adccefa1", - "_shrinkwrap": null, - "_spec": "babel-plugin-external-helpers@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "This plugin contains helper functions that’ll be placed at the top of the generated code", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "2285f48b02bd5dede85175caf8c62e86adccefa1", - "tarball": "https://registry.npmjs.org/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-external-helpers", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-external-helpers" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/.npmignore deleted file mode 100644 index cace0d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -src diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/README.md deleted file mode 100644 index 0e4691f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-syntax-flow - - - -## Installation - -```sh -$ npm install babel-plugin-syntax-flow -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["syntax-flow"] -} -``` - -### Via CLI - -```sh -$ babel --plugins syntax-flow script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["syntax-flow"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/lib/index.js deleted file mode 100644 index 69cd257..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("flow"); - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/package.json deleted file mode 100644 index 5ebd1be..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-flow/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-syntax-flow@^6.18.0", - "scope": null, - "escapedName": "babel-plugin-syntax-flow", - "name": "babel-plugin-syntax-flow", - "rawSpec": "^6.18.0", - "spec": ">=6.18.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types" - ] - ], - "_from": "babel-plugin-syntax-flow@>=6.18.0 <7.0.0", - "_id": "babel-plugin-syntax-flow@6.18.0", - "_inCache": true, - "_location": "/babel-plugin-syntax-flow", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-syntax-flow-6.18.0.tgz_1477343936328_0.1864578581880778" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-syntax-flow@^6.18.0", - "scope": null, - "escapedName": "babel-plugin-syntax-flow", - "name": "babel-plugin-syntax-flow", - "rawSpec": "^6.18.0", - "spec": ">=6.18.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-flow-strip-types" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "_shasum": "4c3ab20a2af26aa20cd25995c398c4eb70310c8d", - "_shrinkwrap": null, - "_spec": "babel-plugin-syntax-flow@^6.18.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types", - "dependencies": {}, - "description": "Allow parsing of the flow syntax", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "4c3ab20a2af26aa20cd25995c398c4eb70310c8d", - "tarball": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-syntax-flow", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-flow" - }, - "scripts": {}, - "version": "6.18.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/.npmignore deleted file mode 100644 index cace0d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -src diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/README.md deleted file mode 100644 index e8c7e6b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-syntax-jsx - - - -## Installation - -```sh -$ npm install babel-plugin-syntax-jsx -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["syntax-jsx"] -} -``` - -### Via CLI - -```sh -$ babel --plugins syntax-jsx script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["syntax-jsx"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/lib/index.js deleted file mode 100644 index 66c7373..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - manipulateOptions: function manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("jsx"); - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/package.json deleted file mode 100644 index 5483af6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-syntax-jsx/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-syntax-jsx@^6.8.0", - "scope": null, - "escapedName": "babel-plugin-syntax-jsx", - "name": "babel-plugin-syntax-jsx", - "rawSpec": "^6.8.0", - "spec": ">=6.8.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx" - ] - ], - "_from": "babel-plugin-syntax-jsx@>=6.8.0 <7.0.0", - "_id": "babel-plugin-syntax-jsx@6.18.0", - "_inCache": true, - "_location": "/babel-plugin-syntax-jsx", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-syntax-jsx-6.18.0.tgz_1477343936472_0.17020426644012332" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-syntax-jsx@^6.8.0", - "scope": null, - "escapedName": "babel-plugin-syntax-jsx", - "name": "babel-plugin-syntax-jsx", - "rawSpec": "^6.8.0", - "spec": ">=6.8.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-react-jsx", - "/babel-plugin-transform-react-jsx-self", - "/babel-plugin-transform-react-jsx-source", - "/babel-preset-react" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "_shasum": "0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946", - "_shrinkwrap": null, - "_spec": "babel-plugin-syntax-jsx@^6.8.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx", - "dependencies": {}, - "description": "Allow parsing of jsx", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946", - "tarball": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-syntax-jsx", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-jsx" - }, - "scripts": {}, - "version": "6.18.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/README.md deleted file mode 100644 index 6e1b8f3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# babel-plugin-transform-es2015-arrow-functions - -> Compile ES2015 arrow functions to ES5 - -## Example - -**In** - -```javascript -var a = () => {}; -var a = (b) => b; - -const double = [1,2,3].map((num) => num * 2); -console.log(double); // [2,4,6] - -var bob = { - _name: "Bob", - _friends: ["Sally", "Tom"], - printFriends() { - this._friends.forEach(f => - console.log(this._name + " knows " + f)); - } -}; -console.log(bob.printFriends()); -``` - -**Out** - -```javascript -var a = function a() {}; -var a = function a(b) { - return b; -}; - -var double = [1, 2, 3].map(function (num) { - return num * 2; -}); -console.log(double); // [2,4,6] - -var bob = { - _name: "Bob", - _friends: ["Sally", "Tom"], - printFriends: function printFriends() { - var _this = this; - - this._friends.forEach(function (f) { - return console.log(_this._name + " knows " + f); - }); - } -}; -console.log(bob.printFriends()); -``` - -[Try in REPL](http://babeljs.io/repl/#?evaluate=true&lineWrap=true&presets=es2015%2Ces2015-loose&experimental=false&loose=false&spec=false&code=var%20a%20%3D%20()%20%3D%3E%20%7B%7D%3B%0Avar%20a%20%3D%20(b)%20%3D%3E%20b%3B%0A%0Aconst%20double%20%3D%20%5B1%2C2%2C3%5D.map((num)%20%3D%3E%20num%20*%202)%3B%0Aconsole.log(double)%3B%20%2F%2F%20%5B2%2C4%2C6%5D%0A%0Avar%20bob%20%3D%20%7B%0A%20%20_name%3A%20%22Bob%22%2C%0A%20%20_friends%3A%20%5B%22Sally%22%2C%20%22Tom%22%5D%2C%0A%20%20printFriends()%20%7B%0A%20%20%20%20this._friends.forEach(f%20%3D%3E%0A%20%20%20%20%20%20console.log(this._name%20%2B%20%22%20knows%20%22%20%2B%20f))%3B%0A%20%20%7D%0A%7D%3B%0Aconsole.log(bob.printFriends())%3B&playground=true) - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-arrow-functions -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-arrow-functions"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-arrow-functions", { "spec": true }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-arrow-functions script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-arrow-functions"] -}); -``` - -## Options - -* `spec` - This option wraps the generated function in `.bind(this)` and keeps uses of `this` inside the function as-is, instead of using a renamed `this`. It also adds a runtime check to ensure the functions are not instantiated. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/lib/index.js deleted file mode 100644 index 8cef2fd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/lib/index.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - return { - visitor: { - ArrowFunctionExpression: function ArrowFunctionExpression(path, state) { - if (state.opts.spec) { - var node = path.node; - - if (node.shadow) return; - - node.shadow = { this: false }; - node.type = "FunctionExpression"; - - var boundThis = t.thisExpression(); - boundThis._forceShadow = path; - - path.ensureBlock(); - path.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(state.addHelper("newArrowCheck"), [t.thisExpression(), boundThis]))); - - path.replaceWith(t.callExpression(t.memberExpression(node, t.identifier("bind")), [t.thisExpression()])); - } else { - path.arrowFunctionToShadowed(); - } - } - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/package.json deleted file mode 100644 index 9d095f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-arrow-functions/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-arrow-functions@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-arrow-functions", - "name": "babel-plugin-transform-es2015-arrow-functions", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-arrow-functions@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-arrow-functions@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-arrow-functions", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz_1484872427408_0.779699427774176" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-arrow-functions@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-arrow-functions", - "name": "babel-plugin-transform-es2015-arrow-functions", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "_shasum": "452692cb711d5f79dc7f85e440ce41b9f244d221", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-arrow-functions@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 arrow functions to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "452692cb711d5f79dc7f85e440ce41b9f244d221", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-arrow-functions", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-arrow-functions" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/README.md deleted file mode 100644 index 4119eb9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-transform-es2015-block-scoped-functions - -> Babel plugin to ensure function declarations at the block level are block scoped. - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-block-scoped-functions -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-block-scoped-functions"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-block-scoped-functions script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-block-scoped-functions"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/lib/index.js deleted file mode 100644 index f18cfc3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/lib/index.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - function statementList(key, path) { - var paths = path.get(key); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _path = _ref2; - - var func = _path.node; - if (!_path.isFunctionDeclaration()) continue; - - var declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]); - - declar._blockHoist = 2; - - func.id = null; - - _path.replaceWith(declar); - } - } - - return { - visitor: { - BlockStatement: function BlockStatement(path) { - var node = path.node, - parent = path.parent; - - if (t.isFunction(parent, { body: node }) || t.isExportDeclaration(parent)) { - return; - } - - statementList("body", path); - }, - SwitchCase: function SwitchCase(path) { - statementList("consequent", path); - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/package.json deleted file mode 100644 index 08cb5e2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoped-functions/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-block-scoped-functions@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-block-scoped-functions", - "name": "babel-plugin-transform-es2015-block-scoped-functions", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-block-scoped-functions@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-block-scoped-functions", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz_1484872427609_0.37350659677758813" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-block-scoped-functions@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-block-scoped-functions", - "name": "babel-plugin-transform-es2015-block-scoped-functions", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "_shasum": "bbc51b49f964d70cb8d8e0b94e820246ce3a6141", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-block-scoped-functions@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Babel plugin to ensure function declarations at the block level are block scoped", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "bbc51b49f964d70cb8d8e0b94e820246ce3a6141", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-block-scoped-functions", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-block-scoped-functions" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/README.md deleted file mode 100644 index 2890f38..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# babel-plugin-transform-es2015-block-scoping - -> Compile ES2015 block scoping (const and let) to ES5 - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-block-scoping -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-es2015-block-scoping"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-es2015-block-scoping", { - "throwIfClosureRequired": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-block-scoping script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-block-scoping"] -}); -``` - -## Options `throwIfClosureRequired` - -In cases such as the following it's impossible to rewrite let/const without adding an additional function and closure while transforming: - -```javascript -for (let i = 0; i < 5; i++) { - setTimeout(() => console.log(i), 1); -} -``` - -In extremely performance-sensitive code, this can be undesirable. If `"throwIfClosureRequired": true` is set, Babel throws when transforming these patterns instead of automatically adding an additional function. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js deleted file mode 100644 index 7f1bb1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js +++ /dev/null @@ -1,649 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -exports.default = function () { - return { - visitor: { - VariableDeclaration: function VariableDeclaration(path, file) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - if (!isBlockScoped(node)) return; - convertBlockScopedToVar(path, null, parent, scope, true); - - if (node._tdzThis) { - var nodes = [node]; - - for (var i = 0; i < node.declarations.length; i++) { - var decl = node.declarations[i]; - if (decl.init) { - var assign = t.assignmentExpression("=", decl.id, decl.init); - assign._ignoreBlockScopingTDZ = true; - nodes.push(t.expressionStatement(assign)); - } - decl.init = file.addHelper("temporalUndefined"); - } - - node._blockHoist = 2; - - if (path.isCompletionRecord()) { - nodes.push(t.expressionStatement(scope.buildUndefinedNode())); - } - - path.replaceWithMultiple(nodes); - } - }, - Loop: function Loop(path, file) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - t.ensureBlock(node); - var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, file); - var replace = blockScoping.run(); - if (replace) path.replaceWith(replace); - }, - CatchClause: function CatchClause(path, file) { - var parent = path.parent, - scope = path.scope; - - var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, file); - blockScoping.run(); - }, - "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, file) { - if (!ignoreBlock(path)) { - var blockScoping = new BlockScoping(null, path, path.parent, path.scope, file); - blockScoping.run(); - } - } - } - }; -}; - -var _babelTraverse = require("babel-traverse"); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _tdz = require("./tdz"); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _values = require("lodash/values"); - -var _values2 = _interopRequireDefault(_values); - -var _extend = require("lodash/extend"); - -var _extend2 = _interopRequireDefault(_extend); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ignoreBlock(path) { - return t.isLoop(path.parent) || t.isCatchClause(path.parent); -} - -var buildRetCheck = (0, _babelTemplate2.default)("\n if (typeof RETURN === \"object\") return RETURN.v;\n"); - -function isBlockScoped(node) { - if (!t.isVariableDeclaration(node)) return false; - if (node[t.BLOCK_SCOPED_SYMBOL]) return true; - if (node.kind !== "let" && node.kind !== "const") return false; - return true; -} - -function convertBlockScopedToVar(path, node, parent, scope) { - var moveBindingsToParent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - - if (!node) { - node = path.node; - } - - if (!t.isFor(parent)) { - for (var i = 0; i < node.declarations.length; i++) { - var declar = node.declarations[i]; - declar.init = declar.init || scope.buildUndefinedNode(); - } - } - - node[t.BLOCK_SCOPED_SYMBOL] = true; - node.kind = "var"; - - if (moveBindingsToParent) { - var parentScope = scope.getFunctionParent(); - var ids = path.getBindingIdentifiers(); - for (var name in ids) { - var binding = scope.getOwnBinding(name); - if (binding) binding.kind = "var"; - scope.moveBindingTo(name, parentScope); - } - } -} - -function isVar(node) { - return t.isVariableDeclaration(node, { kind: "var" }) && !isBlockScoped(node); -} - -var letReferenceBlockVisitor = _babelTraverse2.default.visitors.merge([{ - Loop: { - enter: function enter(path, state) { - state.loopDepth++; - }, - exit: function exit(path, state) { - state.loopDepth--; - } - }, - Function: function Function(path, state) { - if (state.loopDepth > 0) { - path.traverse(letReferenceFunctionVisitor, state); - } - return path.skip(); - } -}, _tdz.visitor]); - -var letReferenceFunctionVisitor = _babelTraverse2.default.visitors.merge([{ - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var ref = state.letReferences[path.node.name]; - - if (!ref) return; - - var localBinding = path.scope.getBindingIdentifier(path.node.name); - if (localBinding && localBinding !== ref) return; - - state.closurify = true; - } -}, _tdz.visitor]); - -var hoistVarDeclarationsVisitor = { - enter: function enter(path, self) { - var node = path.node, - parent = path.parent; - - - if (path.isForStatement()) { - if (isVar(node.init, node)) { - var nodes = self.pushDeclar(node.init); - if (nodes.length === 1) { - node.init = nodes[0]; - } else { - node.init = t.sequenceExpression(nodes); - } - } - } else if (path.isFor()) { - if (isVar(node.left, node)) { - self.pushDeclar(node.left); - node.left = node.left.declarations[0].id; - } - } else if (isVar(node, parent)) { - path.replaceWithMultiple(self.pushDeclar(node).map(function (expr) { - return t.expressionStatement(expr); - })); - } else if (path.isFunction()) { - return path.skip(); - } - } -}; - -var loopLabelVisitor = { - LabeledStatement: function LabeledStatement(_ref, state) { - var node = _ref.node; - - state.innerLabels.push(node.label.name); - } -}; - -var continuationVisitor = { - enter: function enter(path, state) { - if (path.isAssignmentExpression() || path.isUpdateExpression()) { - var bindings = path.getBindingIdentifiers(); - for (var name in bindings) { - if (state.outsideReferences[name] !== path.scope.getBindingIdentifier(name)) continue; - state.reassignments[name] = true; - } - } - } -}; - -function loopNodeTo(node) { - if (t.isBreakStatement(node)) { - return "break"; - } else if (t.isContinueStatement(node)) { - return "continue"; - } -} - -var loopVisitor = { - Loop: function Loop(path, state) { - var oldIgnoreLabeless = state.ignoreLabeless; - state.ignoreLabeless = true; - path.traverse(loopVisitor, state); - state.ignoreLabeless = oldIgnoreLabeless; - path.skip(); - }, - Function: function Function(path) { - path.skip(); - }, - SwitchCase: function SwitchCase(path, state) { - var oldInSwitchCase = state.inSwitchCase; - state.inSwitchCase = true; - path.traverse(loopVisitor, state); - state.inSwitchCase = oldInSwitchCase; - path.skip(); - }, - "BreakStatement|ContinueStatement|ReturnStatement": function BreakStatementContinueStatementReturnStatement(path, state) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - if (node[this.LOOP_IGNORE]) return; - - var replace = void 0; - var loopText = loopNodeTo(node); - - if (loopText) { - if (node.label) { - if (state.innerLabels.indexOf(node.label.name) >= 0) { - return; - } - - loopText = loopText + "|" + node.label.name; - } else { - if (state.ignoreLabeless) return; - - if (state.inSwitchCase) return; - - if (t.isBreakStatement(node) && t.isSwitchCase(parent)) return; - } - - state.hasBreakContinue = true; - state.map[loopText] = node; - replace = t.stringLiteral(loopText); - } - - if (path.isReturnStatement()) { - state.hasReturn = true; - replace = t.objectExpression([t.objectProperty(t.identifier("v"), node.argument || scope.buildUndefinedNode())]); - } - - if (replace) { - replace = t.returnStatement(replace); - replace[this.LOOP_IGNORE] = true; - path.skip(); - path.replaceWith(t.inherits(replace, node)); - } - } -}; - -var BlockScoping = function () { - function BlockScoping(loopPath, blockPath, parent, scope, file) { - (0, _classCallCheck3.default)(this, BlockScoping); - - this.parent = parent; - this.scope = scope; - this.file = file; - - this.blockPath = blockPath; - this.block = blockPath.node; - - this.outsideLetReferences = (0, _create2.default)(null); - this.hasLetReferences = false; - this.letReferences = (0, _create2.default)(null); - this.body = []; - - if (loopPath) { - this.loopParent = loopPath.parent; - this.loopLabel = t.isLabeledStatement(this.loopParent) && this.loopParent.label; - this.loopPath = loopPath; - this.loop = loopPath.node; - } - } - - BlockScoping.prototype.run = function run() { - var block = this.block; - if (block._letDone) return; - block._letDone = true; - - var needsClosure = this.getLetReferences(); - - if (t.isFunction(this.parent) || t.isProgram(this.block)) { - this.updateScopeInfo(); - return; - } - - if (!this.hasLetReferences) return; - - if (needsClosure) { - this.wrapClosure(); - } else { - this.remap(); - } - - this.updateScopeInfo(needsClosure); - - if (this.loopLabel && !t.isLabeledStatement(this.loopParent)) { - return t.labeledStatement(this.loopLabel, this.loop); - } - }; - - BlockScoping.prototype.updateScopeInfo = function updateScopeInfo(wrappedInClosure) { - var scope = this.scope; - var parentScope = scope.getFunctionParent(); - var letRefs = this.letReferences; - - for (var key in letRefs) { - var ref = letRefs[key]; - var binding = scope.getBinding(ref.name); - if (!binding) continue; - if (binding.kind === "let" || binding.kind === "const") { - binding.kind = "var"; - - if (wrappedInClosure) { - scope.removeBinding(ref.name); - } else { - scope.moveBindingTo(ref.name, parentScope); - } - } - } - }; - - BlockScoping.prototype.remap = function remap() { - var letRefs = this.letReferences; - var scope = this.scope; - - for (var key in letRefs) { - var ref = letRefs[key]; - - if (scope.parentHasBinding(key) || scope.hasGlobal(key)) { - if (scope.hasOwnBinding(key)) scope.rename(ref.name); - - if (this.blockPath.scope.hasOwnBinding(key)) this.blockPath.scope.rename(ref.name); - } - } - }; - - BlockScoping.prototype.wrapClosure = function wrapClosure() { - if (this.file.opts.throwIfClosureRequired) { - throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure " + "(throwIfClosureRequired)."); - } - var block = this.block; - - var outsideRefs = this.outsideLetReferences; - - if (this.loop) { - for (var name in outsideRefs) { - var id = outsideRefs[name]; - - if (this.scope.hasGlobal(id.name) || this.scope.parentHasBinding(id.name)) { - delete outsideRefs[id.name]; - delete this.letReferences[id.name]; - - this.scope.rename(id.name); - - this.letReferences[id.name] = id; - outsideRefs[id.name] = id; - } - } - } - - this.has = this.checkLoop(); - - this.hoistVarDeclarations(); - - var params = (0, _values2.default)(outsideRefs); - var args = (0, _values2.default)(outsideRefs); - - var isSwitch = this.blockPath.isSwitchStatement(); - - var fn = t.functionExpression(null, params, t.blockStatement(isSwitch ? [block] : block.body)); - fn.shadow = true; - - this.addContinuations(fn); - - var ref = fn; - - if (this.loop) { - ref = this.scope.generateUidIdentifier("loop"); - this.loopPath.insertBefore(t.variableDeclaration("var", [t.variableDeclarator(ref, fn)])); - } - - var call = t.callExpression(ref, args); - var ret = this.scope.generateUidIdentifier("ret"); - - var hasYield = _babelTraverse2.default.hasType(fn.body, this.scope, "YieldExpression", t.FUNCTION_TYPES); - if (hasYield) { - fn.generator = true; - call = t.yieldExpression(call, true); - } - - var hasAsync = _babelTraverse2.default.hasType(fn.body, this.scope, "AwaitExpression", t.FUNCTION_TYPES); - if (hasAsync) { - fn.async = true; - call = t.awaitExpression(call); - } - - this.buildClosure(ret, call); - - if (isSwitch) this.blockPath.replaceWithMultiple(this.body);else block.body = this.body; - }; - - BlockScoping.prototype.buildClosure = function buildClosure(ret, call) { - var has = this.has; - if (has.hasReturn || has.hasBreakContinue) { - this.buildHas(ret, call); - } else { - this.body.push(t.expressionStatement(call)); - } - }; - - BlockScoping.prototype.addContinuations = function addContinuations(fn) { - var state = { - reassignments: {}, - outsideReferences: this.outsideLetReferences - }; - - this.scope.traverse(fn, continuationVisitor, state); - - for (var i = 0; i < fn.params.length; i++) { - var param = fn.params[i]; - if (!state.reassignments[param.name]) continue; - - var newParam = this.scope.generateUidIdentifier(param.name); - fn.params[i] = newParam; - - this.scope.rename(param.name, newParam.name, fn); - - fn.body.body.push(t.expressionStatement(t.assignmentExpression("=", param, newParam))); - } - }; - - BlockScoping.prototype.getLetReferences = function getLetReferences() { - var _this = this; - - var block = this.block; - - var declarators = []; - - if (this.loop) { - var init = this.loop.left || this.loop.init; - if (isBlockScoped(init)) { - declarators.push(init); - (0, _extend2.default)(this.outsideLetReferences, t.getBindingIdentifiers(init)); - } - } - - var addDeclarationsFromChild = function addDeclarationsFromChild(path, node) { - node = node || path.node; - if (t.isClassDeclaration(node) || t.isFunctionDeclaration(node) || isBlockScoped(node)) { - if (isBlockScoped(node)) { - convertBlockScopedToVar(path, node, block, _this.scope); - } - declarators = declarators.concat(node.declarations || node); - } - if (t.isLabeledStatement(node)) { - addDeclarationsFromChild(path.get("body"), node.body); - } - }; - - if (block.body) { - for (var i = 0; i < block.body.length; i++) { - var declarPath = this.blockPath.get("body")[i]; - addDeclarationsFromChild(declarPath); - } - } - - if (block.cases) { - for (var _i = 0; _i < block.cases.length; _i++) { - var consequents = block.cases[_i].consequent; - - for (var j = 0; j < consequents.length; j++) { - var _declarPath = this.blockPath.get("cases")[_i]; - var declar = consequents[j]; - addDeclarationsFromChild(_declarPath, declar); - } - } - } - - for (var _i2 = 0; _i2 < declarators.length; _i2++) { - var _declar = declarators[_i2]; - - var keys = t.getBindingIdentifiers(_declar, false, true); - (0, _extend2.default)(this.letReferences, keys); - this.hasLetReferences = true; - } - - if (!this.hasLetReferences) return; - - var state = { - letReferences: this.letReferences, - closurify: false, - file: this.file, - loopDepth: 0 - }; - - var loopOrFunctionParent = this.blockPath.find(function (path) { - return path.isLoop() || path.isFunction(); - }); - if (loopOrFunctionParent && loopOrFunctionParent.isLoop()) { - state.loopDepth++; - } - - this.blockPath.traverse(letReferenceBlockVisitor, state); - - return state.closurify; - }; - - BlockScoping.prototype.checkLoop = function checkLoop() { - var state = { - hasBreakContinue: false, - ignoreLabeless: false, - inSwitchCase: false, - innerLabels: [], - hasReturn: false, - isLoop: !!this.loop, - map: {}, - LOOP_IGNORE: (0, _symbol2.default)() - }; - - this.blockPath.traverse(loopLabelVisitor, state); - this.blockPath.traverse(loopVisitor, state); - - return state; - }; - - BlockScoping.prototype.hoistVarDeclarations = function hoistVarDeclarations() { - this.blockPath.traverse(hoistVarDeclarationsVisitor, this); - }; - - BlockScoping.prototype.pushDeclar = function pushDeclar(node) { - var declars = []; - var names = t.getBindingIdentifiers(node); - for (var name in names) { - declars.push(t.variableDeclarator(names[name])); - } - - this.body.push(t.variableDeclaration(node.kind, declars)); - - var replace = []; - - for (var i = 0; i < node.declarations.length; i++) { - var declar = node.declarations[i]; - if (!declar.init) continue; - - var expr = t.assignmentExpression("=", declar.id, declar.init); - replace.push(t.inherits(expr, declar)); - } - - return replace; - }; - - BlockScoping.prototype.buildHas = function buildHas(ret, call) { - var body = this.body; - - body.push(t.variableDeclaration("var", [t.variableDeclarator(ret, call)])); - - var retCheck = void 0; - var has = this.has; - var cases = []; - - if (has.hasReturn) { - retCheck = buildRetCheck({ - RETURN: ret - }); - } - - if (has.hasBreakContinue) { - for (var key in has.map) { - cases.push(t.switchCase(t.stringLiteral(key), [has.map[key]])); - } - - if (has.hasReturn) { - cases.push(t.switchCase(null, [retCheck])); - } - - if (cases.length === 1) { - var single = cases[0]; - body.push(t.ifStatement(t.binaryExpression("===", ret, single.test), single.consequent[0])); - } else { - if (this.loop) { - for (var i = 0; i < cases.length; i++) { - var caseConsequent = cases[i].consequent[0]; - if (t.isBreakStatement(caseConsequent) && !caseConsequent.label) { - caseConsequent.label = this.loopLabel = this.loopLabel || this.scope.generateUidIdentifier("loop"); - } - } - } - - body.push(t.switchStatement(ret, cases)); - } - } else { - if (has.hasReturn) { - body.push(retCheck); - } - } - }; - - return BlockScoping; -}(); - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/tdz.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/tdz.js deleted file mode 100644 index 9137fed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/lib/tdz.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.visitor = undefined; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function getTDZStatus(refPath, bindingPath) { - var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath); - - if (executionStatus === "before") { - return "inside"; - } else if (executionStatus === "after") { - return "outside"; - } else { - return "maybe"; - } -} - -function buildTDZAssert(node, file) { - return t.callExpression(file.addHelper("temporalRef"), [node, t.stringLiteral(node.name), file.addHelper("temporalUndefined")]); -} - -function isReference(node, scope, state) { - var declared = state.letReferences[node.name]; - if (!declared) return false; - - return scope.getBindingIdentifier(node.name) === declared; -} - -var visitor = exports.visitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (!this.file.opts.tdz) return; - - var node = path.node, - parent = path.parent, - scope = path.scope; - - - if (path.parentPath.isFor({ left: node })) return; - if (!isReference(node, scope, state)) return; - - var bindingPath = scope.getBinding(node.name).path; - - var status = getTDZStatus(path, bindingPath); - if (status === "inside") return; - - if (status === "maybe") { - var assert = buildTDZAssert(node, state.file); - - bindingPath.parent._tdzThis = true; - - path.skip(); - - if (path.parentPath.isUpdateExpression()) { - if (parent._ignoreBlockScopingTDZ) return; - path.parentPath.replaceWith(t.sequenceExpression([assert, parent])); - } else { - path.replaceWith(assert); - } - } else if (status === "outside") { - path.replaceWith(t.throwStatement(t.inherits(t.newExpression(t.identifier("ReferenceError"), [t.stringLiteral(node.name + " is not defined - temporal dead zone")]), node))); - } - }, - - - AssignmentExpression: { - exit: function exit(path, state) { - if (!this.file.opts.tdz) return; - - var node = path.node; - - if (node._ignoreBlockScopingTDZ) return; - - var nodes = []; - var ids = path.getBindingIdentifiers(); - - for (var name in ids) { - var id = ids[name]; - - if (isReference(id, path.scope, state)) { - nodes.push(buildTDZAssert(id, state.file)); - } - } - - if (nodes.length) { - node._ignoreBlockScopingTDZ = true; - nodes.push(node); - path.replaceWithMultiple(nodes.map(t.expressionStatement)); - } - } - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package-lock.json deleted file mode 100644 index 5c92384..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package-lock.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-plugin-transform-es2015-block-scoping", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package.json deleted file mode 100644 index a503429..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-block-scoping/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-block-scoping@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-block-scoping", - "name": "babel-plugin-transform-es2015-block-scoping", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-block-scoping@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-block-scoping@6.26.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-block-scoping", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz_1502898859327_0.8509586888831109" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-block-scoping@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-block-scoping", - "name": "babel-plugin-transform-es2015-block-scoping", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "_shasum": "d70f5299c1308d05c12f463813b0a09e73b1895f", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-block-scoping@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - }, - "description": "Compile ES2015 block scoping (const and let) to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "d70f5299c1308d05c12f463813b0a09e73b1895f", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-plugin-transform-es2015-block-scoping", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-block-scoping" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/README.md deleted file mode 100644 index c189adf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# babel-plugin-transform-es2015-classes - -> Compile ES2015 classes to ES5 - -## Caveats - -Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed -due to limitations in ES5 (for the [es2015-classes](http://babeljs.io/docs/plugins/transform-es2015-classes) plugin). -You can try to use [babel-plugin-transform-builtin-extend](https://github.com/loganfsmyth/babel-plugin-transform-builtin-extend) based on `Object.setPrototypeOf` and `Reflect.construct`, but it also has some limitations. - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-classes -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-classes"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-classes", { - "loose": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-classes script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-classes"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false`. - -#### Method enumerability - -Please note that in loose mode class methods **are** enumerable. This is not in line -with the spec and you may run into issues. - -#### Method assignment - -Under loose mode, methods are defined on the class prototype with simple assignments -instead of being defined. This can result in the following not working: - -```javascript -class Foo { - set bar() { - throw new Error("foo!"); - } -} - -class Bar extends Foo { - bar() { - // will throw an error when this method is defined - } -} -``` - -When `Bar.prototype.foo` is defined it triggers the setter on `Foo`. This is a -case that is very unlikely to appear in production code however it's something -to keep in mind. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/index.js deleted file mode 100644 index 9f4c0a9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function (_ref) { - var t = _ref.types; - - var VISITED = (0, _symbol2.default)(); - - return { - visitor: { - ExportDefaultDeclaration: function ExportDefaultDeclaration(path) { - if (!path.get("declaration").isClassDeclaration()) return; - - var node = path.node; - - var ref = node.declaration.id || path.scope.generateUidIdentifier("class"); - node.declaration.id = ref; - - path.replaceWith(node.declaration); - path.insertAfter(t.exportDefaultDeclaration(ref)); - }, - ClassDeclaration: function ClassDeclaration(path) { - var node = path.node; - - - var ref = node.id || path.scope.generateUidIdentifier("class"); - - path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(ref, t.toExpression(node))])); - }, - ClassExpression: function ClassExpression(path, state) { - var node = path.node; - - if (node[VISITED]) return; - - var inferred = (0, _babelHelperFunctionName2.default)(path); - if (inferred && inferred !== node) return path.replaceWith(inferred); - - node[VISITED] = true; - - var Constructor = _vanilla2.default; - if (state.opts.loose) Constructor = _loose2.default; - - path.replaceWith(new Constructor(path, state.file).run()); - } - } - }; -}; - -var _loose = require("./loose"); - -var _loose2 = _interopRequireDefault(_loose); - -var _vanilla = require("./vanilla"); - -var _vanilla2 = _interopRequireDefault(_vanilla); - -var _babelHelperFunctionName = require("babel-helper-function-name"); - -var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators.js deleted file mode 100644 index a5e1a74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (decorators, scope) { - for (var _iterator = decorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var decorator = _ref; - - var expression = decorator.expression; - if (!t.isMemberExpression(expression)) continue; - - var temp = scope.maybeGenerateMemoised(expression.object); - var ref = void 0; - - var nodes = []; - - if (temp) { - ref = temp; - nodes.push(t.assignmentExpression("=", temp, expression.object)); - } else { - ref = expression.object; - } - - nodes.push(t.callExpression(t.memberExpression(t.memberExpression(ref, expression.property, expression.computed), t.identifier("bind")), [ref])); - - if (nodes.length === 1) { - decorator.expression = nodes[0]; - } else { - decorator.expression = t.sequenceExpression(nodes); - } - } - - return decorators; -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/loose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/loose.js deleted file mode 100644 index be11b63..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/loose.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = require("babel-runtime/helpers/inherits"); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _babelHelperFunctionName = require("babel-helper-function-name"); - -var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - -var _vanilla = require("./vanilla"); - -var _vanilla2 = _interopRequireDefault(_vanilla); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var LooseClassTransformer = function (_VanillaTransformer) { - (0, _inherits3.default)(LooseClassTransformer, _VanillaTransformer); - - function LooseClassTransformer() { - (0, _classCallCheck3.default)(this, LooseClassTransformer); - - var _this = (0, _possibleConstructorReturn3.default)(this, _VanillaTransformer.apply(this, arguments)); - - _this.isLoose = true; - return _this; - } - - LooseClassTransformer.prototype._processMethod = function _processMethod(node, scope) { - if (!node.decorators) { - - var classRef = this.classRef; - if (!node.static) classRef = t.memberExpression(classRef, t.identifier("prototype")); - var methodName = t.memberExpression(classRef, node.key, node.computed || t.isLiteral(node.key)); - - var func = t.functionExpression(null, node.params, node.body, node.generator, node.async); - func.returnType = node.returnType; - var key = t.toComputedKey(node, node.key); - if (t.isStringLiteral(key)) { - func = (0, _babelHelperFunctionName2.default)({ - node: func, - id: key, - scope: scope - }); - } - - var expr = t.expressionStatement(t.assignmentExpression("=", methodName, func)); - t.inheritsComments(expr, node); - this.body.push(expr); - return true; - } - }; - - return LooseClassTransformer; -}(_vanilla2.default); - -exports.default = LooseClassTransformer; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js deleted file mode 100644 index 8fd9ac3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/lib/vanilla.js +++ /dev/null @@ -1,559 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _babelTraverse = require("babel-traverse"); - -var _babelHelperReplaceSupers = require("babel-helper-replace-supers"); - -var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers); - -var _babelHelperOptimiseCallExpression = require("babel-helper-optimise-call-expression"); - -var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression); - -var _babelHelperDefineMap = require("babel-helper-define-map"); - -var defineMap = _interopRequireWildcard(_babelHelperDefineMap); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildDerivedConstructor = (0, _babelTemplate2.default)("\n (function () {\n super(...arguments);\n })\n"); - -var noMethodVisitor = { - "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) { - if (!path.is("shadow")) { - path.skip(); - } - }, - Method: function Method(path) { - path.skip(); - } -}; - -var verifyConstructorVisitor = _babelTraverse.visitors.merge([noMethodVisitor, { - Super: function Super(path) { - if (this.isDerived && !this.hasBareSuper && !path.parentPath.isCallExpression({ callee: path.node })) { - throw path.buildCodeFrameError("'super.*' is not allowed before super()"); - } - }, - - - CallExpression: { - exit: function exit(path) { - if (path.get("callee").isSuper()) { - this.hasBareSuper = true; - - if (!this.isDerived) { - throw path.buildCodeFrameError("super() is only allowed in a derived constructor"); - } - } - } - }, - - ThisExpression: function ThisExpression(path) { - if (this.isDerived && !this.hasBareSuper) { - if (!path.inShadow("this")) { - throw path.buildCodeFrameError("'this' is not allowed before super()"); - } - } - } -}]); - -var findThisesVisitor = _babelTraverse.visitors.merge([noMethodVisitor, { - ThisExpression: function ThisExpression(path) { - this.superThises.push(path); - } -}]); - -var ClassTransformer = function () { - function ClassTransformer(path, file) { - (0, _classCallCheck3.default)(this, ClassTransformer); - - this.parent = path.parent; - this.scope = path.scope; - this.node = path.node; - this.path = path; - this.file = file; - - this.clearDescriptors(); - - this.instancePropBody = []; - this.instancePropRefs = {}; - this.staticPropBody = []; - this.body = []; - - this.bareSuperAfter = []; - this.bareSupers = []; - - this.pushedConstructor = false; - this.pushedInherits = false; - this.isLoose = false; - - this.superThises = []; - - this.classId = this.node.id; - - this.classRef = this.node.id ? t.identifier(this.node.id.name) : this.scope.generateUidIdentifier("class"); - - this.superName = this.node.superClass || t.identifier("Function"); - this.isDerived = !!this.node.superClass; - } - - ClassTransformer.prototype.run = function run() { - var _this = this; - - var superName = this.superName; - var file = this.file; - var body = this.body; - - var constructorBody = this.constructorBody = t.blockStatement([]); - this.constructor = this.buildConstructor(); - - var closureParams = []; - var closureArgs = []; - - if (this.isDerived) { - closureArgs.push(superName); - - superName = this.scope.generateUidIdentifierBasedOnNode(superName); - closureParams.push(superName); - - this.superName = superName; - } - - this.buildBody(); - - constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("classCallCheck"), [t.thisExpression(), this.classRef]))); - - body = body.concat(this.staticPropBody.map(function (fn) { - return fn(_this.classRef); - })); - - if (this.classId) { - if (body.length === 1) return t.toExpression(body[0]); - } - - body.push(t.returnStatement(this.classRef)); - - var container = t.functionExpression(null, closureParams, t.blockStatement(body)); - container.shadow = true; - return t.callExpression(container, closureArgs); - }; - - ClassTransformer.prototype.buildConstructor = function buildConstructor() { - var func = t.functionDeclaration(this.classRef, [], this.constructorBody); - t.inherits(func, this.node); - return func; - }; - - ClassTransformer.prototype.pushToMap = function pushToMap(node, enumerable) { - var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "value"; - var scope = arguments[3]; - - var mutatorMap = void 0; - if (node.static) { - this.hasStaticDescriptors = true; - mutatorMap = this.staticMutatorMap; - } else { - this.hasInstanceDescriptors = true; - mutatorMap = this.instanceMutatorMap; - } - - var map = defineMap.push(mutatorMap, node, kind, this.file, scope); - - if (enumerable) { - map.enumerable = t.booleanLiteral(true); - } - - return map; - }; - - ClassTransformer.prototype.constructorMeMaybe = function constructorMeMaybe() { - var hasConstructor = false; - var paths = this.path.get("body.body"); - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - hasConstructor = path.equals("kind", "constructor"); - if (hasConstructor) break; - } - if (hasConstructor) return; - - var params = void 0, - body = void 0; - - if (this.isDerived) { - var _constructor = buildDerivedConstructor().expression; - params = _constructor.params; - body = _constructor.body; - } else { - params = []; - body = t.blockStatement([]); - } - - this.path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), params, body)); - }; - - ClassTransformer.prototype.buildBody = function buildBody() { - this.constructorMeMaybe(); - this.pushBody(); - this.verifyConstructor(); - - if (this.userConstructor) { - var constructorBody = this.constructorBody; - constructorBody.body = constructorBody.body.concat(this.userConstructor.body.body); - t.inherits(this.constructor, this.userConstructor); - t.inherits(constructorBody, this.userConstructor.body); - } - - this.pushDescriptors(); - }; - - ClassTransformer.prototype.pushBody = function pushBody() { - var classBodyPaths = this.path.get("body.body"); - - for (var _iterator2 = classBodyPaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - var node = path.node; - - if (path.isClassProperty()) { - throw path.buildCodeFrameError("Missing class properties transform."); - } - - if (node.decorators) { - throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one."); - } - - if (t.isClassMethod(node)) { - var isConstructor = node.kind === "constructor"; - - if (isConstructor) { - path.traverse(verifyConstructorVisitor, this); - - if (!this.hasBareSuper && this.isDerived) { - throw path.buildCodeFrameError("missing super() call in constructor"); - } - } - - var replaceSupers = new _babelHelperReplaceSupers2.default({ - forceSuperMemoisation: isConstructor, - methodPath: path, - methodNode: node, - objectRef: this.classRef, - superRef: this.superName, - isStatic: node.static, - isLoose: this.isLoose, - scope: this.scope, - file: this.file - }, true); - - replaceSupers.replace(); - - if (isConstructor) { - this.pushConstructor(replaceSupers, node, path); - } else { - this.pushMethod(node, path); - } - } - } - }; - - ClassTransformer.prototype.clearDescriptors = function clearDescriptors() { - this.hasInstanceDescriptors = false; - this.hasStaticDescriptors = false; - - this.instanceMutatorMap = {}; - this.staticMutatorMap = {}; - }; - - ClassTransformer.prototype.pushDescriptors = function pushDescriptors() { - this.pushInherits(); - - var body = this.body; - - var instanceProps = void 0; - var staticProps = void 0; - - if (this.hasInstanceDescriptors) { - instanceProps = defineMap.toClassObject(this.instanceMutatorMap); - } - - if (this.hasStaticDescriptors) { - staticProps = defineMap.toClassObject(this.staticMutatorMap); - } - - if (instanceProps || staticProps) { - if (instanceProps) instanceProps = defineMap.toComputedObjectFromClass(instanceProps); - if (staticProps) staticProps = defineMap.toComputedObjectFromClass(staticProps); - - var nullNode = t.nullLiteral(); - - var args = [this.classRef, nullNode, nullNode, nullNode, nullNode]; - - if (instanceProps) args[1] = instanceProps; - if (staticProps) args[2] = staticProps; - - if (this.instanceInitializersId) { - args[3] = this.instanceInitializersId; - body.unshift(this.buildObjectAssignment(this.instanceInitializersId)); - } - - if (this.staticInitializersId) { - args[4] = this.staticInitializersId; - body.unshift(this.buildObjectAssignment(this.staticInitializersId)); - } - - var lastNonNullIndex = 0; - for (var i = 0; i < args.length; i++) { - if (args[i] !== nullNode) lastNonNullIndex = i; - } - args = args.slice(0, lastNonNullIndex + 1); - - body.push(t.expressionStatement(t.callExpression(this.file.addHelper("createClass"), args))); - } - - this.clearDescriptors(); - }; - - ClassTransformer.prototype.buildObjectAssignment = function buildObjectAssignment(id) { - return t.variableDeclaration("var", [t.variableDeclarator(id, t.objectExpression([]))]); - }; - - ClassTransformer.prototype.wrapSuperCall = function wrapSuperCall(bareSuper, superRef, thisRef, body) { - var bareSuperNode = bareSuper.node; - - if (this.isLoose) { - bareSuperNode.arguments.unshift(t.thisExpression()); - if (bareSuperNode.arguments.length === 2 && t.isSpreadElement(bareSuperNode.arguments[1]) && t.isIdentifier(bareSuperNode.arguments[1].argument, { name: "arguments" })) { - bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument; - bareSuperNode.callee = t.memberExpression(superRef, t.identifier("apply")); - } else { - bareSuperNode.callee = t.memberExpression(superRef, t.identifier("call")); - } - } else { - bareSuperNode = (0, _babelHelperOptimiseCallExpression2.default)(t.logicalExpression("||", t.memberExpression(this.classRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [this.classRef])), t.thisExpression(), bareSuperNode.arguments); - } - - var call = t.callExpression(this.file.addHelper("possibleConstructorReturn"), [t.thisExpression(), bareSuperNode]); - - var bareSuperAfter = this.bareSuperAfter.map(function (fn) { - return fn(thisRef); - }); - - if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) { - - if (this.superThises.length || bareSuperAfter.length) { - bareSuper.scope.push({ id: thisRef }); - call = t.assignmentExpression("=", thisRef, call); - } - - if (bareSuperAfter.length) { - call = t.toSequenceExpression([call].concat(bareSuperAfter, [thisRef])); - } - - bareSuper.parentPath.replaceWith(t.returnStatement(call)); - } else { - bareSuper.replaceWithMultiple([t.variableDeclaration("var", [t.variableDeclarator(thisRef, call)])].concat(bareSuperAfter, [t.expressionStatement(thisRef)])); - } - }; - - ClassTransformer.prototype.verifyConstructor = function verifyConstructor() { - var _this2 = this; - - if (!this.isDerived) return; - - var path = this.userConstructorPath; - var body = path.get("body"); - - path.traverse(findThisesVisitor, this); - - var guaranteedSuperBeforeFinish = !!this.bareSupers.length; - - var superRef = this.superName || t.identifier("Function"); - var thisRef = path.scope.generateUidIdentifier("this"); - - for (var _iterator3 = this.bareSupers, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var bareSuper = _ref3; - - this.wrapSuperCall(bareSuper, superRef, thisRef, body); - - if (guaranteedSuperBeforeFinish) { - bareSuper.find(function (parentPath) { - if (parentPath === path) { - return true; - } - - if (parentPath.isLoop() || parentPath.isConditional()) { - guaranteedSuperBeforeFinish = false; - return true; - } - }); - } - } - - for (var _iterator4 = this.superThises, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var thisPath = _ref4; - - thisPath.replaceWith(thisRef); - } - - var wrapReturn = function wrapReturn(returnArg) { - return t.callExpression(_this2.file.addHelper("possibleConstructorReturn"), [thisRef].concat(returnArg || [])); - }; - - var bodyPaths = body.get("body"); - if (bodyPaths.length && !bodyPaths.pop().isReturnStatement()) { - body.pushContainer("body", t.returnStatement(guaranteedSuperBeforeFinish ? thisRef : wrapReturn())); - } - - for (var _iterator5 = this.superReturns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var returnPath = _ref5; - - if (returnPath.node.argument) { - var ref = returnPath.scope.generateDeclaredUidIdentifier("ret"); - returnPath.get("argument").replaceWithMultiple([t.assignmentExpression("=", ref, returnPath.node.argument), wrapReturn(ref)]); - } else { - returnPath.get("argument").replaceWith(wrapReturn()); - } - } - }; - - ClassTransformer.prototype.pushMethod = function pushMethod(node, path) { - var scope = path ? path.scope : this.scope; - - if (node.kind === "method") { - if (this._processMethod(node, scope)) return; - } - - this.pushToMap(node, false, null, scope); - }; - - ClassTransformer.prototype._processMethod = function _processMethod() { - return false; - }; - - ClassTransformer.prototype.pushConstructor = function pushConstructor(replaceSupers, method, path) { - this.bareSupers = replaceSupers.bareSupers; - this.superReturns = replaceSupers.returns; - - if (path.scope.hasOwnBinding(this.classRef.name)) { - path.scope.rename(this.classRef.name); - } - - var construct = this.constructor; - - this.userConstructorPath = path; - this.userConstructor = method; - this.hasConstructor = true; - - t.inheritsComments(construct, method); - - construct._ignoreUserWhitespace = true; - construct.params = method.params; - - t.inherits(construct.body, method.body); - construct.body.directives = method.body.directives; - - this._pushConstructor(); - }; - - ClassTransformer.prototype._pushConstructor = function _pushConstructor() { - if (this.pushedConstructor) return; - this.pushedConstructor = true; - - if (this.hasInstanceDescriptors || this.hasStaticDescriptors) { - this.pushDescriptors(); - } - - this.body.push(this.constructor); - - this.pushInherits(); - }; - - ClassTransformer.prototype.pushInherits = function pushInherits() { - if (!this.isDerived || this.pushedInherits) return; - - this.pushedInherits = true; - this.body.unshift(t.expressionStatement(t.callExpression(this.file.addHelper("inherits"), [this.classRef, this.superName]))); - }; - - return ClassTransformer; -}(); - -exports.default = ClassTransformer; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/package.json deleted file mode 100644 index 883a9b2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-classes/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-classes@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-classes", - "name": "babel-plugin-transform-es2015-classes", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-classes@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-classes@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-classes", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-classes-6.24.1.tgz_1491578375780_0.6034122135024518" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-classes@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-classes", - "name": "babel-plugin-transform-es2015-classes", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "_shasum": "5a4c58a50c9c9461e564b4b2a3bfabc97a2584db", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-classes@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - }, - "description": "Compile ES2015 classes to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "5a4c58a50c9c9461e564b4b2a3bfabc97a2584db", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-classes", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-classes" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/README.md deleted file mode 100644 index 4a7c74d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# babel-plugin-transform-es2015-computed-properties - -> Compile ES2015 computed properties to ES5 - -## Example - -**In** - -```js -var obj = { - ["x" + foo]: "heh", - ["y" + bar]: "noo", - foo: "foo", - bar: "bar" -}; -``` - -**Out** - -```js -var _obj; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -var obj = ( - _obj = {}, - _defineProperty(_obj, "x" + foo, "heh"), - _defineProperty(_obj, "y" + bar, "noo"), - _defineProperty(_obj, "foo", "foo"), - _defineProperty(_obj, "bar", "bar"), - _obj -); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-computed-properties -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-es2015-computed-properties"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-es2015-computed-properties", { - "loose": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-computed-properties script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-computed-properties"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false` - -Just like method assignment in classes, in loose mode, computed property names -use simple assignments instead of being defined. This is unlikely to be an issue -in production code. - -#### Example - -***In*** - -```js -var obj = { - ["x" + foo]: "heh", - ["y" + bar]: "noo", - foo: "foo", - bar: "bar" -}; -``` - -***Out*** - -```js -var _obj; - -var obj = ( - _obj = {}, - _obj["x" + foo] = "heh", - _obj["y" + bar] = "noo", - _obj.foo = "foo", - _obj.bar = "bar", - _obj -); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/lib/index.js deleted file mode 100644 index 70bdbc1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/lib/index.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types, - template = _ref.template; - - var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n "); - - function getValue(prop) { - if (t.isObjectProperty(prop)) { - return prop.value; - } else if (t.isObjectMethod(prop)) { - return t.functionExpression(null, prop.params, prop.body, prop.generator, prop.async); - } - } - - function pushAssign(objId, prop, body) { - if (prop.kind === "get" && prop.kind === "set") { - pushMutatorDefine(objId, prop, body); - } else { - body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(objId, prop.key, prop.computed || t.isLiteral(prop.key)), getValue(prop)))); - } - } - - function pushMutatorDefine(_ref2, prop) { - var objId = _ref2.objId, - body = _ref2.body, - getMutatorId = _ref2.getMutatorId, - scope = _ref2.scope; - - var key = !prop.computed && t.isIdentifier(prop.key) ? t.stringLiteral(prop.key.name) : prop.key; - - var maybeMemoise = scope.maybeGenerateMemoised(key); - if (maybeMemoise) { - body.push(t.expressionStatement(t.assignmentExpression("=", maybeMemoise, key))); - key = maybeMemoise; - } - - body.push.apply(body, buildMutatorMapAssign({ - MUTATOR_MAP_REF: getMutatorId(), - KEY: key, - VALUE: getValue(prop), - KIND: t.identifier(prop.kind) - })); - } - - function loose(info) { - for (var _iterator = info.computedProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var prop = _ref3; - - if (prop.kind === "get" || prop.kind === "set") { - pushMutatorDefine(info, prop); - } else { - pushAssign(info.objId, prop, info.body); - } - } - } - - function spec(info) { - var objId = info.objId, - body = info.body, - computedProps = info.computedProps, - state = info.state; - - - for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref4; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref4 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref4 = _i2.value; - } - - var prop = _ref4; - - var key = t.toComputedKey(prop); - - if (prop.kind === "get" || prop.kind === "set") { - pushMutatorDefine(info, prop); - } else if (t.isStringLiteral(key, { value: "__proto__" })) { - pushAssign(objId, prop, body); - } else { - if (computedProps.length === 1) { - return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]); - } else { - body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)]))); - } - } - } - } - - return { - visitor: { - ObjectExpression: { - exit: function exit(path, state) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - var hasComputed = false; - for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref5; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref5 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref5 = _i3.value; - } - - var prop = _ref5; - - hasComputed = prop.computed === true; - if (hasComputed) break; - } - if (!hasComputed) return; - - var initProps = []; - var computedProps = []; - var foundComputed = false; - - for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref6; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref6 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref6 = _i4.value; - } - - var _prop = _ref6; - - if (_prop.computed) { - foundComputed = true; - } - - if (foundComputed) { - computedProps.push(_prop); - } else { - initProps.push(_prop); - } - } - - var objId = scope.generateUidIdentifierBasedOnNode(parent); - var initPropExpression = t.objectExpression(initProps); - var body = []; - - body.push(t.variableDeclaration("var", [t.variableDeclarator(objId, initPropExpression)])); - - var callback = spec; - if (state.opts.loose) callback = loose; - - var mutatorRef = void 0; - - var getMutatorId = function getMutatorId() { - if (!mutatorRef) { - mutatorRef = scope.generateUidIdentifier("mutatorMap"); - - body.push(t.variableDeclaration("var", [t.variableDeclarator(mutatorRef, t.objectExpression([]))])); - } - - return mutatorRef; - }; - - var single = callback({ - scope: scope, - objId: objId, - body: body, - computedProps: computedProps, - initPropExpression: initPropExpression, - getMutatorId: getMutatorId, - state: state - }); - - if (mutatorRef) { - body.push(t.expressionStatement(t.callExpression(state.addHelper("defineEnumerableProperties"), [objId, mutatorRef]))); - } - - if (single) { - path.replaceWith(single); - } else { - body.push(t.expressionStatement(objId)); - path.replaceWithMultiple(body); - } - } - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/package.json deleted file mode 100644 index 8440a71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-computed-properties/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-computed-properties@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-computed-properties", - "name": "babel-plugin-transform-es2015-computed-properties", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-computed-properties@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-computed-properties@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-computed-properties", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz_1491578362134_0.8491923431865871" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-computed-properties@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-computed-properties", - "name": "babel-plugin-transform-es2015-computed-properties", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "_shasum": "6fe2a8d16895d5634f4cd999b6d3480a308159b3", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-computed-properties@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - }, - "description": "Compile ES2015 computed properties to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "6fe2a8d16895d5634f4cd999b6d3480a308159b3", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-computed-properties", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-computed-properties" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/README.md deleted file mode 100644 index b20732c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-transform-es2015-destructuring - -> Compile ES2015 destructuring to ES5 - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-destructuring -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-destructuring"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-destructuring script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-destructuring"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js deleted file mode 100644 index 689fb60..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/lib/index.js +++ /dev/null @@ -1,551 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - - function variableDeclarationHasPattern(node) { - for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var declar = _ref2; - - if (t.isPattern(declar.id)) { - return true; - } - } - return false; - } - - function hasRest(pattern) { - for (var _iterator2 = pattern.elements, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var elem = _ref3; - - if (t.isRestElement(elem)) { - return true; - } - } - return false; - } - - var arrayUnpackVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (state.bindings[path.node.name]) { - state.deopt = true; - path.stop(); - } - } - }; - - var DestructuringTransformer = function () { - function DestructuringTransformer(opts) { - (0, _classCallCheck3.default)(this, DestructuringTransformer); - - this.blockHoist = opts.blockHoist; - this.operator = opts.operator; - this.arrays = {}; - this.nodes = opts.nodes || []; - this.scope = opts.scope; - this.file = opts.file; - this.kind = opts.kind; - } - - DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) { - var op = this.operator; - if (t.isMemberExpression(id)) op = "="; - - var node = void 0; - - if (op) { - node = t.expressionStatement(t.assignmentExpression(op, id, init)); - } else { - node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]); - } - - node._blockHoist = this.blockHoist; - - return node; - }; - - DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) { - var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]); - declar._blockHoist = this.blockHoist; - return declar; - }; - - DestructuringTransformer.prototype.push = function push(id, init) { - if (t.isObjectPattern(id)) { - this.pushObjectPattern(id, init); - } else if (t.isArrayPattern(id)) { - this.pushArrayPattern(id, init); - } else if (t.isAssignmentPattern(id)) { - this.pushAssignmentPattern(id, init); - } else { - this.nodes.push(this.buildVariableAssignment(id, init)); - } - }; - - DestructuringTransformer.prototype.toArray = function toArray(node, count) { - if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) { - return node; - } else { - return this.scope.toArray(node, count); - } - }; - - DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) { - - var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef); - - var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]); - declar._blockHoist = this.blockHoist; - this.nodes.push(declar); - - var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef); - - var left = pattern.left; - if (t.isPattern(left)) { - var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional)); - tempValueDefault._blockHoist = this.blockHoist; - - this.nodes.push(tempValueDefault); - this.push(left, tempValueRef); - } else { - this.nodes.push(this.buildVariableAssignment(left, tempConditional)); - } - }; - - DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) { - - var keys = []; - - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; - - if (i >= spreadPropIndex) break; - - if (t.isRestProperty(prop)) continue; - - var key = prop.key; - if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name); - keys.push(key); - } - - keys = t.arrayExpression(keys); - - var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]); - this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value)); - }; - - DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) { - if (t.isLiteral(prop.key)) prop.computed = true; - - var pattern = prop.value; - var objRef = t.memberExpression(propRef, prop.key, prop.computed); - - if (t.isPattern(pattern)) { - this.push(pattern, objRef); - } else { - this.nodes.push(this.buildVariableAssignment(pattern, objRef)); - } - }; - - DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) { - - if (!pattern.properties.length) { - this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef]))); - } - - if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) { - var temp = this.scope.generateUidIdentifierBasedOnNode(objRef); - this.nodes.push(this.buildVariableDeclaration(temp, objRef)); - objRef = temp; - } - - for (var i = 0; i < pattern.properties.length; i++) { - var prop = pattern.properties[i]; - if (t.isRestProperty(prop)) { - this.pushObjectRest(pattern, objRef, prop, i); - } else { - this.pushObjectProperty(prop, objRef); - } - } - }; - - DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) { - if (!t.isArrayExpression(arr)) return false; - - if (pattern.elements.length > arr.elements.length) return; - if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false; - - for (var _iterator3 = pattern.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var elem = _ref4; - - if (!elem) return false; - - if (t.isMemberExpression(elem)) return false; - } - - for (var _iterator4 = arr.elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var _elem = _ref5; - - if (t.isSpreadElement(_elem)) return false; - - if (t.isCallExpression(_elem)) return false; - - if (t.isMemberExpression(_elem)) return false; - } - - var bindings = t.getBindingIdentifiers(pattern); - var state = { deopt: false, bindings: bindings }; - this.scope.traverse(arr, arrayUnpackVisitor, state); - return !state.deopt; - }; - - DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) { - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; - if (t.isRestElement(elem)) { - this.push(elem.argument, t.arrayExpression(arr.elements.slice(i))); - } else { - this.push(elem, arr.elements[i]); - } - } - }; - - DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) { - if (!pattern.elements) return; - - if (this.canUnpackArrayPattern(pattern, arrayRef)) { - return this.pushUnpackedArrayPattern(pattern, arrayRef); - } - - var count = !hasRest(pattern) && pattern.elements.length; - - var toArray = this.toArray(arrayRef, count); - - if (t.isIdentifier(toArray)) { - arrayRef = toArray; - } else { - arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef); - this.arrays[arrayRef.name] = true; - this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray)); - } - - for (var i = 0; i < pattern.elements.length; i++) { - var elem = pattern.elements[i]; - - if (!elem) continue; - - var elemRef = void 0; - - if (t.isRestElement(elem)) { - elemRef = this.toArray(arrayRef); - elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]); - - elem = elem.argument; - } else { - elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true); - } - - this.push(elem, elemRef); - } - }; - - DestructuringTransformer.prototype.init = function init(pattern, ref) { - - if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) { - var memo = this.scope.maybeGenerateMemoised(ref, true); - if (memo) { - this.nodes.push(this.buildVariableDeclaration(memo, ref)); - ref = memo; - } - } - - this.push(pattern, ref); - - return this.nodes; - }; - - return DestructuringTransformer; - }(); - - return { - visitor: { - ExportNamedDeclaration: function ExportNamedDeclaration(path) { - var declaration = path.get("declaration"); - if (!declaration.isVariableDeclaration()) return; - if (!variableDeclarationHasPattern(declaration.node)) return; - - var specifiers = []; - - for (var name in path.getOuterBindingIdentifiers(path)) { - var id = t.identifier(name); - specifiers.push(t.exportSpecifier(id, id)); - } - - path.replaceWith(declaration.node); - path.insertAfter(t.exportNamedDeclaration(null, specifiers)); - }, - ForXStatement: function ForXStatement(path, file) { - var node = path.node, - scope = path.scope; - - var left = node.left; - - if (t.isPattern(left)) { - - var temp = scope.generateUidIdentifier("ref"); - - node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]); - - path.ensureBlock(); - - node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)])); - - return; - } - - if (!t.isVariableDeclaration(left)) return; - - var pattern = left.declarations[0].id; - if (!t.isPattern(pattern)) return; - - var key = scope.generateUidIdentifier("ref"); - node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]); - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - kind: left.kind, - file: file, - scope: scope, - nodes: nodes - }); - - destructuring.init(pattern, key); - - path.ensureBlock(); - - var block = node.body; - block.body = nodes.concat(block.body); - }, - CatchClause: function CatchClause(_ref6, file) { - var node = _ref6.node, - scope = _ref6.scope; - - var pattern = node.param; - if (!t.isPattern(pattern)) return; - - var ref = scope.generateUidIdentifier("ref"); - node.param = ref; - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - kind: "let", - file: file, - scope: scope, - nodes: nodes - }); - destructuring.init(pattern, ref); - - node.body.body = nodes.concat(node.body.body); - }, - AssignmentExpression: function AssignmentExpression(path, file) { - var node = path.node, - scope = path.scope; - - if (!t.isPattern(node.left)) return; - - var nodes = []; - - var destructuring = new DestructuringTransformer({ - operator: node.operator, - file: file, - scope: scope, - nodes: nodes - }); - - var ref = void 0; - if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) { - ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref"); - - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)])); - - if (t.isArrayExpression(node.right)) { - destructuring.arrays[ref.name] = true; - } - } - - destructuring.init(node.left, ref || node.right); - - if (ref) { - nodes.push(t.expressionStatement(ref)); - } - - path.replaceWithMultiple(nodes); - }, - VariableDeclaration: function VariableDeclaration(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - - if (t.isForXStatement(parent)) return; - if (!parent || !path.container) return; - if (!variableDeclarationHasPattern(node)) return; - - var nodes = []; - var declar = void 0; - - for (var i = 0; i < node.declarations.length; i++) { - declar = node.declarations[i]; - - var patternId = declar.init; - var pattern = declar.id; - - var destructuring = new DestructuringTransformer({ - blockHoist: node._blockHoist, - nodes: nodes, - scope: scope, - kind: node.kind, - file: file - }); - - if (t.isPattern(pattern)) { - destructuring.init(pattern, patternId); - - if (+i !== node.declarations.length - 1) { - t.inherits(nodes[nodes.length - 1], declar); - } - } else { - nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar)); - } - } - - var nodesOut = []; - for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref7; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref7 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref7 = _i5.value; - } - - var _node = _ref7; - - var tail = nodesOut[nodesOut.length - 1]; - if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) { - var _tail$declarations; - - (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations); - } else { - nodesOut.push(_node); - } - } - - for (var _iterator6 = nodesOut, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref8; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref8 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref8 = _i6.value; - } - - var nodeOut = _ref8; - - if (!nodeOut.declarations) continue; - for (var _iterator7 = nodeOut.declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref9; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref9 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref9 = _i7.value; - } - - var declaration = _ref9; - var name = declaration.id.name; - - if (scope.bindings[name]) { - scope.bindings[name].kind = nodeOut.kind; - } - } - } - - if (nodesOut.length === 1) { - path.replaceWith(nodesOut[0]); - } else { - path.replaceWithMultiple(nodesOut); - } - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/package.json deleted file mode 100644 index 2016477..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-destructuring/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-destructuring@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-destructuring", - "name": "babel-plugin-transform-es2015-destructuring", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-destructuring@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-destructuring@6.23.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-destructuring", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-destructuring-6.23.0.tgz_1487027061235_0.5828666132874787" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-destructuring@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-destructuring", - "name": "babel-plugin-transform-es2015-destructuring", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "_shasum": "997bb1f1ab967f682d2b0876fe358d60e765c56d", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-destructuring@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 destructuring to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "997bb1f1ab967f682d2b0876fe358d60e765c56d", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-destructuring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-destructuring" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/.npmignore deleted file mode 100644 index 246c4aa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/README.md deleted file mode 100644 index aa502cc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# babel-plugin-transform-es2015-duplicate-keys - -> Compile objects with duplicate keys to valid strict ES5. - -This plugin actually converts duplicate keys in objects to be computed properties, which then must be handled by the [transform-es2015-computed-properties](http://babeljs.io/docs/plugins/transform-es2015-computed-properties) plugin. The final result won't contain any object literals with duplicate keys. - -## Example - -**In** - -```javascript -var x = { a: 5, a: 6 }; -var y = { - get a() {}, - set a(x) {}, - a: 3 -}; -``` - -**Out** - -```javascript -var x = { a: 5, ["a"]: 6 }; -var y = { - get a() {}, - set a(x) {}, - ["a"]: 3 -}; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-duplicate-keys -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-duplicate-keys"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-duplicate-keys script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-duplicate-keys"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/lib/index.js deleted file mode 100644 index 77fcd43..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/lib/index.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -exports.default = function () { - return { - visitor: { - ObjectExpression: function ObjectExpression(path) { - var node = path.node; - - var plainProps = node.properties.filter(function (prop) { - return !t.isSpreadProperty(prop) && !prop.computed; - }); - - var alreadySeenData = (0, _create2.default)(null); - var alreadySeenGetters = (0, _create2.default)(null); - var alreadySeenSetters = (0, _create2.default)(null); - - for (var _iterator = plainProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var prop = _ref; - - var name = getName(prop.key); - var isDuplicate = false; - switch (prop.kind) { - case "get": - if (alreadySeenData[name] || alreadySeenGetters[name]) { - isDuplicate = true; - } - alreadySeenGetters[name] = true; - break; - case "set": - if (alreadySeenData[name] || alreadySeenSetters[name]) { - isDuplicate = true; - } - alreadySeenSetters[name] = true; - break; - default: - if (alreadySeenData[name] || alreadySeenGetters[name] || alreadySeenSetters[name]) { - isDuplicate = true; - } - alreadySeenData[name] = true; - } - - if (isDuplicate) { - prop.computed = true; - prop.key = t.stringLiteral(name); - } - } - } - } - }; -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getName(key) { - if (t.isIdentifier(key)) { - return key.name; - } - return key.value.toString(); -} - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/package.json deleted file mode 100644 index 38a1727..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-duplicate-keys/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-duplicate-keys@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-duplicate-keys", - "name": "babel-plugin-transform-es2015-duplicate-keys", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-duplicate-keys@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-duplicate-keys@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-duplicate-keys", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz_1491578348445_0.6595529397018254" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-duplicate-keys@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-duplicate-keys", - "name": "babel-plugin-transform-es2015-duplicate-keys", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "_shasum": "73eb3d310ca969e3ef9ec91c53741a6f1576423e", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-duplicate-keys@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Compile objects with duplicate keys to valid strict ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "73eb3d310ca969e3ef9ec91c53741a6f1576423e", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-duplicate-keys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-duplicate-keys" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/README.md deleted file mode 100644 index 7aff9a0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# babel-plugin-transform-es2015-for-of - -> Compile ES2015 for...of to ES5 - -## Example - -**In** - -```js -for (var i of foo) {} -``` - -**Out** - -```js -var _iteratorNormalCompletion = true; -var _didIteratorError = false; -var _iteratorError = undefined; - -try { - for (var _iterator = foo[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - } -} catch (err) { - _didIteratorError = true; - _iteratorError = err; -} finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } -} -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-for-of -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-for-of"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-for-of", { - "loose": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-for-of script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-for-of"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false` - -In loose mode, arrays are put in a fast path, thus heavily increasing performance. -All other iterables will continue to work fine. - -#### Example - -**In** - -```js -for (var i of foo) {} -``` - -**Out** - -```js -for (var _iterator = foo, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var i = _ref; -} -``` - -#### Abrupt completions - -In loose mode an iterator's `return` method will not be called on abrupt completions caused by thrown errors. - -Please see [google/traceur-compiler#1773](https://github.com/google/traceur-compiler/issues/1773) and -[babel/babel#838](https://github.com/babel/babel/issues/838) for more information. - -### Optimization - -If a basic array is used, Babel will compile the for-of loop down to a regular for loop. - -**In** - -```js -for (let a of [1,2,3]) {} -``` - -**Out** - -```js -var _arr = [1, 2, 3]; -for (var _i = 0; _i < _arr.length; _i++) { - var a = _arr[_i]; -} -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/lib/index.js deleted file mode 100644 index 056600d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/lib/index.js +++ /dev/null @@ -1,199 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var messages = _ref.messages, - template = _ref.template, - t = _ref.types; - - var buildForOfArray = template("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "); - - var buildForOfLoose = template("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "); - - var buildForOf = template("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n "); - - - function _ForOfStatementArray(path) { - var node = path.node, - scope = path.scope; - - var nodes = []; - var right = node.right; - - if (!t.isIdentifier(right) || !scope.hasBinding(right.name)) { - var uid = scope.generateUidIdentifier("arr"); - nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, right)])); - right = uid; - } - - var iterationKey = scope.generateUidIdentifier("i"); - - var loop = buildForOfArray({ - BODY: node.body, - KEY: iterationKey, - ARR: right - }); - - t.inherits(loop, node); - t.ensureBlock(loop); - - var iterationValue = t.memberExpression(right, iterationKey, true); - - var left = node.left; - if (t.isVariableDeclaration(left)) { - left.declarations[0].init = iterationValue; - loop.body.body.unshift(left); - } else { - loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=", left, iterationValue))); - } - - if (path.parentPath.isLabeledStatement()) { - loop = t.labeledStatement(path.parentPath.node.label, loop); - } - - nodes.push(loop); - - return nodes; - } - - return { - visitor: { - ForOfStatement: function ForOfStatement(path, state) { - if (path.get("right").isArrayExpression()) { - if (path.parentPath.isLabeledStatement()) { - return path.parentPath.replaceWithMultiple(_ForOfStatementArray(path)); - } else { - return path.replaceWithMultiple(_ForOfStatementArray(path)); - } - } - - var callback = spec; - if (state.opts.loose) callback = loose; - - var node = path.node; - - var build = callback(path, state); - var declar = build.declar; - var loop = build.loop; - var block = loop.body; - - path.ensureBlock(); - - if (declar) { - block.body.push(declar); - } - - block.body = block.body.concat(node.body.body); - - t.inherits(loop, node); - t.inherits(loop.body, node.body); - - if (build.replaceParent) { - path.parentPath.replaceWithMultiple(build.node); - path.remove(); - } else { - path.replaceWithMultiple(build.node); - } - } - } - }; - - function loose(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - var left = node.left; - - var declar = void 0, - id = void 0; - - if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) { - id = left; - } else if (t.isVariableDeclaration(left)) { - id = scope.generateUidIdentifier("ref"); - declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, id)]); - } else { - throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type)); - } - - var iteratorKey = scope.generateUidIdentifier("iterator"); - var isArrayKey = scope.generateUidIdentifier("isArray"); - - var loop = buildForOfLoose({ - LOOP_OBJECT: iteratorKey, - IS_ARRAY: isArrayKey, - OBJECT: node.right, - INDEX: scope.generateUidIdentifier("i"), - ID: id - }); - - if (!declar) { - loop.body.body.shift(); - } - - var isLabeledParent = t.isLabeledStatement(parent); - var labeled = void 0; - - if (isLabeledParent) { - labeled = t.labeledStatement(parent.label, loop); - } - - return { - replaceParent: isLabeledParent, - declar: declar, - node: labeled || loop, - loop: loop - }; - } - - function spec(path, file) { - var node = path.node, - scope = path.scope, - parent = path.parent; - - var left = node.left; - var declar = void 0; - - var stepKey = scope.generateUidIdentifier("step"); - var stepValue = t.memberExpression(stepKey, t.identifier("value")); - - if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) { - declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue)); - } else if (t.isVariableDeclaration(left)) { - declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]); - } else { - throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type)); - } - - var iteratorKey = scope.generateUidIdentifier("iterator"); - - var template = buildForOf({ - ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"), - ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"), - ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"), - ITERATOR_KEY: iteratorKey, - STEP_KEY: stepKey, - OBJECT: node.right, - BODY: null - }); - - var isLabeledParent = t.isLabeledStatement(parent); - - var tryBody = template[3].block.body; - var loop = tryBody[0]; - - if (isLabeledParent) { - tryBody[0] = t.labeledStatement(parent.label, loop); - } - - return { - replaceParent: isLabeledParent, - declar: declar, - loop: loop, - node: template - }; - } -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/package.json deleted file mode 100644 index c3de8f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-for-of/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-for-of@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-for-of", - "name": "babel-plugin-transform-es2015-for-of", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-for-of@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-for-of@6.23.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-for-of", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-for-of-6.23.0.tgz_1487027061167_0.7569211190566421" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-for-of@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-for-of", - "name": "babel-plugin-transform-es2015-for-of", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "_shasum": "f47c95b2b613df1d3ecc2fdb7573623c75248691", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-for-of@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 for...of to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "f47c95b2b613df1d3ecc2fdb7573623c75248691", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-for-of", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-for-of" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/README.md deleted file mode 100644 index 815acc5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-transform-es2015-function-name - -> Apply ES2015 function.name semantics to all functions - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-function-name -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-function-name"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-function-name script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-function-name"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/lib/index.js deleted file mode 100644 index 0fd5c66..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/lib/index.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - FunctionExpression: { - exit: function exit(path) { - if (path.key !== "value" && !path.parentPath.isObjectProperty()) { - var replacement = (0, _babelHelperFunctionName2.default)(path); - if (replacement) path.replaceWith(replacement); - } - } - }, - - ObjectProperty: function ObjectProperty(path) { - var value = path.get("value"); - if (value.isFunction()) { - var newNode = (0, _babelHelperFunctionName2.default)(value); - if (newNode) value.replaceWith(newNode); - } - } - } - }; -}; - -var _babelHelperFunctionName = require("babel-helper-function-name"); - -var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/package.json deleted file mode 100644 index 0ab33c1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-function-name/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-function-name@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-function-name", - "name": "babel-plugin-transform-es2015-function-name", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-function-name@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-function-name@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-function-name", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-function-name-6.24.1.tgz_1491578372751_0.10986475623212755" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-function-name@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-function-name", - "name": "babel-plugin-transform-es2015-function-name", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "_shasum": "834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-function-name@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Apply ES2015 function.name semantics to all functions", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-function-name", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-function-name" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/README.md deleted file mode 100644 index 1022482..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# babel-plugin-transform-es2015-literals - -> Compile ES2015 unicode string and number literals to ES5 - -## Example - -**In** - -```js -var b = 0b11; // binary integer literal -var o = 0o7; // octal integer literal -const u = 'Hello\u{000A}\u{0009}!'; // unicode string literals, newline and tab -``` - -**Out** - -```js -var b = 3; // binary integer literal -var o = 7; // octal integer literal -const u = 'Hello\n\t!'; // unicode string literals, newline and tab -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-literals -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-literals"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-literals script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-literals"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/lib/index.js deleted file mode 100644 index 7aa9f8c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/lib/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - NumericLiteral: function NumericLiteral(_ref) { - var node = _ref.node; - - if (node.extra && /^0[ob]/i.test(node.extra.raw)) { - node.extra = undefined; - } - }, - StringLiteral: function StringLiteral(_ref2) { - var node = _ref2.node; - - if (node.extra && /\\[u]/gi.test(node.extra.raw)) { - node.extra = undefined; - } - } - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/package.json deleted file mode 100644 index 3158627..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-literals/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-literals@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-literals", - "name": "babel-plugin-transform-es2015-literals", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-literals@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-literals@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-literals", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-literals-6.22.0.tgz_1484872433559_0.7301469757221639" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-literals@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-literals", - "name": "babel-plugin-transform-es2015-literals", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "_shasum": "4f54a02d6cd66cf915280019a31d31925377ca2e", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-literals@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 unicode string and number literals to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "4f54a02d6cd66cf915280019a31d31925377ca2e", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-literals", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-literals" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/README.md deleted file mode 100644 index bf54c82..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# babel-plugin-transform-es2015-modules-amd - -> This plugin transforms ES2015 modules to [Asynchronous Module Definition (AMD)](https://github.com/amdjs/amdjs-api). - -## Example - -**In** - -```javascript -export default 42; -``` - -**Out** - -```javascript -define(["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.default = 42; -}); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-modules-amd -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-modules-amd"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-modules-amd script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-modules-amd"] -}); -``` - -### Options - -See options for `babel-plugin-transform-es2015-commonjs`. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/lib/index.js deleted file mode 100644 index ecfaa2f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/lib/index.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -exports.default = function (_ref) { - var t = _ref.types; - - function isValidRequireCall(path) { - if (!path.isCallExpression()) return false; - if (!path.get("callee").isIdentifier({ name: "require" })) return false; - if (path.scope.getBinding("require")) return false; - - var args = path.get("arguments"); - if (args.length !== 1) return false; - - var arg = args[0]; - if (!arg.isStringLiteral()) return false; - - return true; - } - - var amdVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(_ref2) { - var node = _ref2.node, - scope = _ref2.scope; - - if (node.name === "exports" && !scope.getBinding("exports")) { - this.hasExports = true; - } - - if (node.name === "module" && !scope.getBinding("module")) { - this.hasModule = true; - } - }, - CallExpression: function CallExpression(path) { - if (!isValidRequireCall(path)) return; - this.bareSources.push(path.node.arguments[0]); - path.remove(); - }, - VariableDeclarator: function VariableDeclarator(path) { - var id = path.get("id"); - if (!id.isIdentifier()) return; - - var init = path.get("init"); - if (!isValidRequireCall(init)) return; - - var source = init.node.arguments[0]; - this.sourceNames[source.value] = true; - this.sources.push([id.node, source]); - - path.remove(); - } - }; - - return { - inherits: require("babel-plugin-transform-es2015-modules-commonjs"), - - pre: function pre() { - this.sources = []; - this.sourceNames = (0, _create2.default)(null); - - this.bareSources = []; - - this.hasExports = false; - this.hasModule = false; - }, - - - visitor: { - Program: { - exit: function exit(path) { - var _this = this; - - if (this.ran) return; - this.ran = true; - - path.traverse(amdVisitor, this); - - var params = this.sources.map(function (source) { - return source[0]; - }); - var sources = this.sources.map(function (source) { - return source[1]; - }); - - sources = sources.concat(this.bareSources.filter(function (str) { - return !_this.sourceNames[str.value]; - })); - - var moduleName = this.getModuleName(); - if (moduleName) moduleName = t.stringLiteral(moduleName); - - if (this.hasExports) { - sources.unshift(t.stringLiteral("exports")); - params.unshift(t.identifier("exports")); - } - - if (this.hasModule) { - sources.unshift(t.stringLiteral("module")); - params.unshift(t.identifier("module")); - } - - var node = path.node; - - var factory = buildFactory({ - PARAMS: params, - BODY: node.body - }); - factory.expression.body.directives = node.directives; - node.directives = []; - - node.body = [buildDefine({ - MODULE_NAME: moduleName, - SOURCES: sources, - FACTORY: factory - })]; - } - } - } - }; -}; - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildDefine = (0, _babelTemplate2.default)("\n define(MODULE_NAME, [SOURCES], FACTORY);\n"); - -var buildFactory = (0, _babelTemplate2.default)("\n (function (PARAMS) {\n BODY;\n })\n"); - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/package.json deleted file mode 100644 index 537263b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-amd/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-modules-amd@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-amd", - "name": "babel-plugin-transform-es2015-modules-amd", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-modules-amd@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-modules-amd@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-modules-amd", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz_1491578372775_0.6660541435703635" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-modules-amd@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-amd", - "name": "babel-plugin-transform-es2015-modules-amd", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-modules-umd", - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "_shasum": "3b3e54017239842d6d19c3011c4bd2f00a00d154", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-modules-amd@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - }, - "description": "This plugin transforms ES2015 modules to AMD", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "3b3e54017239842d6d19c3011c4bd2f00a00d154", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-modules-amd", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-amd" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md deleted file mode 100644 index bdad889..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# babel-plugin-transform-es2015-modules-commonjs - -> This plugin transforms ES2015 modules to [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1). - -## Example - -**In** - -```javascript -export default 42; -``` - -**Out** - -```javascript -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = 42; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-modules-commonjs -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-modules-commonjs"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-modules-commonjs", { - "allowTopLevelThis": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-modules-commonjs script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-modules-commonjs"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false`. - -As per the spec, `import` and `export` are only allowed to be used at the top -level. When in loose mode these are allowed to be used anywhere. - -And by default, when using exports with babel a non-enumerable `__esModule` property -is exported. - -```javascript -var foo = exports.foo = 5; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -``` - -In environments that don't support this you can enable loose mode on `babel-plugin-transform-es2015-modules-commonjs` -and instead of using `Object.defineProperty` an assignment will be used instead. - -```javascript -var foo = exports.foo = 5; -exports.__esModule = true; -``` - -### `strict` - -`boolean`, defaults to `false` - -By default, when using exports with babel a non-enumerable `__esModule` property -is exported. In some cases this property is used to determine if the import _is_ the -default export or if it _contains_ the default export. - -```javascript -var foo = exports.foo = 5; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -``` - -In order to prevent the `__esModule` property from being exported, you can set -the `strict` option to `true`. - -### `noInterop` - -`boolean`, defaults to `false` - -By default, when using exports with babel a non-enumerable `__esModule` property -is exported. This property is then used to determine if the import _is_ the default -export or if it _contains_ the default export. - -```javascript -"use strict"; - -var _foo = require("foo"); - -var _foo2 = _interopRequireDefault(_foo); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -``` - -In cases where the auto-unwrapping of `default` is not needed, you can set the -`noInterop` option to `true` to avoid the usage of the `interopRequireDefault` -helper (shown in inline form above). diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js deleted file mode 100644 index 2fcce50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js +++ /dev/null @@ -1,609 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function () { - var REASSIGN_REMAP_SKIP = (0, _symbol2.default)(); - - var reassignmentVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path) { - var name = path.node.name; - var remap = this.remaps[name]; - if (!remap) return; - - if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return; - - if (path.parentPath.isCallExpression({ callee: path.node })) { - path.replaceWith(t.sequenceExpression([t.numericLiteral(0), remap])); - } else if (path.isJSXIdentifier() && t.isMemberExpression(remap)) { - var object = remap.object, - property = remap.property; - - path.replaceWith(t.JSXMemberExpression(t.JSXIdentifier(object.name), t.JSXIdentifier(property.name))); - } else { - path.replaceWith(remap); - } - this.requeueInParent(path); - }, - AssignmentExpression: function AssignmentExpression(path) { - var node = path.node; - if (node[REASSIGN_REMAP_SKIP]) return; - - var left = path.get("left"); - if (left.isIdentifier()) { - var name = left.node.name; - var exports = this.exports[name]; - if (!exports) return; - - if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return; - - node[REASSIGN_REMAP_SKIP] = true; - - for (var _iterator = exports, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var reid = _ref; - - node = buildExportsAssignment(reid, node).expression; - } - - path.replaceWith(node); - this.requeueInParent(path); - } else if (left.isObjectPattern()) { - for (var _iterator2 = left.node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var property = _ref2; - - var _name = property.value.name; - - var _exports = this.exports[_name]; - if (!_exports) continue; - - if (this.scope.getBinding(_name) !== path.scope.getBinding(_name)) return; - - node[REASSIGN_REMAP_SKIP] = true; - - path.insertAfter(buildExportsAssignment(t.identifier(_name), t.identifier(_name))); - } - } else if (left.isArrayPattern()) { - for (var _iterator3 = left.node.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var element = _ref3; - - if (!element) continue; - var _name2 = element.name; - - var _exports2 = this.exports[_name2]; - if (!_exports2) continue; - - if (this.scope.getBinding(_name2) !== path.scope.getBinding(_name2)) return; - - node[REASSIGN_REMAP_SKIP] = true; - - path.insertAfter(buildExportsAssignment(t.identifier(_name2), t.identifier(_name2))); - } - } - }, - UpdateExpression: function UpdateExpression(path) { - var arg = path.get("argument"); - if (!arg.isIdentifier()) return; - - var name = arg.node.name; - var exports = this.exports[name]; - if (!exports) return; - - if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return; - - var node = t.assignmentExpression(path.node.operator[0] + "=", arg.node, t.numericLiteral(1)); - - if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord() || path.node.prefix) { - path.replaceWith(node); - this.requeueInParent(path); - return; - } - - var nodes = []; - nodes.push(node); - - var operator = void 0; - if (path.node.operator === "--") { - operator = "+"; - } else { - operator = "-"; - } - nodes.push(t.binaryExpression(operator, arg.node, t.numericLiteral(1))); - - path.replaceWithMultiple(t.sequenceExpression(nodes)); - } - }; - - return { - inherits: _babelPluginTransformStrictMode2.default, - - visitor: { - ThisExpression: function ThisExpression(path, state) { - if (this.ranCommonJS) return; - - if (state.opts.allowTopLevelThis !== true && !path.findParent(function (path) { - return !path.is("shadow") && THIS_BREAK_KEYS.indexOf(path.type) >= 0; - })) { - path.replaceWith(t.identifier("undefined")); - } - }, - - - Program: { - exit: function exit(path) { - this.ranCommonJS = true; - - var strict = !!this.opts.strict; - var noInterop = !!this.opts.noInterop; - - var scope = path.scope; - - scope.rename("module"); - scope.rename("exports"); - scope.rename("require"); - - var hasExports = false; - var hasImports = false; - - var body = path.get("body"); - var imports = (0, _create2.default)(null); - var exports = (0, _create2.default)(null); - - var nonHoistedExportNames = (0, _create2.default)(null); - - var topNodes = []; - var remaps = (0, _create2.default)(null); - - var requires = (0, _create2.default)(null); - - function addRequire(source, blockHoist) { - var cached = requires[source]; - if (cached) return cached; - - var ref = path.scope.generateUidIdentifier((0, _path2.basename)(source, (0, _path2.extname)(source))); - - var varDecl = t.variableDeclaration("var", [t.variableDeclarator(ref, buildRequire(t.stringLiteral(source)).expression)]); - - if (imports[source]) { - varDecl.loc = imports[source].loc; - } - - if (typeof blockHoist === "number" && blockHoist > 0) { - varDecl._blockHoist = blockHoist; - } - - topNodes.push(varDecl); - - return requires[source] = ref; - } - - function addTo(obj, key, arr) { - var existing = obj[key] || []; - obj[key] = existing.concat(arr); - } - - for (var _iterator4 = body, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var _path = _ref4; - - if (_path.isExportDeclaration()) { - hasExports = true; - - var specifiers = [].concat(_path.get("declaration"), _path.get("specifiers")); - for (var _iterator6 = specifiers, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref6; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } - - var _specifier2 = _ref6; - - var ids = _specifier2.getBindingIdentifiers(); - if (ids.__esModule) { - throw _specifier2.buildCodeFrameError("Illegal export \"__esModule\""); - } - } - } - - if (_path.isImportDeclaration()) { - var _importsEntry$specifi; - - hasImports = true; - - var key = _path.node.source.value; - var importsEntry = imports[key] || { - specifiers: [], - maxBlockHoist: 0, - loc: _path.node.loc - }; - - (_importsEntry$specifi = importsEntry.specifiers).push.apply(_importsEntry$specifi, _path.node.specifiers); - - if (typeof _path.node._blockHoist === "number") { - importsEntry.maxBlockHoist = Math.max(_path.node._blockHoist, importsEntry.maxBlockHoist); - } - - imports[key] = importsEntry; - - _path.remove(); - } else if (_path.isExportDefaultDeclaration()) { - var declaration = _path.get("declaration"); - if (declaration.isFunctionDeclaration()) { - var id = declaration.node.id; - var defNode = t.identifier("default"); - if (id) { - addTo(exports, id.name, defNode); - topNodes.push(buildExportsAssignment(defNode, id)); - _path.replaceWith(declaration.node); - } else { - topNodes.push(buildExportsAssignment(defNode, t.toExpression(declaration.node))); - _path.remove(); - } - } else if (declaration.isClassDeclaration()) { - var _id = declaration.node.id; - var _defNode = t.identifier("default"); - if (_id) { - addTo(exports, _id.name, _defNode); - _path.replaceWithMultiple([declaration.node, buildExportsAssignment(_defNode, _id)]); - } else { - _path.replaceWith(buildExportsAssignment(_defNode, t.toExpression(declaration.node))); - - _path.parentPath.requeue(_path.get("expression.left")); - } - } else { - _path.replaceWith(buildExportsAssignment(t.identifier("default"), declaration.node)); - - _path.parentPath.requeue(_path.get("expression.left")); - } - } else if (_path.isExportNamedDeclaration()) { - var _declaration = _path.get("declaration"); - if (_declaration.node) { - if (_declaration.isFunctionDeclaration()) { - var _id2 = _declaration.node.id; - addTo(exports, _id2.name, _id2); - topNodes.push(buildExportsAssignment(_id2, _id2)); - _path.replaceWith(_declaration.node); - } else if (_declaration.isClassDeclaration()) { - var _id3 = _declaration.node.id; - addTo(exports, _id3.name, _id3); - _path.replaceWithMultiple([_declaration.node, buildExportsAssignment(_id3, _id3)]); - nonHoistedExportNames[_id3.name] = true; - } else if (_declaration.isVariableDeclaration()) { - var declarators = _declaration.get("declarations"); - for (var _iterator7 = declarators, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref7; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref7 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref7 = _i7.value; - } - - var decl = _ref7; - - var _id4 = decl.get("id"); - - var init = decl.get("init"); - var exportsToInsert = []; - if (!init.node) init.replaceWith(t.identifier("undefined")); - - if (_id4.isIdentifier()) { - addTo(exports, _id4.node.name, _id4.node); - init.replaceWith(buildExportsAssignment(_id4.node, init.node).expression); - nonHoistedExportNames[_id4.node.name] = true; - } else if (_id4.isObjectPattern()) { - for (var _i8 = 0; _i8 < _id4.node.properties.length; _i8++) { - var prop = _id4.node.properties[_i8]; - var propValue = prop.value; - if (t.isAssignmentPattern(propValue)) { - propValue = propValue.left; - } else if (t.isRestProperty(prop)) { - propValue = prop.argument; - } - addTo(exports, propValue.name, propValue); - exportsToInsert.push(buildExportsAssignment(propValue, propValue)); - nonHoistedExportNames[propValue.name] = true; - } - } else if (_id4.isArrayPattern() && _id4.node.elements) { - for (var _i9 = 0; _i9 < _id4.node.elements.length; _i9++) { - var elem = _id4.node.elements[_i9]; - if (!elem) continue; - if (t.isAssignmentPattern(elem)) { - elem = elem.left; - } else if (t.isRestElement(elem)) { - elem = elem.argument; - } - var name = elem.name; - addTo(exports, name, elem); - exportsToInsert.push(buildExportsAssignment(elem, elem)); - nonHoistedExportNames[name] = true; - } - } - _path.insertAfter(exportsToInsert); - } - _path.replaceWith(_declaration.node); - } - continue; - } - - var _specifiers = _path.get("specifiers"); - var nodes = []; - var _source = _path.node.source; - if (_source) { - var ref = addRequire(_source.value, _path.node._blockHoist); - - for (var _iterator8 = _specifiers, _isArray8 = Array.isArray(_iterator8), _i10 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { - var _ref8; - - if (_isArray8) { - if (_i10 >= _iterator8.length) break; - _ref8 = _iterator8[_i10++]; - } else { - _i10 = _iterator8.next(); - if (_i10.done) break; - _ref8 = _i10.value; - } - - var _specifier3 = _ref8; - - if (_specifier3.isExportNamespaceSpecifier()) {} else if (_specifier3.isExportDefaultSpecifier()) {} else if (_specifier3.isExportSpecifier()) { - if (!noInterop && _specifier3.node.local.name === "default") { - topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(t.callExpression(this.addHelper("interopRequireDefault"), [ref]), _specifier3.node.local))); - } else { - topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name), t.memberExpression(ref, _specifier3.node.local))); - } - nonHoistedExportNames[_specifier3.node.exported.name] = true; - } - } - } else { - for (var _iterator9 = _specifiers, _isArray9 = Array.isArray(_iterator9), _i11 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { - var _ref9; - - if (_isArray9) { - if (_i11 >= _iterator9.length) break; - _ref9 = _iterator9[_i11++]; - } else { - _i11 = _iterator9.next(); - if (_i11.done) break; - _ref9 = _i11.value; - } - - var _specifier4 = _ref9; - - if (_specifier4.isExportSpecifier()) { - addTo(exports, _specifier4.node.local.name, _specifier4.node.exported); - nonHoistedExportNames[_specifier4.node.exported.name] = true; - nodes.push(buildExportsAssignment(_specifier4.node.exported, _specifier4.node.local)); - } - } - } - _path.replaceWithMultiple(nodes); - } else if (_path.isExportAllDeclaration()) { - var exportNode = buildExportAll({ - OBJECT: addRequire(_path.node.source.value, _path.node._blockHoist) - }); - exportNode.loc = _path.node.loc; - topNodes.push(exportNode); - _path.remove(); - } - } - - for (var source in imports) { - var _imports$source = imports[source], - specifiers = _imports$source.specifiers, - maxBlockHoist = _imports$source.maxBlockHoist; - - if (specifiers.length) { - var uid = addRequire(source, maxBlockHoist); - - var wildcard = void 0; - - for (var i = 0; i < specifiers.length; i++) { - var specifier = specifiers[i]; - if (t.isImportNamespaceSpecifier(specifier)) { - if (strict || noInterop) { - remaps[specifier.local.name] = uid; - } else { - var varDecl = t.variableDeclaration("var", [t.variableDeclarator(specifier.local, t.callExpression(this.addHelper("interopRequireWildcard"), [uid]))]); - - if (maxBlockHoist > 0) { - varDecl._blockHoist = maxBlockHoist; - } - - topNodes.push(varDecl); - } - wildcard = specifier.local; - } else if (t.isImportDefaultSpecifier(specifier)) { - specifiers[i] = t.importSpecifier(specifier.local, t.identifier("default")); - } - } - - for (var _iterator5 = specifiers, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var _specifier = _ref5; - - if (t.isImportSpecifier(_specifier)) { - var target = uid; - if (_specifier.imported.name === "default") { - if (wildcard) { - target = wildcard; - } else if (!noInterop) { - target = wildcard = path.scope.generateUidIdentifier(uid.name); - var _varDecl = t.variableDeclaration("var", [t.variableDeclarator(target, t.callExpression(this.addHelper("interopRequireDefault"), [uid]))]); - - if (maxBlockHoist > 0) { - _varDecl._blockHoist = maxBlockHoist; - } - - topNodes.push(_varDecl); - } - } - remaps[_specifier.local.name] = t.memberExpression(target, t.cloneWithoutLoc(_specifier.imported)); - } - } - } else { - var requireNode = buildRequire(t.stringLiteral(source)); - requireNode.loc = imports[source].loc; - topNodes.push(requireNode); - } - } - - if (hasImports && (0, _keys2.default)(nonHoistedExportNames).length) { - var maxHoistedExportsNodeAssignmentLength = 100; - var nonHoistedExportNamesArr = (0, _keys2.default)(nonHoistedExportNames); - - var _loop = function _loop(currentExportsNodeAssignmentLength) { - var nonHoistedExportNamesChunk = nonHoistedExportNamesArr.slice(currentExportsNodeAssignmentLength, currentExportsNodeAssignmentLength + maxHoistedExportsNodeAssignmentLength); - - var hoistedExportsNode = t.identifier("undefined"); - - nonHoistedExportNamesChunk.forEach(function (name) { - hoistedExportsNode = buildExportsAssignment(t.identifier(name), hoistedExportsNode).expression; - }); - - var node = t.expressionStatement(hoistedExportsNode); - node._blockHoist = 3; - - topNodes.unshift(node); - }; - - for (var currentExportsNodeAssignmentLength = 0; currentExportsNodeAssignmentLength < nonHoistedExportNamesArr.length; currentExportsNodeAssignmentLength += maxHoistedExportsNodeAssignmentLength) { - _loop(currentExportsNodeAssignmentLength); - } - } - - if (hasExports && !strict) { - var buildTemplate = buildExportsModuleDeclaration; - if (this.opts.loose) buildTemplate = buildLooseExportsModuleDeclaration; - - var declar = buildTemplate(); - declar._blockHoist = 3; - - topNodes.unshift(declar); - } - - path.unshiftContainer("body", topNodes); - path.traverse(reassignmentVisitor, { - remaps: remaps, - scope: scope, - exports: exports, - requeueInParent: function requeueInParent(newPath) { - return path.requeue(newPath); - } - }); - } - } - } - }; -}; - -var _path2 = require("path"); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelPluginTransformStrictMode = require("babel-plugin-transform-strict-mode"); - -var _babelPluginTransformStrictMode2 = _interopRequireDefault(_babelPluginTransformStrictMode); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildRequire = (0, _babelTemplate2.default)("\n require($0);\n"); - -var buildExportsModuleDeclaration = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n"); - -var buildExportsFrom = (0, _babelTemplate2.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n"); - -var buildLooseExportsModuleDeclaration = (0, _babelTemplate2.default)("\n exports.__esModule = true;\n"); - -var buildExportsAssignment = (0, _babelTemplate2.default)("\n exports.$0 = $1;\n"); - -var buildExportAll = (0, _babelTemplate2.default)("\n Object.keys(OBJECT).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n"); - -var THIS_BREAK_KEYS = ["FunctionExpression", "FunctionDeclaration", "ClassProperty", "ClassMethod", "ObjectMethod"]; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json deleted file mode 100644 index aa93b0c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-modules-commonjs@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-commonjs", - "name": "babel-plugin-transform-es2015-modules-commonjs", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-modules-commonjs@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-modules-commonjs@6.26.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-modules-commonjs", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz_1502898859361_0.6545935710892081" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-modules-commonjs@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-commonjs", - "name": "babel-plugin-transform-es2015-modules-commonjs", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-modules-amd", - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", - "_shasum": "0d8394029b7dc6abe1a97ef181e00758dd2e5d8a", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-modules-commonjs@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - }, - "description": "This plugin transforms ES2015 modules to CommonJS", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1", - "babel-plugin-syntax-object-rest-spread": "^6.13.0" - }, - "directories": {}, - "dist": { - "shasum": "0d8394029b7dc6abe1a97ef181e00758dd2e5d8a", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-plugin-transform-es2015-modules-commonjs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-commonjs" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/README.md deleted file mode 100644 index 554421d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# babel-plugin-transform-es2015-modules-systemjs - -> This plugin transforms ES2015 modules to [SystemJS](https://github.com/systemjs/systemjs). - -## Example - -**In** - -```javascript -export default 42; -``` - -**Out** - -```javascript -System.register([], function (_export, _context) { - return { - setters: [], - execute: function () { - _export("default", 42); - } - }; -}); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-modules-systemjs -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-es2015-modules-systemjs"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-es2015-modules-systemjs", { - // outputs SystemJS.register(...) - "systemGlobal": "SystemJS" - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-modules-systemjs script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-modules-systemjs"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/lib/index.js deleted file mode 100644 index 806475c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/lib/index.js +++ /dev/null @@ -1,395 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function (_ref) { - var t = _ref.types; - - var IGNORE_REASSIGNMENT_SYMBOL = (0, _symbol2.default)(); - - var reassignmentVisitor = { - "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) { - if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return; - path.node[IGNORE_REASSIGNMENT_SYMBOL] = true; - - var arg = path.get(path.isAssignmentExpression() ? "left" : "argument"); - if (!arg.isIdentifier()) return; - - var name = arg.node.name; - - if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return; - - var exportedNames = this.exports[name]; - if (!exportedNames) return; - - var node = path.node; - - var isPostUpdateExpression = path.isUpdateExpression() && !node.prefix; - if (isPostUpdateExpression) { - if (node.operator === "++") node = t.binaryExpression("+", node.argument, t.numericLiteral(1));else if (node.operator === "--") node = t.binaryExpression("-", node.argument, t.numericLiteral(1));else isPostUpdateExpression = false; - } - - for (var _iterator = exportedNames, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var exportedName = _ref2; - - node = this.buildCall(exportedName, node).expression; - } - - if (isPostUpdateExpression) node = t.sequenceExpression([node, path.node]); - - path.replaceWith(node); - } - }; - - return { - visitor: { - CallExpression: function CallExpression(path, state) { - if (path.node.callee.type === TYPE_IMPORT) { - var contextIdent = state.contextIdent; - path.replaceWith(t.callExpression(t.memberExpression(contextIdent, t.identifier("import")), path.node.arguments)); - } - }, - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (path.node.name == "__moduleName" && !path.scope.hasBinding("__moduleName")) { - path.replaceWith(t.memberExpression(state.contextIdent, t.identifier("id"))); - } - }, - - - Program: { - enter: function enter(path, state) { - state.contextIdent = path.scope.generateUidIdentifier("context"); - }, - exit: function exit(path, state) { - var exportIdent = path.scope.generateUidIdentifier("export"); - var contextIdent = state.contextIdent; - - var exportNames = (0, _create2.default)(null); - var modules = []; - - var beforeBody = []; - var setters = []; - var sources = []; - var variableIds = []; - var removedPaths = []; - - function addExportName(key, val) { - exportNames[key] = exportNames[key] || []; - exportNames[key].push(val); - } - - function pushModule(source, key, specifiers) { - var module = void 0; - modules.forEach(function (m) { - if (m.key === source) { - module = m; - } - }); - if (!module) { - modules.push(module = { key: source, imports: [], exports: [] }); - } - module[key] = module[key].concat(specifiers); - } - - function buildExportCall(name, val) { - return t.expressionStatement(t.callExpression(exportIdent, [t.stringLiteral(name), val])); - } - - var body = path.get("body"); - - var canHoist = true; - for (var _iterator2 = body, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var _path = _ref3; - - if (_path.isExportDeclaration()) _path = _path.get("declaration"); - if (_path.isVariableDeclaration() && _path.node.kind !== "var") { - canHoist = false; - break; - } - } - - for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var _path2 = _ref4; - - if (canHoist && _path2.isFunctionDeclaration()) { - beforeBody.push(_path2.node); - removedPaths.push(_path2); - } else if (_path2.isImportDeclaration()) { - var source = _path2.node.source.value; - pushModule(source, "imports", _path2.node.specifiers); - for (var name in _path2.getBindingIdentifiers()) { - _path2.scope.removeBinding(name); - variableIds.push(t.identifier(name)); - } - _path2.remove(); - } else if (_path2.isExportAllDeclaration()) { - pushModule(_path2.node.source.value, "exports", _path2.node); - _path2.remove(); - } else if (_path2.isExportDefaultDeclaration()) { - var declar = _path2.get("declaration"); - if (declar.isClassDeclaration() || declar.isFunctionDeclaration()) { - var id = declar.node.id; - var nodes = []; - - if (id) { - nodes.push(declar.node); - nodes.push(buildExportCall("default", id)); - addExportName(id.name, "default"); - } else { - nodes.push(buildExportCall("default", t.toExpression(declar.node))); - } - - if (!canHoist || declar.isClassDeclaration()) { - _path2.replaceWithMultiple(nodes); - } else { - beforeBody = beforeBody.concat(nodes); - removedPaths.push(_path2); - } - } else { - _path2.replaceWith(buildExportCall("default", declar.node)); - } - } else if (_path2.isExportNamedDeclaration()) { - var _declar = _path2.get("declaration"); - - if (_declar.node) { - _path2.replaceWith(_declar); - - var _nodes = []; - var bindingIdentifiers = void 0; - if (_path2.isFunction()) { - var node = _declar.node; - var _name = node.id.name; - if (canHoist) { - addExportName(_name, _name); - beforeBody.push(node); - beforeBody.push(buildExportCall(_name, node.id)); - removedPaths.push(_path2); - } else { - var _bindingIdentifiers; - - bindingIdentifiers = (_bindingIdentifiers = {}, _bindingIdentifiers[_name] = node.id, _bindingIdentifiers); - } - } else { - bindingIdentifiers = _declar.getBindingIdentifiers(); - } - for (var _name2 in bindingIdentifiers) { - addExportName(_name2, _name2); - _nodes.push(buildExportCall(_name2, t.identifier(_name2))); - } - _path2.insertAfter(_nodes); - } else { - var specifiers = _path2.node.specifiers; - if (specifiers && specifiers.length) { - if (_path2.node.source) { - pushModule(_path2.node.source.value, "exports", specifiers); - _path2.remove(); - } else { - var _nodes2 = []; - - for (var _iterator7 = specifiers, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref8; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref8 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref8 = _i7.value; - } - - var specifier = _ref8; - - _nodes2.push(buildExportCall(specifier.exported.name, specifier.local)); - addExportName(specifier.local.name, specifier.exported.name); - } - - _path2.replaceWithMultiple(_nodes2); - } - } - } - } - } - - modules.forEach(function (specifiers) { - var setterBody = []; - var target = path.scope.generateUidIdentifier(specifiers.key); - - for (var _iterator4 = specifiers.imports, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var specifier = _ref5; - - if (t.isImportNamespaceSpecifier(specifier)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, target))); - } else if (t.isImportDefaultSpecifier(specifier)) { - specifier = t.importSpecifier(specifier.local, t.identifier("default")); - } - - if (t.isImportSpecifier(specifier)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, t.memberExpression(target, specifier.imported)))); - } - } - - if (specifiers.exports.length) { - var exportObjRef = path.scope.generateUidIdentifier("exportObj"); - - setterBody.push(t.variableDeclaration("var", [t.variableDeclarator(exportObjRef, t.objectExpression([]))])); - - for (var _iterator5 = specifiers.exports, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref6; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref6 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref6 = _i5.value; - } - - var node = _ref6; - - if (t.isExportAllDeclaration(node)) { - setterBody.push(buildExportAll({ - KEY: path.scope.generateUidIdentifier("key"), - EXPORT_OBJ: exportObjRef, - TARGET: target - })); - } else if (t.isExportSpecifier(node)) { - setterBody.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(exportObjRef, node.exported), t.memberExpression(target, node.local)))); - } else {} - } - - setterBody.push(t.expressionStatement(t.callExpression(exportIdent, [exportObjRef]))); - } - - sources.push(t.stringLiteral(specifiers.key)); - setters.push(t.functionExpression(null, [target], t.blockStatement(setterBody))); - }); - - var moduleName = this.getModuleName(); - if (moduleName) moduleName = t.stringLiteral(moduleName); - - if (canHoist) { - (0, _babelHelperHoistVariables2.default)(path, function (id) { - return variableIds.push(id); - }); - } - - if (variableIds.length) { - beforeBody.unshift(t.variableDeclaration("var", variableIds.map(function (id) { - return t.variableDeclarator(id); - }))); - } - - path.traverse(reassignmentVisitor, { - exports: exportNames, - buildCall: buildExportCall, - scope: path.scope - }); - - for (var _iterator6 = removedPaths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref7; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref7 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref7 = _i6.value; - } - - var _path3 = _ref7; - - _path3.remove(); - } - - path.node.body = [buildTemplate({ - SYSTEM_REGISTER: t.memberExpression(t.identifier(state.opts.systemGlobal || "System"), t.identifier("register")), - BEFORE_BODY: beforeBody, - MODULE_NAME: moduleName, - SETTERS: setters, - SOURCES: sources, - BODY: path.node.body, - EXPORT_IDENTIFIER: exportIdent, - CONTEXT_IDENTIFIER: contextIdent - })]; - } - } - } - }; -}; - -var _babelHelperHoistVariables = require("babel-helper-hoist-variables"); - -var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildTemplate = (0, _babelTemplate2.default)("\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n"); - -var buildExportAll = (0, _babelTemplate2.default)("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n"); - -var TYPE_IMPORT = "Import"; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/package.json deleted file mode 100644 index d39f67f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-systemjs/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-modules-systemjs@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-systemjs", - "name": "babel-plugin-transform-es2015-modules-systemjs", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-plugin-transform-es2015-modules-systemjs@>=6.5.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-modules-systemjs@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-modules-systemjs", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz_1491578363823_0.04013581667095423" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-modules-systemjs@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-systemjs", - "name": "babel-plugin-transform-es2015-modules-systemjs", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015", - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "_shasum": "ff89a142b9119a906195f5f106ecf305d9407d23", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-modules-systemjs@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "dependencies": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - }, - "description": "This plugin transforms ES2015 modules to SystemJS", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1", - "babel-plugin-syntax-dynamic-import": "^6.18.0" - }, - "directories": {}, - "dist": { - "shasum": "ff89a142b9119a906195f5f106ecf305d9407d23", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-modules-systemjs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-systemjs" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/README.md deleted file mode 100644 index fe32773..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# babel-plugin-transform-es2015-modules-umd - -> This plugin transforms ES2015 modules to [Universal Module Definition (UMD)](https://github.com/umdjs/umd). - -## Example - -**In** - -```javascript -export default 42; -``` - -**Out** - -```javascript -(function (global, factory) { - if (typeof define === "function" && define.amd) { - define(["exports"], factory); - } else if (typeof exports !== "undefined") { - factory(exports); - } else { - var mod = { - exports: {} - }; - factory(mod.exports); - global.actual = mod.exports; - } -})(this, function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.default = 42; -}); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-modules-umd -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-modules-umd"] -} -``` - -You can also override the names of particular libraries when this module is -running in the browser. For example the `es6-promise` library exposes itself -as `global.Promise` rather than `global.es6Promise`. This can be accommodated by: - -```json -{ - "plugins": [ - ["transform-es2015-modules-umd", { - "globals": { - "es6-promise": "Promise" - } - }] - ] -} -``` - -#### Default semantics - -There are a few things to note about the default semantics. - -_First_, this transform uses the -[basename](https://en.wikipedia.org/wiki/Basename) of each import to generate -the global names in the UMD output. This means that if you're importing -multiple modules with the same basename, like: - -```js -import fooBar1 from "foo-bar"; -import fooBar2 from "./mylib/foo-bar"; -``` - -it will transpile into two references to the same browser global: - -```js -factory(global.fooBar, global.fooBar); -``` - -If you set the plugin options to: - -```json -{ - "globals": { - "foo-bar": "fooBAR", - "./mylib/foo-bar": "mylib.fooBar" - } -} -``` - -it will still transpile both to one browser global: - -```js -factory(global.fooBAR, global.fooBAR); -``` - -because again the transform is only using the basename of the import. - -_Second_, the specified override will still be passed to the `toIdentifier` -function in [babel-types/src/converters](https://github.com/babel/babel/blob/master/packages/babel-types/src/converters.js). -This means that if you specify an override as a member expression like: - -```json -{ - "globals": { - "fizzbuzz": "fizz.buzz" - } -} -``` - -this will _not_ transpile to `factory(global.fizz.buzz)`. Instead, it will -transpile to `factory(global.fizzBuzz)` based on the logic in `toIdentifier`. - -_Third_, you cannot override the exported global name. - -#### More flexible semantics with `exactGlobals: true` - -All of these behaviors can limit the flexibility of the `globals` map. To -remove these limitations, you can set the `exactGlobals` option to `true`. -Doing this instructs the plugin to: - -1. always use the full import string instead of the basename when generating -the global names -2. skip passing `globals` overrides to the `toIdentifier` function. Instead, -they are used exactly as written, so you will get errors if you do not use -valid identifiers or valid uncomputed (dot) member expressions. -3. allow the exported global name to be overridden via the `globals` map. Any -override must again be a valid identifier or valid member expression. - -Thus, if you set `exactGlobals` to `true` and do not pass any overrides, the -first example of: - -```js -import fooBar1 from "foo-bar"; -import fooBar2 from "./mylib/foo-bar"; -``` - -will transpile to: - -```js -factory(global.fooBar, global.mylibFooBar); -``` - -And if you set the plugin options to: - -```json -{ - "globals": { - "foo-bar": "fooBAR", - "./mylib/foo-bar": "mylib.fooBar" - }, - "exactGlobals": true -} -``` - -then it'll transpile to: - -```js -factory(global.fooBAR, global.mylib.fooBar) -``` - -Finally, with the plugin options set to: - -```json -{ - "plugins": [ - "external-helpers", - ["transform-es2015-modules-umd", { - "globals": { - "my/custom/module/name": "My.Custom.Module.Name" - }, - "exactGlobals": true - }] - ], - "moduleId": "my/custom/module/name" -} -``` - -it will transpile to: - -```js -factory(mod.exports); -global.My = global.My || {}; -global.My.Custom = global.My.Custom || {}; -global.My.Custom.Module = global.My.Custom.Module || {}; -global.My.Custom.Module.Name = mod.exports; -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-modules-umd script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-modules-umd"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/lib/index.js deleted file mode 100644 index d537971..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/lib/index.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - function isValidDefine(path) { - if (!path.isExpressionStatement()) return; - - var expr = path.get("expression"); - if (!expr.isCallExpression()) return false; - if (!expr.get("callee").isIdentifier({ name: "define" })) return false; - - var args = expr.get("arguments"); - if (args.length === 3 && !args.shift().isStringLiteral()) return false; - if (args.length !== 2) return false; - if (!args.shift().isArrayExpression()) return false; - if (!args.shift().isFunctionExpression()) return false; - - return true; - } - - return { - inherits: require("babel-plugin-transform-es2015-modules-amd"), - - visitor: { - Program: { - exit: function exit(path, state) { - var last = path.get("body").pop(); - if (!isValidDefine(last)) return; - - var call = last.node.expression; - var args = call.arguments; - - var moduleName = args.length === 3 ? args.shift() : null; - var amdArgs = call.arguments[0]; - var func = call.arguments[1]; - var browserGlobals = state.opts.globals || {}; - - var commonArgs = amdArgs.elements.map(function (arg) { - if (arg.value === "module" || arg.value === "exports") { - return t.identifier(arg.value); - } else { - return t.callExpression(t.identifier("require"), [arg]); - } - }); - - var browserArgs = amdArgs.elements.map(function (arg) { - if (arg.value === "module") { - return t.identifier("mod"); - } else if (arg.value === "exports") { - return t.memberExpression(t.identifier("mod"), t.identifier("exports")); - } else { - var memberExpression = void 0; - - if (state.opts.exactGlobals) { - var globalRef = browserGlobals[arg.value]; - if (globalRef) { - memberExpression = globalRef.split(".").reduce(function (accum, curr) { - return t.memberExpression(accum, t.identifier(curr)); - }, t.identifier("global")); - } else { - memberExpression = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(arg.value))); - } - } else { - var requireName = (0, _path.basename)(arg.value, (0, _path.extname)(arg.value)); - var globalName = browserGlobals[requireName] || requireName; - memberExpression = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(globalName))); - } - - return memberExpression; - } - }); - - var moduleNameOrBasename = moduleName ? moduleName.value : this.file.opts.basename; - var globalToAssign = t.memberExpression(t.identifier("global"), t.identifier(t.toIdentifier(moduleNameOrBasename))); - var prerequisiteAssignments = null; - - if (state.opts.exactGlobals) { - var globalName = browserGlobals[moduleNameOrBasename]; - - if (globalName) { - prerequisiteAssignments = []; - - var members = globalName.split("."); - globalToAssign = members.slice(1).reduce(function (accum, curr) { - prerequisiteAssignments.push(buildPrerequisiteAssignment({ GLOBAL_REFERENCE: accum })); - return t.memberExpression(accum, t.identifier(curr)); - }, t.memberExpression(t.identifier("global"), t.identifier(members[0]))); - } - } - - var globalExport = buildGlobalExport({ - BROWSER_ARGUMENTS: browserArgs, - PREREQUISITE_ASSIGNMENTS: prerequisiteAssignments, - GLOBAL_TO_ASSIGN: globalToAssign - }); - - last.replaceWith(buildWrapper({ - MODULE_NAME: moduleName, - AMD_ARGUMENTS: amdArgs, - COMMON_ARGUMENTS: commonArgs, - GLOBAL_EXPORT: globalExport, - FUNC: func - })); - } - } - } - }; -}; - -var _path = require("path"); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildPrerequisiteAssignment = (0, _babelTemplate2.default)("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n"); - -var buildGlobalExport = (0, _babelTemplate2.default)("\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n PREREQUISITE_ASSIGNMENTS\n GLOBAL_TO_ASSIGN = mod.exports;\n"); - -var buildWrapper = (0, _babelTemplate2.default)("\n (function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== \"undefined\") {\n factory(COMMON_ARGUMENTS);\n } else {\n GLOBAL_EXPORT\n }\n })(this, FUNC);\n"); - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/package.json deleted file mode 100644 index 0a20db0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-umd/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-modules-umd@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-umd", - "name": "babel-plugin-transform-es2015-modules-umd", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-modules-umd@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-modules-umd@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-modules-umd", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz_1491578378753_0.8726147976703942" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-modules-umd@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-modules-umd", - "name": "babel-plugin-transform-es2015-modules-umd", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "_shasum": "ac997e6285cd18ed6176adb607d602344ad38468", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-modules-umd@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - }, - "description": "This plugin transforms ES2015 modules to UMD", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "ac997e6285cd18ed6176adb607d602344ad38468", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-modules-umd", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-umd" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/README.md deleted file mode 100644 index be0d505..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-transform-es2015-object-super - -> Compile ES2015 object super to ES5 - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-object-super -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-object-super"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-object-super script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-object-super"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/lib/index.js deleted file mode 100644 index e02f78e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/lib/index.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function (_ref) { - var t = _ref.types; - - function Property(path, node, scope, getObjectRef, file) { - var replaceSupers = new _babelHelperReplaceSupers2.default({ - getObjectRef: getObjectRef, - methodNode: node, - methodPath: path, - isStatic: true, - scope: scope, - file: file - }); - - replaceSupers.replace(); - } - - var CONTAINS_SUPER = (0, _symbol2.default)(); - - return { - visitor: { - Super: function Super(path) { - var parentObj = path.findParent(function (path) { - return path.isObjectExpression(); - }); - if (parentObj) parentObj.node[CONTAINS_SUPER] = true; - }, - - - ObjectExpression: { - exit: function exit(path, file) { - if (!path.node[CONTAINS_SUPER]) return; - - var objectRef = void 0; - var getObjectRef = function getObjectRef() { - return objectRef = objectRef || path.scope.generateUidIdentifier("obj"); - }; - - var propPaths = path.get("properties"); - for (var _iterator = propPaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var propPath = _ref2; - - if (propPath.isObjectProperty()) propPath = propPath.get("value"); - Property(propPath, propPath.node, path.scope, getObjectRef, file); - } - - if (objectRef) { - path.scope.push({ id: objectRef }); - path.replaceWith(t.assignmentExpression("=", objectRef, path.node)); - } - } - } - } - }; -}; - -var _babelHelperReplaceSupers = require("babel-helper-replace-supers"); - -var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/package.json deleted file mode 100644 index 54e2af8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-object-super/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-object-super@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-object-super", - "name": "babel-plugin-transform-es2015-object-super", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-object-super@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-object-super@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-object-super", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-object-super-6.24.1.tgz_1491578374085_0.19697221810929477" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-object-super@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-object-super", - "name": "babel-plugin-transform-es2015-object-super", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "_shasum": "24cef69ae21cb83a7f8603dad021f572eb278f8d", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-object-super@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 object super to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "24cef69ae21cb83a7f8603dad021f572eb278f8d", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-object-super", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-object-super" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/README.md deleted file mode 100644 index 5c52e0c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# babel-plugin-transform-es2015-parameters - -> Compile ES2015 default and rest parameters to ES5 - -This plugin transforms ES2015 parameters to ES5, this includes: - -- Destructuring parameters -- Default parameters -- Rest parameters - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-parameters -``` - -## Caveats - -Default parameters desugar into `let` declarations to retain proper semantics. If this is -not supported in your environment then you'll need the -[transform-block-scoping](http://babeljs.io/docs/plugins/transform-es2015-block-scoping) plugin. - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-parameters"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-parameters script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-parameters"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/default.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/default.js deleted file mode 100644 index f0d982f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/default.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.visitor = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _babelHelperGetFunctionArity = require("babel-helper-get-function-arity"); - -var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity); - -var _babelHelperCallDelegate = require("babel-helper-call-delegate"); - -var _babelHelperCallDelegate2 = _interopRequireDefault(_babelHelperCallDelegate); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildDefaultParam = (0, _babelTemplate2.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n"); - -var buildCutOff = (0, _babelTemplate2.default)("\n let $0 = $1[$2];\n"); - -function hasDefaults(node) { - for (var _iterator = node.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var param = _ref; - - if (!t.isIdentifier(param)) return true; - } - return false; -} - -function isSafeBinding(scope, node) { - if (!scope.hasOwnBinding(node.name)) return true; - - var _scope$getOwnBinding = scope.getOwnBinding(node.name), - kind = _scope$getOwnBinding.kind; - - return kind === "param" || kind === "local"; -} - -var iifeVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var scope = path.scope, - node = path.node; - - if (node.name === "eval" || !isSafeBinding(scope, node)) { - state.iife = true; - path.stop(); - } - }, - Scope: function Scope(path) { - path.skip(); - } -}; - -var visitor = exports.visitor = { - Function: function Function(path) { - var node = path.node, - scope = path.scope; - - if (!hasDefaults(node)) return; - - path.ensureBlock(); - - var state = { - iife: false, - scope: scope - }; - - var body = []; - - var argsIdentifier = t.identifier("arguments"); - argsIdentifier._shadowedFunctionLiteral = path; - - function pushDefNode(left, right, i) { - var defNode = buildDefaultParam({ - VARIABLE_NAME: left, - DEFAULT_VALUE: right, - ARGUMENT_KEY: t.numericLiteral(i), - ARGUMENTS: argsIdentifier - }); - defNode._blockHoist = node.params.length - i; - body.push(defNode); - } - - var lastNonDefaultParam = (0, _babelHelperGetFunctionArity2.default)(node); - - var params = path.get("params"); - for (var i = 0; i < params.length; i++) { - var param = params[i]; - - if (!param.isAssignmentPattern()) { - if (!state.iife && !param.isIdentifier()) { - param.traverse(iifeVisitor, state); - } - - continue; - } - - var left = param.get("left"); - var right = param.get("right"); - - if (i >= lastNonDefaultParam || left.isPattern()) { - var placeholder = scope.generateUidIdentifier("x"); - placeholder._isDefaultPlaceholder = true; - node.params[i] = placeholder; - } else { - node.params[i] = left.node; - } - - if (!state.iife) { - if (right.isIdentifier() && !isSafeBinding(scope, right.node)) { - state.iife = true; - } else { - right.traverse(iifeVisitor, state); - } - } - - pushDefNode(left.node, right.node, i); - } - - for (var _i2 = lastNonDefaultParam + 1; _i2 < node.params.length; _i2++) { - var _param = node.params[_i2]; - if (_param._isDefaultPlaceholder) continue; - - var declar = buildCutOff(_param, argsIdentifier, t.numericLiteral(_i2)); - declar._blockHoist = node.params.length - _i2; - body.push(declar); - } - - node.params = node.params.slice(0, lastNonDefaultParam); - - if (state.iife) { - body.push((0, _babelHelperCallDelegate2.default)(path, scope)); - path.set("body", t.blockStatement(body)); - } else { - path.get("body").unshiftContainer("body", body); - } - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/destructuring.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/destructuring.js deleted file mode 100644 index 896c7c1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/destructuring.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.visitor = undefined; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var visitor = exports.visitor = { - Function: function Function(path) { - var params = path.get("params"); - - var hoistTweak = t.isRestElement(params[params.length - 1]) ? 1 : 0; - var outputParamsLength = params.length - hoistTweak; - - for (var i = 0; i < outputParamsLength; i++) { - var param = params[i]; - if (param.isArrayPattern() || param.isObjectPattern()) { - var uid = path.scope.generateUidIdentifier("ref"); - - var declar = t.variableDeclaration("let", [t.variableDeclarator(param.node, uid)]); - declar._blockHoist = outputParamsLength - i; - - path.ensureBlock(); - path.get("body").unshiftContainer("body", declar); - - param.replaceWith(uid); - } - } - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/index.js deleted file mode 100644 index feab6db..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/index.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function () { - return { - visitor: _babelTraverse.visitors.merge([{ - ArrowFunctionExpression: function ArrowFunctionExpression(path) { - var params = path.get("params"); - for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var param = _ref; - - if (param.isRestElement() || param.isAssignmentPattern()) { - path.arrowFunctionToShadowed(); - break; - } - } - } - }, destructuring.visitor, rest.visitor, def.visitor]) - }; -}; - -var _babelTraverse = require("babel-traverse"); - -var _destructuring = require("./destructuring"); - -var destructuring = _interopRequireWildcard(_destructuring); - -var _default = require("./default"); - -var def = _interopRequireWildcard(_default); - -var _rest = require("./rest"); - -var rest = _interopRequireWildcard(_rest); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/rest.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/rest.js deleted file mode 100644 index ef056dd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/lib/rest.js +++ /dev/null @@ -1,259 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.visitor = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _babelTemplate = require("babel-template"); - -var _babelTemplate2 = _interopRequireDefault(_babelTemplate); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildRest = (0, _babelTemplate2.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n"); - -var restIndex = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n"); - -var restIndexImpure = (0, _babelTemplate2.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n"); - -var restLength = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n"); - -var memberExpressionOptimisationVisitor = { - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) { - path.skip(); - } - }, - Flow: function Flow(path) { - if (path.isTypeCastExpression()) return; - - path.skip(); - }, - - - "Function|ClassProperty": function FunctionClassProperty(path, state) { - var oldNoOptimise = state.noOptimise; - state.noOptimise = true; - path.traverse(memberExpressionOptimisationVisitor, state); - state.noOptimise = oldNoOptimise; - - path.skip(); - }, - - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var node = path.node; - - if (node.name === "arguments") { - state.deopted = true; - } - - if (node.name !== state.name) return; - - if (state.noOptimise) { - state.deopted = true; - } else { - var parentPath = path.parentPath; - - if (parentPath.listKey === "params" && parentPath.key < state.offset) { - return; - } - - if (parentPath.isMemberExpression({ object: node })) { - var grandparentPath = parentPath.parentPath; - - var argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({ operator: "delete" }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee); - - if (argsOptEligible) { - if (parentPath.node.computed) { - if (parentPath.get("property").isBaseType("number")) { - state.candidates.push({ cause: "indexGetter", path: path }); - return; - } - } else if (parentPath.node.property.name === "length") { - state.candidates.push({ cause: "lengthGetter", path: path }); - return; - } - } - } - - if (state.offset === 0 && parentPath.isSpreadElement()) { - var call = parentPath.parentPath; - if (call.isCallExpression() && call.node.arguments.length === 1) { - state.candidates.push({ cause: "argSpread", path: path }); - return; - } - } - - state.references.push(path); - } - }, - BindingIdentifier: function BindingIdentifier(_ref, state) { - var node = _ref.node; - - if (node.name === state.name) { - state.deopted = true; - } - } -}; -function hasRest(node) { - return t.isRestElement(node.params[node.params.length - 1]); -} - -function optimiseIndexGetter(path, argsId, offset) { - var index = void 0; - - if (t.isNumericLiteral(path.parent.property)) { - index = t.numericLiteral(path.parent.property.value + offset); - } else if (offset === 0) { - index = path.parent.property; - } else { - index = t.binaryExpression("+", path.parent.property, t.numericLiteral(offset)); - } - - var scope = path.scope; - - if (!scope.isPure(index)) { - var temp = scope.generateUidIdentifierBasedOnNode(index); - scope.push({ id: temp, kind: "var" }); - path.parentPath.replaceWith(restIndexImpure({ - ARGUMENTS: argsId, - INDEX: index, - REF: temp - })); - } else { - path.parentPath.replaceWith(restIndex({ - ARGUMENTS: argsId, - INDEX: index - })); - } -} - -function optimiseLengthGetter(path, argsId, offset) { - if (offset) { - path.parentPath.replaceWith(restLength({ - ARGUMENTS: argsId, - OFFSET: t.numericLiteral(offset) - })); - } else { - path.replaceWith(argsId); - } -} - -var visitor = exports.visitor = { - Function: function Function(path) { - var node = path.node, - scope = path.scope; - - if (!hasRest(node)) return; - - var rest = node.params.pop().argument; - - var argsId = t.identifier("arguments"); - - argsId._shadowedFunctionLiteral = path; - - var state = { - references: [], - offset: node.params.length, - - argumentsNode: argsId, - outerBinding: scope.getBindingIdentifier(rest.name), - - candidates: [], - - name: rest.name, - - deopted: false - }; - - path.traverse(memberExpressionOptimisationVisitor, state); - - if (!state.deopted && !state.references.length) { - for (var _iterator = state.candidates, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var _ref4 = _ref3; - var _path = _ref4.path, - cause = _ref4.cause; - - switch (cause) { - case "indexGetter": - optimiseIndexGetter(_path, argsId, state.offset); - break; - case "lengthGetter": - optimiseLengthGetter(_path, argsId, state.offset); - break; - default: - _path.replaceWith(argsId); - } - } - return; - } - - state.references = state.references.concat(state.candidates.map(function (_ref5) { - var path = _ref5.path; - return path; - })); - - state.deopted = state.deopted || !!node.shadow; - - var start = t.numericLiteral(node.params.length); - var key = scope.generateUidIdentifier("key"); - var len = scope.generateUidIdentifier("len"); - - var arrKey = key; - var arrLen = len; - if (node.params.length) { - arrKey = t.binaryExpression("-", key, start); - - arrLen = t.conditionalExpression(t.binaryExpression(">", len, start), t.binaryExpression("-", len, start), t.numericLiteral(0)); - } - - var loop = buildRest({ - ARGUMENTS: argsId, - ARRAY_KEY: arrKey, - ARRAY_LEN: arrLen, - START: start, - ARRAY: rest, - KEY: key, - LEN: len - }); - - if (state.deopted) { - loop._blockHoist = node.params.length + 1; - node.body.body.unshift(loop); - } else { - loop._blockHoist = 1; - - var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent(); - - target.findParent(function (path) { - if (path.isLoop()) { - target = path; - } else { - return path.isFunction(); - } - }); - - target.insertBefore(loop); - } - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/package.json deleted file mode 100644 index fe8558d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-parameters/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-parameters@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-parameters", - "name": "babel-plugin-transform-es2015-parameters", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-parameters@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-parameters@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-parameters", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-parameters-6.24.1.tgz_1491578364122_0.5907053858973086" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-parameters@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-parameters", - "name": "babel-plugin-transform-es2015-parameters", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "_shasum": "57ac351ab49caf14a97cd13b09f66fdf0a625f2b", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-parameters@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - }, - "description": "Compile ES2015 default and rest parameters to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "57ac351ab49caf14a97cd13b09f66fdf0a625f2b", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-parameters", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-parameters" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/README.md deleted file mode 100644 index 95c87e2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# babel-plugin-transform-es2015-shorthand-properties - -> Compile ES2015 shorthand properties to ES5 - -## Example - -**In** - -```js -var o = { a, b, c }; -``` - -**Out** - -```js -var o = { a: a, b: b, c: c }; -``` - -**In** - -```js -var cat = { - getName() { - return name; - } -}; -``` - -**Out** - -```js -var cat = { - getName: function () { - return name; - } -}; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-shorthand-properties -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-shorthand-properties"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-shorthand-properties script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-shorthand-properties"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/lib/index.js deleted file mode 100644 index ec3c7cd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/lib/index.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - ObjectMethod: function ObjectMethod(path) { - var node = path.node; - - if (node.kind === "method") { - var func = t.functionExpression(null, node.params, node.body, node.generator, node.async); - func.returnType = node.returnType; - - path.replaceWith(t.objectProperty(node.key, func, node.computed)); - } - }, - ObjectProperty: function ObjectProperty(_ref) { - var node = _ref.node; - - if (node.shorthand) { - node.shorthand = false; - } - } - } - }; -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/package.json deleted file mode 100644 index 2f7a9a0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-shorthand-properties/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-shorthand-properties@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-shorthand-properties", - "name": "babel-plugin-transform-es2015-shorthand-properties", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-shorthand-properties@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-shorthand-properties@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-shorthand-properties", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz_1491578349312_0.1297836024314165" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-shorthand-properties@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-shorthand-properties", - "name": "babel-plugin-transform-es2015-shorthand-properties", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "_shasum": "24f875d6721c87661bbd99a4622e51f14de38aa0", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-shorthand-properties@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Compile ES2015 shorthand properties to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "24f875d6721c87661bbd99a4622e51f14de38aa0", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-shorthand-properties", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-shorthand-properties" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/README.md deleted file mode 100644 index 9d0e166..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# babel-plugin-transform-es2015-spread - -> Compile ES2015 spread to ES5 - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-spread -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-spread"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-spread", { - "loose": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-spread script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-spread"] -}); -``` - -## Options - -* `loose` - All iterables are assumed to be arrays. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/lib/index.js deleted file mode 100644 index 6649677..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/lib/index.js +++ /dev/null @@ -1,157 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - function getSpreadLiteral(spread, scope, state) { - if (state.opts.loose && !t.isIdentifier(spread.argument, { name: "arguments" })) { - return spread.argument; - } else { - return scope.toArray(spread.argument, true); - } - } - - function hasSpread(nodes) { - for (var i = 0; i < nodes.length; i++) { - if (t.isSpreadElement(nodes[i])) { - return true; - } - } - return false; - } - - function build(props, scope, state) { - var nodes = []; - - var _props = []; - - function push() { - if (!_props.length) return; - nodes.push(t.arrayExpression(_props)); - _props = []; - } - - for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var prop = _ref2; - - if (t.isSpreadElement(prop)) { - push(); - nodes.push(getSpreadLiteral(prop, scope, state)); - } else { - _props.push(prop); - } - } - - push(); - - return nodes; - } - - return { - visitor: { - ArrayExpression: function ArrayExpression(path, state) { - var node = path.node, - scope = path.scope; - - var elements = node.elements; - if (!hasSpread(elements)) return; - - var nodes = build(elements, scope, state); - var first = nodes.shift(); - - if (!t.isArrayExpression(first)) { - nodes.unshift(first); - first = t.arrayExpression([]); - } - - path.replaceWith(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes)); - }, - CallExpression: function CallExpression(path, state) { - var node = path.node, - scope = path.scope; - - - var args = node.arguments; - if (!hasSpread(args)) return; - - var calleePath = path.get("callee"); - if (calleePath.isSuper()) return; - - var contextLiteral = t.identifier("undefined"); - - node.arguments = []; - - var nodes = void 0; - if (args.length === 1 && args[0].argument.name === "arguments") { - nodes = [args[0].argument]; - } else { - nodes = build(args, scope, state); - } - - var first = nodes.shift(); - if (nodes.length) { - node.arguments.push(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes)); - } else { - node.arguments.push(first); - } - - var callee = node.callee; - - if (calleePath.isMemberExpression()) { - var temp = scope.maybeGenerateMemoised(callee.object); - if (temp) { - callee.object = t.assignmentExpression("=", temp, callee.object); - contextLiteral = temp; - } else { - contextLiteral = callee.object; - } - t.appendToMemberExpression(callee, t.identifier("apply")); - } else { - node.callee = t.memberExpression(node.callee, t.identifier("apply")); - } - - if (t.isSuper(contextLiteral)) { - contextLiteral = t.thisExpression(); - } - - node.arguments.unshift(contextLiteral); - }, - NewExpression: function NewExpression(path, state) { - var node = path.node, - scope = path.scope; - - var args = node.arguments; - if (!hasSpread(args)) return; - - var nodes = build(args, scope, state); - - var context = t.arrayExpression([t.nullLiteral()]); - - args = t.callExpression(t.memberExpression(context, t.identifier("concat")), nodes); - - path.replaceWith(t.newExpression(t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Function"), t.identifier("prototype")), t.identifier("bind")), t.identifier("apply")), [node.callee, args]), [])); - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/package.json deleted file mode 100644 index 2ba2bc2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-spread/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-spread@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-spread", - "name": "babel-plugin-transform-es2015-spread", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-spread@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-spread@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-spread", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-spread-6.22.0.tgz_1484872439193_0.7624396567698568" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-spread@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-spread", - "name": "babel-plugin-transform-es2015-spread", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "_shasum": "d6d68a99f89aedc4536c81a542e8dd9f1746f8d1", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-spread@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 spread to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "d6d68a99f89aedc4536c81a542e8dd9f1746f8d1", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-spread", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-spread" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/README.md deleted file mode 100644 index aefaaf9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-transform-es2015-sticky-regex - -> Compile ES2015 sticky regex to an ES5 RegExp constructor - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-sticky-regex -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-sticky-regex"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-sticky-regex script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-sticky-regex"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/lib/index.js deleted file mode 100644 index 1ac2d0b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/lib/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - RegExpLiteral: function RegExpLiteral(path) { - var node = path.node; - - if (!regex.is(node, "y")) return; - - path.replaceWith(t.newExpression(t.identifier("RegExp"), [t.stringLiteral(node.pattern), t.stringLiteral(node.flags)])); - } - } - }; -}; - -var _babelHelperRegex = require("babel-helper-regex"); - -var regex = _interopRequireWildcard(_babelHelperRegex); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/package.json deleted file mode 100644 index 4f3a237..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-sticky-regex/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-sticky-regex@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-sticky-regex", - "name": "babel-plugin-transform-es2015-sticky-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-sticky-regex@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-sticky-regex@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-sticky-regex", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz_1491578352236_0.6988765797577798" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-sticky-regex@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-sticky-regex", - "name": "babel-plugin-transform-es2015-sticky-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "_shasum": "00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-sticky-regex@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "Compile ES2015 sticky regex to an ES5 RegExp constructor", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-sticky-regex", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-sticky-regex" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/README.md deleted file mode 100644 index 854bc74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# babel-plugin-transform-es2015-template-literals - -> Compile ES2015 template literals to ES5 - -## Example - -**In** - -```javascript -`foo${bar}`; -``` - -**Out** - -```javascript -"foo" + bar; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-template-literals -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-template-literals"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-template-literals", { - "loose": true, - "spec": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-template-literals script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-template-literals"] -}); -``` - -## Options - -### `loose` -In loose mode, tagged template literal objects aren't frozen. - - -### `spec` -This option wraps all template literal expressions with `String`. See [babel/babel#1065](https://github.com/babel/babel/issues/1065) for more info. - -**In** - -```javascript -`foo${bar}`; -``` - -**Out** - -```javascript -"foo" + String(bar); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/lib/index.js deleted file mode 100644 index 2e6e57b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/lib/index.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - function isString(node) { - return t.isLiteral(node) && typeof node.value === "string"; - } - - function buildBinaryExpression(left, right) { - return t.binaryExpression("+", left, right); - } - - return { - visitor: { - TaggedTemplateExpression: function TaggedTemplateExpression(path, state) { - var node = path.node; - - var quasi = node.quasi; - var args = []; - - var strings = []; - var raw = []; - - for (var _iterator = quasi.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var elem = _ref2; - - strings.push(t.stringLiteral(elem.value.cooked)); - raw.push(t.stringLiteral(elem.value.raw)); - } - - strings = t.arrayExpression(strings); - raw = t.arrayExpression(raw); - - var templateName = "taggedTemplateLiteral"; - if (state.opts.loose) templateName += "Loose"; - - var templateObject = state.file.addTemplateObject(templateName, strings, raw); - args.push(templateObject); - - args = args.concat(quasi.expressions); - - path.replaceWith(t.callExpression(node.tag, args)); - }, - TemplateLiteral: function TemplateLiteral(path, state) { - var nodes = []; - - var expressions = path.get("expressions"); - - for (var _iterator2 = path.node.quasis, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var elem = _ref3; - - nodes.push(t.stringLiteral(elem.value.cooked)); - - var expr = expressions.shift(); - if (expr) { - if (state.opts.spec && !expr.isBaseType("string") && !expr.isBaseType("number")) { - nodes.push(t.callExpression(t.identifier("String"), [expr.node])); - } else { - nodes.push(expr.node); - } - } - } - - nodes = nodes.filter(function (n) { - return !t.isLiteral(n, { value: "" }); - }); - - if (!isString(nodes[0]) && !isString(nodes[1])) { - nodes.unshift(t.stringLiteral("")); - } - - if (nodes.length > 1) { - var root = buildBinaryExpression(nodes.shift(), nodes.shift()); - - for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var node = _ref4; - - root = buildBinaryExpression(root, node); - } - - path.replaceWith(root); - } else { - path.replaceWith(nodes[0]); - } - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/package.json deleted file mode 100644 index 23f9b6a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-template-literals/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-template-literals@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-template-literals", - "name": "babel-plugin-transform-es2015-template-literals", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-template-literals@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-template-literals@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-template-literals", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-template-literals-6.22.0.tgz_1484872441432_0.952275461750105" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-template-literals@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-template-literals", - "name": "babel-plugin-transform-es2015-template-literals", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "_shasum": "a84b3450f7e9f8f1f6839d6d687da84bb1236d8d", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-template-literals@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Compile ES2015 template literals to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "a84b3450f7e9f8f1f6839d6d687da84bb1236d8d", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-template-literals", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-template-literals" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/README.md deleted file mode 100644 index 92a7d2d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# babel-plugin-transform-es2015-typeof-symbol - -> ES6 introduces a new native type called [symbols](https://babeljs.io/learn-es2015/#ecmascript-2015-features-symbols). This transformer wraps all `typeof` expressions with a method that replicates native behaviour. (ie. returning "symbol" for symbols) - -## Example - -**In** - -```javascript -typeof Symbol() === "symbol"; -``` - -**Out** - -```javascript -var _typeof = function (obj) { - return obj && obj.constructor === Symbol ? "symbol" : typeof obj; -}; - -_typeof(Symbol()) === "symbol"; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-typeof-symbol -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-typeof-symbol"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-typeof-symbol script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-typeof-symbol"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/lib/index.js deleted file mode 100644 index b63a92c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/lib/index.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function (_ref) { - var t = _ref.types; - - var IGNORE = (0, _symbol2.default)(); - - return { - visitor: { - Scope: function Scope(_ref2) { - var scope = _ref2.scope; - - if (!scope.getBinding("Symbol")) { - return; - } - - scope.rename("Symbol"); - }, - UnaryExpression: function UnaryExpression(path) { - var node = path.node, - parent = path.parent; - - if (node[IGNORE]) return; - if (path.find(function (path) { - return path.node && !!path.node._generated; - })) return; - - if (path.parentPath.isBinaryExpression() && t.EQUALITY_BINARY_OPERATORS.indexOf(parent.operator) >= 0) { - var opposite = path.getOpposite(); - if (opposite.isLiteral() && opposite.node.value !== "symbol" && opposite.node.value !== "object") { - return; - } - } - - if (node.operator === "typeof") { - var call = t.callExpression(this.addHelper("typeof"), [node.argument]); - if (path.get("argument").isIdentifier()) { - var undefLiteral = t.stringLiteral("undefined"); - var unary = t.unaryExpression("typeof", node.argument); - unary[IGNORE] = true; - path.replaceWith(t.conditionalExpression(t.binaryExpression("===", unary, undefLiteral), undefLiteral, call)); - } else { - path.replaceWith(call); - } - } - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/package.json deleted file mode 100644 index 069c37b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-typeof-symbol/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-typeof-symbol@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-typeof-symbol", - "name": "babel-plugin-transform-es2015-typeof-symbol", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-typeof-symbol@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-es2015-typeof-symbol@6.23.0", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-typeof-symbol", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz_1487027061153_0.9038311641197652" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-typeof-symbol@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-typeof-symbol", - "name": "babel-plugin-transform-es2015-typeof-symbol", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "_shasum": "dec09f1cddff94b52ac73d505c84df59dcceb372", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-typeof-symbol@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "dec09f1cddff94b52ac73d505c84df59dcceb372", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-typeof-symbol", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-typeof-symbol" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/README.md deleted file mode 100644 index 56b2035..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# babel-plugin-transform-es2015-unicode-regex - -> Compile ES2015 unicode regex to ES5 - -## Example - -**In** - -```js -var string = "foo💩bar"; -var match = string.match(/foo(.)bar/u); -``` - -**Out** - -```js -var string = "foo💩bar"; -var match = string.match(/foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-unicode-regex -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-es2015-unicode-regex"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-unicode-regex script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-unicode-regex"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/lib/index.js deleted file mode 100644 index 2c427e9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/lib/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - RegExpLiteral: function RegExpLiteral(_ref) { - var node = _ref.node; - - if (!regex.is(node, "u")) return; - node.pattern = (0, _regexpuCore2.default)(node.pattern, node.flags); - regex.pullFlag(node, "u"); - } - } - }; -}; - -var _regexpuCore = require("regexpu-core"); - -var _regexpuCore2 = _interopRequireDefault(_regexpuCore); - -var _babelHelperRegex = require("babel-helper-regex"); - -var regex = _interopRequireWildcard(_babelHelperRegex); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/package.json deleted file mode 100644 index 8e1a92c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-es2015-unicode-regex@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-unicode-regex", - "name": "babel-plugin-transform-es2015-unicode-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-es2015-unicode-regex@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-es2015-unicode-regex@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-es2015-unicode-regex", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz_1491578353335_0.3241676192265004" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-es2015-unicode-regex@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-es2015-unicode-regex", - "name": "babel-plugin-transform-es2015-unicode-regex", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "_shasum": "d38b12f42ea7323f729387f18a7c5ae1faeb35e9", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-es2015-unicode-regex@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "dependencies": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - }, - "description": "Compile ES2015 Unicode regex to ES5", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "d38b12f42ea7323f729387f18a7c5ae1faeb35e9", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-es2015-unicode-regex", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-unicode-regex" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/README.md deleted file mode 100644 index afde549..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# babel-plugin-transform-flow-strip-types - -> Strip all [flow](http://flowtype.org) type annotations and declarations from your output code. - -## Example - -**In** - -```javascript -function foo(one: any, two: number, three?): string {} -``` - -**Out** - -```javascript -function foo(one, two, three) {} -``` - -[Try in REPL](http://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=react&code=function%20foo(one%3A%20any%2C%20two%3A%20number%2C%20three%3F)%3A%20string%20%7B%7D&experimental=false&loose=false&spec=false&playground=false&stage=0 -) - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-flow-strip-types -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-flow-strip-types"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-flow-strip-types script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-flow-strip-types"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/lib/index.js deleted file mode 100644 index 6df1230..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/lib/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - var FLOW_DIRECTIVE = "@flow"; - - return { - inherits: require("babel-plugin-syntax-flow"), - - visitor: { - Program: function Program(path, _ref2) { - var comments = _ref2.file.ast.comments; - - for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var comment = _ref3; - - if (comment.value.indexOf(FLOW_DIRECTIVE) >= 0) { - comment.value = comment.value.replace(FLOW_DIRECTIVE, ""); - - if (!comment.value.replace(/\*/g, "").trim()) comment.ignore = true; - } - } - }, - Flow: function Flow(path) { - path.remove(); - }, - ClassProperty: function ClassProperty(path) { - path.node.variance = null; - path.node.typeAnnotation = null; - if (!path.node.value) path.remove(); - }, - Class: function Class(path) { - path.node.implements = null; - - path.get("body.body").forEach(function (child) { - if (child.isClassProperty()) { - child.node.typeAnnotation = null; - if (!child.node.value) child.remove(); - } - }); - }, - AssignmentPattern: function AssignmentPattern(_ref4) { - var node = _ref4.node; - - node.left.optional = false; - }, - Function: function Function(_ref5) { - var node = _ref5.node; - - for (var i = 0; i < node.params.length; i++) { - var param = node.params[i]; - param.optional = false; - } - }, - TypeCastExpression: function TypeCastExpression(path) { - var node = path.node; - - do { - node = node.expression; - } while (t.isTypeCastExpression(node)); - path.replaceWith(node); - } - } - }; -}; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/package.json deleted file mode 100644 index 3fe2db1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-flow-strip-types/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-flow-strip-types@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-flow-strip-types", - "name": "babel-plugin-transform-flow-strip-types", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow" - ] - ], - "_from": "babel-plugin-transform-flow-strip-types@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-flow-strip-types@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-flow-strip-types", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-flow-strip-types-6.22.0.tgz_1484872448016_0.6260147255379707" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-flow-strip-types@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-flow-strip-types", - "name": "babel-plugin-transform-flow-strip-types", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-flow" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "_shasum": "84cb672935d43714fdc32bce84568d87441cf7cf", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-flow-strip-types@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow", - "dependencies": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" - }, - "description": "Strip flow type annotations from your output code.", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "84cb672935d43714fdc32bce84568d87441cf7cf", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-flow-strip-types", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-flow-strip-types" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/LICENSE deleted file mode 100644 index b9d8498..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jed Watson - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/README.md deleted file mode 100644 index 100fe5f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# babel-plugin-transform-object-assign - -> Replace `Object.assign` with an inline helper. If you are authoring an application, rather than a library, it is recommended that you use the `Object.assign` polyfill instead. - -## Example - -**In** - -```javascript -Object.assign(a, b); -``` - -**Out** - -```javascript -var _extends = ...; - -_extends(a, b); -``` - -## Caveats - -- Will only work with code of the form `Object.assign` or `Object['assign']`. The following patterns are not supported: - - ```javascript - var { assign } = Object; - var assign = Object.assign; - ``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-object-assign -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-object-assign"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-object-assign script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-object-assign"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/lib/index.js deleted file mode 100644 index f358618..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/lib/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () { - return { - visitor: { - CallExpression: function CallExpression(path, file) { - if (path.get("callee").matchesPattern("Object.assign")) { - path.node.callee = file.addHelper("extends"); - } - } - } - }; -}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/package.json deleted file mode 100644 index bbd3223..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-object-assign/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-object-assign@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-object-assign", - "name": "babel-plugin-transform-object-assign", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-plugin-transform-object-assign@>=6.5.0 <7.0.0", - "_id": "babel-plugin-transform-object-assign@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-object-assign", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-object-assign-6.22.0.tgz_1484872449974_0.20145762572064996" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-object-assign@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-object-assign", - "name": "babel-plugin-transform-object-assign", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz", - "_shasum": "f99d2f66f1a0b0d498e346c5359684740caa20ba", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-object-assign@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "author": { - "name": "Jed Watson" - }, - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Replace Object.assign with an inline helper", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "f99d2f66f1a0b0d498e346c5359684740caa20ba", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-object-assign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-assign" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/README.md deleted file mode 100644 index 81a1312..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# babel-plugin-transform-react-display-name - -> Add displayName to `createReactClass` (and `React.createClass`) calls - -## Example - -**In** - -```js -var foo = React.createClass({}); // React <= 15 -var bar = createReactClass({}); // React 16+ -``` - -**Out** - -```js -var foo = React.createClass({ - displayName: "foo" -}); // React <= 15 -var bar = createReactClass({ - displayName: "bar" -}); // React 16+ -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-react-display-name -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-react-display-name"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-react-display-name script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-react-display-name"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/lib/index.js deleted file mode 100644 index efecca6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/lib/index.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - function addDisplayName(id, call) { - var props = call.arguments[0].properties; - var safe = true; - - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - var key = t.toComputedKey(prop); - if (t.isLiteral(key, { value: "displayName" })) { - safe = false; - break; - } - } - - if (safe) { - props.unshift(t.objectProperty(t.identifier("displayName"), t.stringLiteral(id))); - } - } - - var isCreateClassCallExpression = t.buildMatchMemberExpression("React.createClass"); - var isCreateClassAddon = function isCreateClassAddon(callee) { - return callee.name === "createReactClass"; - }; - - function isCreateClass(node) { - if (!node || !t.isCallExpression(node)) return false; - - if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) return false; - - var args = node.arguments; - if (args.length !== 1) return false; - - var first = args[0]; - if (!t.isObjectExpression(first)) return false; - - return true; - } - - return { - visitor: { - ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref2, state) { - var node = _ref2.node; - - if (isCreateClass(node.declaration)) { - var displayName = state.file.opts.basename; - - if (displayName === "index") { - displayName = _path2.default.basename(_path2.default.dirname(state.file.opts.filename)); - } - - addDisplayName(displayName, node.declaration); - } - }, - CallExpression: function CallExpression(path) { - var node = path.node; - - if (!isCreateClass(node)) return; - - var id = void 0; - - path.find(function (path) { - if (path.isAssignmentExpression()) { - id = path.node.left; - } else if (path.isObjectProperty()) { - id = path.node.key; - } else if (path.isVariableDeclarator()) { - id = path.node.id; - } else if (path.isStatement()) { - return true; - } - - if (id) return true; - }); - - if (!id) return; - - if (t.isMemberExpression(id)) { - id = id.property; - } - - if (t.isIdentifier(id)) { - addDisplayName(id.name, node); - } - } - } - }; -}; - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/package.json deleted file mode 100644 index de42559..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-display-name/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-react-display-name@^6.23.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-display-name", - "name": "babel-plugin-transform-react-display-name", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react" - ] - ], - "_from": "babel-plugin-transform-react-display-name@>=6.23.0 <7.0.0", - "_id": "babel-plugin-transform-react-display-name@6.25.0", - "_inCache": true, - "_location": "/babel-plugin-transform-react-display-name", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-plugin-transform-react-display-name-6.25.0.tgz_1496957345533_0.45894206734374166" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-react-display-name@^6.23.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-display-name", - "name": "babel-plugin-transform-react-display-name", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-react" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", - "_shasum": "67e2bf1f1e9c93ab08db96792e05392bf2cc28d1", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-react-display-name@^6.23.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Add displayName to React.createClass calls", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "67e2bf1f1e9c93ab08db96792e05392bf2cc28d1", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-plugin-transform-react-display-name", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-display-name" - }, - "scripts": {}, - "version": "6.25.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/README.md deleted file mode 100644 index 69395fe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# babel-plugin-transform-react-jsx-self - -> Adds `__self` prop to JSX elements, which React will use to generate some runtime warnings. All React users should enable this transform in dev mode. - -## Example - -**In** - -``` - -``` - -**Out** - -``` - -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-react-jsx-self -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-react-jsx-self"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-react-jsx-self script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-react-jsx-self"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/lib/index.js deleted file mode 100644 index 1cffaf1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/lib/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - var visitor = { - JSXOpeningElement: function JSXOpeningElement(_ref2) { - var node = _ref2.node; - - var id = t.jSXIdentifier(TRACE_ID); - var trace = t.thisExpression(); - - node.attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace))); - } - }; - - return { - visitor: visitor - }; -}; - -var TRACE_ID = "__self"; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/package.json deleted file mode 100644 index a92067c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-self/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-react-jsx-self@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx-self", - "name": "babel-plugin-transform-react-jsx-self", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react" - ] - ], - "_from": "babel-plugin-transform-react-jsx-self@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-react-jsx-self@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-react-jsx-self", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-react-jsx-self-6.22.0.tgz_1484872456629_0.6736158702988178" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-react-jsx-self@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx-self", - "name": "babel-plugin-transform-react-jsx-self", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-react" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", - "_shasum": "df6d80a9da2612a121e6ddd7558bcbecf06e636e", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-react-jsx-self@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react", - "dependencies": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - }, - "description": "Add a __self prop to all JSX Elements", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "df6d80a9da2612a121e6ddd7558bcbecf06e636e", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-react-jsx-self", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-self" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/README.md deleted file mode 100644 index da6e5a4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# babel-plugin-transform-react-jsx-source - -> Adds source file and line number to JSX elements. - -## Example - -**In** - -``` - -``` - -**Out** - -``` - -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-react-jsx-source -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["transform-react-jsx-source"] -} -``` - -### Via CLI - -```sh -babel --plugins transform-react-jsx-source script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-react-jsx-source"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/lib/index.js deleted file mode 100644 index 5b9f08c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/lib/index.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (_ref) { - var t = _ref.types; - - function makeTrace(fileNameIdentifier, lineNumber) { - var fileLineLiteral = lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral(); - var fileNameProperty = t.objectProperty(t.identifier("fileName"), fileNameIdentifier); - var lineNumberProperty = t.objectProperty(t.identifier("lineNumber"), fileLineLiteral); - return t.objectExpression([fileNameProperty, lineNumberProperty]); - } - - var visitor = { - JSXOpeningElement: function JSXOpeningElement(path, state) { - var id = t.jSXIdentifier(TRACE_ID); - var location = path.container.openingElement.loc; - if (!location) { - return; - } - - var attributes = path.container.openingElement.attributes; - for (var i = 0; i < attributes.length; i++) { - var name = attributes[i].name; - if (name && name.name === TRACE_ID) { - return; - } - } - - if (!state.fileNameIdentifier) { - var fileName = state.file.log.filename !== "unknown" ? state.file.log.filename : null; - - var fileNameIdentifier = path.scope.generateUidIdentifier(FILE_NAME_VAR); - path.hub.file.scope.push({ id: fileNameIdentifier, init: t.stringLiteral(fileName) }); - state.fileNameIdentifier = fileNameIdentifier; - } - - var trace = makeTrace(state.fileNameIdentifier, location.start.line); - attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace))); - } - }; - - return { - visitor: visitor - }; -}; - -var TRACE_ID = "__source"; -var FILE_NAME_VAR = "_jsxFileName"; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/package.json deleted file mode 100644 index e243210..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx-source/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-react-jsx-source@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx-source", - "name": "babel-plugin-transform-react-jsx-source", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react" - ] - ], - "_from": "babel-plugin-transform-react-jsx-source@>=6.22.0 <7.0.0", - "_id": "babel-plugin-transform-react-jsx-source@6.22.0", - "_inCache": true, - "_location": "/babel-plugin-transform-react-jsx-source", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-react-jsx-source-6.22.0.tgz_1484872456850_0.6164425157476217" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-react-jsx-source@^6.22.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx-source", - "name": "babel-plugin-transform-react-jsx-source", - "rawSpec": "^6.22.0", - "spec": ">=6.22.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-react" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", - "_shasum": "66ac12153f5cd2d17b3c19268f4bf0197f44ecd6", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-react-jsx-source@^6.22.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react", - "dependencies": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - }, - "description": "Add a __source prop to all JSX Elements", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "66ac12153f5cd2d17b3c19268f4bf0197f44ecd6", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-react-jsx-source", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source" - }, - "scripts": {}, - "version": "6.22.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/README.md deleted file mode 100644 index 128536d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# babel-plugin-transform-react-jsx - -> Turn JSX into React function calls - -## Example - -### React - -**In** - -```javascript -var profile =
- -

{[user.firstName, user.lastName].join(' ')}

-
; -``` - -**Out** - -```javascript -var profile = React.createElement("div", null, - React.createElement("img", { src: "avatar.png", className: "profile" }), - React.createElement("h3", null, [user.firstName, user.lastName].join(" ")) -); -``` - -### Custom - -**In** - -```javascript -/** @jsx dom */ - -var { dom } = require("deku"); - -var profile =
- -

{[user.firstName, user.lastName].join(' ')}

-
; -``` - -**Out** - -```javascript -/** @jsx dom */ - -var dom = require("deku").dom; - -var profile = dom( "div", null, - dom("img", { src: "avatar.png", className: "profile" }), - dom("h3", null, [user.firstName, user.lastName].join(" ")) -); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-react-jsx -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-react-jsx"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-react-jsx", { - "pragma": "dom" // default pragma is React.createElement - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-react-jsx script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-react-jsx"] -}); -``` - -## Options - -### `pragma` - -`string`, defaults to `React.createElement`. - -Replace the function used when compiling JSX expressions. - -Note that the `@jsx React.DOM` pragma has been deprecated as of React v0.12 - -### `useBuiltIns` - -`boolean`, defaults to `false`. - -When spreading props, use `Object.assign` directly instead of Babel's extend helper. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/lib/index.js deleted file mode 100644 index 51bfe0f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/lib/index.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (_ref) { - var t = _ref.types; - - var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/; - - var visitor = (0, _babelHelperBuilderReactJsx2.default)({ - pre: function pre(state) { - var tagName = state.tagName; - var args = state.args; - if (t.react.isCompatTag(tagName)) { - args.push(t.stringLiteral(tagName)); - } else { - args.push(state.tagExpr); - } - }, - post: function post(state, pass) { - state.callee = pass.get("jsxIdentifier")(); - } - }); - - visitor.Program = function (path, state) { - var file = state.file; - - var id = state.opts.pragma || "React.createElement"; - - for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var comment = _ref2; - - var matches = JSX_ANNOTATION_REGEX.exec(comment.value); - if (matches) { - id = matches[1]; - if (id === "React.DOM") { - throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12"); - } else { - break; - } - } - } - - state.set("jsxIdentifier", function () { - return id.split(".").map(function (name) { - return t.identifier(name); - }).reduce(function (object, property) { - return t.memberExpression(object, property); - }); - }); - }; - - return { - inherits: _babelPluginSyntaxJsx2.default, - visitor: visitor - }; -}; - -var _babelPluginSyntaxJsx = require("babel-plugin-syntax-jsx"); - -var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx); - -var _babelHelperBuilderReactJsx = require("babel-helper-builder-react-jsx"); - -var _babelHelperBuilderReactJsx2 = _interopRequireDefault(_babelHelperBuilderReactJsx); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/package.json deleted file mode 100644 index 5eaf88b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-react-jsx/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-react-jsx@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx", - "name": "babel-plugin-transform-react-jsx", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-plugin-transform-react-jsx@>=6.5.0 <7.0.0", - "_id": "babel-plugin-transform-react-jsx@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-react-jsx", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-react-jsx-6.24.1.tgz_1491578353896_0.45240585040301085" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-react-jsx@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-react-jsx", - "name": "babel-plugin-transform-react-jsx", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-react", - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", - "_shasum": "840a028e7df460dfc3a2d29f0c0d91f6376e66a3", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-react-jsx@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "dependencies": { - "babel-helper-builder-react-jsx": "^6.24.1", - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - }, - "description": "Turn JSX into React function calls", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "840a028e7df460dfc3a2d29f0c0d91f6376e66a3", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-react-jsx", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/README.md deleted file mode 100644 index c169863..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# babel-plugin-transform-regenerator - -> Transform async/generator functions with [regenerator](https://github.com/facebook/regenerator) - -## Example - -**In** - -```javascript -function* a() { - yield 1; -} -``` - -**Out** - -```javascript -var _marked = [a].map(regeneratorRuntime.mark); - -function a() { - return regeneratorRuntime.wrap(function a$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return 1; - - case 2: - case "end": - return _context.stop(); - } - } - }, _marked[0], this); -} -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-regenerator -``` - -## Usage - -### Via `.babelrc` (Recommended) - -Without options: - -```json -{ - "plugins": ["transform-regenerator"] -} -``` - -With options: - -|name|default value| -|---|---| -|asyncGenerators|true| -|generators|true| -|async|true| - -```json -{ - "plugins": [ - ["transform-regenerator", { - "asyncGenerators": false, - "generators": false, - "async": false - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-regenerator script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-regenerator"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/lib/index.js deleted file mode 100644 index 7296275..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("regenerator-transform"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package-lock.json deleted file mode 100644 index c6e5a41..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package-lock.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "babel-plugin-transform-regenerator", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", - "requires": { - "core-js": "2.5.0", - "regenerator-runtime": "0.10.5" - } - }, - "babel-types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", - "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", - "requires": { - "babel-runtime": "6.25.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" - } - }, - "core-js": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "private": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" - }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - }, - "regenerator-transform": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.0.tgz", - "integrity": "sha512-0oMTqaJuM3Q6RWqts6U0/ijW3xcnY8d/KimL3IkQW1zib1gmSb1lKoFKNF+kSDmriGESlOHcwoI1XpXKNEGcLg==", - "requires": { - "babel-runtime": "6.25.0", - "babel-types": "6.25.0", - "private": "0.1.7" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package.json deleted file mode 100644 index 49908d1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-regenerator@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-regenerator", - "name": "babel-plugin-transform-regenerator", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015" - ] - ], - "_from": "babel-plugin-transform-regenerator@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-regenerator@6.26.0", - "_inCache": true, - "_location": "/babel-plugin-transform-regenerator", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-plugin-transform-regenerator-6.26.0.tgz_1502898849637_0.9644891484640539" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-regenerator@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-regenerator", - "name": "babel-plugin-transform-regenerator", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-es2015" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "_shasum": "e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-regenerator@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015", - "author": { - "name": "Ben Newman", - "email": "bn@cs.stanford.edu" - }, - "dependencies": { - "regenerator-transform": "^0.10.0" - }, - "description": "Explode async and generator functions into a state machine.", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz" - }, - "homepage": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-plugin-transform-regenerator", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/README.md deleted file mode 100644 index ff42d7e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/README.md +++ /dev/null @@ -1,231 +0,0 @@ -# babel-plugin-transform-runtime - -> Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals. (This plugin is recommended in a library/tool) - -NOTE: Instance methods such as `"foobar".includes("foo")` will not work since that would require modification of existing builtins (Use [`babel-polyfill`](http://babeljs.io/docs/usage/polyfill) for that). - -## Why? - -Babel uses very small helpers for common functions such as `_extend`. By default this will be added to every file that requires it. This duplication is sometimes unnecessary, especially when your application is spread out over multiple files. - -This is where the `transform-runtime` plugin comes in: all of the helpers will reference the module `babel-runtime` to avoid duplication across your compiled output. The runtime will be compiled into your build. - -Another purpose of this transformer is to create a sandboxed environment for your code. If you use [babel-polyfill](http://babeljs.io/docs/usage/polyfill/) and the built-ins it provides such as `Promise`, `Set` and `Map`, those will pollute the global scope. While this might be ok for an app or a command line tool, it becomes a problem if your code is a library which you intend to publish for others to use or if you can't exactly control the environment in which your code will run. - -The transformer will alias these built-ins to `core-js` so you can use them seamlessly without having to require the polyfill. - -See the [technical details](#technical-details) section for more information on how this works and the types of transformations that occur. - -## Installation - -**NOTE - Production vs. development dependencies** - -In most cases, you should install `babel-plugin-transform-runtime` as a development dependency (with `--save-dev`). - -```sh -npm install --save-dev babel-plugin-transform-runtime -``` - -and `babel-runtime` as a production dependency (with `--save`). - -```sh -npm install --save babel-runtime -``` - -The transformation plugin is typically used only in development, but the runtime itself will be depended on by your deployed/published code. See the examples below for more details. - -## Usage - -### Via `.babelrc` (Recommended) - -Add the following line to your `.babelrc` file: - -```js -// without options -{ - "plugins": ["transform-runtime"] -} - -// with options -{ - "plugins": [ - ["transform-runtime", { - "helpers": false, // defaults to true - "polyfill": false, // defaults to true - "regenerator": true, // defaults to true - "moduleName": "babel-runtime" // defaults to "babel-runtime" - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-runtime script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-runtime"] -}); -``` - -## Technical details - -The `runtime` transformer plugin does three things: - -* Automatically requires `babel-runtime/regenerator` when you use generators/async functions. -* Automatically requires `babel-runtime/core-js` and maps ES6 static methods and built-ins. -* Removes the inline babel helpers and uses the module `babel-runtime/helpers` instead. - -What does this actually mean though? Basically, you can use built-ins such as `Promise`, `Set`, `Symbol` etc as well use all the Babel features that require a polyfill seamlessly, without global pollution, making it extremely suitable for libraries. - -Make sure you include `babel-runtime` as a dependency. - -### Regenerator aliasing - -Whenever you use a generator function or async function: - -```javascript -function* foo() { - -} -``` - -the following is generated: - -```javascript -"use strict"; - -var _marked = [foo].map(regeneratorRuntime.mark); - -function foo() { - return regeneratorRuntime.wrap(function foo$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - case "end": - return _context.stop(); - } - }, _marked[0], this); -} -``` - -This isn't ideal as then you have to include the regenerator runtime which -pollutes the global scope. - -Instead what the `runtime` transformer does it compile that to: - -```javascript -"use strict"; - -var _regenerator = require("babel-runtime/regenerator"); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _marked = [foo].map(_regenerator2.default.mark); - -function foo() { - return regeneratorRuntime.wrap(function foo$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - case "end": - return _context.stop(); - } - }, _marked[0], this); -} -``` - -This means that you can use the regenerator runtime without polluting your current environment. - -### `core-js` aliasing - -Sometimes you may want to use new built-ins such as `Map`, `Set`, `Promise` etc. Your only way -to use these is usually to include a globally polluting polyfill. - -What the `runtime` transformer does is transform the following: - -```javascript -var sym = Symbol(); - -var promise = new Promise; - -console.log(arr[Symbol.iterator]()); -``` - -into the following: - -```javascript -"use strict"; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _promise = require("babel-runtime/core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var sym = (0, _symbol2.default)(); - -var promise = new _promise2.default(); - -console.log((0, _getIterator3.default)(arr)); -``` - -This means is that you can seamlessly use these native built-ins and static methods -without worrying about where they come from. - -**NOTE:** Instance methods such as `"foobar".includes("foo")` will **not** work. - -### Helper aliasing - -Usually babel will place helpers at the top of your file to do common tasks to avoid -duplicating the code around in the current file. Sometimes these helpers can get a -little bulky and add unnecessary duplication across files. The `runtime` -transformer replaces all the helper calls to a module. - -That means that the following code: - -```javascript -class Person { -} -``` - -usually turns into: - -```javascript -"use strict"; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Person = function Person() { - _classCallCheck(this, Person); -}; -``` - -the `runtime` transformer however turns this into: - -```javascript -"use strict"; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Person = function Person() { - (0, _classCallCheck3.default)(this, Person); -}; -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/definitions.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/definitions.js deleted file mode 100644 index be58bd3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/definitions.js +++ /dev/null @@ -1,191 +0,0 @@ -"use strict"; - -module.exports = { - builtins: { - Symbol: "symbol", - Promise: "promise", - Map: "map", - WeakMap: "weak-map", - Set: "set", - WeakSet: "weak-set", - Observable: "observable", - setImmediate: "set-immediate", - clearImmediate: "clear-immediate", - asap: "asap" - }, - - methods: { - Array: { - concat: "array/concat", - copyWithin: "array/copy-within", - entries: "array/entries", - every: "array/every", - fill: "array/fill", - filter: "array/filter", - findIndex: "array/find-index", - find: "array/find", - forEach: "array/for-each", - from: "array/from", - includes: "array/includes", - indexOf: "array/index-of", - - join: "array/join", - keys: "array/keys", - lastIndexOf: "array/last-index-of", - map: "array/map", - of: "array/of", - pop: "array/pop", - push: "array/push", - reduceRight: "array/reduce-right", - reduce: "array/reduce", - reverse: "array/reverse", - shift: "array/shift", - slice: "array/slice", - some: "array/some", - sort: "array/sort", - splice: "array/splice", - unshift: "array/unshift", - values: "array/values" - }, - - JSON: { - stringify: "json/stringify" - }, - - Object: { - assign: "object/assign", - create: "object/create", - defineProperties: "object/define-properties", - defineProperty: "object/define-property", - entries: "object/entries", - freeze: "object/freeze", - getOwnPropertyDescriptor: "object/get-own-property-descriptor", - getOwnPropertyDescriptors: "object/get-own-property-descriptors", - getOwnPropertyNames: "object/get-own-property-names", - getOwnPropertySymbols: "object/get-own-property-symbols", - getPrototypeOf: "object/get-prototype-of", - isExtensible: "object/is-extensible", - isFrozen: "object/is-frozen", - isSealed: "object/is-sealed", - is: "object/is", - keys: "object/keys", - preventExtensions: "object/prevent-extensions", - seal: "object/seal", - setPrototypeOf: "object/set-prototype-of", - values: "object/values" - }, - - RegExp: { - escape: "regexp/escape" }, - - Math: { - acosh: "math/acosh", - asinh: "math/asinh", - atanh: "math/atanh", - cbrt: "math/cbrt", - clz32: "math/clz32", - cosh: "math/cosh", - expm1: "math/expm1", - fround: "math/fround", - hypot: "math/hypot", - imul: "math/imul", - log10: "math/log10", - log1p: "math/log1p", - log2: "math/log2", - sign: "math/sign", - sinh: "math/sinh", - tanh: "math/tanh", - trunc: "math/trunc", - iaddh: "math/iaddh", - isubh: "math/isubh", - imulh: "math/imulh", - umulh: "math/umulh" - }, - - Symbol: { - for: "symbol/for", - hasInstance: "symbol/has-instance", - isConcatSpreadable: "symbol/is-concat-spreadable", - iterator: "symbol/iterator", - keyFor: "symbol/key-for", - match: "symbol/match", - replace: "symbol/replace", - search: "symbol/search", - species: "symbol/species", - split: "symbol/split", - toPrimitive: "symbol/to-primitive", - toStringTag: "symbol/to-string-tag", - unscopables: "symbol/unscopables" - }, - - String: { - at: "string/at", - codePointAt: "string/code-point-at", - endsWith: "string/ends-with", - fromCodePoint: "string/from-code-point", - includes: "string/includes", - matchAll: "string/match-all", - padLeft: "string/pad-left", - padRight: "string/pad-right", - padStart: "string/pad-start", - padEnd: "string/pad-end", - raw: "string/raw", - repeat: "string/repeat", - startsWith: "string/starts-with", - trim: "string/trim", - trimLeft: "string/trim-left", - trimRight: "string/trim-right", - trimStart: "string/trim-start", - trimEnd: "string/trim-end" - }, - - Number: { - EPSILON: "number/epsilon", - isFinite: "number/is-finite", - isInteger: "number/is-integer", - isNaN: "number/is-nan", - isSafeInteger: "number/is-safe-integer", - MAX_SAFE_INTEGER: "number/max-safe-integer", - MIN_SAFE_INTEGER: "number/min-safe-integer", - parseFloat: "number/parse-float", - parseInt: "number/parse-int" - }, - - Reflect: { - apply: "reflect/apply", - construct: "reflect/construct", - defineProperty: "reflect/define-property", - deleteProperty: "reflect/delete-property", - enumerate: "reflect/enumerate", - getOwnPropertyDescriptor: "reflect/get-own-property-descriptor", - getPrototypeOf: "reflect/get-prototype-of", - get: "reflect/get", - has: "reflect/has", - isExtensible: "reflect/is-extensible", - ownKeys: "reflect/own-keys", - preventExtensions: "reflect/prevent-extensions", - setPrototypeOf: "reflect/set-prototype-of", - set: "reflect/set", - defineMetadata: "reflect/define-metadata", - deleteMetadata: "reflect/delete-metadata", - getMetadata: "reflect/get-metadata", - getMetadataKeys: "reflect/get-metadata-keys", - getOwnMetadata: "reflect/get-own-metadata", - getOwnMetadataKeys: "reflect/get-own-metadata-keys", - hasMetadata: "reflect/has-metadata", - hasOwnMetadata: "reflect/has-own-metadata", - metadata: "reflect/metadata" - }, - - System: { - global: "system/global" - }, - - Error: { - isError: "error/is-error" }, - - Date: {}, - - Function: {} - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/index.js deleted file mode 100644 index 34e3f3f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/lib/index.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.definitions = undefined; - -exports.default = function (_ref) { - var t = _ref.types; - - function getRuntimeModuleName(opts) { - return opts.moduleName || "babel-runtime"; - } - - function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); - } - - var HELPER_BLACKLIST = ["interopRequireWildcard", "interopRequireDefault"]; - - return { - pre: function pre(file) { - var moduleName = getRuntimeModuleName(this.opts); - - if (this.opts.helpers !== false) { - file.set("helperGenerator", function (name) { - if (HELPER_BLACKLIST.indexOf(name) < 0) { - return file.addImport(moduleName + "/helpers/" + name, "default", name); - } - }); - } - - this.setDynamic("regeneratorIdentifier", function () { - return file.addImport(moduleName + "/regenerator", "default", "regeneratorRuntime"); - }); - }, - - - visitor: { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - var node = path.node, - parent = path.parent, - scope = path.scope; - - - if (node.name === "regeneratorRuntime" && state.opts.regenerator !== false) { - path.replaceWith(state.get("regeneratorIdentifier")); - return; - } - - if (state.opts.polyfill === false) return; - - if (t.isMemberExpression(parent)) return; - if (!has(_definitions2.default.builtins, node.name)) return; - if (scope.getBindingIdentifier(node.name)) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[node.name], "default", node.name)); - }, - CallExpression: function CallExpression(path, state) { - if (state.opts.polyfill === false) return; - - if (path.node.arguments.length) return; - - var callee = path.node.callee; - if (!t.isMemberExpression(callee)) return; - if (!callee.computed) return; - if (!path.get("callee.property").matchesPattern("Symbol.iterator")) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/get-iterator", "default", "getIterator"), [callee.object])); - }, - BinaryExpression: function BinaryExpression(path, state) { - if (state.opts.polyfill === false) return; - - if (path.node.operator !== "in") return; - if (!path.get("left").matchesPattern("Symbol.iterator")) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/is-iterable", "default", "isIterable"), [path.node.right])); - }, - - MemberExpression: { - enter: function enter(path, state) { - if (state.opts.polyfill === false) return; - if (!path.isReferenced()) return; - - var node = path.node; - - var obj = node.object; - var prop = node.property; - - if (!t.isReferenced(obj, node)) return; - if (node.computed) return; - if (!has(_definitions2.default.methods, obj.name)) return; - - var methods = _definitions2.default.methods[obj.name]; - if (!has(methods, prop.name)) return; - - if (path.scope.getBindingIdentifier(obj.name)) return; - - if (obj.name === "Object" && prop.name === "defineProperty" && path.parentPath.isCallExpression()) { - var call = path.parentPath.node; - if (call.arguments.length === 3 && t.isLiteral(call.arguments[1])) return; - } - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(state.addImport(moduleName + "/core-js/" + methods[prop.name], "default", obj.name + "$" + prop.name)); - }, - exit: function exit(path, state) { - if (state.opts.polyfill === false) return; - if (!path.isReferenced()) return; - - var node = path.node; - - var obj = node.object; - - if (!has(_definitions2.default.builtins, obj.name)) return; - if (path.scope.getBindingIdentifier(obj.name)) return; - - var moduleName = getRuntimeModuleName(state.opts); - path.replaceWith(t.memberExpression(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[obj.name], "default", obj.name), node.property, node.computed)); - } - } - } - }; -}; - -var _definitions = require("./definitions"); - -var _definitions2 = _interopRequireDefault(_definitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.definitions = _definitions2.default; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/package.json deleted file mode 100644 index e12369f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-runtime/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-runtime@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-runtime", - "name": "babel-plugin-transform-runtime", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-plugin-transform-runtime@>=6.5.0 <7.0.0", - "_id": "babel-plugin-transform-runtime@6.23.0", - "_inCache": true, - "_location": "/babel-plugin-transform-runtime", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-runtime-6.23.0.tgz_1487027065879_0.5762181608006358" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-runtime@^6.5.0", - "scope": null, - "escapedName": "babel-plugin-transform-runtime", - "name": "babel-plugin-transform-runtime", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", - "_shasum": "88490d446502ea9b8e7efb0fe09ec4d99479b1ee", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-runtime@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "dependencies": { - "babel-runtime": "^6.22.0" - }, - "description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.22.0" - }, - "directories": {}, - "dist": { - "shasum": "88490d446502ea9b8e7efb0fe09ec4d99479b1ee", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-runtime", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/README.md deleted file mode 100644 index 08c5afe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# babel-plugin-transform-strict-mode - -> This plugin places a `"use strict";` directive at the top of all files to enable [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). - -This plugin may be enabled via `babel-plugin-transform-es2015-modules-commonjs`. -If you wish to disable it you can either turn `strict` off or pass -`strictMode: false` as an option to the commonjs transform. - -## Example - -**In** - -```javascript -foo(); -``` - -**Out** - -```javascript -"use strict"; - -foo(); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-strict-mode -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-strict-mode"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-strict-mode", { - "strict": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-strict-mode script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-strict-mode"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/lib/index.js deleted file mode 100644 index 3b60e64..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/lib/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function () { - return { - visitor: { - Program: function Program(path, state) { - if (state.opts.strict === false || state.opts.strictMode === false) return; - - var node = path.node; - - - for (var _iterator = node.directives, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var directive = _ref; - - if (directive.value.value === "use strict") return; - } - - path.unshiftContainer("directives", t.directive(t.directiveLiteral("use strict"))); - } - } - }; -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/package.json deleted file mode 100644 index 7da31c8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-strict-mode/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-plugin-transform-strict-mode@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-strict-mode", - "name": "babel-plugin-transform-strict-mode", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs" - ] - ], - "_from": "babel-plugin-transform-strict-mode@>=6.24.1 <7.0.0", - "_id": "babel-plugin-transform-strict-mode@6.24.1", - "_inCache": true, - "_location": "/babel-plugin-transform-strict-mode", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-plugin-transform-strict-mode-6.24.1.tgz_1491578349467_0.8609954498242587" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-plugin-transform-strict-mode@^6.24.1", - "scope": null, - "escapedName": "babel-plugin-transform-strict-mode", - "name": "babel-plugin-transform-strict-mode", - "rawSpec": "^6.24.1", - "spec": ">=6.24.1 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-modules-commonjs" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "_shasum": "d5faf7aa578a65bbe591cf5edae04a0c67020758", - "_shrinkwrap": null, - "_spec": "babel-plugin-transform-strict-mode@^6.24.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-modules-commonjs", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "description": "This plugin places a 'use strict'; directive at the top of all files to enable strict mode", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "d5faf7aa578a65bbe591cf5edae04a0c67020758", - "tarball": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-plugin-transform-strict-mode", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-strict-mode" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/README.md deleted file mode 100644 index 77340ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# babel-preset-es2015 - -> Babel preset for all es2015 plugins. - -## Install - -```sh -npm install --save-dev babel-preset-es2015 -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "presets": ["es2015"] -} -``` - -### Via CLI - -```sh -babel script.js --presets es2015 -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - presets: ["es2015"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false`. - -Enable "loose" transformations for any plugins in this preset that allow them. - -### `modules` - -`"amd" | "umd" | "systemjs" | "commonjs" | false`, defaults to `"commonjs"`. - -Enable transformation of ES6 module syntax to another module type. - -Setting this to `false` will not transform modules. - -### `spec` - -`boolean`, defaults to `false`. - -Enable "spec" transformations for any plugins in this preset that allow them. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/lib/index.js deleted file mode 100644 index dcf46ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/lib/index.js +++ /dev/null @@ -1,140 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _babelPluginTransformEs2015TemplateLiterals = require("babel-plugin-transform-es2015-template-literals"); - -var _babelPluginTransformEs2015TemplateLiterals2 = _interopRequireDefault(_babelPluginTransformEs2015TemplateLiterals); - -var _babelPluginTransformEs2015Literals = require("babel-plugin-transform-es2015-literals"); - -var _babelPluginTransformEs2015Literals2 = _interopRequireDefault(_babelPluginTransformEs2015Literals); - -var _babelPluginTransformEs2015FunctionName = require("babel-plugin-transform-es2015-function-name"); - -var _babelPluginTransformEs2015FunctionName2 = _interopRequireDefault(_babelPluginTransformEs2015FunctionName); - -var _babelPluginTransformEs2015ArrowFunctions = require("babel-plugin-transform-es2015-arrow-functions"); - -var _babelPluginTransformEs2015ArrowFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015ArrowFunctions); - -var _babelPluginTransformEs2015BlockScopedFunctions = require("babel-plugin-transform-es2015-block-scoped-functions"); - -var _babelPluginTransformEs2015BlockScopedFunctions2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScopedFunctions); - -var _babelPluginTransformEs2015Classes = require("babel-plugin-transform-es2015-classes"); - -var _babelPluginTransformEs2015Classes2 = _interopRequireDefault(_babelPluginTransformEs2015Classes); - -var _babelPluginTransformEs2015ObjectSuper = require("babel-plugin-transform-es2015-object-super"); - -var _babelPluginTransformEs2015ObjectSuper2 = _interopRequireDefault(_babelPluginTransformEs2015ObjectSuper); - -var _babelPluginTransformEs2015ShorthandProperties = require("babel-plugin-transform-es2015-shorthand-properties"); - -var _babelPluginTransformEs2015ShorthandProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ShorthandProperties); - -var _babelPluginTransformEs2015DuplicateKeys = require("babel-plugin-transform-es2015-duplicate-keys"); - -var _babelPluginTransformEs2015DuplicateKeys2 = _interopRequireDefault(_babelPluginTransformEs2015DuplicateKeys); - -var _babelPluginTransformEs2015ComputedProperties = require("babel-plugin-transform-es2015-computed-properties"); - -var _babelPluginTransformEs2015ComputedProperties2 = _interopRequireDefault(_babelPluginTransformEs2015ComputedProperties); - -var _babelPluginTransformEs2015ForOf = require("babel-plugin-transform-es2015-for-of"); - -var _babelPluginTransformEs2015ForOf2 = _interopRequireDefault(_babelPluginTransformEs2015ForOf); - -var _babelPluginTransformEs2015StickyRegex = require("babel-plugin-transform-es2015-sticky-regex"); - -var _babelPluginTransformEs2015StickyRegex2 = _interopRequireDefault(_babelPluginTransformEs2015StickyRegex); - -var _babelPluginTransformEs2015UnicodeRegex = require("babel-plugin-transform-es2015-unicode-regex"); - -var _babelPluginTransformEs2015UnicodeRegex2 = _interopRequireDefault(_babelPluginTransformEs2015UnicodeRegex); - -var _babelPluginCheckEs2015Constants = require("babel-plugin-check-es2015-constants"); - -var _babelPluginCheckEs2015Constants2 = _interopRequireDefault(_babelPluginCheckEs2015Constants); - -var _babelPluginTransformEs2015Spread = require("babel-plugin-transform-es2015-spread"); - -var _babelPluginTransformEs2015Spread2 = _interopRequireDefault(_babelPluginTransformEs2015Spread); - -var _babelPluginTransformEs2015Parameters = require("babel-plugin-transform-es2015-parameters"); - -var _babelPluginTransformEs2015Parameters2 = _interopRequireDefault(_babelPluginTransformEs2015Parameters); - -var _babelPluginTransformEs2015Destructuring = require("babel-plugin-transform-es2015-destructuring"); - -var _babelPluginTransformEs2015Destructuring2 = _interopRequireDefault(_babelPluginTransformEs2015Destructuring); - -var _babelPluginTransformEs2015BlockScoping = require("babel-plugin-transform-es2015-block-scoping"); - -var _babelPluginTransformEs2015BlockScoping2 = _interopRequireDefault(_babelPluginTransformEs2015BlockScoping); - -var _babelPluginTransformEs2015TypeofSymbol = require("babel-plugin-transform-es2015-typeof-symbol"); - -var _babelPluginTransformEs2015TypeofSymbol2 = _interopRequireDefault(_babelPluginTransformEs2015TypeofSymbol); - -var _babelPluginTransformEs2015ModulesCommonjs = require("babel-plugin-transform-es2015-modules-commonjs"); - -var _babelPluginTransformEs2015ModulesCommonjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesCommonjs); - -var _babelPluginTransformEs2015ModulesSystemjs = require("babel-plugin-transform-es2015-modules-systemjs"); - -var _babelPluginTransformEs2015ModulesSystemjs2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesSystemjs); - -var _babelPluginTransformEs2015ModulesAmd = require("babel-plugin-transform-es2015-modules-amd"); - -var _babelPluginTransformEs2015ModulesAmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesAmd); - -var _babelPluginTransformEs2015ModulesUmd = require("babel-plugin-transform-es2015-modules-umd"); - -var _babelPluginTransformEs2015ModulesUmd2 = _interopRequireDefault(_babelPluginTransformEs2015ModulesUmd); - -var _babelPluginTransformRegenerator = require("babel-plugin-transform-regenerator"); - -var _babelPluginTransformRegenerator2 = _interopRequireDefault(_babelPluginTransformRegenerator); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function preset(context) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var moduleTypes = ["commonjs", "amd", "umd", "systemjs"]; - var loose = false; - var modules = "commonjs"; - var spec = false; - - if (opts !== undefined) { - if (opts.loose !== undefined) loose = opts.loose; - if (opts.modules !== undefined) modules = opts.modules; - if (opts.spec !== undefined) spec = opts.spec; - } - - if (typeof loose !== "boolean") throw new Error("Preset es2015 'loose' option must be a boolean."); - if (typeof spec !== "boolean") throw new Error("Preset es2015 'spec' option must be a boolean."); - if (modules !== false && moduleTypes.indexOf(modules) === -1) { - throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\n" + "or a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'"); - } - - var optsLoose = { loose: loose }; - - return { - plugins: [[_babelPluginTransformEs2015TemplateLiterals2.default, { loose: loose, spec: spec }], _babelPluginTransformEs2015Literals2.default, _babelPluginTransformEs2015FunctionName2.default, [_babelPluginTransformEs2015ArrowFunctions2.default, { spec: spec }], _babelPluginTransformEs2015BlockScopedFunctions2.default, [_babelPluginTransformEs2015Classes2.default, optsLoose], _babelPluginTransformEs2015ObjectSuper2.default, _babelPluginTransformEs2015ShorthandProperties2.default, _babelPluginTransformEs2015DuplicateKeys2.default, [_babelPluginTransformEs2015ComputedProperties2.default, optsLoose], [_babelPluginTransformEs2015ForOf2.default, optsLoose], _babelPluginTransformEs2015StickyRegex2.default, _babelPluginTransformEs2015UnicodeRegex2.default, _babelPluginCheckEs2015Constants2.default, [_babelPluginTransformEs2015Spread2.default, optsLoose], _babelPluginTransformEs2015Parameters2.default, [_babelPluginTransformEs2015Destructuring2.default, optsLoose], _babelPluginTransformEs2015BlockScoping2.default, _babelPluginTransformEs2015TypeofSymbol2.default, modules === "commonjs" && [_babelPluginTransformEs2015ModulesCommonjs2.default, optsLoose], modules === "systemjs" && [_babelPluginTransformEs2015ModulesSystemjs2.default, optsLoose], modules === "amd" && [_babelPluginTransformEs2015ModulesAmd2.default, optsLoose], modules === "umd" && [_babelPluginTransformEs2015ModulesUmd2.default, optsLoose], [_babelPluginTransformRegenerator2.default, { async: false, asyncGenerators: false }]].filter(Boolean) }; -} - -var oldConfig = preset({}); - -exports.default = oldConfig; - -Object.defineProperty(oldConfig, "buildPreset", { - configurable: true, - writable: true, - - enumerable: false, - value: preset -}); -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/package.json deleted file mode 100644 index 0591e0c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-es2015/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-preset-es2015@^6.5.0", - "scope": null, - "escapedName": "babel-preset-es2015", - "name": "babel-preset-es2015", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-preset-es2015@>=6.5.0 <7.0.0", - "_id": "babel-preset-es2015@6.24.1", - "_inCache": true, - "_location": "/babel-preset-es2015", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-preset-es2015-6.24.1.tgz_1491578381678_0.9453926899004728" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-preset-es2015@^6.5.0", - "scope": null, - "escapedName": "babel-preset-es2015", - "name": "babel-preset-es2015", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "_shasum": "d44050d6bc2c9feea702aaf38d727a0210538939", - "_shrinkwrap": null, - "_spec": "babel-preset-es2015@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" - }, - "description": "Babel preset for all es2015 plugins.", - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1", - "babel-helper-transform-fixture-test-runner": "^6.24.1" - }, - "directories": {}, - "dist": { - "shasum": "d44050d6bc2c9feea702aaf38d727a0210538939", - "tarball": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-preset-es2015", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-preset-es2015" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/README.md deleted file mode 100644 index 26593bd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# babel-preset-flow - -> Babel preset for all Flow plugins. - -This preset includes the following plugins: - -- [transform-flow-strip-types](https://babeljs.io/docs/plugins/transform-flow-strip-types/) - -## Example - -**In** - -```javascript -function foo(one: any, two: number, three?): string {} -``` - -**Out** - -```javascript -function foo(one, two, three) {} -``` - -## Installation - -```sh -npm install --save-dev babel-preset-flow -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "presets": ["flow"] -} -``` - -### Via CLI - -```sh -babel --presets flow script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - presets: ["flow"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/lib/index.js deleted file mode 100644 index e967162..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/lib/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _babelPluginTransformFlowStripTypes = require("babel-plugin-transform-flow-strip-types"); - -var _babelPluginTransformFlowStripTypes2 = _interopRequireDefault(_babelPluginTransformFlowStripTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - plugins: [_babelPluginTransformFlowStripTypes2.default] -}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/package.json deleted file mode 100644 index ca8d33e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-flow/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-preset-flow@^6.23.0", - "scope": null, - "escapedName": "babel-preset-flow", - "name": "babel-preset-flow", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react" - ] - ], - "_from": "babel-preset-flow@>=6.23.0 <7.0.0", - "_id": "babel-preset-flow@6.23.0", - "_inCache": true, - "_location": "/babel-preset-flow", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/babel-preset-flow-6.23.0.tgz_1487034855931_0.6768502427730709" - }, - "_npmUser": { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-preset-flow@^6.23.0", - "scope": null, - "escapedName": "babel-preset-flow", - "name": "babel-preset-flow", - "rawSpec": "^6.23.0", - "spec": ">=6.23.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-preset-react" - ], - "_resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", - "_shasum": "e71218887085ae9a24b5be4169affb599816c49d", - "_shrinkwrap": null, - "_spec": "babel-preset-flow@^6.23.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react", - "author": { - "name": "James Kyle", - "email": "me@thejameskyle.com" - }, - "dependencies": { - "babel-plugin-transform-flow-strip-types": "^6.22.0" - }, - "description": "Babel preset for all Flow plugins.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "e71218887085ae9a24b5be4169affb599816c49d", - "tarball": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz" - }, - "keywords": [ - "babel-preset", - "flowtype", - "flow", - "types" - ], - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "simnalamburt", - "email": "simnalamburt@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-preset-flow", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-preset-flow" - }, - "scripts": {}, - "version": "6.23.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/README.md deleted file mode 100644 index 591a595..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# babel-preset-react - -> Babel preset for all React plugins. - -This preset includes the following plugins/presets: - -- [preset-flow](https://babeljs.io/docs/plugins/preset-flow/) -- [syntax-jsx](https://babeljs.io/docs/plugins/syntax-jsx/) -- [transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/) -- [transform-react-display-name](https://babeljs.io/docs/plugins/transform-react-display-name/) - -## Install - -> You can also check out the React [Getting Started page](https://facebook.github.io/react/docs/hello-world.html) - -> For more info, check out the setup page on the [cli](/docs/setup/) and the [usage](/docs/usage/cli/) docs. - -Install the CLI and this preset - -```sh -npm install --save-dev babel-cli babel-preset-react -``` - -Make a .babelrc config file with the preset - -```sh -echo '{ "presets": ["react"] }' > .babelrc -``` - -Create a file to run on - -```sh -echo '

Hello, world!

' > index.js -``` - -View the output - -```sh -./node_modules/.bin/babel index.js -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "presets": ["react"] -} -``` - -### Via CLI - -```sh -babel script.js --presets react -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - presets: ["react"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/lib/index.js deleted file mode 100644 index 3236195..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/lib/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _babelPresetFlow = require("babel-preset-flow"); - -var _babelPresetFlow2 = _interopRequireDefault(_babelPresetFlow); - -var _babelPluginTransformReactJsx = require("babel-plugin-transform-react-jsx"); - -var _babelPluginTransformReactJsx2 = _interopRequireDefault(_babelPluginTransformReactJsx); - -var _babelPluginSyntaxJsx = require("babel-plugin-syntax-jsx"); - -var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx); - -var _babelPluginTransformReactDisplayName = require("babel-plugin-transform-react-display-name"); - -var _babelPluginTransformReactDisplayName2 = _interopRequireDefault(_babelPluginTransformReactDisplayName); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - presets: [_babelPresetFlow2.default], - plugins: [_babelPluginTransformReactJsx2.default, _babelPluginSyntaxJsx2.default, _babelPluginTransformReactDisplayName2.default], - env: { - development: { - plugins: [] - } - } -}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/package.json deleted file mode 100644 index 963fce7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-preset-react/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-preset-react@^6.5.0", - "scope": null, - "escapedName": "babel-preset-react", - "name": "babel-preset-react", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "babel-preset-react@>=6.5.0 <7.0.0", - "_id": "babel-preset-react@6.24.1", - "_inCache": true, - "_location": "/babel-preset-react", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/babel-preset-react-6.24.1.tgz_1491578364990_0.7569366935640574" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-preset-react@^6.5.0", - "scope": null, - "escapedName": "babel-preset-react", - "name": "babel-preset-react", - "rawSpec": "^6.5.0", - "spec": ">=6.5.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", - "_shasum": "ba69dfaea45fc3ec639b6a4ecea6e17702c91380", - "_shrinkwrap": null, - "_spec": "babel-preset-react@^6.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-plugin-syntax-jsx": "^6.3.13", - "babel-plugin-transform-react-display-name": "^6.23.0", - "babel-plugin-transform-react-jsx": "^6.24.1", - "babel-plugin-transform-react-jsx-self": "^6.22.0", - "babel-plugin-transform-react-jsx-source": "^6.22.0", - "babel-preset-flow": "^6.23.0" - }, - "description": "Babel preset for all React plugins.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ba69dfaea45fc3ec639b6a4ecea6e17702c91380", - "tarball": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "jmm", - "email": "npm-public@jessemccarthy.net" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - } - ], - "name": "babel-preset-react", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-preset-react" - }, - "scripts": {}, - "version": "6.24.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/README.md deleted file mode 100644 index 413e7a6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# babel-register - -> The require hook will bind itself to node's require and automatically compile files on the fly. - -One of the ways you can use Babel is through the require hook. The require hook -will bind itself to node's `require` and automatically compile files on the -fly. This is equivalent to CoffeeScript's -[coffee-script/register](http://coffeescript.org/v2/annotated-source/register.html). - -## Install - -```sh -npm install babel-register --save-dev -``` - -## Usage - -```js -require("babel-register"); -``` - -All subsequent files required by node with the extensions `.es6`, `.es`, `.jsx` -and `.js` will be transformed by Babel. - -
-

Polyfill not included

-

- You must include the polyfill separately - when using features that require it, like generators. -

-
- -### Ignores `node_modules` by default - -**NOTE:** By default all requires to `node_modules` will be ignored. You can -override this by passing an ignore regex via: - -```js -require("babel-register")({ - // This will override `node_modules` ignoring - you can alternatively pass - // an array of strings to be explicitly matched or a regex / glob - ignore: false -}); -``` - -## Specifying options - -```javascript -require("babel-register")({ - // Optional ignore regex - if any filenames **do** match this regex then they - // aren't compiled. - ignore: /regex/, - - // Ignore can also be specified as a function. - ignore: function(filename) { - if (filename === "/path/to/es6-file.js") { - return false; - } else { - return true; - } - }, - - // Optional only regex - if any filenames **don't** match this regex then they - // aren't compiled - only: /my_es6_folder/, - - // Setting this will remove the currently hooked extensions of .es6, `.es`, `.jsx` - // and .js so you'll have to add them back if you want them to be used again. - extensions: [".es6", ".es", ".jsx", ".js"], - - // Setting this to false will disable the cache. - cache: true -}); -``` - -You can pass in all other [options](https://babeljs.io/docs/usage/api/#options) as well, -including `plugins` and `presets`. But note that the closest [`.babelrc`](https://babeljs.io/docs/usage/babelrc/) -to each file still applies, and takes precedence over any options you pass in here. - -## Environment variables - -By default `babel-node` and `babel-register` will save to a json cache in your -temporary directory. - -This will heavily improve with the startup and compilation of your files. There -are however scenarios where you want to change this behaviour and there are -environment variables exposed to allow you to do this. - -### BABEL_CACHE_PATH - -Specify a different cache location. - -```sh -BABEL_CACHE_PATH=/foo/my-cache.json babel-node script.js -``` - -### BABEL_DISABLE_CACHE - -Disable the cache. - -```sh -BABEL_DISABLE_CACHE=1 babel-node script.js -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/browser.js deleted file mode 100644 index 47e585e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/browser.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function () {}; - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/cache.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/cache.js deleted file mode 100644 index 4fbe0d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/cache.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -exports.save = save; -exports.load = load; -exports.get = get; - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -var _fs = require("fs"); - -var _fs2 = _interopRequireDefault(_fs); - -var _mkdirp = require("mkdirp"); - -var _homeOrTmp = require("home-or-tmp"); - -var _homeOrTmp2 = _interopRequireDefault(_homeOrTmp); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FILENAME = process.env.BABEL_CACHE_PATH || _path2.default.join(_homeOrTmp2.default, ".babel.json"); -var data = {}; - -function save() { - var serialised = "{}"; - - try { - serialised = (0, _stringify2.default)(data, null, " "); - } catch (err) { - - if (err.message === "Invalid string length") { - err.message = "Cache too large so it's been cleared."; - console.error(err.stack); - } else { - throw err; - } - } - - (0, _mkdirp.sync)(_path2.default.dirname(FILENAME)); - _fs2.default.writeFileSync(FILENAME, serialised); -} - -function load() { - if (process.env.BABEL_DISABLE_CACHE) return; - - process.on("exit", save); - process.nextTick(save); - - if (!_fs2.default.existsSync(FILENAME)) return; - - try { - data = JSON.parse(_fs2.default.readFileSync(FILENAME)); - } catch (err) { - return; - } -} - -function get() { - return data; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/node.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/node.js deleted file mode 100644 index 41f0936..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/lib/node.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -exports.default = function () { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - if (opts.only != null) only = _babelCore.util.arrayify(opts.only, _babelCore.util.regexify); - if (opts.ignore != null) ignore = _babelCore.util.arrayify(opts.ignore, _babelCore.util.regexify); - - if (opts.extensions) hookExtensions(_babelCore.util.arrayify(opts.extensions)); - - if (opts.cache === false) cache = null; - - delete opts.extensions; - delete opts.ignore; - delete opts.cache; - delete opts.only; - - (0, _extend2.default)(transformOpts, opts); -}; - -var _cloneDeep = require("lodash/cloneDeep"); - -var _cloneDeep2 = _interopRequireDefault(_cloneDeep); - -var _sourceMapSupport = require("source-map-support"); - -var _sourceMapSupport2 = _interopRequireDefault(_sourceMapSupport); - -var _cache = require("./cache"); - -var registerCache = _interopRequireWildcard(_cache); - -var _extend = require("lodash/extend"); - -var _extend2 = _interopRequireDefault(_extend); - -var _babelCore = require("babel-core"); - -var babel = _interopRequireWildcard(_babelCore); - -var _fs = require("fs"); - -var _fs2 = _interopRequireDefault(_fs); - -var _path = require("path"); - -var _path2 = _interopRequireDefault(_path); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -_sourceMapSupport2.default.install({ - handleUncaughtExceptions: false, - environment: "node", - retrieveSourceMap: function retrieveSourceMap(source) { - var map = maps && maps[source]; - if (map) { - return { - url: null, - map: map - }; - } else { - return null; - } - } -}); - -registerCache.load(); -var cache = registerCache.get(); - -var transformOpts = {}; - -var ignore = void 0; -var only = void 0; - -var oldHandlers = {}; -var maps = {}; - -var cwd = process.cwd(); - -function getRelativePath(filename) { - return _path2.default.relative(cwd, filename); -} - -function mtime(filename) { - return +_fs2.default.statSync(filename).mtime; -} - -function compile(filename) { - var result = void 0; - - var opts = new _babelCore.OptionManager().init((0, _extend2.default)({ sourceRoot: _path2.default.dirname(filename) }, (0, _cloneDeep2.default)(transformOpts), { filename: filename })); - - var cacheKey = (0, _stringify2.default)(opts) + ":" + babel.version; - - var env = process.env.BABEL_ENV || process.env.NODE_ENV; - if (env) cacheKey += ":" + env; - - if (cache) { - var cached = cache[cacheKey]; - if (cached && cached.mtime === mtime(filename)) { - result = cached; - } - } - - if (!result) { - result = babel.transformFileSync(filename, (0, _extend2.default)(opts, { - babelrc: false, - sourceMaps: "both", - ast: false - })); - } - - if (cache) { - cache[cacheKey] = result; - result.mtime = mtime(filename); - } - - maps[filename] = result.map; - - return result.code; -} - -function shouldIgnore(filename) { - if (!ignore && !only) { - return getRelativePath(filename).split(_path2.default.sep).indexOf("node_modules") >= 0; - } else { - return _babelCore.util.shouldIgnore(filename, ignore || [], only); - } -} - -function loader(m, filename) { - m._compile(compile(filename), filename); -} - -function registerExtension(ext) { - var old = oldHandlers[ext] || oldHandlers[".js"] || require.extensions[".js"]; - - require.extensions[ext] = function (m, filename) { - if (shouldIgnore(filename)) { - old(m, filename); - } else { - loader(m, filename, old); - } - }; -} - -function hookExtensions(_exts) { - (0, _keys2.default)(oldHandlers).forEach(function (ext) { - var old = oldHandlers[ext]; - if (old === undefined) { - delete require.extensions[ext]; - } else { - require.extensions[ext] = old; - } - }); - - oldHandlers = {}; - - _exts.forEach(function (ext) { - oldHandlers[ext] = require.extensions[ext]; - registerExtension(ext); - }); -} - -hookExtensions(_babelCore.util.canCompile.EXTENSIONS); - -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package-lock.json deleted file mode 100644 index 91df8f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package-lock.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "babel-register", - "version": "6.24.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "core-js": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY=" - }, - "decache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/decache/-/decache-4.1.0.tgz", - "integrity": "sha1-IDfV7fdW3aIwyFAjZZ58PR1uAQU=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" - }, - "source-map-support": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", - "requires": { - "source-map": "0.5.6" - } - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package.json deleted file mode 100644 index 1beb224..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-register@^6.26.0", - "scope": null, - "escapedName": "babel-register", - "name": "babel-register", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-register@>=6.26.0 <7.0.0", - "_id": "babel-register@6.26.0", - "_inCache": true, - "_location": "/babel-register", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-register-6.26.0.tgz_1502898863058_0.9258956837002188" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-register@^6.26.0", - "scope": null, - "escapedName": "babel-register", - "name": "babel-register", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core" - ], - "_resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "_shasum": "6ed021173e2fcb486d7acb45c6009a856f647071", - "_shrinkwrap": null, - "_spec": "babel-register@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "browser": "lib/browser.js", - "dependencies": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "description": "babel require hook", - "devDependencies": { - "decache": "^4.1.0" - }, - "directories": {}, - "dist": { - "shasum": "6ed021173e2fcb486d7acb45c6009a856f647071", - "tarball": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz" - }, - "license": "MIT", - "main": "lib/node.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-register", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-register" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/.npmignore deleted file mode 100644 index 3efd5b9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -scripts -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/README.md deleted file mode 100644 index 8aa8593..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# babel-runtime - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js.js deleted file mode 100644 index 7d56643..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - "default": require("core-js/library"), - __esModule: true -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/concat.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/concat.js deleted file mode 100644 index f0a5ec7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/concat.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/copy-within.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/copy-within.js deleted file mode 100644 index e9352ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/copy-within.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/entries.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/entries.js deleted file mode 100644 index ee8b9e9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/every.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/every.js deleted file mode 100644 index adc9319..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/every.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/fill.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/fill.js deleted file mode 100644 index 3cc2fe1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/fill.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/filter.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/filter.js deleted file mode 100644 index f73a5db..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/filter.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find-index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find-index.js deleted file mode 100644 index 560caa8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find-index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find.js deleted file mode 100644 index 7763993..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/find.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/for-each.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/for-each.js deleted file mode 100644 index 4808c96..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/for-each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/from.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/from.js deleted file mode 100644 index 8c92e81..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/from.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/includes.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/includes.js deleted file mode 100644 index 602d0d8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/includes.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/includes"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/index-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/index-of.js deleted file mode 100644 index eb4a6ac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/index-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/index-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/join.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/join.js deleted file mode 100644 index 7dc300b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/join.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/join"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/keys.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/keys.js deleted file mode 100644 index 5008ccb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/keys"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/last-index-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/last-index-of.js deleted file mode 100644 index ed92a55..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/last-index-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/last-index-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/map.js deleted file mode 100644 index 0f58810..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/map"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/of.js deleted file mode 100644 index d03ab62..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/pop.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/pop.js deleted file mode 100644 index 9114d2f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/pop.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/pop"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/push.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/push.js deleted file mode 100644 index 0cd42be..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/push.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/push"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce-right.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce-right.js deleted file mode 100644 index f56176c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reduce-right"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce.js deleted file mode 100644 index c0a2006..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reduce.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reduce"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reverse.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reverse.js deleted file mode 100644 index 8892c26..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/reverse.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reverse"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/shift.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/shift.js deleted file mode 100644 index 49e66cd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/shift.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/shift"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/slice.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/slice.js deleted file mode 100644 index 5f5fe16..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/slice.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/some.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/some.js deleted file mode 100644 index 72ca911..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/some.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/some"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/sort.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/sort.js deleted file mode 100644 index 32dece8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/sort.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/sort"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/splice.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/splice.js deleted file mode 100644 index 6fdebb0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/splice.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/splice"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/unshift.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/unshift.js deleted file mode 100644 index 3c237a4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/unshift.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/unshift"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/values.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/values.js deleted file mode 100644 index 6cc67aa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/array/values.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/values"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/asap.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/asap.js deleted file mode 100644 index a59e4d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/asap.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/asap"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/clear-immediate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/clear-immediate.js deleted file mode 100644 index f2090b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/clear-immediate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/clear-immediate"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/error/is-error.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/error/is-error.js deleted file mode 100644 index 2637546..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/error/is-error.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/error/is-error"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/get-iterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/get-iterator.js deleted file mode 100644 index 8f9943a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/get-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/is-iterable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/is-iterable.js deleted file mode 100644 index d690ac8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/is-iterable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/is-iterable"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/json/stringify.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/json/stringify.js deleted file mode 100644 index f09e2f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/json/stringify.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/json/stringify"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/map.js deleted file mode 100644 index ed02186..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/map"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/acosh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/acosh.js deleted file mode 100644 index 37e2202..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/acosh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/acosh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/asinh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/asinh.js deleted file mode 100644 index b5147b3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/asinh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/asinh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/atanh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/atanh.js deleted file mode 100644 index ad09bb7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/atanh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/atanh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cbrt.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cbrt.js deleted file mode 100644 index 24a6974..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cbrt.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/cbrt"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/clz32.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/clz32.js deleted file mode 100644 index d2218b4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/clz32.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/clz32"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cosh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cosh.js deleted file mode 100644 index fa9d079..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/cosh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/cosh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/expm1.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/expm1.js deleted file mode 100644 index 860921e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/expm1.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/expm1"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/fround.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/fround.js deleted file mode 100644 index b62e43a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/fround.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/fround"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/hypot.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/hypot.js deleted file mode 100644 index b07335b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/hypot.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/hypot"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/iaddh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/iaddh.js deleted file mode 100644 index 016eb07..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/iaddh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/iaddh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imul.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imul.js deleted file mode 100644 index 3bf89e8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imul.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/imul"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imulh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imulh.js deleted file mode 100644 index 3fc7d74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/imulh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/imulh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/isubh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/isubh.js deleted file mode 100644 index 6b6ea4f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/isubh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/isubh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log10.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log10.js deleted file mode 100644 index f384512..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log10.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log10"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log1p.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log1p.js deleted file mode 100644 index 358fc45..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log1p.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log1p"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log2.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log2.js deleted file mode 100644 index 1cbca00..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/log2.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log2"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sign.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sign.js deleted file mode 100644 index 8d0cfa3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sign.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/sign"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sinh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sinh.js deleted file mode 100644 index 81afadd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/sinh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/sinh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/tanh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/tanh.js deleted file mode 100644 index 76fad88..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/tanh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/tanh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/trunc.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/trunc.js deleted file mode 100644 index 443a958..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/trunc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/trunc"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/umulh.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/umulh.js deleted file mode 100644 index 357f389..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/math/umulh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/umulh"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/epsilon.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/epsilon.js deleted file mode 100644 index b5c7862..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/epsilon.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/epsilon"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-finite.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-finite.js deleted file mode 100644 index 7366242..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-finite.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-finite"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-integer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-integer.js deleted file mode 100644 index 69b9bb7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-integer"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-nan.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-nan.js deleted file mode 100644 index 5402a71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-nan.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-nan"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-safe-integer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-safe-integer.js deleted file mode 100644 index 2d72dd4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/is-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/max-safe-integer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/max-safe-integer.js deleted file mode 100644 index 9b55c84..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/max-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/max-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/min-safe-integer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/min-safe-integer.js deleted file mode 100644 index b5e9785..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/min-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/min-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-float.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-float.js deleted file mode 100644 index 0e0f0bc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-float.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/parse-float"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-int.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-int.js deleted file mode 100644 index 6d454ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/number/parse-int.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/parse-int"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/assign.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/assign.js deleted file mode 100644 index ca48f0c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/assign.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/assign"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/create.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/create.js deleted file mode 100644 index 130165c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/create.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/create"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-properties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-properties.js deleted file mode 100644 index d39e153..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/define-properties"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-property.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-property.js deleted file mode 100644 index f41735b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/entries.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/entries.js deleted file mode 100644 index 32ed7a5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/entries"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/freeze.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/freeze.js deleted file mode 100644 index 8cc278b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/freeze.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/freeze"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js deleted file mode 100644 index 8e9296e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js deleted file mode 100644 index 23200d2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptors"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-names.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-names.js deleted file mode 100644 index 7b95445..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-names.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-names"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js deleted file mode 100644 index c2fc78f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-symbols"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-prototype-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-prototype-of.js deleted file mode 100644 index 47d3f72..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/get-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-extensible.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-extensible.js deleted file mode 100644 index 51175ad..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-extensible.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-frozen.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-frozen.js deleted file mode 100644 index e8ab5f1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-frozen.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-frozen"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-sealed.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-sealed.js deleted file mode 100644 index 77beda4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is-sealed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-sealed"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is.js deleted file mode 100644 index 6524704..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/is.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/keys.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/keys.js deleted file mode 100644 index 04a3f01..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/keys"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/prevent-extensions.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/prevent-extensions.js deleted file mode 100644 index 3d4305f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/prevent-extensions.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/seal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/seal.js deleted file mode 100644 index c969cab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/seal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/seal"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/set-prototype-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/set-prototype-of.js deleted file mode 100644 index 63b1435..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/set-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/values.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/values.js deleted file mode 100644 index c587097..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/object/values.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/values"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/observable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/observable.js deleted file mode 100644 index 04ca51e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/observable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/observable"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/promise.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/promise.js deleted file mode 100644 index 0cb9a23..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/promise.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/promise"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/apply.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/apply.js deleted file mode 100644 index cc578d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/apply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/apply"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/construct.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/construct.js deleted file mode 100644 index a2d991a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/construct.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/construct"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-metadata.js deleted file mode 100644 index 1ba7d4a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/define-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-property.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-property.js deleted file mode 100644 index aee1c3a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/define-property"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-metadata.js deleted file mode 100644 index 3396c42..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/delete-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-property.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-property.js deleted file mode 100644 index efa76ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/delete-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/delete-property"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/enumerate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/enumerate.js deleted file mode 100644 index 041484b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/enumerate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/enumerate"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js deleted file mode 100644 index 722e099..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata.js deleted file mode 100644 index d725525..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js deleted file mode 100644 index feff3a6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js deleted file mode 100644 index 1f8bd56..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js deleted file mode 100644 index 67a50f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js deleted file mode 100644 index d3c8d4e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get.js deleted file mode 100644 index a42e4fb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/get.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-metadata.js deleted file mode 100644 index c1051a3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js deleted file mode 100644 index 1cefbf7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has.js deleted file mode 100644 index e2a9665..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/has.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/is-extensible.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/is-extensible.js deleted file mode 100644 index b0de7bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/is-extensible.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/metadata.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/metadata.js deleted file mode 100644 index cb85fde..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/metadata"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/own-keys.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/own-keys.js deleted file mode 100644 index d98fed2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/own-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/own-keys"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js deleted file mode 100644 index 5408d89..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js deleted file mode 100644 index 5433e2e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set.js deleted file mode 100644 index 657bddc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/reflect/set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/set"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/regexp/escape.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/regexp/escape.js deleted file mode 100644 index 12a25c3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/regexp/escape.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/regexp/escape"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set-immediate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set-immediate.js deleted file mode 100644 index fc42eb4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set-immediate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/set-immediate"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set.js deleted file mode 100644 index 22c14d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/set"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/at.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/at.js deleted file mode 100644 index 1c4b595..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/at.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/at"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/code-point-at.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/code-point-at.js deleted file mode 100644 index 4332bdb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/code-point-at.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/code-point-at"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/ends-with.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/ends-with.js deleted file mode 100644 index ad3b55a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/ends-with.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/ends-with"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/from-code-point.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/from-code-point.js deleted file mode 100644 index 8c10782..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/from-code-point.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/from-code-point"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/includes.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/includes.js deleted file mode 100644 index f7de270..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/includes.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/includes"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/match-all.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/match-all.js deleted file mode 100644 index 813855c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/match-all.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/match-all"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-end.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-end.js deleted file mode 100644 index 5ff9814..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-end.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-left.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-left.js deleted file mode 100644 index ee67e70..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-left.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-right.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-right.js deleted file mode 100644 index 5ff9814..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-start.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-start.js deleted file mode 100644 index ee67e70..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/pad-start.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/raw.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/raw.js deleted file mode 100644 index 05c92dc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/raw.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/raw"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/repeat.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/repeat.js deleted file mode 100644 index 816ef2e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/repeat.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/repeat"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/starts-with.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/starts-with.js deleted file mode 100644 index 5d74716..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/starts-with.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/starts-with"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-end.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-end.js deleted file mode 100644 index 7c426f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-end.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-end"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-left.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-left.js deleted file mode 100644 index b8a7e1e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-left.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-left"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-right.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-right.js deleted file mode 100644 index ba3ca74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-right"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-start.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-start.js deleted file mode 100644 index f1f035a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim-start.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-start"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim.js deleted file mode 100644 index 7d51cf0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/string/trim.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol.js deleted file mode 100644 index 9aa95a0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/async-iterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/async-iterator.js deleted file mode 100644 index 9dd3a57..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/async-iterator"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/for.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/for.js deleted file mode 100644 index de7424f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/for.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/for"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/has-instance.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/has-instance.js deleted file mode 100644 index f771180..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/has-instance.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/has-instance"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js deleted file mode 100644 index 0bc7f03..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/is-concat-spreadable"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/iterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/iterator.js deleted file mode 100644 index 3f9a0fb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/iterator"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/key-for.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/key-for.js deleted file mode 100644 index 15a6cfb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/key-for.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/key-for"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/match.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/match.js deleted file mode 100644 index ed64810..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/match.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/match"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/observable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/observable.js deleted file mode 100644 index 876f9c0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/observable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/observable"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/replace.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/replace.js deleted file mode 100644 index 35f900b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/replace.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/replace"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/search.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/search.js deleted file mode 100644 index 4b81d31..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/search.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/search"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/species.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/species.js deleted file mode 100644 index 4481321..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/species.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/species"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/split.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/split.js deleted file mode 100644 index 1f5795c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/split.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/split"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-primitive.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-primitive.js deleted file mode 100644 index b7f9e04..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-primitive.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/to-primitive"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-string-tag.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-string-tag.js deleted file mode 100644 index d9e4e4d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/to-string-tag.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/to-string-tag"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/unscopables.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/unscopables.js deleted file mode 100644 index cd3dac0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/symbol/unscopables.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/unscopables"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/system/global.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/system/global.js deleted file mode 100644 index c442f17..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/system/global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/system/global"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-map.js deleted file mode 100644 index de130d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/weak-map"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-set.js deleted file mode 100644 index b96cb97..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/core-js/weak-set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/weak-set"), __esModule: true }; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator-delegate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator-delegate.js deleted file mode 100644 index c1debb4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator-delegate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator.js deleted file mode 100644 index ee87351..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-iterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-iterator.js deleted file mode 100644 index c014bbb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-to-generator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-to-generator.js deleted file mode 100644 index 5f81e90..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_async-to-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_class-call-check.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_class-call-check.js deleted file mode 100644 index d4514f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_class-call-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_create-class.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_create-class.js deleted file mode 100644 index 2699d23..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_create-class.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_defaults.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_defaults.js deleted file mode 100644 index a4274f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_defaults.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defaults.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-enumerable-properties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-enumerable-properties.js deleted file mode 100644 index c60bbfc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-enumerable-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-property.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-property.js deleted file mode 100644 index a265eab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_extends.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_extends.js deleted file mode 100644 index 2ecdb0e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_extends.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./extends.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_get.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_get.js deleted file mode 100644 index 39aa387..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_get.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./get.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_inherits.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_inherits.js deleted file mode 100644 index 29deff3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./inherits.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_instanceof.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_instanceof.js deleted file mode 100644 index 4c61213..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_instanceof.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./instanceof.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-default.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-default.js deleted file mode 100644 index 10edad2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-wildcard.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-wildcard.js deleted file mode 100644 index ae19e01..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_interop-require-wildcard.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_jsx.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_jsx.js deleted file mode 100644 index f21ab91..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_jsx.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./jsx.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_new-arrow-check.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_new-arrow-check.js deleted file mode 100644 index 6325419..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_new-arrow-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-destructuring-empty.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-destructuring-empty.js deleted file mode 100644 index 9c6ffef..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-destructuring-empty.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-without-properties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-without-properties.js deleted file mode 100644 index 052b207..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_object-without-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_possible-constructor-return.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_possible-constructor-return.js deleted file mode 100644 index 09018d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_possible-constructor-return.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_self-global.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_self-global.js deleted file mode 100644 index c3d45f3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_self-global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_set.js deleted file mode 100644 index e4dd5ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./set.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js deleted file mode 100644 index 8bb56d3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array.js deleted file mode 100644 index 28d7fd8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_sliced-to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js deleted file mode 100644 index 8ffa3f7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal.js deleted file mode 100644 index 160a917..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_tagged-template-literal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-ref.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-ref.js deleted file mode 100644 index cf2e4e4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-ref.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-undefined.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-undefined.js deleted file mode 100644 index 234fc33..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_temporal-undefined.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-array.js deleted file mode 100644 index d89ee39..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-consumable-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-consumable-array.js deleted file mode 100644 index 0aad718..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_to-consumable-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_typeof.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_typeof.js deleted file mode 100644 index 14fd11c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/_typeof.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./typeof.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator-delegate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator-delegate.js deleted file mode 100644 index c1debb4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator-delegate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator.js deleted file mode 100644 index ee87351..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-iterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-iterator.js deleted file mode 100644 index c014bbb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-to-generator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-to-generator.js deleted file mode 100644 index 5f81e90..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/async-to-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGenerator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGenerator.js deleted file mode 100644 index d3032e7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGenerator.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new _promise2.default(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - _promise2.default.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof _symbol2.default === "function" && _symbol2.default.asyncIterator) { - AsyncGenerator.prototype[_symbol2.default.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function wrap(fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function _await(value) { - return new AwaitValue(value); - } - }; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js deleted file mode 100644 index 5fcc123..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (inner, awaitWrap) { - var iter = {}, - waiting = false; - - function pump(key, value) { - waiting = true; - value = new _promise2.default(function (resolve) { - resolve(inner[key](value)); - }); - return { - done: false, - value: awaitWrap(value) - }; - } - - ; - - if (typeof _symbol2.default === "function" && _iterator2.default) { - iter[_iterator2.default] = function () { - return this; - }; - } - - iter.next = function (value) { - if (waiting) { - waiting = false; - return value; - } - - return pump("next", value); - }; - - if (typeof inner.throw === "function") { - iter.throw = function (value) { - if (waiting) { - waiting = false; - throw value; - } - - return pump("throw", value); - }; - } - - if (typeof inner.return === "function") { - iter.return = function (value) { - return pump("return", value); - }; - } - - return iter; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncIterator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncIterator.js deleted file mode 100644 index b542b6c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncIterator.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (iterable) { - if (typeof _symbol2.default === "function") { - if (_symbol2.default.asyncIterator) { - var method = iterable[_symbol2.default.asyncIterator]; - if (method != null) return method.call(iterable); - } - - if (_iterator2.default) { - return (0, _getIterator3.default)(iterable); - } - } - - throw new TypeError("Object is not async iterable"); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncToGenerator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncToGenerator.js deleted file mode 100644 index 50be669..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/asyncToGenerator.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/class-call-check.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/class-call-check.js deleted file mode 100644 index d4514f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/class-call-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/classCallCheck.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/classCallCheck.js deleted file mode 100644 index 63d6d8f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/classCallCheck.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/create-class.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/create-class.js deleted file mode 100644 index 2699d23..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/create-class.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/createClass.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/createClass.js deleted file mode 100644 index bee484d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/createClass.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - (0, _defineProperty2.default)(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defaults.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defaults.js deleted file mode 100644 index 9a721ce..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defaults.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -var _getOwnPropertyNames = require("../core-js/object/get-own-property-names"); - -var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, defaults) { - var keys = (0, _getOwnPropertyNames2.default)(defaults); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key); - - if (value && value.configurable && obj[key] === undefined) { - (0, _defineProperty2.default)(obj, key, value); - } - } - - return obj; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-enumerable-properties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-enumerable-properties.js deleted file mode 100644 index c60bbfc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-enumerable-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-property.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-property.js deleted file mode 100644 index a265eab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineEnumerableProperties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineEnumerableProperties.js deleted file mode 100644 index 503a1ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineEnumerableProperties.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, descs) { - for (var key in descs) { - var desc = descs[key]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - (0, _defineProperty2.default)(obj, key, desc); - } - - return obj; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineProperty.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineProperty.js deleted file mode 100644 index b0f46d8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/defineProperty.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/extends.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/extends.js deleted file mode 100644 index 976aef1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/extends.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _assign = require("../core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _assign2.default || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/get.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/get.js deleted file mode 100644 index 38b79b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/get.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getPrototypeOf = require("../core-js/object/get-prototype-of"); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); - - if (desc === undefined) { - var parent = (0, _getPrototypeOf2.default)(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/inherits.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/inherits.js deleted file mode 100644 index ae8a92d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/inherits.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _setPrototypeOf = require("../core-js/object/set-prototype-of"); - -var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); - -var _create = require("../core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _typeof2 = require("../helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/instanceof.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/instanceof.js deleted file mode 100644 index f2d90ec..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/instanceof.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _hasInstance = require("../core-js/symbol/has-instance"); - -var _hasInstance2 = _interopRequireDefault(_hasInstance); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (left, right) { - if (right != null && typeof _symbol2.default !== "undefined" && right[_hasInstance2.default]) { - return right[_hasInstance2.default](left); - } else { - return left instanceof right; - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-default.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-default.js deleted file mode 100644 index 10edad2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-wildcard.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-wildcard.js deleted file mode 100644 index ae19e01..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interop-require-wildcard.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireDefault.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireDefault.js deleted file mode 100644 index df808f6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireDefault.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireWildcard.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireWildcard.js deleted file mode 100644 index d95b6ac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/interopRequireWildcard.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj.default = obj; - return newObj; - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/jsx.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/jsx.js deleted file mode 100644 index b2164d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/jsx.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _for = require("../core-js/symbol/for"); - -var _for2 = _interopRequireDefault(_for); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - var REACT_ELEMENT_TYPE = typeof _symbol2.default === "function" && _for2.default && (0, _for2.default)("react.element") || 0xeac7; - return function createRawReactElement(type, props, key, children) { - var defaultProps = type && type.defaultProps; - var childrenLength = arguments.length - 3; - - if (!props && childrenLength !== 0) { - props = {}; - } - - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 3]; - } - - props.children = childArray; - } - - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key === undefined ? null : '' + key, - ref: null, - props: props, - _owner: null - }; - }; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/new-arrow-check.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/new-arrow-check.js deleted file mode 100644 index 6325419..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/new-arrow-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/newArrowCheck.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/newArrowCheck.js deleted file mode 100644 index c15ee5c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/newArrowCheck.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (innerThis, boundThis) { - if (innerThis !== boundThis) { - throw new TypeError("Cannot instantiate an arrow function"); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-destructuring-empty.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-destructuring-empty.js deleted file mode 100644 index 9c6ffef..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-destructuring-empty.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-without-properties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-without-properties.js deleted file mode 100644 index 052b207..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/object-without-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js deleted file mode 100644 index e2651c1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - if (obj == null) throw new TypeError("Cannot destructure undefined"); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectWithoutProperties.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectWithoutProperties.js deleted file mode 100644 index e9f07e6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/objectWithoutProperties.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj, keys) { - var target = {}; - - for (var i in obj) { - if (keys.indexOf(i) >= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possible-constructor-return.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possible-constructor-return.js deleted file mode 100644 index 09018d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possible-constructor-return.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possibleConstructorReturn.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possibleConstructorReturn.js deleted file mode 100644 index 957f425..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/possibleConstructorReturn.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("../helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/self-global.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/self-global.js deleted file mode 100644 index c3d45f3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/self-global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/selfGlobal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/selfGlobal.js deleted file mode 100644 index 378beb8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/selfGlobal.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = typeof global === "undefined" ? self : global; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/set.js deleted file mode 100644 index 8780efb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/set.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getPrototypeOf = require("../core-js/object/get-prototype-of"); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function set(object, property, value, receiver) { - var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); - - if (desc === undefined) { - var parent = (0, _getPrototypeOf2.default)(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array-loose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array-loose.js deleted file mode 100644 index 8bb56d3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array.js deleted file mode 100644 index 28d7fd8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/sliced-to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArray.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArray.js deleted file mode 100644 index de11512..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArray.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _isIterable2 = require("../core-js/is-iterable"); - -var _isIterable3 = _interopRequireDefault(_isIterable2); - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if ((0, _isIterable3.default)(Object(arr))) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArrayLoose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArrayLoose.js deleted file mode 100644 index 012bbd8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/slicedToArrayLoose.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _isIterable2 = require("../core-js/is-iterable"); - -var _isIterable3 = _interopRequireDefault(_isIterable2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if ((0, _isIterable3.default)(Object(arr))) { - var _arr = []; - - for (var _iterator = (0, _getIterator3.default)(arr), _step; !(_step = _iterator.next()).done;) { - _arr.push(_step.value); - - if (i && _arr.length === i) break; - } - - return _arr; - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js deleted file mode 100644 index 8ffa3f7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal.js deleted file mode 100644 index 160a917..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/tagged-template-literal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js deleted file mode 100644 index 060dcf9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperties = require("../core-js/object/define-properties"); - -var _defineProperties2 = _interopRequireDefault(_defineProperties); - -var _freeze = require("../core-js/object/freeze"); - -var _freeze2 = _interopRequireDefault(_freeze); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (strings, raw) { - return (0, _freeze2.default)((0, _defineProperties2.default)(strings, { - raw: { - value: (0, _freeze2.default)(raw) - } - })); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js deleted file mode 100644 index 76c4930..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (strings, raw) { - strings.raw = raw; - return strings; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-ref.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-ref.js deleted file mode 100644 index cf2e4e4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-ref.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-undefined.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-undefined.js deleted file mode 100644 index 234fc33..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporal-undefined.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalRef.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalRef.js deleted file mode 100644 index 49b8b24..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalRef.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (val, name, undef) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalUndefined.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalUndefined.js deleted file mode 100644 index 4066de1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/temporalUndefined.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = {}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-array.js deleted file mode 100644 index d89ee39..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-consumable-array.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-consumable-array.js deleted file mode 100644 index 0aad718..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/to-consumable-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toArray.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toArray.js deleted file mode 100644 index 8601a44..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toArray.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _from = require("../core-js/array/from"); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - return Array.isArray(arr) ? arr : (0, _from2.default)(arr); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toConsumableArray.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toConsumableArray.js deleted file mode 100644 index c4e34f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/toConsumableArray.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _from = require("../core-js/array/from"); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return (0, _from2.default)(arr); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/typeof.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/typeof.js deleted file mode 100644 index d22add8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/helpers/typeof.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { - return typeof obj === "undefined" ? "undefined" : _typeof(obj); -} : function (obj) { - return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package-lock.json deleted file mode 100644 index 78600f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package-lock.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "name": "babel-runtime", - "version": "6.23.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "babel-code-frame": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "6.25.0", - "babel-template": "6.25.0" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "6.25.0" - } - }, - "babel-plugin-transform-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", - "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", - "dev": true, - "requires": { - "babel-runtime": "6.25.0" - } - }, - "babel-runtime": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", - "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", - "dev": true, - "requires": { - "core-js": "2.5.0" - } - }, - "babel-template": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", - "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", - "dev": true, - "requires": { - "babel-runtime": "6.25.0", - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.18.0", - "lodash": "4.17.4" - } - }, - "babel-traverse": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", - "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", - "dev": true, - "requires": { - "babel-code-frame": "6.22.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.18.0", - "debug": "2.6.8", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" - } - }, - "babel-types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", - "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", - "dev": true, - "requires": { - "babel-runtime": "6.25.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "core-js": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", - "integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY=" - }, - "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", - "dev": true, - "requires": { - "loose-envify": "1.3.1" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package.json deleted file mode 100644 index ba5efeb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/package.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-runtime@^6.26.0", - "scope": null, - "escapedName": "babel-runtime", - "name": "babel-runtime", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-runtime@>=6.26.0 <7.0.0", - "_id": "babel-runtime@6.26.0", - "_inCache": true, - "_location": "/babel-runtime", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-runtime-6.26.0.tgz_1502898849886_0.663184720557183" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-runtime@^6.26.0", - "scope": null, - "escapedName": "babel-runtime", - "name": "babel-runtime", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-generator", - "/babel-helper-builder-react-jsx", - "/babel-helper-call-delegate", - "/babel-helper-define-map", - "/babel-helper-function-name", - "/babel-helper-get-function-arity", - "/babel-helper-hoist-variables", - "/babel-helper-optimise-call-expression", - "/babel-helper-regex", - "/babel-helper-replace-supers", - "/babel-helpers", - "/babel-messages", - "/babel-plugin-check-es2015-constants", - "/babel-plugin-external-helpers", - "/babel-plugin-transform-es2015-arrow-functions", - "/babel-plugin-transform-es2015-block-scoped-functions", - "/babel-plugin-transform-es2015-block-scoping", - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-computed-properties", - "/babel-plugin-transform-es2015-destructuring", - "/babel-plugin-transform-es2015-duplicate-keys", - "/babel-plugin-transform-es2015-for-of", - "/babel-plugin-transform-es2015-function-name", - "/babel-plugin-transform-es2015-literals", - "/babel-plugin-transform-es2015-modules-amd", - "/babel-plugin-transform-es2015-modules-commonjs", - "/babel-plugin-transform-es2015-modules-systemjs", - "/babel-plugin-transform-es2015-modules-umd", - "/babel-plugin-transform-es2015-object-super", - "/babel-plugin-transform-es2015-parameters", - "/babel-plugin-transform-es2015-shorthand-properties", - "/babel-plugin-transform-es2015-spread", - "/babel-plugin-transform-es2015-sticky-regex", - "/babel-plugin-transform-es2015-template-literals", - "/babel-plugin-transform-es2015-typeof-symbol", - "/babel-plugin-transform-es2015-unicode-regex", - "/babel-plugin-transform-flow-strip-types", - "/babel-plugin-transform-object-assign", - "/babel-plugin-transform-react-display-name", - "/babel-plugin-transform-react-jsx", - "/babel-plugin-transform-react-jsx-self", - "/babel-plugin-transform-react-jsx-source", - "/babel-plugin-transform-runtime", - "/babel-plugin-transform-strict-mode", - "/babel-register", - "/babel-template", - "/babel-traverse", - "/babel-types", - "/regenerator-transform" - ], - "_resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "_shasum": "965c7058668e82b55d7bfe04ff2337bc8b5647fe", - "_shrinkwrap": null, - "_spec": "babel-runtime@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "description": "babel selfContained runtime", - "devDependencies": { - "babel-helpers": "^6.22.0", - "babel-plugin-transform-runtime": "^6.23.0" - }, - "directories": {}, - "dist": { - "shasum": "965c7058668e82b55d7bfe04ff2337bc8b5647fe", - "tarball": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" - }, - "license": "MIT", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-runtime", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-runtime" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/regenerator/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/regenerator/index.js deleted file mode 100644 index 9fd4158..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime/regenerator/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("regenerator-runtime"); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/README.md deleted file mode 100644 index c73507a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# babel-template - -> Generate an AST from a string template. - -In computer science, this is known as an implementation of quasiquotes. - -## Install - -```sh -npm install --save-dev babel-template -``` - -## Usage - -```js -import template from "babel-template"; -import generate from "babel-generator"; -import * as t from "babel-types"; - -const buildRequire = template(` - var IMPORT_NAME = require(SOURCE); -`); - -const ast = buildRequire({ - IMPORT_NAME: t.identifier("myModule"), - SOURCE: t.stringLiteral("my-module") -}); - -console.log(generate(ast).code); -``` - -```js -const myModule = require("my-module"); -``` - -## API - -### `template(code, [opts])` - -#### code - -Type: `string` - -#### options - -`babel-template` accepts all of the options from [babylon], and specifies -some defaults of its own: - -* `allowReturnOutsideFunction` is set to `true` by default. -* `allowSuperOutsideMethod` is set to `true` by default. - -##### preserveComments - -Type: `boolean` -Default: `false` - -Set this to `true` to preserve any comments from the `code` parameter. - -#### Return value - -`babel-template` returns a `function` which is invoked with an optional object -of replacements. See the usage section for an example. - -[babylon]: https://github.com/babel/babylon#options diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/lib/index.js deleted file mode 100644 index ab5ec99..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/lib/index.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("babel-runtime/core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -exports.default = function (code, opts) { - var stack = void 0; - try { - throw new Error(); - } catch (error) { - if (error.stack) { - stack = error.stack.split("\n").slice(1).join("\n"); - } - } - - opts = (0, _assign2.default)({ - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - preserveComments: false - }, opts); - - var _getAst = function getAst() { - var ast = void 0; - - try { - ast = babylon.parse(code, opts); - - ast = _babelTraverse2.default.removeProperties(ast, { preserveComments: opts.preserveComments }); - - _babelTraverse2.default.cheap(ast, function (node) { - node[FROM_TEMPLATE] = true; - }); - } catch (err) { - err.stack = err.stack + "from\n" + stack; - throw err; - } - - _getAst = function getAst() { - return ast; - }; - - return ast; - }; - - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return useTemplate(_getAst(), args); - }; -}; - -var _cloneDeep = require("lodash/cloneDeep"); - -var _cloneDeep2 = _interopRequireDefault(_cloneDeep); - -var _assign = require("lodash/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _has = require("lodash/has"); - -var _has2 = _interopRequireDefault(_has); - -var _babelTraverse = require("babel-traverse"); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _babylon = require("babylon"); - -var babylon = _interopRequireWildcard(_babylon); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FROM_TEMPLATE = "_fromTemplate"; -var TEMPLATE_SKIP = (0, _symbol2.default)(); - -function useTemplate(ast, nodes) { - ast = (0, _cloneDeep2.default)(ast); - var _ast = ast, - program = _ast.program; - - - if (nodes.length) { - (0, _babelTraverse2.default)(ast, templateVisitor, null, nodes); - } - - if (program.body.length > 1) { - return program.body; - } else { - return program.body[0]; - } -} - -var templateVisitor = { - noScope: true, - - enter: function enter(path, args) { - var node = path.node; - - if (node[TEMPLATE_SKIP]) return path.skip(); - - if (t.isExpressionStatement(node)) { - node = node.expression; - } - - var replacement = void 0; - - if (t.isIdentifier(node) && node[FROM_TEMPLATE]) { - if ((0, _has2.default)(args[0], node.name)) { - replacement = args[0][node.name]; - } else if (node.name[0] === "$") { - var i = +node.name.slice(1); - if (args[i]) replacement = args[i]; - } - } - - if (replacement === null) { - path.remove(); - } - - if (replacement) { - replacement[TEMPLATE_SKIP] = true; - path.replaceInline(replacement); - } - }, - exit: function exit(_ref) { - var node = _ref.node; - - if (!node.loc) _babelTraverse2.default.clearNode(node); - } -}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package-lock.json deleted file mode 100644 index 3c059a7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package-lock.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "babel-template", - "version": "6.25.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package.json deleted file mode 100644 index 4edf6f7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-template/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-template@^6.26.0", - "scope": null, - "escapedName": "babel-template", - "name": "babel-template", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-template@>=6.26.0 <7.0.0", - "_id": "babel-template@6.26.0", - "_inCache": true, - "_location": "/babel-template", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-template-6.26.0.tgz_1502898857848_0.5731625664047897" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-template@^6.26.0", - "scope": null, - "escapedName": "babel-template", - "name": "babel-template", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-helper-function-name", - "/babel-helper-replace-supers", - "/babel-helpers", - "/babel-plugin-transform-es2015-block-scoping", - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-computed-properties", - "/babel-plugin-transform-es2015-modules-amd", - "/babel-plugin-transform-es2015-modules-commonjs", - "/babel-plugin-transform-es2015-modules-systemjs", - "/babel-plugin-transform-es2015-modules-umd", - "/babel-plugin-transform-es2015-parameters" - ], - "_resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "_shasum": "de03e2d16396b069f46dd9fff8521fb1a0e35e02", - "_shrinkwrap": null, - "_spec": "babel-template@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - }, - "description": "Generate an AST from a string template.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "de03e2d16396b069f46dd9fff8521fb1a0e35e02", - "tarball": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-template", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-template" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/README.md deleted file mode 100644 index 1dfda0a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-traverse - -> babel-traverse maintains the overall tree state, and is responsible for replacing, removing, and adding nodes. - -## Install - -```sh -$ npm install --save babel-traverse -``` - -## Usage - -We can use it alongside Babylon to traverse and update nodes: - -```js -import * as babylon from "babylon"; -import traverse from "babel-traverse"; - -const code = `function square(n) { - return n * n; -}`; - -const ast = babylon.parse(code); - -traverse(ast, { - enter(path) { - if (path.isIdentifier({ name: "n" })) { - path.node.name = "x"; - } - } -}); -``` -[:book: **Read the full docs here**](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-traverse) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/cache.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/cache.js deleted file mode 100644 index b337eec..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/cache.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.scope = exports.path = undefined; - -var _weakMap = require("babel-runtime/core-js/weak-map"); - -var _weakMap2 = _interopRequireDefault(_weakMap); - -exports.clear = clear; -exports.clearPath = clearPath; -exports.clearScope = clearScope; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var path = exports.path = new _weakMap2.default(); -var scope = exports.scope = new _weakMap2.default(); - -function clear() { - clearPath(); - clearScope(); -} - -function clearPath() { - exports.path = path = new _weakMap2.default(); -} - -function clearScope() { - exports.scope = scope = new _weakMap2.default(); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/context.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/context.js deleted file mode 100644 index 3b9ded8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/context.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _path2 = require("./path"); - -var _path3 = _interopRequireDefault(_path2); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var testing = process.env.NODE_ENV === "test"; - -var TraversalContext = function () { - function TraversalContext(scope, opts, state, parentPath) { - (0, _classCallCheck3.default)(this, TraversalContext); - this.queue = null; - - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - - TraversalContext.prototype.shouldVisit = function shouldVisit(node) { - var opts = this.opts; - if (opts.enter || opts.exit) return true; - - if (opts[node.type]) return true; - - var keys = t.VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - - if (node[key]) return true; - } - - return false; - }; - - TraversalContext.prototype.create = function create(node, obj, key, listKey) { - return _path3.default.get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey: listKey - }); - }; - - TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - }; - - TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) { - if (container.length === 0) return false; - - var queue = []; - - for (var key = 0; key < container.length; key++) { - var node = container[key]; - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } - - return this.visitQueue(queue); - }; - - TraversalContext.prototype.visitSingle = function visitSingle(node, key) { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - }; - - TraversalContext.prototype.visitQueue = function visitQueue(queue) { - this.queue = queue; - this.priorityQueue = []; - - var visited = []; - var stop = false; - - for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - path.resync(); - - if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { - path.pushContext(this); - } - - if (path.key === null) continue; - - if (testing && queue.length >= 10000) { - this.trap = true; - } - - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); - - if (path.visit()) { - stop = true; - break; - } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } - } - - for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var _path = _ref3; - - _path.popContext(); - } - - this.queue = null; - - return stop; - }; - - TraversalContext.prototype.visit = function visit(node, key) { - var nodes = node[key]; - if (!nodes) return false; - - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - }; - - return TraversalContext; -}(); - -exports.default = TraversalContext; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/hub.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/hub.js deleted file mode 100644 index f989c4c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/hub.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Hub = function Hub(file, options) { - (0, _classCallCheck3.default)(this, Hub); - - this.file = file; - this.options = options; -}; - -exports.default = Hub; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/index.js deleted file mode 100644 index 19a14ce..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/index.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _path = require("./path"); - -Object.defineProperty(exports, "NodePath", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_path).default; - } -}); - -var _scope = require("./scope"); - -Object.defineProperty(exports, "Scope", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_scope).default; - } -}); - -var _hub = require("./hub"); - -Object.defineProperty(exports, "Hub", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_hub).default; - } -}); -exports.default = traverse; - -var _context = require("./context"); - -var _context2 = _interopRequireDefault(_context); - -var _visitors = require("./visitors"); - -var visitors = _interopRequireWildcard(_visitors); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _includes = require("lodash/includes"); - -var _includes2 = _interopRequireDefault(_includes); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _cache = require("./cache"); - -var cache = _interopRequireWildcard(_cache); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.visitors = visitors; -function traverse(parent, opts, scope, state, parentPath) { - if (!parent) return; - if (!opts) opts = {}; - - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error(messages.get("traverseNeedsParent", parent.type)); - } - } - - visitors.explode(opts); - - traverse.node(parent, opts, scope, state, parentPath); -} - -traverse.visitors = visitors; -traverse.verify = visitors.verify; -traverse.explode = visitors.explode; - -traverse.NodePath = require("./path"); -traverse.Scope = require("./scope"); -traverse.Hub = require("./hub"); - -traverse.cheap = function (node, enter) { - return t.traverseFast(node, enter); -}; - -traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { - var keys = t.VISITOR_KEYS[node.type]; - if (!keys) return; - - var context = new _context2.default(scope, opts, state, parentPath); - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } -}; - -traverse.clearNode = function (node, opts) { - t.removeProperties(node, opts); - - cache.path.delete(node); -}; - -traverse.removeProperties = function (tree, opts) { - t.traverseFast(tree, traverse.clearNode, opts); - return tree; -}; - -function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.stop(); - } -} - -traverse.hasType = function (tree, scope, type, blacklistTypes) { - if ((0, _includes2.default)(blacklistTypes, tree.type)) return false; - - if (tree.type === type) return true; - - var state = { - has: false, - type: type - }; - - traverse(tree, { - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, scope, state); - - return state.has; -}; - -traverse.clearCache = function () { - cache.clear(); -}; - -traverse.clearCache.clearPath = cache.clearPath; -traverse.clearCache.clearScope = cache.clearScope; - -traverse.copyCache = function (source, destination) { - if (cache.path.has(source)) { - cache.path.set(destination, cache.path.get(source)); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/ancestry.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/ancestry.js deleted file mode 100644 index 2a8c322..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/ancestry.js +++ /dev/null @@ -1,238 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.findParent = findParent; -exports.find = find; -exports.getFunctionParent = getFunctionParent; -exports.getStatementParent = getStatementParent; -exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; -exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; -exports.getAncestry = getAncestry; -exports.isAncestor = isAncestor; -exports.isDescendant = isDescendant; -exports.inType = inType; -exports.inShadow = inShadow; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function findParent(callback) { - var path = this; - while (path = path.parentPath) { - if (callback(path)) return path; - } - return null; -} - -function find(callback) { - var path = this; - do { - if (callback(path)) return path; - } while (path = path.parentPath); - return null; -} - -function getFunctionParent() { - return this.findParent(function (path) { - return path.isFunction() || path.isProgram(); - }); -} - -function getStatementParent() { - var path = this; - do { - if (Array.isArray(path.container)) { - return path; - } - } while (path = path.parentPath); -} - -function getEarliestCommonAncestorFrom(paths) { - return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { - var earliest = void 0; - var keys = t.VISITOR_KEYS[deepest.type]; - - for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var ancestry = _ref; - - var path = ancestry[i + 1]; - - if (!earliest) { - earliest = path; - continue; - } - - if (path.listKey && earliest.listKey === path.listKey) { - if (path.key < earliest.key) { - earliest = path; - continue; - } - } - - var earliestKeyIndex = keys.indexOf(earliest.parentKey); - var currentKeyIndex = keys.indexOf(path.parentKey); - if (earliestKeyIndex > currentKeyIndex) { - earliest = path; - } - } - - return earliest; - }); -} - -function getDeepestCommonAncestorFrom(paths, filter) { - var _this = this; - - if (!paths.length) { - return this; - } - - if (paths.length === 1) { - return paths[0]; - } - - var minDepth = Infinity; - - var lastCommonIndex = void 0, - lastCommon = void 0; - - var ancestries = paths.map(function (path) { - var ancestry = []; - - do { - ancestry.unshift(path); - } while ((path = path.parentPath) && path !== _this); - - if (ancestry.length < minDepth) { - minDepth = ancestry.length; - } - - return ancestry; - }); - - var first = ancestries[0]; - - depthLoop: for (var i = 0; i < minDepth; i++) { - var shouldMatch = first[i]; - - for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var ancestry = _ref2; - - if (ancestry[i] !== shouldMatch) { - break depthLoop; - } - } - - lastCommonIndex = i; - lastCommon = shouldMatch; - } - - if (lastCommon) { - if (filter) { - return filter(lastCommon, lastCommonIndex, ancestries); - } else { - return lastCommon; - } - } else { - throw new Error("Couldn't find intersection"); - } -} - -function getAncestry() { - var path = this; - var paths = []; - do { - paths.push(path); - } while (path = path.parentPath); - return paths; -} - -function isAncestor(maybeDescendant) { - return maybeDescendant.isDescendant(this); -} - -function isDescendant(maybeAncestor) { - return !!this.findParent(function (parent) { - return parent === maybeAncestor; - }); -} - -function inType() { - var path = this; - while (path) { - for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var type = _ref3; - - if (path.node.type === type) return true; - } - path = path.parentPath; - } - - return false; -} - -function inShadow(key) { - var parentFn = this.isFunction() ? this : this.findParent(function (p) { - return p.isFunction(); - }); - if (!parentFn) return; - - if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) { - var shadow = parentFn.node.shadow; - - if (shadow && (!key || shadow[key] !== false)) { - return parentFn; - } - } else if (parentFn.isArrowFunctionExpression()) { - return parentFn; - } - - return null; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/comments.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/comments.js deleted file mode 100644 index 800018c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/comments.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.shareCommentsWithSiblings = shareCommentsWithSiblings; -exports.addComment = addComment; -exports.addComments = addComments; -function shareCommentsWithSiblings() { - if (typeof this.key === "string") return; - - var node = this.node; - if (!node) return; - - var trailing = node.trailingComments; - var leading = node.leadingComments; - if (!trailing && !leading) return; - - var prev = this.getSibling(this.key - 1); - var next = this.getSibling(this.key + 1); - - if (!prev.node) prev = next; - if (!next.node) next = prev; - - prev.addComments("trailing", leading); - next.addComments("leading", trailing); -} - -function addComment(type, content, line) { - this.addComments(type, [{ - type: line ? "CommentLine" : "CommentBlock", - value: content - }]); -} - -function addComments(type, comments) { - if (!comments) return; - - var node = this.node; - if (!node) return; - - var key = type + "Comments"; - - if (node[key]) { - node[key] = node[key].concat(comments); - } else { - node[key] = comments; - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/context.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/context.js deleted file mode 100644 index 961e66e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/context.js +++ /dev/null @@ -1,281 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.call = call; -exports._call = _call; -exports.isBlacklisted = isBlacklisted; -exports.visit = visit; -exports.skip = skip; -exports.skipKey = skipKey; -exports.stop = stop; -exports.setScope = setScope; -exports.setContext = setContext; -exports.resync = resync; -exports._resyncParent = _resyncParent; -exports._resyncKey = _resyncKey; -exports._resyncList = _resyncList; -exports._resyncRemoved = _resyncRemoved; -exports.popContext = popContext; -exports.pushContext = pushContext; -exports.setup = setup; -exports.setKey = setKey; -exports.requeue = requeue; -exports._getQueueContexts = _getQueueContexts; - -var _index = require("../index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function call(key) { - var opts = this.opts; - - this.debug(function () { - return key; - }); - - if (this.node) { - if (this._call(opts[key])) return true; - } - - if (this.node) { - return this._call(opts[this.node.type] && opts[this.node.type][key]); - } - - return false; -} - -function _call(fns) { - if (!fns) return false; - - for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (!fn) continue; - - var node = this.node; - if (!node) return true; - - var ret = fn.call(this.state, this, this.state); - if (ret) throw new Error("Unexpected return value from visitor method " + fn); - - if (this.node !== node) return true; - - if (this.shouldStop || this.shouldSkip || this.removed) return true; - } - - return false; -} - -function isBlacklisted() { - var blacklist = this.opts.blacklist; - return blacklist && blacklist.indexOf(this.node.type) > -1; -} - -function visit() { - if (!this.node) { - return false; - } - - if (this.isBlacklisted()) { - return false; - } - - if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { - return false; - } - - if (this.call("enter") || this.shouldSkip) { - this.debug(function () { - return "Skip..."; - }); - return this.shouldStop; - } - - this.debug(function () { - return "Recursing into..."; - }); - _index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); - - this.call("exit"); - - return this.shouldStop; -} - -function skip() { - this.shouldSkip = true; -} - -function skipKey(key) { - this.skipKeys[key] = true; -} - -function stop() { - this.shouldStop = true; - this.shouldSkip = true; -} - -function setScope() { - if (this.opts && this.opts.noScope) return; - - var target = this.context && this.context.scope; - - if (!target) { - var path = this.parentPath; - while (path && !target) { - if (path.opts && path.opts.noScope) return; - - target = path.scope; - path = path.parentPath; - } - } - - this.scope = this.getScope(target); - if (this.scope) this.scope.init(); -} - -function setContext(context) { - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.skipKeys = {}; - - if (context) { - this.context = context; - this.state = context.state; - this.opts = context.opts; - } - - this.setScope(); - - return this; -} - -function resync() { - if (this.removed) return; - - this._resyncParent(); - this._resyncList(); - this._resyncKey(); -} - -function _resyncParent() { - if (this.parentPath) { - this.parent = this.parentPath.node; - } -} - -function _resyncKey() { - if (!this.container) return; - - if (this.node === this.container[this.key]) return; - - if (Array.isArray(this.container)) { - for (var i = 0; i < this.container.length; i++) { - if (this.container[i] === this.node) { - return this.setKey(i); - } - } - } else { - for (var key in this.container) { - if (this.container[key] === this.node) { - return this.setKey(key); - } - } - } - - this.key = null; -} - -function _resyncList() { - if (!this.parent || !this.inList) return; - - var newContainer = this.parent[this.listKey]; - if (this.container === newContainer) return; - - this.container = newContainer || null; -} - -function _resyncRemoved() { - if (this.key == null || !this.container || this.container[this.key] !== this.node) { - this._markRemoved(); - } -} - -function popContext() { - this.contexts.pop(); - this.setContext(this.contexts[this.contexts.length - 1]); -} - -function pushContext(context) { - this.contexts.push(context); - this.setContext(context); -} - -function setup(parentPath, container, listKey, key) { - this.inList = !!listKey; - this.listKey = listKey; - this.parentKey = listKey || key; - this.container = container; - - this.parentPath = parentPath || this.parentPath; - this.setKey(key); -} - -function setKey(key) { - this.key = key; - this.node = this.container[this.key]; - this.type = this.node && this.node.type; -} - -function requeue() { - var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; - - if (pathToQueue.removed) return; - - var contexts = this.contexts; - - for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var context = _ref2; - - context.maybeQueue(pathToQueue); - } -} - -function _getQueueContexts() { - var path = this; - var contexts = this.contexts; - while (!contexts.length) { - path = path.parentPath; - contexts = path.contexts; - } - return contexts; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/conversion.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/conversion.js deleted file mode 100644 index 8989248..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/conversion.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.toComputedKey = toComputedKey; -exports.ensureBlock = ensureBlock; -exports.arrowFunctionToShadowed = arrowFunctionToShadowed; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function toComputedKey() { - var node = this.node; - - var key = void 0; - if (this.isMemberExpression()) { - key = node.property; - } else if (this.isProperty() || this.isMethod()) { - key = node.key; - } else { - throw new ReferenceError("todo"); - } - - if (!node.computed) { - if (t.isIdentifier(key)) key = t.stringLiteral(key.name); - } - - return key; -} - -function ensureBlock() { - return t.ensureBlock(this.node); -} - -function arrowFunctionToShadowed() { - if (!this.isArrowFunctionExpression()) return; - - this.ensureBlock(); - - var node = this.node; - - node.expression = false; - node.type = "FunctionExpression"; - node.shadow = node.shadow || true; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/evaluation.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/evaluation.js deleted file mode 100644 index 86aac21..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/evaluation.js +++ /dev/null @@ -1,398 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _map = require("babel-runtime/core-js/map"); - -var _map2 = _interopRequireDefault(_map); - -exports.evaluateTruthy = evaluateTruthy; -exports.evaluate = evaluate; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var VALID_CALLEES = ["String", "Number", "Math"]; -var INVALID_METHODS = ["random"]; - -function evaluateTruthy() { - var res = this.evaluate(); - if (res.confident) return !!res.value; -} - -function evaluate() { - var confident = true; - var deoptPath = void 0; - var seen = new _map2.default(); - - function deopt(path) { - if (!confident) return; - deoptPath = path; - confident = false; - } - - var value = evaluate(this); - if (!confident) value = undefined; - return { - confident: confident, - deopt: deoptPath, - value: value - }; - - function evaluate(path) { - var node = path.node; - - - if (seen.has(node)) { - var existing = seen.get(node); - if (existing.resolved) { - return existing.value; - } else { - deopt(path); - return; - } - } else { - var item = { resolved: false }; - seen.set(node, item); - - var val = _evaluate(path); - if (confident) { - item.resolved = true; - item.value = val; - } - return val; - } - } - - function _evaluate(path) { - if (!confident) return; - - var node = path.node; - - - if (path.isSequenceExpression()) { - var exprs = path.get("expressions"); - return evaluate(exprs[exprs.length - 1]); - } - - if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { - return node.value; - } - - if (path.isNullLiteral()) { - return null; - } - - if (path.isTemplateLiteral()) { - var str = ""; - - var i = 0; - var _exprs = path.get("expressions"); - - for (var _iterator = node.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var elem = _ref; - - if (!confident) break; - - str += elem.value.cooked; - - var expr = _exprs[i++]; - if (expr) str += String(evaluate(expr)); - } - - if (!confident) return; - return str; - } - - if (path.isConditionalExpression()) { - var testResult = evaluate(path.get("test")); - if (!confident) return; - if (testResult) { - return evaluate(path.get("consequent")); - } else { - return evaluate(path.get("alternate")); - } - } - - if (path.isExpressionWrapper()) { - return evaluate(path.get("expression")); - } - - if (path.isMemberExpression() && !path.parentPath.isCallExpression({ callee: node })) { - var property = path.get("property"); - var object = path.get("object"); - - if (object.isLiteral() && property.isIdentifier()) { - var _value = object.node.value; - var type = typeof _value === "undefined" ? "undefined" : (0, _typeof3.default)(_value); - if (type === "number" || type === "string") { - return _value[property.node.name]; - } - } - } - - if (path.isReferencedIdentifier()) { - var binding = path.scope.getBinding(node.name); - - if (binding && binding.constantViolations.length > 0) { - return deopt(binding.path); - } - - if (binding && path.node.start < binding.path.node.end) { - return deopt(binding.path); - } - - if (binding && binding.hasValue) { - return binding.value; - } else { - if (node.name === "undefined") { - return binding ? deopt(binding.path) : undefined; - } else if (node.name === "Infinity") { - return binding ? deopt(binding.path) : Infinity; - } else if (node.name === "NaN") { - return binding ? deopt(binding.path) : NaN; - } - - var resolved = path.resolve(); - if (resolved === path) { - return deopt(path); - } else { - return evaluate(resolved); - } - } - } - - if (path.isUnaryExpression({ prefix: true })) { - if (node.operator === "void") { - return undefined; - } - - var argument = path.get("argument"); - if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { - return "function"; - } - - var arg = evaluate(argument); - if (!confident) return; - switch (node.operator) { - case "!": - return !arg; - case "+": - return +arg; - case "-": - return -arg; - case "~": - return ~arg; - case "typeof": - return typeof arg === "undefined" ? "undefined" : (0, _typeof3.default)(arg); - } - } - - if (path.isArrayExpression()) { - var arr = []; - var elems = path.get("elements"); - for (var _iterator2 = elems, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _elem = _ref2; - - _elem = _elem.evaluate(); - - if (_elem.confident) { - arr.push(_elem.value); - } else { - return deopt(_elem); - } - } - return arr; - } - - if (path.isObjectExpression()) { - var obj = {}; - var props = path.get("properties"); - for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - if (prop.isObjectMethod() || prop.isSpreadProperty()) { - return deopt(prop); - } - var keyPath = prop.get("key"); - var key = keyPath; - if (prop.node.computed) { - key = key.evaluate(); - if (!key.confident) { - return deopt(keyPath); - } - key = key.value; - } else if (key.isIdentifier()) { - key = key.node.name; - } else { - key = key.node.value; - } - var valuePath = prop.get("value"); - var _value2 = valuePath.evaluate(); - if (!_value2.confident) { - return deopt(valuePath); - } - _value2 = _value2.value; - obj[key] = _value2; - } - return obj; - } - - if (path.isLogicalExpression()) { - var wasConfident = confident; - var left = evaluate(path.get("left")); - var leftConfident = confident; - confident = wasConfident; - var right = evaluate(path.get("right")); - var rightConfident = confident; - confident = leftConfident && rightConfident; - - switch (node.operator) { - case "||": - if (left && leftConfident) { - confident = true; - return left; - } - - if (!confident) return; - - return left || right; - case "&&": - if (!left && leftConfident || !right && rightConfident) { - confident = true; - } - - if (!confident) return; - - return left && right; - } - } - - if (path.isBinaryExpression()) { - var _left = evaluate(path.get("left")); - if (!confident) return; - var _right = evaluate(path.get("right")); - if (!confident) return; - - switch (node.operator) { - case "-": - return _left - _right; - case "+": - return _left + _right; - case "/": - return _left / _right; - case "*": - return _left * _right; - case "%": - return _left % _right; - case "**": - return Math.pow(_left, _right); - case "<": - return _left < _right; - case ">": - return _left > _right; - case "<=": - return _left <= _right; - case ">=": - return _left >= _right; - case "==": - return _left == _right; - case "!=": - return _left != _right; - case "===": - return _left === _right; - case "!==": - return _left !== _right; - case "|": - return _left | _right; - case "&": - return _left & _right; - case "^": - return _left ^ _right; - case "<<": - return _left << _right; - case ">>": - return _left >> _right; - case ">>>": - return _left >>> _right; - } - } - - if (path.isCallExpression()) { - var callee = path.get("callee"); - var context = void 0; - var func = void 0; - - if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { - func = global[node.callee.name]; - } - - if (callee.isMemberExpression()) { - var _object = callee.get("object"); - var _property = callee.get("property"); - - if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) { - context = global[_object.node.name]; - func = context[_property.node.name]; - } - - if (_object.isLiteral() && _property.isIdentifier()) { - var _type = (0, _typeof3.default)(_object.node.value); - if (_type === "string" || _type === "number") { - context = _object.node.value; - func = context[_property.node.name]; - } - } - } - - if (func) { - var args = path.get("arguments").map(evaluate); - if (!confident) return; - - return func.apply(context, args); - } - } - - deopt(path); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/family.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/family.js deleted file mode 100644 index 4dd3752..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/family.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.getStatementParent = getStatementParent; -exports.getOpposite = getOpposite; -exports.getCompletionRecords = getCompletionRecords; -exports.getSibling = getSibling; -exports.getPrevSibling = getPrevSibling; -exports.getNextSibling = getNextSibling; -exports.getAllNextSiblings = getAllNextSiblings; -exports.getAllPrevSiblings = getAllPrevSiblings; -exports.get = get; -exports._getKey = _getKey; -exports._getPattern = _getPattern; -exports.getBindingIdentifiers = getBindingIdentifiers; -exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; -exports.getBindingIdentifierPaths = getBindingIdentifierPaths; -exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStatementParent() { - var path = this; - - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - break; - } else { - path = path.parentPath; - } - } while (path); - - if (path && (path.isProgram() || path.isFile())) { - throw new Error("File/Program node, we can't possibly find a statement parent to this"); - } - - return path; -} - -function getOpposite() { - if (this.key === "left") { - return this.getSibling("right"); - } else if (this.key === "right") { - return this.getSibling("left"); - } -} - -function getCompletionRecords() { - var paths = []; - - var add = function add(path) { - if (path) paths = paths.concat(path.getCompletionRecords()); - }; - - if (this.isIfStatement()) { - add(this.get("consequent")); - add(this.get("alternate")); - } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { - add(this.get("body")); - } else if (this.isProgram() || this.isBlockStatement()) { - add(this.get("body").pop()); - } else if (this.isFunction()) { - return this.get("body").getCompletionRecords(); - } else if (this.isTryStatement()) { - add(this.get("block")); - add(this.get("handler")); - add(this.get("finalizer")); - } else { - paths.push(this); - } - - return paths; -} - -function getSibling(key) { - return _index2.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: key - }); -} - -function getPrevSibling() { - return this.getSibling(this.key - 1); -} - -function getNextSibling() { - return this.getSibling(this.key + 1); -} - -function getAllNextSiblings() { - var _key = this.key; - var sibling = this.getSibling(++_key); - var siblings = []; - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(++_key); - } - return siblings; -} - -function getAllPrevSiblings() { - var _key = this.key; - var sibling = this.getSibling(--_key); - var siblings = []; - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(--_key); - } - return siblings; -} - -function get(key, context) { - if (context === true) context = this.context; - var parts = key.split("."); - if (parts.length === 1) { - return this._getKey(key, context); - } else { - return this._getPattern(parts, context); - } -} - -function _getKey(key, context) { - var _this = this; - - var node = this.node; - var container = node[key]; - - if (Array.isArray(container)) { - return container.map(function (_, i) { - return _index2.default.get({ - listKey: key, - parentPath: _this, - parent: node, - container: container, - key: i - }).setContext(context); - }); - } else { - return _index2.default.get({ - parentPath: this, - parent: node, - container: node, - key: key - }).setContext(context); - } -} - -function _getPattern(parts, context) { - var path = this; - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - if (part === ".") { - path = path.parentPath; - } else { - if (Array.isArray(path)) { - path = path[part]; - } else { - path = path.get(part, context); - } - } - } - return path; -} - -function getBindingIdentifiers(duplicates) { - return t.getBindingIdentifiers(this.node, duplicates); -} - -function getOuterBindingIdentifiers(duplicates) { - return t.getOuterBindingIdentifiers(this.node, duplicates); -} - -function getBindingIdentifierPaths() { - var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var path = this; - var search = [].concat(path); - var ids = (0, _create2.default)(null); - - while (search.length) { - var id = search.shift(); - if (!id) continue; - if (!id.node) continue; - - var keys = t.getBindingIdentifiers.keys[id.node.type]; - - if (id.isIdentifier()) { - if (duplicates) { - var _ids = ids[id.node.name] = ids[id.node.name] || []; - _ids.push(id); - } else { - ids[id.node.name] = id; - } - continue; - } - - if (id.isExportDeclaration()) { - var declaration = id.get("declaration"); - if (declaration.isDeclaration()) { - search.push(declaration); - } - continue; - } - - if (outerOnly) { - if (id.isFunctionDeclaration()) { - search.push(id.get("id")); - continue; - } - if (id.isFunctionExpression()) { - continue; - } - } - - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var child = id.get(key); - if (Array.isArray(child) || child.node) { - search = search.concat(child); - } - } - } - } - - return ids; -} - -function getOuterBindingIdentifierPaths(duplicates) { - return this.getBindingIdentifierPaths(duplicates, true); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/index.js deleted file mode 100644 index dd8ae24..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/index.js +++ /dev/null @@ -1,242 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _virtualTypes = require("./lib/virtual-types"); - -var virtualTypes = _interopRequireWildcard(_virtualTypes); - -var _debug2 = require("debug"); - -var _debug3 = _interopRequireDefault(_debug2); - -var _invariant = require("invariant"); - -var _invariant2 = _interopRequireDefault(_invariant); - -var _index = require("../index"); - -var _index2 = _interopRequireDefault(_index); - -var _assign = require("lodash/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -var _scope = require("../scope"); - -var _scope2 = _interopRequireDefault(_scope); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _cache = require("../cache"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _debug = (0, _debug3.default)("babel"); - -var NodePath = function () { - function NodePath(hub, parent) { - (0, _classCallCheck3.default)(this, NodePath); - - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = {}; - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } - - NodePath.get = function get(_ref) { - var hub = _ref.hub, - parentPath = _ref.parentPath, - parent = _ref.parent, - container = _ref.container, - listKey = _ref.listKey, - key = _ref.key; - - if (!hub && parentPath) { - hub = parentPath.hub; - } - - (0, _invariant2.default)(parent, "To get a node path the parent needs to exist"); - - var targetNode = container[key]; - - var paths = _cache.path.get(parent) || []; - if (!_cache.path.has(parent)) { - _cache.path.set(parent, paths); - } - - var path = void 0; - - for (var i = 0; i < paths.length; i++) { - var pathCheck = paths[i]; - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } - - path.setup(parentPath, container, listKey, key); - - return path; - }; - - NodePath.prototype.getScope = function getScope(scope) { - var ourScope = scope; - - if (this.isScope()) { - ourScope = new _scope2.default(this, scope); - } - - return ourScope; - }; - - NodePath.prototype.setData = function setData(key, val) { - return this.data[key] = val; - }; - - NodePath.prototype.getData = function getData(key, def) { - var val = this.data[key]; - if (!val && def) val = this.data[key] = def; - return val; - }; - - NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) { - var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError; - - return this.hub.file.buildCodeFrameError(this.node, msg, Error); - }; - - NodePath.prototype.traverse = function traverse(visitor, state) { - (0, _index2.default)(this.node, visitor, this.scope, state, this); - }; - - NodePath.prototype.mark = function mark(type, message) { - this.hub.file.metadata.marked.push({ - type: type, - message: message, - loc: this.node.loc - }); - }; - - NodePath.prototype.set = function set(key, node) { - t.validate(this.node, key, node); - this.node[key] = node; - }; - - NodePath.prototype.getPathLocation = function getPathLocation() { - var parts = []; - var path = this; - do { - var key = path.key; - if (path.inList) key = path.listKey + "[" + key + "]"; - parts.unshift(key); - } while (path = path.parentPath); - return parts.join("."); - }; - - NodePath.prototype.debug = function debug(buildMessage) { - if (!_debug.enabled) return; - _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage()); - }; - - return NodePath; -}(); - -exports.default = NodePath; - - -(0, _assign2.default)(NodePath.prototype, require("./ancestry")); -(0, _assign2.default)(NodePath.prototype, require("./inference")); -(0, _assign2.default)(NodePath.prototype, require("./replacement")); -(0, _assign2.default)(NodePath.prototype, require("./evaluation")); -(0, _assign2.default)(NodePath.prototype, require("./conversion")); -(0, _assign2.default)(NodePath.prototype, require("./introspection")); -(0, _assign2.default)(NodePath.prototype, require("./context")); -(0, _assign2.default)(NodePath.prototype, require("./removal")); -(0, _assign2.default)(NodePath.prototype, require("./modification")); -(0, _assign2.default)(NodePath.prototype, require("./family")); -(0, _assign2.default)(NodePath.prototype, require("./comments")); - -var _loop2 = function _loop2() { - if (_isArray) { - if (_i >= _iterator.length) return "break"; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) return "break"; - _ref2 = _i.value; - } - - var type = _ref2; - - var typeKey = "is" + type; - NodePath.prototype[typeKey] = function (opts) { - return t[typeKey](this.node, opts); - }; - - NodePath.prototype["assert" + type] = function (opts) { - if (!this[typeKey](opts)) { - throw new TypeError("Expected node path of type " + type); - } - }; -}; - -for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref2; - - var _ret2 = _loop2(); - - if (_ret2 === "break") break; -} - -var _loop = function _loop(type) { - if (type[0] === "_") return "continue"; - if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); - - var virtualType = virtualTypes[type]; - - NodePath.prototype["is" + type] = function (opts) { - return virtualType.checkPath(this, opts); - }; -}; - -for (var type in virtualTypes) { - var _ret = _loop(type); - - if (_ret === "continue") continue; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/index.js deleted file mode 100644 index d939663..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/index.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.getTypeAnnotation = getTypeAnnotation; -exports._getTypeAnnotation = _getTypeAnnotation; -exports.isBaseType = isBaseType; -exports.couldBeBaseType = couldBeBaseType; -exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; -exports.isGenericType = isGenericType; - -var _inferers = require("./inferers"); - -var inferers = _interopRequireWildcard(_inferers); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getTypeAnnotation() { - if (this.typeAnnotation) return this.typeAnnotation; - - var type = this._getTypeAnnotation() || t.anyTypeAnnotation(); - if (t.isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; -} - -function _getTypeAnnotation() { - var node = this.node; - - if (!node) { - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - var declar = this.parentPath.parentPath; - var declarParent = declar.parentPath; - - if (declar.key === "left" && declarParent.isForInStatement()) { - return t.stringTypeAnnotation(); - } - - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t.anyTypeAnnotation(); - } - - return t.voidTypeAnnotation(); - } else { - return; - } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - - var inferer = inferers[node.type]; - if (inferer) { - return inferer.call(this, node); - } - - inferer = inferers[this.parentPath.type]; - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); - } -} - -function isBaseType(baseName, soft) { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); -} - -function _isBaseType(baseName, type, soft) { - if (baseName === "string") { - return t.isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t.isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t.isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t.isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t.isMixedTypeAnnotation(type); - } else if (baseName === "empty") { - return t.isEmptyTypeAnnotation(type); - } else if (baseName === "void") { - return t.isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error("Unknown base type " + baseName); - } - } -} - -function couldBeBaseType(name) { - var type = this.getTypeAnnotation(); - if (t.isAnyTypeAnnotation(type)) return true; - - if (t.isUnionTypeAnnotation(type)) { - for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var type2 = _ref; - - if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } - } - return false; - } else { - return _isBaseType(name, type, true); - } -} - -function baseTypeStrictlyMatches(right) { - var left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); - - if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) { - return right.type === left.type; - } -} - -function isGenericType(genericName) { - var type = this.getTypeAnnotation(); - return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName }); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferer-reference.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferer-reference.js deleted file mode 100644 index 3a8ff31..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferer-reference.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.default = function (node) { - if (!this.isReferenced()) return; - - var binding = this.scope.getBinding(node.name); - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(this, node.name); - } - } - - if (node.name === "undefined") { - return t.voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t.numberTypeAnnotation(); - } else if (node.name === "arguments") {} -}; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getTypeAnnotationBindingConstantViolations(path, name) { - var binding = path.scope.getBinding(name); - - var types = []; - path.typeAnnotation = t.unionTypeAnnotation(types); - - var functionConstantViolations = []; - var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - - var testType = getConditionalAnnotation(path, name); - if (testType) { - var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - - constantViolations = constantViolations.filter(function (path) { - return testConstantViolations.indexOf(path) < 0; - }); - - types.push(testType.typeAnnotation); - } - - if (constantViolations.length) { - constantViolations = constantViolations.concat(functionConstantViolations); - - for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var violation = _ref; - - types.push(violation.getTypeAnnotation()); - } - } - - if (types.length) { - return t.createUnionTypeAnnotation(types); - } -} - -function getConstantViolationsBefore(binding, path, functions) { - var violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(function (violation) { - violation = violation.resolve(); - var status = violation._guessExecutionStatusRelativeTo(path); - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); -} - -function inferAnnotationFromBinaryExpression(name, path) { - var operator = path.node.operator; - - var right = path.get("right").resolve(); - var left = path.get("left").resolve(); - - var target = void 0; - if (left.isIdentifier({ name: name })) { - target = right; - } else if (right.isIdentifier({ name: name })) { - target = left; - } - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else { - return; - } - } else { - if (operator !== "===") return; - } - - var typeofPath = void 0; - var typePath = void 0; - if (left.isUnaryExpression({ operator: "typeof" })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ operator: "typeof" })) { - typeofPath = right; - typePath = left; - } - if (!typePath && !typeofPath) return; - - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; - - var typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; - - if (!typeofPath.get("argument").isIdentifier({ name: name })) return; - - return t.createTypeAnnotationBasedOnTypeof(typePath.node.value); -} - -function getParentConditionalPath(path) { - var parentPath = void 0; - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } else { - return parentPath; - } - } else { - path = parentPath; - } - } -} - -function getConditionalAnnotation(path, name) { - var ifStatement = getParentConditionalPath(path); - if (!ifStatement) return; - - var test = ifStatement.get("test"); - var paths = [test]; - var types = []; - - do { - var _path = paths.shift().resolve(); - - if (_path.isLogicalExpression()) { - paths.push(_path.get("left")); - paths.push(_path.get("right")); - } - - if (_path.isBinaryExpression()) { - var type = inferAnnotationFromBinaryExpression(name, _path); - if (type) types.push(type); - } - } while (paths.length); - - if (types.length) { - return { - typeAnnotation: t.createUnionTypeAnnotation(types), - ifStatement: ifStatement - }; - } else { - return getConditionalAnnotation(ifStatement, name); - } -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferers.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferers.js deleted file mode 100644 index ecce2b4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/inference/inferers.js +++ /dev/null @@ -1,195 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined; - -var _infererReference = require("./inferer-reference"); - -Object.defineProperty(exports, "Identifier", { - enumerable: true, - get: function get() { - return _interopRequireDefault(_infererReference).default; - } -}); -exports.VariableDeclarator = VariableDeclarator; -exports.TypeCastExpression = TypeCastExpression; -exports.NewExpression = NewExpression; -exports.TemplateLiteral = TemplateLiteral; -exports.UnaryExpression = UnaryExpression; -exports.BinaryExpression = BinaryExpression; -exports.LogicalExpression = LogicalExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.SequenceExpression = SequenceExpression; -exports.AssignmentExpression = AssignmentExpression; -exports.UpdateExpression = UpdateExpression; -exports.StringLiteral = StringLiteral; -exports.NumericLiteral = NumericLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.RegExpLiteral = RegExpLiteral; -exports.ObjectExpression = ObjectExpression; -exports.ArrayExpression = ArrayExpression; -exports.RestElement = RestElement; -exports.CallExpression = CallExpression; -exports.TaggedTemplateExpression = TaggedTemplateExpression; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function VariableDeclarator() { - var id = this.get("id"); - - if (id.isIdentifier()) { - return this.get("init").getTypeAnnotation(); - } else { - return; - } -} - -function TypeCastExpression(node) { - return node.typeAnnotation; -} - -TypeCastExpression.validParent = true; - -function NewExpression(node) { - if (this.get("callee").isIdentifier()) { - return t.genericTypeAnnotation(node.callee); - } -} - -function TemplateLiteral() { - return t.stringTypeAnnotation(); -} - -function UnaryExpression(node) { - var operator = node.operator; - - if (operator === "void") { - return t.voidTypeAnnotation(); - } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.stringTypeAnnotation(); - } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); - } -} - -function BinaryExpression(node) { - var operator = node.operator; - - if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.numberTypeAnnotation(); - } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t.booleanTypeAnnotation(); - } else if (operator === "+") { - var right = this.get("right"); - var left = this.get("left"); - - if (left.isBaseType("number") && right.isBaseType("number")) { - return t.numberTypeAnnotation(); - } else if (left.isBaseType("string") || right.isBaseType("string")) { - return t.stringTypeAnnotation(); - } - - return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]); - } -} - -function LogicalExpression() { - return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); -} - -function ConditionalExpression() { - return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); -} - -function SequenceExpression() { - return this.get("expressions").pop().getTypeAnnotation(); -} - -function AssignmentExpression() { - return this.get("right").getTypeAnnotation(); -} - -function UpdateExpression(node) { - var operator = node.operator; - if (operator === "++" || operator === "--") { - return t.numberTypeAnnotation(); - } -} - -function StringLiteral() { - return t.stringTypeAnnotation(); -} - -function NumericLiteral() { - return t.numberTypeAnnotation(); -} - -function BooleanLiteral() { - return t.booleanTypeAnnotation(); -} - -function NullLiteral() { - return t.nullLiteralTypeAnnotation(); -} - -function RegExpLiteral() { - return t.genericTypeAnnotation(t.identifier("RegExp")); -} - -function ObjectExpression() { - return t.genericTypeAnnotation(t.identifier("Object")); -} - -function ArrayExpression() { - return t.genericTypeAnnotation(t.identifier("Array")); -} - -function RestElement() { - return ArrayExpression(); -} - -RestElement.validParent = true; - -function Func() { - return t.genericTypeAnnotation(t.identifier("Function")); -} - -exports.FunctionExpression = Func; -exports.ArrowFunctionExpression = Func; -exports.FunctionDeclaration = Func; -exports.ClassExpression = Func; -exports.ClassDeclaration = Func; -function CallExpression() { - return resolveCall(this.get("callee")); -} - -function TaggedTemplateExpression() { - return resolveCall(this.get("tag")); -} - -function resolveCall(callee) { - callee = callee.resolve(); - - if (callee.isFunction()) { - if (callee.is("async")) { - if (callee.is("generator")) { - return t.genericTypeAnnotation(t.identifier("AsyncIterator")); - } else { - return t.genericTypeAnnotation(t.identifier("Promise")); - } - } else { - if (callee.node.returnType) { - return callee.node.returnType; - } else {} - } - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/introspection.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/introspection.js deleted file mode 100644 index 27be039..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/introspection.js +++ /dev/null @@ -1,386 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.is = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.matchesPattern = matchesPattern; -exports.has = has; -exports.isStatic = isStatic; -exports.isnt = isnt; -exports.equals = equals; -exports.isNodeType = isNodeType; -exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; -exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; -exports.isCompletionRecord = isCompletionRecord; -exports.isStatementOrBlock = isStatementOrBlock; -exports.referencesImport = referencesImport; -exports.getSource = getSource; -exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; -exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; -exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; -exports.resolve = resolve; -exports._resolve = _resolve; - -var _includes = require("lodash/includes"); - -var _includes2 = _interopRequireDefault(_includes); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function matchesPattern(pattern, allowPartial) { - if (!this.isMemberExpression()) return false; - - var parts = pattern.split("."); - var search = [this.node]; - var i = 0; - - function matches(name) { - var part = parts[i]; - return part === "*" || name === part; - } - - while (search.length) { - var node = search.shift(); - - if (allowPartial && i === parts.length) { - return true; - } - - if (t.isIdentifier(node)) { - if (!matches(node.name)) return false; - } else if (t.isLiteral(node)) { - if (!matches(node.value)) return false; - } else if (t.isMemberExpression(node)) { - if (node.computed && !t.isLiteral(node.property)) { - return false; - } else { - search.unshift(node.property); - search.unshift(node.object); - continue; - } - } else if (t.isThisExpression(node)) { - if (!matches("this")) return false; - } else { - return false; - } - - if (++i > parts.length) { - return false; - } - } - - return i === parts.length; -} - -function has(key) { - var val = this.node && this.node[key]; - if (val && Array.isArray(val)) { - return !!val.length; - } else { - return !!val; - } -} - -function isStatic() { - return this.scope.isStatic(this.node); -} - -var is = exports.is = has; - -function isnt(key) { - return !this.has(key); -} - -function equals(key, value) { - return this.node[key] === value; -} - -function isNodeType(type) { - return t.isType(this.type, type); -} - -function canHaveVariableDeclarationOrExpression() { - return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); -} - -function canSwapBetweenExpressionAndStatement(replacement) { - if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { - return false; - } - - if (this.isExpression()) { - return t.isBlockStatement(replacement); - } else if (this.isBlockStatement()) { - return t.isExpression(replacement); - } - - return false; -} - -function isCompletionRecord(allowInsideFunction) { - var path = this; - var first = true; - - do { - var container = path.container; - - if (path.isFunction() && !first) { - return !!allowInsideFunction; - } - - first = false; - - if (Array.isArray(container) && path.key !== container.length - 1) { - return false; - } - } while ((path = path.parentPath) && !path.isProgram()); - - return true; -} - -function isStatementOrBlock() { - if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) { - return false; - } else { - return (0, _includes2.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key); - } -} - -function referencesImport(moduleSource, importName) { - if (!this.isReferencedIdentifier()) return false; - - var binding = this.scope.getBinding(this.node.name); - if (!binding || binding.kind !== "module") return false; - - var path = binding.path; - var parent = path.parentPath; - if (!parent.isImportDeclaration()) return false; - - if (parent.node.source.value === moduleSource) { - if (!importName) return true; - } else { - return false; - } - - if (path.isImportDefaultSpecifier() && importName === "default") { - return true; - } - - if (path.isImportNamespaceSpecifier() && importName === "*") { - return true; - } - - if (path.isImportSpecifier() && path.node.imported.name === importName) { - return true; - } - - return false; -} - -function getSource() { - var node = this.node; - if (node.end) { - return this.hub.file.code.slice(node.start, node.end); - } else { - return ""; - } -} - -function willIMaybeExecuteBefore(target) { - return this._guessExecutionStatusRelativeTo(target) !== "after"; -} - -function _guessExecutionStatusRelativeTo(target) { - var targetFuncParent = target.scope.getFunctionParent(); - var selfFuncParent = this.scope.getFunctionParent(); - - if (targetFuncParent.node !== selfFuncParent.node) { - var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); - if (status) { - return status; - } else { - target = targetFuncParent.path; - } - } - - var targetPaths = target.getAncestry(); - if (targetPaths.indexOf(this) >= 0) return "after"; - - var selfPaths = this.getAncestry(); - - var commonPath = void 0; - var targetIndex = void 0; - var selfIndex = void 0; - for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { - var selfPath = selfPaths[selfIndex]; - targetIndex = targetPaths.indexOf(selfPath); - if (targetIndex >= 0) { - commonPath = selfPath; - break; - } - } - if (!commonPath) { - return "before"; - } - - var targetRelationship = targetPaths[targetIndex - 1]; - var selfRelationship = selfPaths[selfIndex - 1]; - if (!targetRelationship || !selfRelationship) { - return "before"; - } - - if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { - return targetRelationship.key > selfRelationship.key ? "before" : "after"; - } - - var targetKeyPosition = t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key); - var selfKeyPosition = t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key); - return targetKeyPosition > selfKeyPosition ? "before" : "after"; -} - -function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { - var targetFuncPath = targetFuncParent.path; - if (!targetFuncPath.isFunctionDeclaration()) return; - - var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); - - if (!binding.references) return "before"; - - var referencePaths = binding.referencePaths; - - for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - if (path.key !== "callee" || !path.parentPath.isCallExpression()) { - return; - } - } - - var allStatus = void 0; - - for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _path = _ref2; - - var childOfFunction = !!_path.find(function (path) { - return path.node === targetFuncPath.node; - }); - if (childOfFunction) continue; - - var status = this._guessExecutionStatusRelativeTo(_path); - - if (allStatus) { - if (allStatus !== status) return; - } else { - allStatus = status; - } - } - - return allStatus; -} - -function resolve(dangerous, resolved) { - return this._resolve(dangerous, resolved) || this; -} - -function _resolve(dangerous, resolved) { - if (resolved && resolved.indexOf(this) >= 0) return; - - resolved = resolved || []; - resolved.push(this); - - if (this.isVariableDeclarator()) { - if (this.get("id").isIdentifier()) { - return this.get("init").resolve(dangerous, resolved); - } else {} - } else if (this.isReferencedIdentifier()) { - var binding = this.scope.getBinding(this.node.name); - if (!binding) return; - - if (!binding.constant) return; - - if (binding.kind === "module") return; - - if (binding.path !== this) { - var ret = binding.path.resolve(dangerous, resolved); - - if (this.find(function (parent) { - return parent.node === ret.node; - })) return; - return ret; - } - } else if (this.isTypeCastExpression()) { - return this.get("expression").resolve(dangerous, resolved); - } else if (dangerous && this.isMemberExpression()) { - - var targetKey = this.toComputedKey(); - if (!t.isLiteral(targetKey)) return; - - var targetName = targetKey.value; - - var target = this.get("object").resolve(dangerous, resolved); - - if (target.isObjectExpression()) { - var props = target.get("properties"); - for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - if (!prop.isProperty()) continue; - - var key = prop.get("key"); - - var match = prop.isnt("computed") && key.isIdentifier({ name: targetName }); - - match = match || key.isLiteral({ value: targetName }); - - if (match) return prop.get("value").resolve(dangerous, resolved); - } - } else if (target.isArrayExpression() && !isNaN(+targetName)) { - var elems = target.get("elements"); - var elem = elems[targetName]; - if (elem) return elem.resolve(dangerous, resolved); - } - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/hoister.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/hoister.js deleted file mode 100644 index 7e4e8be..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/hoister.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var referenceVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { - return; - } - - if (path.node.name === "this") { - var scope = path.scope; - do { - if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break; - } while (scope = scope.parent); - if (scope) state.breakOnScopePaths.push(scope.path); - } - - var binding = path.scope.getBinding(path.node.name); - if (!binding) return; - - if (binding !== state.scope.getBinding(path.node.name)) return; - - state.bindings[path.node.name] = binding; - } -}; - -var PathHoister = function () { - function PathHoister(path, scope) { - (0, _classCallCheck3.default)(this, PathHoister); - - this.breakOnScopePaths = []; - - this.bindings = {}; - - this.scopes = []; - - this.scope = scope; - this.path = path; - - this.attachAfter = false; - } - - PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) { - for (var key in this.bindings) { - var binding = this.bindings[key]; - if (!scope.bindingIdentifierEquals(key, binding.identifier)) { - return false; - } - } - - return true; - }; - - PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() { - var scope = this.path.scope; - do { - if (this.isCompatibleScope(scope)) { - this.scopes.push(scope); - } else { - break; - } - - if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { - break; - } - } while (scope = scope.parent); - }; - - PathHoister.prototype.getAttachmentPath = function getAttachmentPath() { - var path = this._getAttachmentPath(); - if (!path) return; - - var targetScope = path.scope; - - if (targetScope.path === path) { - targetScope = path.scope.parent; - } - - if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (var name in this.bindings) { - if (!targetScope.hasOwnBinding(name)) continue; - - var binding = this.bindings[name]; - - if (binding.kind === "param") continue; - - if (this.getAttachmentParentForPath(binding.path).key > path.key) { - this.attachAfter = true; - path = binding.path; - - for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var violationPath = _ref; - - if (this.getAttachmentParentForPath(violationPath).key > path.key) { - path = violationPath; - } - } - } - } - } - - if (path.parentPath.isExportDeclaration()) { - path = path.parentPath; - } - - return path; - }; - - PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() { - var scopes = this.scopes; - - var scope = scopes.pop(); - - if (!scope) return; - - if (scope.path.isFunction()) { - if (this.hasOwnParamBindings(scope)) { - if (this.scope === scope) return; - - return scope.path.get("body").get("body")[0]; - } else { - return this.getNextScopeAttachmentParent(); - } - } else if (scope.path.isProgram()) { - return this.getNextScopeAttachmentParent(); - } - }; - - PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() { - var scope = this.scopes.pop(); - if (scope) return this.getAttachmentParentForPath(scope.path); - }; - - PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) { - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path; - } while (path = path.parentPath); - }; - - PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) { - for (var name in this.bindings) { - if (!scope.hasOwnBinding(name)) continue; - - var binding = this.bindings[name]; - - if (binding.kind === "param" && binding.constant) return true; - } - return false; - }; - - PathHoister.prototype.run = function run() { - var node = this.path.node; - if (node._hoisted) return; - node._hoisted = true; - - this.path.traverse(referenceVisitor, this); - - this.getCompatibleScopes(); - - var attachTo = this.getAttachmentPath(); - if (!attachTo) return; - - if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; - - var uid = attachTo.scope.generateUidIdentifier("ref"); - var declarator = t.variableDeclarator(uid, this.path.node); - - var insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; - attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]); - - var parent = this.path.parentPath; - if (parent.isJSXElement() && this.path.container === parent.node.children) { - uid = t.JSXExpressionContainer(uid); - } - - this.path.replaceWith(uid); - }; - - return PathHoister; -}(); - -exports.default = PathHoister; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/removal-hooks.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/removal-hooks.js deleted file mode 100644 index 6058ec1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/removal-hooks.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -exports.__esModule = true; -var hooks = exports.hooks = [function (self, parent) { - var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); - - if (removeParent) { - parent.remove(); - return true; - } -}, function (self, parent) { - if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { - parent.replaceWith(parent.node.expressions[0]); - return true; - } -}, function (self, parent) { - if (parent.isBinary()) { - if (self.key === "left") { - parent.replaceWith(parent.node.right); - } else { - parent.replaceWith(parent.node.left); - } - return true; - } -}, function (self, parent) { - if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { - self.replaceWith({ - type: "BlockStatement", - body: [] - }); - return true; - } -}]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/virtual-types.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/virtual-types.js deleted file mode 100644 index 80bb5b9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/lib/virtual-types.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var ReferencedIdentifier = exports.ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - checkPath: function checkPath(_ref, opts) { - var node = _ref.node, - parent = _ref.parent; - - if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) { - if (t.isJSXIdentifier(node, opts)) { - if (_babelTypes.react.isCompatTag(node.name)) return false; - } else { - return false; - } - } - - return t.isReferenced(node, parent); - } -}; - -var ReferencedMemberExpression = exports.ReferencedMemberExpression = { - types: ["MemberExpression"], - checkPath: function checkPath(_ref2) { - var node = _ref2.node, - parent = _ref2.parent; - - return t.isMemberExpression(node) && t.isReferenced(node, parent); - } -}; - -var BindingIdentifier = exports.BindingIdentifier = { - types: ["Identifier"], - checkPath: function checkPath(_ref3) { - var node = _ref3.node, - parent = _ref3.parent; - - return t.isIdentifier(node) && t.isBinding(node, parent); - } -}; - -var Statement = exports.Statement = { - types: ["Statement"], - checkPath: function checkPath(_ref4) { - var node = _ref4.node, - parent = _ref4.parent; - - if (t.isStatement(node)) { - if (t.isVariableDeclaration(node)) { - if (t.isForXStatement(parent, { left: node })) return false; - if (t.isForStatement(parent, { init: node })) return false; - } - - return true; - } else { - return false; - } - } -}; - -var Expression = exports.Expression = { - types: ["Expression"], - checkPath: function checkPath(path) { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t.isExpression(path.node); - } - } -}; - -var Scope = exports.Scope = { - types: ["Scopable"], - checkPath: function checkPath(path) { - return t.isScope(path.node, path.parent); - } -}; - -var Referenced = exports.Referenced = { - checkPath: function checkPath(path) { - return t.isReferenced(path.node, path.parent); - } -}; - -var BlockScoped = exports.BlockScoped = { - checkPath: function checkPath(path) { - return t.isBlockScoped(path.node); - } -}; - -var Var = exports.Var = { - types: ["VariableDeclaration"], - checkPath: function checkPath(path) { - return t.isVar(path.node); - } -}; - -var User = exports.User = { - checkPath: function checkPath(path) { - return path.node && !!path.node.loc; - } -}; - -var Generated = exports.Generated = { - checkPath: function checkPath(path) { - return !path.isUser(); - } -}; - -var Pure = exports.Pure = { - checkPath: function checkPath(path, opts) { - return path.scope.isPure(path.node, opts); - } -}; - -var Flow = exports.Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], - checkPath: function checkPath(_ref5) { - var node = _ref5.node; - - if (t.isFlow(node)) { - return true; - } else if (t.isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t.isExportDeclaration(node)) { - return node.exportKind === "type"; - } else if (t.isImportSpecifier(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else { - return false; - } - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/modification.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/modification.js deleted file mode 100644 index 30fb165..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/modification.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.insertBefore = insertBefore; -exports._containerInsert = _containerInsert; -exports._containerInsertBefore = _containerInsertBefore; -exports._containerInsertAfter = _containerInsertAfter; -exports._maybePopFromStatements = _maybePopFromStatements; -exports.insertAfter = insertAfter; -exports.updateSiblingKeys = updateSiblingKeys; -exports._verifyNodeList = _verifyNodeList; -exports.unshiftContainer = unshiftContainer; -exports.pushContainer = pushContainer; -exports.hoist = hoist; - -var _cache = require("../cache"); - -var _hoister = require("./lib/hoister"); - -var _hoister2 = _interopRequireDefault(_hoister); - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function insertBefore(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { - return this.parentPath.insertBefore(nodes); - } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { - if (this.node) nodes.push(this.node); - this.replaceExpressionWithStatements(nodes); - } else { - this._maybePopFromStatements(nodes); - if (Array.isArray(this.container)) { - return this._containerInsertBefore(nodes); - } else if (this.isStatementOrBlock()) { - if (this.node) nodes.push(this.node); - this._replaceWith(t.blockStatement(nodes)); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } - } - - return [this]; -} - -function _containerInsert(from, nodes) { - this.updateSiblingKeys(from, nodes.length); - - var paths = []; - - for (var i = 0; i < nodes.length; i++) { - var to = from + i; - var node = nodes[i]; - this.container.splice(to, 0, node); - - if (this.context) { - var path = this.context.create(this.parent, this.container, to, this.listKey); - - if (this.context.queue) path.pushContext(this.context); - paths.push(path); - } else { - paths.push(_index2.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: to - })); - } - } - - var contexts = this._getQueueContexts(); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _path = _ref; - - _path.setScope(); - _path.debug(function () { - return "Inserted."; - }); - - for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var context = _ref2; - - context.maybeQueue(_path, true); - } - } - - return paths; -} - -function _containerInsertBefore(nodes) { - return this._containerInsert(this.key, nodes); -} - -function _containerInsertAfter(nodes) { - return this._containerInsert(this.key + 1, nodes); -} - -function _maybePopFromStatements(nodes) { - var last = nodes[nodes.length - 1]; - var isIdentifier = t.isIdentifier(last) || t.isExpressionStatement(last) && t.isIdentifier(last.expression); - - if (isIdentifier && !this.isCompletionRecord()) { - nodes.pop(); - } -} - -function insertAfter(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) { - return this.parentPath.insertAfter(nodes); - } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") { - if (this.node) { - var temp = this.scope.generateDeclaredUidIdentifier(); - nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node))); - nodes.push(t.expressionStatement(temp)); - } - this.replaceExpressionWithStatements(nodes); - } else { - this._maybePopFromStatements(nodes); - if (Array.isArray(this.container)) { - return this._containerInsertAfter(nodes); - } else if (this.isStatementOrBlock()) { - if (this.node) nodes.unshift(this.node); - this._replaceWith(t.blockStatement(nodes)); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } - } - - return [this]; -} - -function updateSiblingKeys(fromIndex, incrementBy) { - if (!this.parent) return; - - var paths = _cache.path.get(this.parent); - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (path.key >= fromIndex) { - path.key += incrementBy; - } - } -} - -function _verifyNodeList(nodes) { - if (!nodes) { - return []; - } - - if (nodes.constructor !== Array) { - nodes = [nodes]; - } - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var msg = void 0; - - if (!node) { - msg = "has falsy node"; - } else if ((typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node)) !== "object") { - msg = "contains a non-object node"; - } else if (!node.type) { - msg = "without a type"; - } else if (node instanceof _index2.default) { - msg = "has a NodePath when it expected a raw object"; - } - - if (msg) { - var type = Array.isArray(node) ? "array" : typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node); - throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type); - } - } - - return nodes; -} - -function unshiftContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - var path = _index2.default.get({ - parentPath: this, - parent: this.node, - container: this.node[listKey], - listKey: listKey, - key: 0 - }); - - return path.insertBefore(nodes); -} - -function pushContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - var container = this.node[listKey]; - var path = _index2.default.get({ - parentPath: this, - parent: this.node, - container: container, - listKey: listKey, - key: container.length - }); - - return path.replaceWithMultiple(nodes); -} - -function hoist() { - var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.scope; - - var hoister = new _hoister2.default(this, scope); - return hoister.run(); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/removal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/removal.js deleted file mode 100644 index 04f3147..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/removal.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.remove = remove; -exports._callRemovalHooks = _callRemovalHooks; -exports._remove = _remove; -exports._markRemoved = _markRemoved; -exports._assertUnremoved = _assertUnremoved; - -var _removalHooks = require("./lib/removal-hooks"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function remove() { - this._assertUnremoved(); - - this.resync(); - - if (this._callRemovalHooks()) { - this._markRemoved(); - return; - } - - this.shareCommentsWithSiblings(); - this._remove(); - this._markRemoved(); -} - -function _callRemovalHooks() { - for (var _iterator = _removalHooks.hooks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - - if (fn(this, this.parentPath)) return true; - } -} - -function _remove() { - if (Array.isArray(this.container)) { - this.container.splice(this.key, 1); - this.updateSiblingKeys(this.key, -1); - } else { - this._replaceWith(null); - } -} - -function _markRemoved() { - this.shouldSkip = true; - this.removed = true; - this.node = null; -} - -function _assertUnremoved() { - if (this.removed) { - throw this.buildCodeFrameError("NodePath has been removed so is read-only."); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/replacement.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/replacement.js deleted file mode 100644 index 411dacf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/path/replacement.js +++ /dev/null @@ -1,268 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.replaceWithMultiple = replaceWithMultiple; -exports.replaceWithSourceString = replaceWithSourceString; -exports.replaceWith = replaceWith; -exports._replaceWith = _replaceWith; -exports.replaceExpressionWithStatements = replaceExpressionWithStatements; -exports.replaceInline = replaceInline; - -var _babelCodeFrame = require("babel-code-frame"); - -var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame); - -var _index = require("../index"); - -var _index2 = _interopRequireDefault(_index); - -var _index3 = require("./index"); - -var _index4 = _interopRequireDefault(_index3); - -var _babylon = require("babylon"); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hoistVariablesVisitor = { - Function: function Function(path) { - path.skip(); - }, - VariableDeclaration: function VariableDeclaration(path) { - if (path.node.kind !== "var") return; - - var bindings = path.getBindingIdentifiers(); - for (var key in bindings) { - path.scope.push({ id: bindings[key] }); - } - - var exprs = []; - - for (var _iterator = path.node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var declar = _ref; - - if (declar.init) { - exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init))); - } - } - - path.replaceWithMultiple(exprs); - } -}; - -function replaceWithMultiple(nodes) { - this.resync(); - - nodes = this._verifyNodeList(nodes); - t.inheritLeadingComments(nodes[0], this.node); - t.inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - this.insertAfter(nodes); - - if (this.node) { - this.requeue(); - } else { - this.remove(); - } -} - -function replaceWithSourceString(replacement) { - this.resync(); - - try { - replacement = "(" + replacement + ")"; - replacement = (0, _babylon.parse)(replacement); - } catch (err) { - var loc = err.loc; - if (loc) { - err.message += " - make sure this is an expression."; - err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1); - } - throw err; - } - - replacement = replacement.program.body[0].expression; - _index2.default.removeProperties(replacement); - return this.replaceWith(replacement); -} - -function replaceWith(replacement) { - this.resync(); - - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } - - if (replacement instanceof _index4.default) { - replacement = replacement.node; - } - - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } - - if (this.node === replacement) { - return; - } - - if (this.isProgram() && !t.isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } - - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } - - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } - - if (this.isNodeType("Statement") && t.isExpression(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { - replacement = t.expressionStatement(replacement); - } - } - - if (this.isNodeType("Expression") && t.isStatement(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } - } - - var oldNode = this.node; - if (oldNode) { - t.inheritsComments(replacement, oldNode); - t.removeComments(oldNode); - } - - this._replaceWith(replacement); - this.type = replacement.type; - - this.setScope(); - - this.requeue(); -} - -function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } - - if (this.inList) { - t.validate(this.parent, this.key, [node]); - } else { - t.validate(this.parent, this.key, node); - } - - this.debug(function () { - return "Replace with " + (node && node.type); - }); - - this.node = this.container[this.key] = node; -} - -function replaceExpressionWithStatements(nodes) { - this.resync(); - - var toSequenceExpression = t.toSequenceExpression(nodes, this.scope); - - if (t.isSequenceExpression(toSequenceExpression)) { - var exprs = toSequenceExpression.expressions; - - if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) { - this._maybePopFromStatements(exprs); - } - - if (exprs.length === 1) { - this.replaceWith(exprs[0]); - } else { - this.replaceWith(toSequenceExpression); - } - } else if (toSequenceExpression) { - this.replaceWith(toSequenceExpression); - } else { - var container = t.functionExpression(null, [], t.blockStatement(nodes)); - container.shadow = true; - - this.replaceWith(t.callExpression(container, [])); - this.traverse(hoistVariablesVisitor); - - var completionRecords = this.get("callee").getCompletionRecords(); - for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - - if (!path.isExpressionStatement()) continue; - - var loop = path.findParent(function (path) { - return path.isLoop(); - }); - if (loop) { - var uid = loop.getData("expressionReplacementReturnUid"); - - if (!uid) { - var callee = this.get("callee"); - uid = callee.scope.generateDeclaredUidIdentifier("ret"); - callee.get("body").pushContainer("body", t.returnStatement(uid)); - loop.setData("expressionReplacementReturnUid", uid); - } else { - uid = t.identifier(uid.name); - } - - path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression)); - } else { - path.replaceWith(t.returnStatement(path.node.expression)); - } - } - - return this.node; - } -} - -function replaceInline(nodes) { - this.resync(); - - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - this._containerInsertAfter(nodes); - return this.remove(); - } else { - return this.replaceWithMultiple(nodes); - } - } else { - return this.replaceWith(nodes); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/binding.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/binding.js deleted file mode 100644 index 0730cdf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/binding.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Binding = function () { - function Binding(_ref) { - var existing = _ref.existing, - identifier = _ref.identifier, - scope = _ref.scope, - path = _ref.path, - kind = _ref.kind; - (0, _classCallCheck3.default)(this, Binding); - - this.identifier = identifier; - this.scope = scope; - this.path = path; - this.kind = kind; - - this.constantViolations = []; - this.constant = true; - - this.referencePaths = []; - this.referenced = false; - this.references = 0; - - this.clearValue(); - - if (existing) { - this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations); - } - } - - Binding.prototype.deoptValue = function deoptValue() { - this.clearValue(); - this.hasDeoptedValue = true; - }; - - Binding.prototype.setValue = function setValue(value) { - if (this.hasDeoptedValue) return; - this.hasValue = true; - this.value = value; - }; - - Binding.prototype.clearValue = function clearValue() { - this.hasDeoptedValue = false; - this.hasValue = false; - this.value = null; - }; - - Binding.prototype.reassign = function reassign(path) { - this.constant = false; - if (this.constantViolations.indexOf(path) !== -1) { - return; - } - this.constantViolations.push(path); - }; - - Binding.prototype.reference = function reference(path) { - if (this.referencePaths.indexOf(path) !== -1) { - return; - } - this.referenced = true; - this.references++; - this.referencePaths.push(path); - }; - - Binding.prototype.dereference = function dereference() { - this.references--; - this.referenced = !!this.references; - }; - - return Binding; -}(); - -exports.default = Binding; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/index.js deleted file mode 100644 index c91aa6a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/index.js +++ /dev/null @@ -1,1094 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _map = require("babel-runtime/core-js/map"); - -var _map2 = _interopRequireDefault(_map); - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _includes = require("lodash/includes"); - -var _includes2 = _interopRequireDefault(_includes); - -var _repeat = require("lodash/repeat"); - -var _repeat2 = _interopRequireDefault(_repeat); - -var _renamer = require("./lib/renamer"); - -var _renamer2 = _interopRequireDefault(_renamer); - -var _index = require("../index"); - -var _index2 = _interopRequireDefault(_index); - -var _defaults = require("lodash/defaults"); - -var _defaults2 = _interopRequireDefault(_defaults); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _binding2 = require("./binding"); - -var _binding3 = _interopRequireDefault(_binding2); - -var _globals = require("globals"); - -var _globals2 = _interopRequireDefault(_globals); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _cache = require("../cache"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _crawlCallsCount = 0; - -function getCache(path, parentScope, self) { - var scopes = _cache.scope.get(path.node) || []; - - for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var scope = _ref; - - if (scope.parent === parentScope && scope.path === path) return scope; - } - - scopes.push(self); - - if (!_cache.scope.has(path.node)) { - _cache.scope.set(path.node, scopes); - } -} - -function gatherNodeParts(node, parts) { - if (t.isModuleDeclaration(node)) { - if (node.source) { - gatherNodeParts(node.source, parts); - } else if (node.specifiers && node.specifiers.length) { - for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var specifier = _ref2; - - gatherNodeParts(specifier, parts); - } - } else if (node.declaration) { - gatherNodeParts(node.declaration, parts); - } - } else if (t.isModuleSpecifier(node)) { - gatherNodeParts(node.local, parts); - } else if (t.isMemberExpression(node)) { - gatherNodeParts(node.object, parts); - gatherNodeParts(node.property, parts); - } else if (t.isIdentifier(node)) { - parts.push(node.name); - } else if (t.isLiteral(node)) { - parts.push(node.value); - } else if (t.isCallExpression(node)) { - gatherNodeParts(node.callee, parts); - } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) { - for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var prop = _ref3; - - gatherNodeParts(prop.key || prop.argument, parts); - } - } -} - -var collectorVisitor = { - For: function For(path) { - for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var key = _ref4; - - var declar = path.get(key); - if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar); - } - }, - Declaration: function Declaration(path) { - if (path.isBlockScoped()) return; - - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return; - - path.scope.getFunctionParent().registerDeclaration(path); - }, - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - state.references.push(path); - }, - ForXStatement: function ForXStatement(path, state) { - var left = path.get("left"); - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(left); - } - }, - - - ExportDeclaration: { - exit: function exit(path) { - var node = path.node, - scope = path.scope; - - var declar = node.declaration; - if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) { - var _id = declar.id; - if (!_id) return; - - var binding = scope.getBinding(_id.name); - if (binding) binding.reference(path); - } else if (t.isVariableDeclaration(declar)) { - for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var decl = _ref5; - - var ids = t.getBindingIdentifiers(decl); - for (var name in ids) { - var _binding = scope.getBinding(name); - if (_binding) _binding.reference(path); - } - } - } - } - }, - - LabeledStatement: function LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, - AssignmentExpression: function AssignmentExpression(path, state) { - state.assignments.push(path); - }, - UpdateExpression: function UpdateExpression(path, state) { - state.constantViolations.push(path.get("argument")); - }, - UnaryExpression: function UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path.get("argument")); - } - }, - BlockScoped: function BlockScoped(path) { - var scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, - ClassDeclaration: function ClassDeclaration(path) { - var id = path.node.id; - if (!id) return; - - var name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, - Block: function Block(path) { - var paths = path.get("body"); - for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref6; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } - - var bodyPath = _ref6; - - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } - } - } -}; - -var uid = 0; - -var Scope = function () { - function Scope(path, parentScope) { - (0, _classCallCheck3.default)(this, Scope); - - if (parentScope && parentScope.block === path.node) { - return parentScope; - } - - var cached = getCache(path, parentScope, this); - if (cached) return cached; - - this.uid = uid++; - this.parent = parentScope; - this.hub = path.hub; - - this.parentBlock = path.parent; - this.block = path.node; - this.path = path; - - this.labels = new _map2.default(); - } - - Scope.prototype.traverse = function traverse(node, opts, state) { - (0, _index2.default)(node, opts, this, state, this.path); - }; - - Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - var id = this.generateUidIdentifier(name); - this.push({ id: id }); - return id; - }; - - Scope.prototype.generateUidIdentifier = function generateUidIdentifier() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - return t.identifier(this.generateUid(name)); - }; - - Scope.prototype.generateUid = function generateUid() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; - - name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - - var uid = void 0; - var i = 0; - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - - var program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; - - return uid; - }; - - Scope.prototype._generateUid = function _generateUid(name, i) { - var id = name; - if (i > 1) id += i; - return "_" + id; - }; - - Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { - var node = parent; - - if (t.isAssignmentExpression(parent)) { - node = parent.left; - } else if (t.isVariableDeclarator(parent)) { - node = parent.id; - } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) { - node = node.key; - } - - var parts = []; - gatherNodeParts(node, parts); - - var id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - - return this.generateUidIdentifier(id.slice(0, 20)); - }; - - Scope.prototype.isStatic = function isStatic(node) { - if (t.isThisExpression(node) || t.isSuper(node)) { - return true; - } - - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } - - return false; - }; - - Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { - if (this.isStatic(node)) { - return null; - } else { - var _id2 = this.generateUidIdentifierBasedOnNode(node); - if (!dontPush) this.push({ id: _id2 }); - return _id2; - } - }; - - Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { - if (kind === "param") return; - - if (kind === "hoisted" && local.kind === "let") return; - - var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); - - if (duplicate) { - throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError); - } - }; - - Scope.prototype.rename = function rename(oldName, newName, block) { - var binding = this.getBinding(oldName); - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _renamer2.default(binding, oldName, newName).rename(block); - } - }; - - Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; - } - }; - - Scope.prototype.dump = function dump() { - var sep = (0, _repeat2.default)("-", 60); - console.log(sep); - var scope = this; - do { - console.log("#", scope.block.type); - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - console.log(" -", name, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - console.log(sep); - }; - - Scope.prototype.toArray = function toArray(node, i) { - var file = this.hub.file; - - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (binding && binding.constant && binding.path.isGenericType("Array")) return node; - } - - if (t.isArrayExpression(node)) { - return node; - } - - if (t.isIdentifier(node, { name: "arguments" })) { - return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]); - } - - var helperName = "toArray"; - var args = [node]; - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t.numericLiteral(i)); - helperName = "slicedToArray"; - } - return t.callExpression(file.addHelper(helperName), args); - }; - - Scope.prototype.hasLabel = function hasLabel(name) { - return !!this.getLabel(name); - }; - - Scope.prototype.getLabel = function getLabel(name) { - return this.labels.get(name); - }; - - Scope.prototype.registerLabel = function registerLabel(path) { - this.labels.set(path.node.label.name, path); - }; - - Scope.prototype.registerDeclaration = function registerDeclaration(path) { - if (path.isLabeledStatement()) { - this.registerLabel(path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - var declarations = path.get("declarations"); - for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref7; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref7 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref7 = _i7.value; - } - - var declar = _ref7; - - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - var specifiers = path.get("specifiers"); - for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { - var _ref8; - - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref8 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref8 = _i8.value; - } - - var specifier = _ref8; - - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - var _declar = path.get("declaration"); - if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { - this.registerDeclaration(_declar); - } - } else { - this.registerBinding("unknown", path); - } - }; - - Scope.prototype.buildUndefinedNode = function buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t.unaryExpression("void", t.numericLiteral(0), true); - } else { - return t.identifier("undefined"); - } - }; - - Scope.prototype.registerConstantViolation = function registerConstantViolation(path) { - var ids = path.getBindingIdentifiers(); - for (var name in ids) { - var binding = this.getBinding(name); - if (binding) binding.reassign(path); - } - }; - - Scope.prototype.registerBinding = function registerBinding(kind, path) { - var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path; - - if (!kind) throw new ReferenceError("no `kind`"); - - if (path.isVariableDeclaration()) { - var declarators = path.get("declarations"); - for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { - var _ref9; - - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref9 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref9 = _i9.value; - } - - var declar = _ref9; - - this.registerBinding(kind, declar); - } - return; - } - - var parent = this.getProgramParent(); - var ids = path.getBindingIdentifiers(true); - - for (var name in ids) { - for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { - var _ref10; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref10 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref10 = _i10.value; - } - - var _id3 = _ref10; - - var local = this.getOwnBinding(name); - if (local) { - if (local.identifier === _id3) continue; - - this.checkBlockScopedCollisions(local, kind, name, _id3); - } - - if (local && local.path.isFlow()) local = null; - - parent.references[name] = true; - - this.bindings[name] = new _binding3.default({ - identifier: _id3, - existing: local, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - }; - - Scope.prototype.addGlobal = function addGlobal(node) { - this.globals[node.name] = node; - }; - - Scope.prototype.hasUid = function hasUid(name) { - var scope = this; - - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.hasGlobal = function hasGlobal(name) { - var scope = this; - - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.hasReference = function hasReference(name) { - var scope = this; - - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - Scope.prototype.isPure = function isPure(node, constantsOnly) { - if (t.isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t.isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false; - return this.isPure(node.body, constantsOnly); - } else if (t.isClassBody(node)) { - for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) { - var _ref11; - - if (_isArray11) { - if (_i11 >= _iterator11.length) break; - _ref11 = _iterator11[_i11++]; - } else { - _i11 = _iterator11.next(); - if (_i11.done) break; - _ref11 = _i11.value; - } - - var method = _ref11; - - if (!this.isPure(method, constantsOnly)) return false; - } - return true; - } else if (t.isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t.isArrayExpression(node)) { - for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) { - var _ref12; - - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref12 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref12 = _i12.value; - } - - var elem = _ref12; - - if (!this.isPure(elem, constantsOnly)) return false; - } - return true; - } else if (t.isObjectExpression(node)) { - for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) { - var _ref13; - - if (_isArray13) { - if (_i13 >= _iterator13.length) break; - _ref13 = _iterator13[_i13++]; - } else { - _i13 = _iterator13.next(); - if (_i13.done) break; - _ref13 = _i13.value; - } - - var prop = _ref13; - - if (!this.isPure(prop, constantsOnly)) return false; - } - return true; - } else if (t.isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t.isClassProperty(node) || t.isObjectProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t.isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else { - return t.isPureish(node); - } - }; - - Scope.prototype.setData = function setData(key, val) { - return this.data[key] = val; - }; - - Scope.prototype.getData = function getData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - }; - - Scope.prototype.removeData = function removeData(key) { - var scope = this; - do { - var data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - }; - - Scope.prototype.init = function init() { - if (!this.references) this.crawl(); - }; - - Scope.prototype.crawl = function crawl() { - _crawlCallsCount++; - this._crawl(); - _crawlCallsCount--; - }; - - Scope.prototype._crawl = function _crawl() { - var path = this.path; - - this.references = (0, _create2.default)(null); - this.bindings = (0, _create2.default)(null); - this.globals = (0, _create2.default)(null); - this.uids = (0, _create2.default)(null); - this.data = (0, _create2.default)(null); - - if (path.isLoop()) { - for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) { - var _ref14; - - if (_isArray14) { - if (_i14 >= _iterator14.length) break; - _ref14 = _iterator14[_i14++]; - } else { - _i14 = _iterator14.next(); - if (_i14.done) break; - _ref14 = _i14.value; - } - - var key = _ref14; - - var node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } - - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } - } - - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t.NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } - } - - if (path.isFunction()) { - var params = path.get("params"); - for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) { - var _ref15; - - if (_isArray15) { - if (_i15 >= _iterator15.length) break; - _ref15 = _iterator15[_i15++]; - } else { - _i15 = _iterator15.next(); - if (_i15.done) break; - _ref15 = _i15.value; - } - - var param = _ref15; - - this.registerBinding("param", param); - } - } - - if (path.isCatchClause()) { - this.registerBinding("let", path); - } - - var parent = this.getProgramParent(); - if (parent.crawling) return; - - var state = { - references: [], - constantViolations: [], - assignments: [] - }; - - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; - - for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) { - var _ref16; - - if (_isArray16) { - if (_i16 >= _iterator16.length) break; - _ref16 = _iterator16[_i16++]; - } else { - _i16 = _iterator16.next(); - if (_i16.done) break; - _ref16 = _i16.value; - } - - var _path = _ref16; - - var ids = _path.getBindingIdentifiers(); - var programParent = void 0; - for (var name in ids) { - if (_path.scope.getBinding(name)) continue; - - programParent = programParent || _path.scope.getProgramParent(); - programParent.addGlobal(ids[name]); - } - - _path.scope.registerConstantViolation(_path); - } - - for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) { - var _ref17; - - if (_isArray17) { - if (_i17 >= _iterator17.length) break; - _ref17 = _iterator17[_i17++]; - } else { - _i17 = _iterator17.next(); - if (_i17.done) break; - _ref17 = _i17.value; - } - - var ref = _ref17; - - var binding = ref.scope.getBinding(ref.node.name); - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } - } - - for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) { - var _ref18; - - if (_isArray18) { - if (_i18 >= _iterator18.length) break; - _ref18 = _iterator18[_i18++]; - } else { - _i18 = _iterator18.next(); - if (_i18.done) break; - _ref18 = _i18.value; - } - - var _path2 = _ref18; - - _path2.scope.registerConstantViolation(_path2); - } - }; - - Scope.prototype.push = function push(opts) { - var path = this.path; - - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } - - if (path.isSwitchStatement()) { - path = this.getFunctionParent().path; - } - - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - t.ensureBlock(path.node); - path = path.get("body"); - } - - var unique = opts.unique; - var kind = opts.kind || "var"; - var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - - var dataKey = "declaration:" + kind + ":" + blockHoist; - var declarPath = !unique && path.getData(dataKey); - - if (!declarPath) { - var declar = t.variableDeclaration(kind, []); - declar._generated = true; - declar._blockHoist = blockHoist; - - var _path$unshiftContaine = path.unshiftContainer("body", [declar]); - - declarPath = _path$unshiftContaine[0]; - - if (!unique) path.setData(dataKey, declarPath); - } - - var declarator = t.variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - }; - - Scope.prototype.getProgramParent = function getProgramParent() { - var scope = this; - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; - - Scope.prototype.getFunctionParent = function getFunctionParent() { - var scope = this; - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a Function or Program..."); - }; - - Scope.prototype.getBlockParent = function getBlockParent() { - var scope = this; - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - }; - - Scope.prototype.getAllBindings = function getAllBindings() { - var ids = (0, _create2.default)(null); - - var scope = this; - do { - (0, _defaults2.default)(ids, scope.bindings); - scope = scope.parent; - } while (scope); - - return ids; - }; - - Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() { - var ids = (0, _create2.default)(null); - - for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) { - var _ref19; - - if (_isArray19) { - if (_i19 >= _iterator19.length) break; - _ref19 = _iterator19[_i19++]; - } else { - _i19 = _iterator19.next(); - if (_i19.done) break; - _ref19 = _i19.value; - } - - var kind = _ref19; - - var scope = this; - do { - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - if (binding.kind === kind) ids[name] = binding; - } - scope = scope.parent; - } while (scope); - } - - return ids; - }; - - Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { - return this.getBindingIdentifier(name) === node; - }; - - Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) { - if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) { - console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "); - } - return binding; - }; - - Scope.prototype.getBinding = function getBinding(name) { - var scope = this; - - do { - var binding = scope.getOwnBinding(name); - if (binding) return this.warnOnFlowBinding(binding); - } while (scope = scope.parent); - }; - - Scope.prototype.getOwnBinding = function getOwnBinding(name) { - return this.warnOnFlowBinding(this.bindings[name]); - }; - - Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) { - var info = this.getBinding(name); - return info && info.identifier; - }; - - Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { - var binding = this.bindings[name]; - return binding && binding.identifier; - }; - - Scope.prototype.hasOwnBinding = function hasOwnBinding(name) { - return !!this.getOwnBinding(name); - }; - - Scope.prototype.hasBinding = function hasBinding(name, noGlobals) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true; - if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true; - return false; - }; - - Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) { - return this.parent && this.parent.hasBinding(name, noGlobals); - }; - - Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) { - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - }; - - Scope.prototype.removeOwnBinding = function removeOwnBinding(name) { - delete this.bindings[name]; - }; - - Scope.prototype.removeBinding = function removeBinding(name) { - var info = this.getBinding(name); - if (info) { - info.scope.removeOwnBinding(name); - } - - var scope = this; - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - }; - - return Scope; -}(); - -Scope.globals = (0, _keys2.default)(_globals2.default.builtin); -Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; -exports.default = Scope; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/lib/renamer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/lib/renamer.js deleted file mode 100644 index 351b4d9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/scope/lib/renamer.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _binding = require("../binding"); - -var _binding2 = _interopRequireDefault(_binding); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var renameVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { - var node = _ref.node; - - if (node.name === state.oldName) { - node.name = state.newName; - } - }, - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, - "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { - var ids = path.getOuterBindingIdentifiers(); - - for (var name in ids) { - if (name === state.oldName) ids[name].name = state.newName; - } - } -}; - -var Renamer = function () { - function Renamer(binding, oldName, newName) { - (0, _classCallCheck3.default)(this, Renamer); - - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } - - Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { - var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath; - if (!exportDeclar) return; - - var isDefault = exportDeclar.isExportDefaultDeclaration(); - - if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) { - parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default"); - } - - var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers(); - var specifiers = []; - - for (var name in bindingIdentifiers) { - var localName = name === this.oldName ? this.newName : name; - var exportedName = isDefault ? "default" : name; - specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName))); - } - - if (specifiers.length) { - var aliasDeclar = t.exportNamedDeclaration(null, specifiers); - - if (parentDeclar.isFunctionDeclaration()) { - aliasDeclar._blockHoist = 3; - } - - exportDeclar.insertAfter(aliasDeclar); - exportDeclar.replaceWith(parentDeclar.node); - } - }; - - Renamer.prototype.rename = function rename(block) { - var binding = this.binding, - oldName = this.oldName, - newName = this.newName; - var scope = binding.scope, - path = binding.path; - - - var parentDeclar = path.find(function (path) { - return path.isDeclaration() || path.isFunctionExpression(); - }); - if (parentDeclar) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } - - scope.traverse(block || scope.block, renameVisitor, this); - - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } - - if (binding.type === "hoisted") {} - }; - - return Renamer; -}(); - -exports.default = Renamer; -module.exports = exports["default"]; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/visitors.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/visitors.js deleted file mode 100644 index dadf5d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/lib/visitors.js +++ /dev/null @@ -1,341 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.explode = explode; -exports.verify = verify; -exports.merge = merge; - -var _virtualTypes = require("./path/lib/virtual-types"); - -var virtualTypes = _interopRequireWildcard(_virtualTypes); - -var _babelMessages = require("babel-messages"); - -var messages = _interopRequireWildcard(_babelMessages); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _clone = require("lodash/clone"); - -var _clone2 = _interopRequireDefault(_clone); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function explode(visitor) { - if (visitor._exploded) return visitor; - visitor._exploded = true; - - for (var nodeType in visitor) { - if (shouldIgnoreKey(nodeType)) continue; - - var parts = nodeType.split("|"); - if (parts.length === 1) continue; - - var fns = visitor[nodeType]; - delete visitor[nodeType]; - - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - visitor[part] = fns; - } - } - - verify(visitor); - - delete visitor.__esModule; - - ensureEntranceObjects(visitor); - - ensureCallbackArrays(visitor); - - for (var _iterator2 = (0, _keys2.default)(visitor), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _nodeType3 = _ref2; - - if (shouldIgnoreKey(_nodeType3)) continue; - - var wrapper = virtualTypes[_nodeType3]; - if (!wrapper) continue; - - var _fns2 = visitor[_nodeType3]; - for (var type in _fns2) { - _fns2[type] = wrapCheck(wrapper, _fns2[type]); - } - - delete visitor[_nodeType3]; - - if (wrapper.types) { - for (var _iterator4 = wrapper.types, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var _type = _ref4; - - if (visitor[_type]) { - mergePair(visitor[_type], _fns2); - } else { - visitor[_type] = _fns2; - } - } - } else { - mergePair(visitor, _fns2); - } - } - - for (var _nodeType in visitor) { - if (shouldIgnoreKey(_nodeType)) continue; - - var _fns = visitor[_nodeType]; - - var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType]; - - var deprecratedKey = t.DEPRECATED_KEYS[_nodeType]; - if (deprecratedKey) { - console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey); - aliases = [deprecratedKey]; - } - - if (!aliases) continue; - - delete visitor[_nodeType]; - - for (var _iterator3 = aliases, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var alias = _ref3; - - var existing = visitor[alias]; - if (existing) { - mergePair(existing, _fns); - } else { - visitor[alias] = (0, _clone2.default)(_fns); - } - } - } - - for (var _nodeType2 in visitor) { - if (shouldIgnoreKey(_nodeType2)) continue; - - ensureCallbackArrays(visitor[_nodeType2]); - } - - return visitor; -} - -function verify(visitor) { - if (visitor._verified) return; - - if (typeof visitor === "function") { - throw new Error(messages.get("traverseVerifyRootFunction")); - } - - for (var nodeType in visitor) { - if (nodeType === "enter" || nodeType === "exit") { - validateVisitorMethods(nodeType, visitor[nodeType]); - } - - if (shouldIgnoreKey(nodeType)) continue; - - if (t.TYPES.indexOf(nodeType) < 0) { - throw new Error(messages.get("traverseVerifyNodeType", nodeType)); - } - - var visitors = visitor[nodeType]; - if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") { - for (var visitorKey in visitors) { - if (visitorKey === "enter" || visitorKey === "exit") { - validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]); - } else { - throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey)); - } - } - } - } - - visitor._verified = true; -} - -function validateVisitorMethods(path, val) { - var fns = [].concat(val); - for (var _iterator5 = fns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var fn = _ref5; - - if (typeof fn !== "function") { - throw new TypeError("Non-function found defined in " + path + " with type " + (typeof fn === "undefined" ? "undefined" : (0, _typeof3.default)(fn))); - } - } -} - -function merge(visitors) { - var states = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var wrapper = arguments[2]; - - var rootVisitor = {}; - - for (var i = 0; i < visitors.length; i++) { - var visitor = visitors[i]; - var state = states[i]; - - explode(visitor); - - for (var type in visitor) { - var visitorType = visitor[type]; - - if (state || wrapper) { - visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); - } - - var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; - mergePair(nodeVisitor, visitorType); - } - } - - return rootVisitor; -} - -function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { - var newVisitor = {}; - - var _loop = function _loop(key) { - var fns = oldVisitor[key]; - - if (!Array.isArray(fns)) return "continue"; - - fns = fns.map(function (fn) { - var newFn = fn; - - if (state) { - newFn = function newFn(path) { - return fn.call(state, path, state); - }; - } - - if (wrapper) { - newFn = wrapper(state.key, key, newFn); - } - - return newFn; - }); - - newVisitor[key] = fns; - }; - - for (var key in oldVisitor) { - var _ret = _loop(key); - - if (_ret === "continue") continue; - } - - return newVisitor; -} - -function ensureEntranceObjects(obj) { - for (var key in obj) { - if (shouldIgnoreKey(key)) continue; - - var fns = obj[key]; - if (typeof fns === "function") { - obj[key] = { enter: fns }; - } - } -} - -function ensureCallbackArrays(obj) { - if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; - if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; -} - -function wrapCheck(wrapper, fn) { - var newFn = function newFn(path) { - if (wrapper.checkPath(path)) { - return fn.apply(this, arguments); - } - }; - newFn.toString = function () { - return fn.toString(); - }; - return newFn; -} - -function shouldIgnoreKey(key) { - if (key[0] === "_") return true; - - if (key === "enter" || key === "exit" || key === "shouldSkip") return true; - - if (key === "blacklist" || key === "noScope" || key === "skipKeys") return true; - - return false; -} - -function mergePair(dest, src) { - for (var key in src) { - dest[key] = [].concat(dest[key] || [], src[key]); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package-lock.json deleted file mode 100644 index 092c397..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package-lock.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "babel-traverse", - "version": "6.25.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, - "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", - "requires": { - "loose-envify": "1.3.1" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "requires": { - "js-tokens": "3.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package.json deleted file mode 100644 index 3c07776..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-traverse@^6.26.0", - "scope": null, - "escapedName": "babel-traverse", - "name": "babel-traverse", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-traverse@>=6.26.0 <7.0.0", - "_id": "babel-traverse@6.26.0", - "_inCache": true, - "_location": "/babel-traverse", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-traverse-6.26.0.tgz_1502898856222_0.6180560656357557" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-traverse@^6.26.0", - "scope": null, - "escapedName": "babel-traverse", - "name": "babel-traverse", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-helper-call-delegate", - "/babel-helper-function-name", - "/babel-helper-replace-supers", - "/babel-plugin-transform-es2015-block-scoping", - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-parameters", - "/babel-template" - ], - "_resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "_shasum": "46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee", - "_shrinkwrap": null, - "_spec": "babel-traverse@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", - "devDependencies": { - "babel-generator": "^6.26.0" - }, - "directories": {}, - "dist": { - "shasum": "46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee", - "tarball": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-traverse", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/README.md deleted file mode 100644 index b0e3f1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/README.md +++ /dev/null @@ -1,2029 +0,0 @@ -# babel-types - -> This module contains methods for building ASTs manually and for checking the types of AST nodes. - -## Install - -```sh -npm install --save-dev babel-types -``` - -## API - - - -### anyTypeAnnotation -```javascript -t.anyTypeAnnotation() -``` - -See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### arrayExpression -```javascript -t.arrayExpression(elements) -``` - -See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`. - -Aliases: `Expression` - - - `elements`: `Array` (default: `[]`) - ---- - -### arrayPattern -```javascript -t.arrayPattern(elements, typeAnnotation) -``` - -See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `elements`: `Array` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### arrayTypeAnnotation -```javascript -t.arrayTypeAnnotation(elementType) -``` - -See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `elementType` (required) - ---- - -### arrowFunctionExpression -```javascript -t.arrowFunctionExpression(params, body, async) -``` - -See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `params`: `Array` (required) - - `body`: `BlockStatement | Expression` (required) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### assignmentExpression -```javascript -t.assignmentExpression(operator, left, right) -``` - -See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `string` (required) - - `left`: `LVal` (required) - - `right`: `Expression` (required) - ---- - -### assignmentPattern -```javascript -t.assignmentPattern(left, right) -``` - -See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `left`: `Identifier` (required) - - `right`: `Expression` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### awaitExpression -```javascript -t.awaitExpression(argument) -``` - -See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (required) - ---- - -### binaryExpression -```javascript -t.binaryExpression(operator, left, right) -``` - -See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `'+' | '-' | '/' | '%' | '*' | '**' | '&' | '|' | '>>' | '>>>' | '<<' | '^' | '==' | '===' | '!=' | '!==' | 'in' | 'instanceof' | '>' | '<' | '>=' | '<='` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### bindExpression -```javascript -t.bindExpression(object, callee) -``` - -See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`. - -Aliases: `Expression` - - - `object` (required) - - `callee` (required) - ---- - -### blockStatement -```javascript -t.blockStatement(body, directives) -``` - -See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block`, `Statement` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - ---- - -### booleanLiteral -```javascript -t.booleanLiteral(value) -``` - -See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `boolean` (required) - ---- - -### booleanLiteralTypeAnnotation -```javascript -t.booleanLiteralTypeAnnotation() -``` - -See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### booleanTypeAnnotation -```javascript -t.booleanTypeAnnotation() -``` - -See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### breakStatement -```javascript -t.breakStatement(label) -``` - -See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### callExpression -```javascript -t.callExpression(callee, arguments) -``` - -See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - ---- - -### catchClause -```javascript -t.catchClause(param, body) -``` - -See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`. - -Aliases: `Scopable` - - - `param`: `Identifier` (required) - - `body`: `BlockStatement` (required) - ---- - -### classBody -```javascript -t.classBody(body) -``` - -See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`. - - - `body`: `Array` (required) - ---- - -### classDeclaration -```javascript -t.classDeclaration(id, superClass, body, decorators) -``` - -See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`. - -Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish` - - - `id`: `Identifier` (required) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (required) - - `implements` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classExpression -```javascript -t.classExpression(id, superClass, body, decorators) -``` - -See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`. - -Aliases: `Scopable`, `Class`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (required) - - `implements` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classImplements -```javascript -t.classImplements(id, typeParameters) -``` - -See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### classMethod -```javascript -t.classMethod(kind, key, params, body, computed, static) -``` - -See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`. - -Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method` - - - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `static`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `decorators` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classProperty -```javascript -t.classProperty(key, value, typeAnnotation, decorators, computed) -``` - -See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`. - -Aliases: `Property` - - - `key` (required) - - `value` (required) - - `typeAnnotation` (required) - - `decorators` (required) - - `computed`: `boolean` (default: `false`) - ---- - -### conditionalExpression -```javascript -t.conditionalExpression(test, consequent, alternate) -``` - -See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`. - -Aliases: `Expression`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Expression` (required) - - `alternate`: `Expression` (required) - ---- - -### continueStatement -```javascript -t.continueStatement(label) -``` - -See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### debuggerStatement -```javascript -t.debuggerStatement() -``` - -See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### declareClass -```javascript -t.declareClass(id, typeParameters, extends, body) -``` - -See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### declareExportDeclaration -```javascript -t.declareExportDeclaration(declaration, specifiers, source) -``` - -See also `t.isDeclareExportDeclaration(node, opts)` and `t.assertDeclareExportDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `declaration` (required) - - `specifiers` (required) - - `source` (required) - ---- - -### declareFunction -```javascript -t.declareFunction(id) -``` - -See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - ---- - -### declareInterface -```javascript -t.declareInterface(id, typeParameters, extends, body) -``` - -See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### declareModule -```javascript -t.declareModule(id, body) -``` - -See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `body` (required) - ---- - -### declareModuleExports -```javascript -t.declareModuleExports(typeAnnotation) -``` - -See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `typeAnnotation` (required) - ---- - -### declareOpaqueType -```javascript -t.declareOpaqueType(id, typeParameters, supertype) -``` - -See also `t.isDeclareOpaqueType(node, opts)` and `t.assertDeclareOpaqueType(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `supertype` (required) - ---- - -### declareTypeAlias -```javascript -t.declareTypeAlias(id, typeParameters, right) -``` - -See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `right` (required) - ---- - -### declareVariable -```javascript -t.declareVariable(id) -``` - -See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - ---- - -### decorator -```javascript -t.decorator(expression) -``` - -See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`. - - - `expression`: `Expression` (required) - ---- - -### directive -```javascript -t.directive(value) -``` - -See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`. - - - `value`: `DirectiveLiteral` (required) - ---- - -### directiveLiteral -```javascript -t.directiveLiteral(value) -``` - -See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`. - - - `value`: `string` (required) - ---- - -### doExpression -```javascript -t.doExpression(body) -``` - -See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`. - -Aliases: `Expression` - - - `body`: `BlockStatement` (required) - ---- - -### doWhileStatement -```javascript -t.doWhileStatement(test, body) -``` - -See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### emptyStatement -```javascript -t.emptyStatement() -``` - -See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### emptyTypeAnnotation -```javascript -t.emptyTypeAnnotation() -``` - -See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### existentialTypeParam -```javascript -t.existentialTypeParam() -``` - -See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`. - -Aliases: `Flow` - - ---- - -### exportAllDeclaration -```javascript -t.exportAllDeclaration(source) -``` - -See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `source`: `StringLiteral` (required) - ---- - -### exportDefaultDeclaration -```javascript -t.exportDefaultDeclaration(declaration) -``` - -See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required) - ---- - -### exportDefaultSpecifier -```javascript -t.exportDefaultSpecifier(exported) -``` - -See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportNamedDeclaration -```javascript -t.exportNamedDeclaration(declaration, specifiers, source) -``` - -See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `Declaration` (default: `null`) - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (default: `null`) - ---- - -### exportNamespaceSpecifier -```javascript -t.exportNamespaceSpecifier(exported) -``` - -See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportSpecifier -```javascript -t.exportSpecifier(local, exported) -``` - -See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `exported`: `Identifier` (required) - ---- - -### expressionStatement -```javascript -t.expressionStatement(expression) -``` - -See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`. - -Aliases: `Statement`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### file -```javascript -t.file(program, comments, tokens) -``` - -See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`. - - - `program`: `Program` (required) - - `comments` (required) - - `tokens` (required) - ---- - -### forAwaitStatement -```javascript -t.forAwaitStatement(left, right, body) -``` - -See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forInStatement -```javascript -t.forInStatement(left, right, body) -``` - -See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forOfStatement -```javascript -t.forOfStatement(left, right, body) -``` - -See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forStatement -```javascript -t.forStatement(init, test, update, body) -``` - -See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop` - - - `init`: `VariableDeclaration | Expression` (default: `null`) - - `test`: `Expression` (default: `null`) - - `update`: `Expression` (default: `null`) - - `body`: `Statement` (required) - ---- - -### functionDeclaration -```javascript -t.functionDeclaration(id, params, body, generator, async) -``` - -See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration` - - - `id`: `Identifier` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### functionExpression -```javascript -t.functionExpression(id, params, body, generator, async) -``` - -See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### functionTypeAnnotation -```javascript -t.functionTypeAnnotation(typeParameters, params, rest, returnType) -``` - -See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeParameters` (required) - - `params` (required) - - `rest` (required) - - `returnType` (required) - ---- - -### functionTypeParam -```javascript -t.functionTypeParam(name, typeAnnotation) -``` - -See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`. - -Aliases: `Flow` - - - `name` (required) - - `typeAnnotation` (required) - ---- - -### genericTypeAnnotation -```javascript -t.genericTypeAnnotation(id, typeParameters) -``` - -See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### identifier -```javascript -t.identifier(name) -``` - -See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. - -Aliases: `Expression`, `LVal` - - - `name``string` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation` (default: `null`) - ---- - -### ifStatement -```javascript -t.ifStatement(test, consequent, alternate) -``` - -See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`. - -Aliases: `Statement`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Statement` (required) - - `alternate`: `Statement` (default: `null`) - ---- - -### import -```javascript -t.import() -``` - -See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`. - -Aliases: `Expression` - - ---- - -### importDeclaration -```javascript -t.importDeclaration(specifiers, source) -``` - -See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration` - - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (required) - ---- - -### importDefaultSpecifier -```javascript -t.importDefaultSpecifier(local) -``` - -See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importNamespaceSpecifier -```javascript -t.importNamespaceSpecifier(local) -``` - -See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importSpecifier -```javascript -t.importSpecifier(local, imported) -``` - -See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `imported`: `Identifier` (required) - - `importKind`: `null | 'type' | 'typeof'` (default: `null`) - ---- - -### interfaceDeclaration -```javascript -t.interfaceDeclaration(id, typeParameters, extends, body) -``` - -See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### interfaceExtends -```javascript -t.interfaceExtends(id, typeParameters) -``` - -See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### intersectionTypeAnnotation -```javascript -t.intersectionTypeAnnotation(types) -``` - -See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### jSXAttribute -```javascript -t.jSXAttribute(name, value) -``` - -See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXNamespacedName` (required) - - `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`) - ---- - -### jSXClosingElement -```javascript -t.jSXClosingElement(name) -``` - -See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - ---- - -### jSXElement -```javascript -t.jSXElement(openingElement, closingElement, children, selfClosing) -``` - -See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`. - -Aliases: `JSX`, `Immutable`, `Expression` - - - `openingElement`: `JSXOpeningElement` (required) - - `closingElement`: `JSXClosingElement` (default: `null`) - - `children`: `Array` (required) - - `selfClosing` (required) - ---- - -### jSXEmptyExpression -```javascript -t.jSXEmptyExpression() -``` - -See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`. - -Aliases: `JSX`, `Expression` - - ---- - -### jSXExpressionContainer -```javascript -t.jSXExpressionContainer(expression) -``` - -See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXIdentifier -```javascript -t.jSXIdentifier(name) -``` - -See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`. - -Aliases: `JSX`, `Expression` - - - `name`: `string` (required) - ---- - -### jSXMemberExpression -```javascript -t.jSXMemberExpression(object, property) -``` - -See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`. - -Aliases: `JSX`, `Expression` - - - `object`: `JSXMemberExpression | JSXIdentifier` (required) - - `property`: `JSXIdentifier` (required) - ---- - -### jSXNamespacedName -```javascript -t.jSXNamespacedName(namespace, name) -``` - -See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`. - -Aliases: `JSX` - - - `namespace`: `JSXIdentifier` (required) - - `name`: `JSXIdentifier` (required) - ---- - -### jSXOpeningElement -```javascript -t.jSXOpeningElement(name, attributes, selfClosing) -``` - -See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - - `attributes`: `Array` (required) - - `selfClosing`: `boolean` (default: `false`) - ---- - -### jSXSpreadAttribute -```javascript -t.jSXSpreadAttribute(argument) -``` - -See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`. - -Aliases: `JSX` - - - `argument`: `Expression` (required) - ---- - -### jSXSpreadChild -```javascript -t.jSXSpreadChild(expression) -``` - -See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXText -```javascript -t.jSXText(value) -``` - -See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `value`: `string` (required) - ---- - -### labeledStatement -```javascript -t.labeledStatement(label, body) -``` - -See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`. - -Aliases: `Statement` - - - `label`: `Identifier` (required) - - `body`: `Statement` (required) - ---- - -### logicalExpression -```javascript -t.logicalExpression(operator, left, right) -``` - -See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `'||' | '&&'` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### memberExpression -```javascript -t.memberExpression(object, property, computed) -``` - -See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`. - -Aliases: `Expression`, `LVal` - - - `object`: `Expression` (required) - - `property`if computed then `Expression` else `Identifier` (required) - - `computed`: `boolean` (default: `false`) - ---- - -### metaProperty -```javascript -t.metaProperty(meta, property) -``` - -See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`. - -Aliases: `Expression` - - - `meta`: `string` (required) - - `property`: `string` (required) - ---- - -### mixedTypeAnnotation -```javascript -t.mixedTypeAnnotation() -``` - -See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### newExpression -```javascript -t.newExpression(callee, arguments) -``` - -See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - ---- - -### noop -```javascript -t.noop() -``` - -See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`. - - ---- - -### nullLiteral -```javascript -t.nullLiteral() -``` - -See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - ---- - -### nullLiteralTypeAnnotation -```javascript -t.nullLiteralTypeAnnotation() -``` - -See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### nullableTypeAnnotation -```javascript -t.nullableTypeAnnotation(typeAnnotation) -``` - -See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeAnnotation` (required) - ---- - -### numberTypeAnnotation -```javascript -t.numberTypeAnnotation() -``` - -See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### numericLiteral -```javascript -t.numericLiteral(value) -``` - -See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `number` (required) - ---- - -### numericLiteralTypeAnnotation -```javascript -t.numericLiteralTypeAnnotation() -``` - -See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### objectExpression -```javascript -t.objectExpression(properties) -``` - -See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`. - -Aliases: `Expression` - - - `properties`: `Array` (required) - ---- - -### objectMethod -```javascript -t.objectMethod(kind, key, params, body, computed) -``` - -See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`. - -Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember` - - - `kind`: `"method" | "get" | "set"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `params` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### objectPattern -```javascript -t.objectPattern(properties, typeAnnotation) -``` - -See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `properties`: `Array` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### objectProperty -```javascript -t.objectProperty(key, value, computed, shorthand, decorators) -``` - -See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`. - -Aliases: `UserWhitespacable`, `Property`, `ObjectMember` - - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `value`: `Expression | Pattern | RestElement` (required) - - `computed`: `boolean` (default: `false`) - - `shorthand`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - ---- - -### objectTypeAnnotation -```javascript -t.objectTypeAnnotation(properties, indexers, callProperties) -``` - -See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `properties` (required) - - `indexers` (required) - - `callProperties` (required) - ---- - -### objectTypeCallProperty -```javascript -t.objectTypeCallProperty(value) -``` - -See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `value` (required) - ---- - -### objectTypeIndexer -```javascript -t.objectTypeIndexer(id, key, value) -``` - -See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `id` (required) - - `key` (required) - - `value` (required) - ---- - -### objectTypeProperty -```javascript -t.objectTypeProperty(key, value) -``` - -See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `key` (required) - - `value` (required) - ---- - -### objectTypeSpreadProperty -```javascript -t.objectTypeSpreadProperty(argument) -``` - -See also `t.isObjectTypeSpreadProperty(node, opts)` and `t.assertObjectTypeSpreadProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `argument` (required) - ---- - -### opaqueType -```javascript -t.opaqueType(id, typeParameters, impltype, supertype) -``` - -See also `t.isOpaqueType(node, opts)` and `t.assertOpaqueType(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `impltype` (required) - - `supertype` (required) - ---- - -### parenthesizedExpression -```javascript -t.parenthesizedExpression(expression) -``` - -See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`. - -Aliases: `Expression`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### program -```javascript -t.program(body, directives) -``` - -See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - ---- - -### qualifiedTypeIdentifier -```javascript -t.qualifiedTypeIdentifier(id, qualification) -``` - -See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `qualification` (required) - ---- - -### regExpLiteral -```javascript -t.regExpLiteral(pattern, flags) -``` - -See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `pattern`: `string` (required) - - `flags`: `string` (default: `''`) - ---- - -### restElement -```javascript -t.restElement(argument, typeAnnotation) -``` - -See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`. - -Aliases: `LVal` - - - `argument`: `LVal` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### restProperty -```javascript -t.restProperty(argument) -``` - -See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `LVal` (required) - ---- - -### returnStatement -```javascript -t.returnStatement(argument) -``` - -See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (default: `null`) - ---- - -### sequenceExpression -```javascript -t.sequenceExpression(expressions) -``` - -See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`. - -Aliases: `Expression` - - - `expressions`: `Array` (required) - ---- - -### spreadElement -```javascript -t.spreadElement(argument) -``` - -See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `Expression` (required) - ---- - -### spreadProperty -```javascript -t.spreadProperty(argument) -``` - -See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `Expression` (required) - ---- - -### stringLiteral -```javascript -t.stringLiteral(value) -``` - -See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `string` (required) - ---- - -### stringLiteralTypeAnnotation -```javascript -t.stringLiteralTypeAnnotation() -``` - -See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### stringTypeAnnotation -```javascript -t.stringTypeAnnotation() -``` - -See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### super -```javascript -t.super() -``` - -See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`. - -Aliases: `Expression` - - ---- - -### switchCase -```javascript -t.switchCase(test, consequent) -``` - -See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`. - - - `test`: `Expression` (default: `null`) - - `consequent`: `Array` (required) - ---- - -### switchStatement -```javascript -t.switchStatement(discriminant, cases) -``` - -See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Scopable` - - - `discriminant`: `Expression` (required) - - `cases`: `Array` (required) - ---- - -### taggedTemplateExpression -```javascript -t.taggedTemplateExpression(tag, quasi) -``` - -See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`. - -Aliases: `Expression` - - - `tag`: `Expression` (required) - - `quasi`: `TemplateLiteral` (required) - ---- - -### templateElement -```javascript -t.templateElement(value, tail) -``` - -See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`. - - - `value` (required) - - `tail`: `boolean` (default: `false`) - ---- - -### templateLiteral -```javascript -t.templateLiteral(quasis, expressions) -``` - -See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `quasis`: `Array` (required) - - `expressions`: `Array` (required) - ---- - -### thisExpression -```javascript -t.thisExpression() -``` - -See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`. - -Aliases: `Expression` - - ---- - -### thisTypeAnnotation -```javascript -t.thisTypeAnnotation() -``` - -See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### throwStatement -```javascript -t.throwStatement(argument) -``` - -See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (required) - ---- - -### tryStatement -```javascript -t.tryStatement(block, handler, finalizer) -``` - -See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`. - -Aliases: `Statement` - - - `block` (required) - - `handler` (default: `null`) - - `finalizer`: `BlockStatement` (default: `null`) - - `body`: `BlockStatement` (default: `null`) - ---- - -### tupleTypeAnnotation -```javascript -t.tupleTypeAnnotation(types) -``` - -See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### typeAlias -```javascript -t.typeAlias(id, typeParameters, right) -``` - -See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `right` (required) - ---- - -### typeAnnotation -```javascript -t.typeAnnotation(typeAnnotation) -``` - -See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeAnnotation` (required) - ---- - -### typeCastExpression -```javascript -t.typeCastExpression(expression, typeAnnotation) -``` - -See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`. - -Aliases: `Flow`, `ExpressionWrapper`, `Expression` - - - `expression` (required) - - `typeAnnotation` (required) - ---- - -### typeParameter -```javascript -t.typeParameter(bound) -``` - -See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`. - -Aliases: `Flow` - - - `bound` (required) - ---- - -### typeParameterDeclaration -```javascript -t.typeParameterDeclaration(params) -``` - -See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`. - -Aliases: `Flow` - - - `params` (required) - ---- - -### typeParameterInstantiation -```javascript -t.typeParameterInstantiation(params) -``` - -See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`. - -Aliases: `Flow` - - - `params` (required) - ---- - -### typeofTypeAnnotation -```javascript -t.typeofTypeAnnotation(argument) -``` - -See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `argument` (required) - ---- - -### unaryExpression -```javascript -t.unaryExpression(operator, argument, prefix) -``` - -See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`. - -Aliases: `UnaryLike`, `Expression` - - - `operator`: `'void' | 'delete' | '!' | '+' | '-' | '++' | '--' | '~' | 'typeof'` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `true`) - ---- - -### unionTypeAnnotation -```javascript -t.unionTypeAnnotation(types) -``` - -See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### updateExpression -```javascript -t.updateExpression(operator, argument, prefix) -``` - -See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `'++' | '--'` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `false`) - ---- - -### variableDeclaration -```javascript -t.variableDeclaration(kind, declarations) -``` - -See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `kind`: `"var" | "let" | "const"` (required) - - `declarations`: `Array` (required) - ---- - -### variableDeclarator -```javascript -t.variableDeclarator(id, init) -``` - -See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`. - - - `id`: `LVal` (required) - - `init`: `Expression` (default: `null`) - ---- - -### voidTypeAnnotation -```javascript -t.voidTypeAnnotation() -``` - -See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### whileStatement -```javascript -t.whileStatement(test, body) -``` - -See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### withStatement -```javascript -t.withStatement(object, body) -``` - -See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`. - -Aliases: `Statement` - - - `object` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### yieldExpression -```javascript -t.yieldExpression(argument, delegate) -``` - -See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (default: `null`) - - `delegate`: `boolean` (default: `false`) - ---- - - - - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/constants.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/constants.js deleted file mode 100644 index ba15090..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/constants.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; - -var _for = require("babel-runtime/core-js/symbol/for"); - -var _for2 = _interopRequireDefault(_for); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"]; -var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"]; -var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; - -var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"]; -var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"]; - -var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]); -var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS); -var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); - -var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"]; -var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"]; -var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); - -var INHERIT_KEYS = exports.INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] -}; - -var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = (0, _for2.default)("var used to be block scoped"); -var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = (0, _for2.default)("should not be considered a local binding"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/converters.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/converters.js deleted file mode 100644 index bd0a3c6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/converters.js +++ /dev/null @@ -1,350 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _maxSafeInteger = require("babel-runtime/core-js/number/max-safe-integer"); - -var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.toComputedKey = toComputedKey; -exports.toSequenceExpression = toSequenceExpression; -exports.toKeyAlias = toKeyAlias; -exports.toIdentifier = toIdentifier; -exports.toBindingIdentifierName = toBindingIdentifierName; -exports.toStatement = toStatement; -exports.toExpression = toExpression; -exports.toBlock = toBlock; -exports.valueToNode = valueToNode; - -var _isPlainObject = require("lodash/isPlainObject"); - -var _isPlainObject2 = _interopRequireDefault(_isPlainObject); - -var _isRegExp = require("lodash/isRegExp"); - -var _isRegExp2 = _interopRequireDefault(_isRegExp); - -var _index = require("./index"); - -var t = _interopRequireWildcard(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toComputedKey(node) { - var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key || node.property; - - if (!node.computed) { - if (t.isIdentifier(key)) key = t.stringLiteral(key.name); - } - return key; -} - -function gatherSequenceExpressions(nodes, scope, declars) { - var exprs = []; - var ensureLastUndefined = true; - - for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var node = _ref; - - ensureLastUndefined = false; - - if (t.isExpression(node)) { - exprs.push(node); - } else if (t.isExpressionStatement(node)) { - exprs.push(node.expression); - } else if (t.isVariableDeclaration(node)) { - if (node.kind !== "var") return; - - for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var declar = _ref2; - - var bindings = t.getBindingIdentifiers(declar); - for (var key in bindings) { - declars.push({ - kind: node.kind, - id: bindings[key] - }); - } - - if (declar.init) { - exprs.push(t.assignmentExpression("=", declar.id, declar.init)); - } - } - - ensureLastUndefined = true; - } else if (t.isIfStatement(node)) { - var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); - var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); - if (!consequent || !alternate) return; - - exprs.push(t.conditionalExpression(node.test, consequent, alternate)); - } else if (t.isBlockStatement(node)) { - var body = gatherSequenceExpressions(node.body, scope, declars); - if (!body) return; - - exprs.push(body); - } else if (t.isEmptyStatement(node)) { - ensureLastUndefined = true; - } else { - return; - } - } - - if (ensureLastUndefined) { - exprs.push(scope.buildUndefinedNode()); - } - - if (exprs.length === 1) { - return exprs[0]; - } else { - return t.sequenceExpression(exprs); - } -} - -function toSequenceExpression(nodes, scope) { - if (!nodes || !nodes.length) return; - - var declars = []; - var result = gatherSequenceExpressions(nodes, scope, declars); - if (!result) return; - - for (var _iterator3 = declars, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var declar = _ref3; - - scope.push(declar); - } - - return result; -} - -function toKeyAlias(node) { - var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key; - - var alias = void 0; - - if (node.kind === "method") { - return toKeyAlias.increment() + ""; - } else if (t.isIdentifier(key)) { - alias = key.name; - } else if (t.isStringLiteral(key)) { - alias = (0, _stringify2.default)(key.value); - } else { - alias = (0, _stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key))); - } - - if (node.computed) { - alias = "[" + alias + "]"; - } - - if (node.static) { - alias = "static:" + alias; - } - - return alias; -} - -toKeyAlias.uid = 0; - -toKeyAlias.increment = function () { - if (toKeyAlias.uid >= _maxSafeInteger2.default) { - return toKeyAlias.uid = 0; - } else { - return toKeyAlias.uid++; - } -}; - -function toIdentifier(name) { - name = name + ""; - - name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); - - name = name.replace(/^[-0-9]+/, ""); - - name = name.replace(/[-\s]+(.)?/g, function (match, c) { - return c ? c.toUpperCase() : ""; - }); - - if (!t.isValidIdentifier(name)) { - name = "_" + name; - } - - return name || "_"; -} - -function toBindingIdentifierName(name) { - name = toIdentifier(name); - if (name === "eval" || name === "arguments") name = "_" + name; - return name; -} - -function toStatement(node, ignore) { - if (t.isStatement(node)) { - return node; - } - - var mustHaveId = false; - var newType = void 0; - - if (t.isClass(node)) { - mustHaveId = true; - newType = "ClassDeclaration"; - } else if (t.isFunction(node)) { - mustHaveId = true; - newType = "FunctionDeclaration"; - } else if (t.isAssignmentExpression(node)) { - return t.expressionStatement(node); - } - - if (mustHaveId && !node.id) { - newType = false; - } - - if (!newType) { - if (ignore) { - return false; - } else { - throw new Error("cannot turn " + node.type + " to a statement"); - } - } - - node.type = newType; - - return node; -} - -function toExpression(node) { - if (t.isExpressionStatement(node)) { - node = node.expression; - } - - if (t.isExpression(node)) { - return node; - } - - if (t.isClass(node)) { - node.type = "ClassExpression"; - } else if (t.isFunction(node)) { - node.type = "FunctionExpression"; - } - - if (!t.isExpression(node)) { - throw new Error("cannot turn " + node.type + " to an expression"); - } - - return node; -} - -function toBlock(node, parent) { - if (t.isBlockStatement(node)) { - return node; - } - - if (t.isEmptyStatement(node)) { - node = []; - } - - if (!Array.isArray(node)) { - if (!t.isStatement(node)) { - if (t.isFunction(parent)) { - node = t.returnStatement(node); - } else { - node = t.expressionStatement(node); - } - } - - node = [node]; - } - - return t.blockStatement(node); -} - -function valueToNode(value) { - if (value === undefined) { - return t.identifier("undefined"); - } - - if (value === true || value === false) { - return t.booleanLiteral(value); - } - - if (value === null) { - return t.nullLiteral(); - } - - if (typeof value === "string") { - return t.stringLiteral(value); - } - - if (typeof value === "number") { - return t.numericLiteral(value); - } - - if ((0, _isRegExp2.default)(value)) { - var pattern = value.source; - var flags = value.toString().match(/\/([a-z]+|)$/)[1]; - return t.regExpLiteral(pattern, flags); - } - - if (Array.isArray(value)) { - return t.arrayExpression(value.map(t.valueToNode)); - } - - if ((0, _isPlainObject2.default)(value)) { - var props = []; - for (var key in value) { - var nodeKey = void 0; - if (t.isValidIdentifier(key)) { - nodeKey = t.identifier(key); - } else { - nodeKey = t.stringLiteral(key); - } - props.push(t.objectProperty(nodeKey, t.valueToNode(value[key]))); - } - return t.objectExpression(props); - } - - throw new Error("don't know how to turn this value into a node"); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/core.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/core.js deleted file mode 100644 index 413faf8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/core.js +++ /dev/null @@ -1,701 +0,0 @@ -"use strict"; - -var _index = require("../index"); - -var t = _interopRequireWildcard(_index); - -var _constants = require("../constants"); - -var _index2 = require("./index"); - -var _index3 = _interopRequireDefault(_index2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -(0, _index3.default)("ArrayExpression", { - fields: { - elements: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); - -(0, _index3.default)("AssignmentExpression", { - fields: { - operator: { - validate: (0, _index2.assertValueType)("string") - }, - left: { - validate: (0, _index2.assertNodeType)("LVal") - }, - right: { - validate: (0, _index2.assertNodeType)("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] -}); - -(0, _index3.default)("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS) - }, - left: { - validate: (0, _index2.assertNodeType)("Expression") - }, - right: { - validate: (0, _index2.assertNodeType)("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] -}); - -(0, _index3.default)("Directive", { - visitor: ["value"], - fields: { - value: { - validate: (0, _index2.assertNodeType)("DirectiveLiteral") - } - } -}); - -(0, _index3.default)("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _index2.assertValueType)("string") - } - } -}); - -(0, _index3.default)("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] -}); - -(0, _index3.default)("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _index2.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); - -(0, _index3.default)("CallExpression", { - visitor: ["callee", "arguments"], - fields: { - callee: { - validate: (0, _index2.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) - } - }, - aliases: ["Expression"] -}); - -(0, _index3.default)("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: (0, _index2.assertNodeType)("Identifier") - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement") - } - }, - aliases: ["Scopable"] -}); - -(0, _index3.default)("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: (0, _index2.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _index2.assertNodeType)("Expression") - }, - alternate: { - validate: (0, _index2.assertNodeType)("Expression") - } - }, - aliases: ["Expression", "Conditional"] -}); - -(0, _index3.default)("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _index2.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); - -(0, _index3.default)("DebuggerStatement", { - aliases: ["Statement"] -}); - -(0, _index3.default)("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: (0, _index2.assertNodeType)("Expression") - }, - body: { - validate: (0, _index2.assertNodeType)("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] -}); - -(0, _index3.default)("EmptyStatement", { - aliases: ["Statement"] -}); - -(0, _index3.default)("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _index2.assertNodeType)("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] -}); - -(0, _index3.default)("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: (0, _index2.assertNodeType)("Program") - } - } -}); - -(0, _index3.default)("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _index2.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _index2.assertNodeType)("Expression") - }, - body: { - validate: (0, _index2.assertNodeType)("Statement") - } - } -}); - -(0, _index3.default)("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: (0, _index2.assertNodeType)("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: (0, _index2.assertNodeType)("Expression"), - optional: true - }, - update: { - validate: (0, _index2.assertNodeType)("Expression"), - optional: true - }, - body: { - validate: (0, _index2.assertNodeType)("Statement") - } - } -}); - -(0, _index3.default)("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: { - id: { - validate: (0, _index2.assertNodeType)("Identifier") - }, - params: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement") - }, - generator: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - }, - async: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - } - }, - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] -}); - -(0, _index3.default)("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: { - id: { - validate: (0, _index2.assertNodeType)("Identifier"), - optional: true - }, - params: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal"))) - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement") - }, - generator: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - }, - async: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - } - } -}); - -(0, _index3.default)("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation"], - aliases: ["Expression", "LVal"], - fields: { - name: { - validate: function validate(node, key, val) { - if (!t.isValidIdentifier(val)) {} - } - }, - decorators: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index3.default)("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: (0, _index2.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _index2.assertNodeType)("Statement") - }, - alternate: { - optional: true, - validate: (0, _index2.assertNodeType)("Statement") - } - } -}); - -(0, _index3.default)("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: (0, _index2.assertNodeType)("Identifier") - }, - body: { - validate: (0, _index2.assertNodeType)("Statement") - } - } -}); - -(0, _index3.default)("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _index2.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); - -(0, _index3.default)("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: (0, _index2.assertValueType)("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); - -(0, _index3.default)("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); - -(0, _index3.default)("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _index2.assertValueType)("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); - -(0, _index3.default)("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Literal"], - fields: { - pattern: { - validate: (0, _index2.assertValueType)("string") - }, - flags: { - validate: (0, _index2.assertValueType)("string"), - default: "" - } - } -}); - -(0, _index3.default)("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS) - }, - left: { - validate: (0, _index2.assertNodeType)("Expression") - }, - right: { - validate: (0, _index2.assertNodeType)("Expression") - } - } -}); - -(0, _index3.default)("MemberExpression", { - builder: ["object", "property", "computed"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: { - object: { - validate: (0, _index2.assertNodeType)("Expression") - }, - property: { - validate: function validate(node, key, val) { - var expectedType = node.computed ? "Expression" : "Identifier"; - (0, _index2.assertNodeType)(expectedType)(node, key, val); - } - }, - computed: { - default: false - } - } -}); - -(0, _index3.default)("NewExpression", { - visitor: ["callee", "arguments"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _index2.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement"))) - } - } -}); - -(0, _index3.default)("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives"], - fields: { - directives: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"] -}); - -(0, _index3.default)("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadProperty"))) - } - } -}); - -(0, _index3.default)("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed"], - fields: { - kind: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("method", "get", "set")), - default: "method" - }, - computed: { - validate: (0, _index2.assertValueType)("boolean"), - default: false - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - decorators: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement") - }, - generator: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - }, - async: { - default: false, - validate: (0, _index2.assertValueType)("boolean") - } - }, - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] -}); - -(0, _index3.default)("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", "decorators"], - fields: { - computed: { - validate: (0, _index2.assertValueType)("boolean"), - default: false - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - value: { - validate: (0, _index2.assertNodeType)("Expression", "Pattern", "RestElement") - }, - shorthand: { - validate: (0, _index2.assertValueType)("boolean"), - default: false - }, - decorators: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"] -}); - -(0, _index3.default)("RestElement", { - visitor: ["argument", "typeAnnotation"], - aliases: ["LVal"], - fields: { - argument: { - validate: (0, _index2.assertNodeType)("LVal") - }, - decorators: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index3.default)("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _index2.assertNodeType)("Expression"), - optional: true - } - } -}); - -(0, _index3.default)("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression"))) - } - }, - aliases: ["Expression"] -}); - -(0, _index3.default)("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: (0, _index2.assertNodeType)("Expression"), - optional: true - }, - consequent: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement"))) - } - } -}); - -(0, _index3.default)("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: (0, _index2.assertNodeType)("Expression") - }, - cases: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("SwitchCase"))) - } - } -}); - -(0, _index3.default)("ThisExpression", { - aliases: ["Expression"] -}); - -(0, _index3.default)("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _index2.assertNodeType)("Expression") - } - } -}); - -(0, _index3.default)("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - body: { - validate: (0, _index2.assertNodeType)("BlockStatement") - }, - handler: { - optional: true, - handler: (0, _index2.assertNodeType)("BlockStatement") - }, - finalizer: { - optional: true, - validate: (0, _index2.assertNodeType)("BlockStatement") - } - } -}); - -(0, _index3.default)("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: true - }, - argument: { - validate: (0, _index2.assertNodeType)("Expression") - }, - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] -}); - -(0, _index3.default)("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: false - }, - argument: { - validate: (0, _index2.assertNodeType)("Expression") - }, - operator: { - validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] -}); - -(0, _index3.default)("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - kind: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("var", "let", "const")) - }, - declarations: { - validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("VariableDeclarator"))) - } - } -}); - -(0, _index3.default)("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: (0, _index2.assertNodeType)("LVal") - }, - init: { - optional: true, - validate: (0, _index2.assertNodeType)("Expression") - } - } -}); - -(0, _index3.default)("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: (0, _index2.assertNodeType)("Expression") - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") - } - } -}); - -(0, _index3.default)("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - object: (0, _index2.assertNodeType)("Expression") - }, - body: { - validate: (0, _index2.assertNodeType)("BlockStatement", "Statement") - } - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/es2015.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/es2015.js deleted file mode 100644 index 5f57b44..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/es2015.js +++ /dev/null @@ -1,354 +0,0 @@ -"use strict"; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _index2.default)("AssignmentPattern", { - visitor: ["left", "right"], - aliases: ["Pattern", "LVal"], - fields: { - left: { - validate: (0, _index.assertNodeType)("Identifier") - }, - right: { - validate: (0, _index.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index2.default)("ArrayPattern", { - visitor: ["elements", "typeAnnotation"], - aliases: ["Pattern", "LVal"], - fields: { - elements: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Identifier", "Pattern", "RestElement"))) - }, - decorators: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index2.default)("ArrowFunctionExpression", { - builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType", "typeParameters"], - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: { - params: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) - }, - body: { - validate: (0, _index.assertNodeType)("BlockStatement", "Expression") - }, - async: { - validate: (0, _index.assertValueType)("boolean"), - default: false - } - } -}); - -(0, _index2.default)("ClassBody", { - visitor: ["body"], - fields: { - body: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ClassMethod", "ClassProperty"))) - } - } -}); - -(0, _index2.default)("ClassDeclaration", { - builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], - aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], - fields: { - id: { - validate: (0, _index.assertNodeType)("Identifier") - }, - body: { - validate: (0, _index.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _index.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index2.default)("ClassExpression", { - inherits: "ClassDeclaration", - aliases: ["Scopable", "Class", "Expression", "Pureish"], - fields: { - id: { - optional: true, - validate: (0, _index.assertNodeType)("Identifier") - }, - body: { - validate: (0, _index.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _index.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index2.default)("ExportAllDeclaration", { - visitor: ["source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - source: { - validate: (0, _index.assertNodeType)("StringLiteral") - } - } -}); - -(0, _index2.default)("ExportDefaultDeclaration", { - visitor: ["declaration"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _index.assertNodeType)("FunctionDeclaration", "ClassDeclaration", "Expression") - } - } -}); - -(0, _index2.default)("ExportNamedDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _index.assertNodeType)("Declaration"), - optional: true - }, - specifiers: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ExportSpecifier"))) - }, - source: { - validate: (0, _index.assertNodeType)("StringLiteral"), - optional: true - } - } -}); - -(0, _index2.default)("ExportSpecifier", { - visitor: ["local", "exported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _index.assertNodeType)("Identifier") - }, - exported: { - validate: (0, _index.assertNodeType)("Identifier") - } - } -}); - -(0, _index2.default)("ForOfStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _index.assertNodeType)("Expression") - }, - body: { - validate: (0, _index.assertNodeType)("Statement") - } - } -}); - -(0, _index2.default)("ImportDeclaration", { - visitor: ["specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration"], - fields: { - specifiers: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) - }, - source: { - validate: (0, _index.assertNodeType)("StringLiteral") - } - } -}); - -(0, _index2.default)("ImportDefaultSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _index.assertNodeType)("Identifier") - } - } -}); - -(0, _index2.default)("ImportNamespaceSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _index.assertNodeType)("Identifier") - } - } -}); - -(0, _index2.default)("ImportSpecifier", { - visitor: ["local", "imported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _index.assertNodeType)("Identifier") - }, - imported: { - validate: (0, _index.assertNodeType)("Identifier") - }, - importKind: { - validate: (0, _index.assertOneOf)(null, "type", "typeof") - } - } -}); - -(0, _index2.default)("MetaProperty", { - visitor: ["meta", "property"], - aliases: ["Expression"], - fields: { - meta: { - validate: (0, _index.assertValueType)("string") - }, - property: { - validate: (0, _index.assertValueType)("string") - } - } -}); - -(0, _index2.default)("ClassMethod", { - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], - builder: ["kind", "key", "params", "body", "computed", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: { - kind: { - validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")), - default: "method" - }, - computed: { - default: false, - validate: (0, _index.assertValueType)("boolean") - }, - static: { - default: false, - validate: (0, _index.assertValueType)("boolean") - }, - key: { - validate: function validate(node, key, val) { - var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"]; - _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val); - } - }, - params: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal"))) - }, - body: { - validate: (0, _index.assertNodeType)("BlockStatement") - }, - generator: { - default: false, - validate: (0, _index.assertValueType)("boolean") - }, - async: { - default: false, - validate: (0, _index.assertValueType)("boolean") - } - } -}); - -(0, _index2.default)("ObjectPattern", { - visitor: ["properties", "typeAnnotation"], - aliases: ["Pattern", "LVal"], - fields: { - properties: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("RestProperty", "Property"))) - }, - decorators: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator"))) - } - } -}); - -(0, _index2.default)("SpreadElement", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("Super", { - aliases: ["Expression"] -}); - -(0, _index2.default)("TaggedTemplateExpression", { - visitor: ["tag", "quasi"], - aliases: ["Expression"], - fields: { - tag: { - validate: (0, _index.assertNodeType)("Expression") - }, - quasi: { - validate: (0, _index.assertNodeType)("TemplateLiteral") - } - } -}); - -(0, _index2.default)("TemplateElement", { - builder: ["value", "tail"], - fields: { - value: {}, - tail: { - validate: (0, _index.assertValueType)("boolean"), - default: false - } - } -}); - -(0, _index2.default)("TemplateLiteral", { - visitor: ["quasis", "expressions"], - aliases: ["Expression", "Literal"], - fields: { - quasis: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("TemplateElement"))) - }, - expressions: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression"))) - } - } -}); - -(0, _index2.default)("YieldExpression", { - builder: ["argument", "delegate"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - delegate: { - validate: (0, _index.assertValueType)("boolean"), - default: false - }, - argument: { - optional: true, - validate: (0, _index.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/experimental.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/experimental.js deleted file mode 100644 index d65d609..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/experimental.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _index2.default)("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("ForAwaitStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _index.assertNodeType)("Expression") - }, - body: { - validate: (0, _index.assertNodeType)("Statement") - } - } -}); - -(0, _index2.default)("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: {} -}); - -(0, _index2.default)("Import", { - aliases: ["Expression"] -}); - -(0, _index2.default)("Decorator", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: (0, _index.assertNodeType)("BlockStatement") - } - } -}); - -(0, _index2.default)("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _index.assertNodeType)("Identifier") - } - } -}); - -(0, _index2.default)("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _index.assertNodeType)("Identifier") - } - } -}); - -(0, _index2.default)("RestProperty", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: (0, _index.assertNodeType)("LVal") - } - } -}); - -(0, _index2.default)("SpreadProperty", { - visitor: ["argument"], - aliases: ["UnaryLike"], - fields: { - argument: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/flow.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/flow.js deleted file mode 100644 index 89c6302..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/flow.js +++ /dev/null @@ -1,285 +0,0 @@ -"use strict"; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _index2.default)("AnyTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("BooleanLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - builder: ["key", "value", "typeAnnotation", "decorators", "computed"], - aliases: ["Property"], - fields: { - computed: { - validate: (0, _index.assertValueType)("boolean"), - default: false - } - } -}); - -(0, _index2.default)("DeclareClass", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareInterface", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareModule", { - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareModuleExports", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareOpaqueType", { - visitor: ["id", "typeParameters", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("DeclareExportDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("ExistentialTypeParam", { - aliases: ["Flow"] -}); - -(0, _index2.default)("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("InterfaceDeclaration", { - visitor: ["id", "typeParameters", "extends", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("MixedTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"] -}); - -(0, _index2.default)("EmptyTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"] -}); - -(0, _index2.default)("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("NumericLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("NumberTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("StringLiteralTypeAnnotation", { - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("StringTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("ThisTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); - -(0, _index2.default)("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("OpaqueType", { - visitor: ["id", "typeParameters", "impltype", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: {} -}); - -(0, _index2.default)("TypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: {} -}); - -(0, _index2.default)("TypeParameter", { - visitor: ["bound"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("TypeParameterDeclaration", { - visitor: ["params"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("TypeParameterInstantiation", { - visitor: ["params"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: {} -}); - -(0, _index2.default)("ObjectTypeIndexer", { - visitor: ["id", "key", "value"], - aliases: ["Flow", "UserWhitespacable"], - fields: {} -}); - -(0, _index2.default)("ObjectTypeProperty", { - visitor: ["key", "value"], - aliases: ["Flow", "UserWhitespacable"], - fields: {} -}); - -(0, _index2.default)("ObjectTypeSpreadProperty", { - visitor: ["argument"], - aliases: ["Flow", "UserWhitespacable"], - fields: {} -}); - -(0, _index2.default)("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow"], - fields: {} -}); - -(0, _index2.default)("VoidTypeAnnotation", { - aliases: ["Flow", "FlowBaseAnnotation"], - fields: {} -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/index.js deleted file mode 100644 index d512114..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/index.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined; - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -exports.assertEach = assertEach; -exports.assertOneOf = assertOneOf; -exports.assertNodeType = assertNodeType; -exports.assertNodeOrValueType = assertNodeOrValueType; -exports.assertValueType = assertValueType; -exports.chain = chain; -exports.default = defineType; - -var _index = require("../index"); - -var t = _interopRequireWildcard(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var VISITOR_KEYS = exports.VISITOR_KEYS = {}; -var ALIAS_KEYS = exports.ALIAS_KEYS = {}; -var NODE_FIELDS = exports.NODE_FIELDS = {}; -var BUILDER_KEYS = exports.BUILDER_KEYS = {}; -var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {}; - -function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else if (val === undefined) { - return "undefined"; - } else { - return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val); - } -} - -function assertEach(callback) { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (var i = 0; i < val.length; i++) { - callback(node, key + "[" + i + "]", val[i]); - } - } - validator.each = callback; - return validator; -} - -function assertOneOf() { - for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) { - vals[_key] = arguments[_key]; - } - - function validate(node, key, val) { - if (vals.indexOf(val) < 0) { - throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val)); - } - } - - validate.oneOf = vals; - - return validate; -} - -function assertNodeType() { - for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - types[_key2] = arguments[_key2]; - } - - function validate(node, key, val) { - var valid = false; - - for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var type = _ref; - - if (t.is(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); - } - } - - validate.oneOfNodeTypes = types; - - return validate; -} - -function assertNodeOrValueType() { - for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - types[_key3] = arguments[_key3]; - } - - function validate(node, key, val) { - var valid = false; - - for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var type = _ref2; - - if (getType(val) === type || t.is(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type))); - } - } - - validate.oneOfNodeOrValueTypes = types; - - return validate; -} - -function assertValueType(type) { - function validate(node, key, val) { - var valid = getType(val) === type; - - if (!valid) { - throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); - } - } - - validate.type = type; - - return validate; -} - -function chain() { - for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - fns[_key4] = arguments[_key4]; - } - - function validate() { - for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var fn = _ref3; - - fn.apply(undefined, arguments); - } - } - validate.chainOf = fns; - return validate; -} - -function defineType(type) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var inherits = opts.inherits && store[opts.inherits] || {}; - - opts.fields = opts.fields || inherits.fields || {}; - opts.visitor = opts.visitor || inherits.visitor || []; - opts.aliases = opts.aliases || inherits.aliases || []; - opts.builder = opts.builder || inherits.builder || opts.visitor || []; - - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } - - for (var _iterator4 = opts.visitor.concat(opts.builder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var _key5 = _ref4; - - opts.fields[_key5] = opts.fields[_key5] || {}; - } - - for (var key in opts.fields) { - var field = opts.fields[key]; - - if (opts.builder.indexOf(key) === -1) { - field.optional = true; - } - if (field.default === undefined) { - field.default = null; - } else if (!field.validate) { - field.validate = assertValueType(getType(field.default)); - } - } - - VISITOR_KEYS[type] = opts.visitor; - BUILDER_KEYS[type] = opts.builder; - NODE_FIELDS[type] = opts.fields; - ALIAS_KEYS[type] = opts.aliases; - - store[type] = opts; -} - -var store = {}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/init.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/init.js deleted file mode 100644 index a3334fe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/init.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -require("./index"); - -require("./core"); - -require("./es2015"); - -require("./flow"); - -require("./jsx"); - -require("./misc"); - -require("./experimental"); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/jsx.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/jsx.js deleted file mode 100644 index 1c0c066..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/jsx.js +++ /dev/null @@ -1,147 +0,0 @@ -"use strict"; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _index2.default)("JSXAttribute", { - visitor: ["name", "value"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName") - }, - value: { - optional: true, - validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer") - } - } -}); - -(0, _index2.default)("JSXClosingElement", { - visitor: ["name"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - } - } -}); - -(0, _index2.default)("JSXElement", { - builder: ["openingElement", "closingElement", "children", "selfClosing"], - visitor: ["openingElement", "children", "closingElement"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingElement: { - validate: (0, _index.assertNodeType)("JSXOpeningElement") - }, - closingElement: { - optional: true, - validate: (0, _index.assertNodeType)("JSXClosingElement") - }, - children: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement"))) - } - } -}); - -(0, _index2.default)("JSXEmptyExpression", { - aliases: ["JSX", "Expression"] -}); - -(0, _index2.default)("JSXExpressionContainer", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("JSXSpreadChild", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("JSXIdentifier", { - builder: ["name"], - aliases: ["JSX", "Expression"], - fields: { - name: { - validate: (0, _index.assertValueType)("string") - } - } -}); - -(0, _index2.default)("JSXMemberExpression", { - visitor: ["object", "property"], - aliases: ["JSX", "Expression"], - fields: { - object: { - validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier") - }, - property: { - validate: (0, _index.assertNodeType)("JSXIdentifier") - } - } -}); - -(0, _index2.default)("JSXNamespacedName", { - visitor: ["namespace", "name"], - aliases: ["JSX"], - fields: { - namespace: { - validate: (0, _index.assertNodeType)("JSXIdentifier") - }, - name: { - validate: (0, _index.assertNodeType)("JSXIdentifier") - } - } -}); - -(0, _index2.default)("JSXOpeningElement", { - builder: ["name", "attributes", "selfClosing"], - visitor: ["name", "attributes"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - }, - selfClosing: { - default: false, - validate: (0, _index.assertValueType)("boolean") - }, - attributes: { - validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) - } - } -}); - -(0, _index2.default)("JSXSpreadAttribute", { - visitor: ["argument"], - aliases: ["JSX"], - fields: { - argument: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); - -(0, _index2.default)("JSXText", { - aliases: ["JSX", "Immutable"], - builder: ["value"], - fields: { - value: { - validate: (0, _index.assertValueType)("string") - } - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/misc.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/misc.js deleted file mode 100644 index f982b9a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/definitions/misc.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var _index = require("./index"); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _index2.default)("Noop", { - visitor: [] -}); - -(0, _index2.default)("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: (0, _index.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/flow.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/flow.js deleted file mode 100644 index 2857915..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/flow.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.createUnionTypeAnnotation = createUnionTypeAnnotation; -exports.removeTypeDuplicates = removeTypeDuplicates; -exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof; - -var _index = require("./index"); - -var t = _interopRequireWildcard(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function createUnionTypeAnnotation(types) { - var flattened = removeTypeDuplicates(types); - - if (flattened.length === 1) { - return flattened[0]; - } else { - return t.unionTypeAnnotation(flattened); - } -} - -function removeTypeDuplicates(nodes) { - var generics = {}; - var bases = {}; - - var typeGroups = []; - - var types = []; - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - if (!node) continue; - - if (types.indexOf(node) >= 0) { - continue; - } - - if (t.isAnyTypeAnnotation(node)) { - return [node]; - } - - if (t.isFlowBaseAnnotation(node)) { - bases[node.type] = node; - continue; - } - - if (t.isUnionTypeAnnotation(node)) { - if (typeGroups.indexOf(node.types) < 0) { - nodes = nodes.concat(node.types); - typeGroups.push(node.types); - } - continue; - } - - if (t.isGenericTypeAnnotation(node)) { - var name = node.id.name; - - if (generics[name]) { - var existing = generics[name]; - if (existing.typeParameters) { - if (node.typeParameters) { - existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); - } - } else { - existing = node.typeParameters; - } - } else { - generics[name] = node; - } - - continue; - } - - types.push(node); - } - - for (var type in bases) { - types.push(bases[type]); - } - - for (var _name in generics) { - types.push(generics[_name]); - } - - return types; -} - -function createTypeAnnotationBasedOnTypeof(type) { - if (type === "string") { - return t.stringTypeAnnotation(); - } else if (type === "number") { - return t.numberTypeAnnotation(); - } else if (type === "undefined") { - return t.voidTypeAnnotation(); - } else if (type === "boolean") { - return t.booleanTypeAnnotation(); - } else if (type === "function") { - return t.genericTypeAnnotation(t.identifier("Function")); - } else if (type === "object") { - return t.genericTypeAnnotation(t.identifier("Object")); - } else if (type === "symbol") { - return t.genericTypeAnnotation(t.identifier("Symbol")); - } else { - throw new Error("Invalid typeof value"); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/index.js deleted file mode 100644 index 4c00703..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/index.js +++ /dev/null @@ -1,835 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined; - -var _getOwnPropertySymbols = require("babel-runtime/core-js/object/get-own-property-symbols"); - -var _getOwnPropertySymbols2 = _interopRequireDefault(_getOwnPropertySymbols); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _constants = require("./constants"); - -Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", { - enumerable: true, - get: function get() { - return _constants.STATEMENT_OR_BLOCK_KEYS; - } -}); -Object.defineProperty(exports, "FLATTENABLE_KEYS", { - enumerable: true, - get: function get() { - return _constants.FLATTENABLE_KEYS; - } -}); -Object.defineProperty(exports, "FOR_INIT_KEYS", { - enumerable: true, - get: function get() { - return _constants.FOR_INIT_KEYS; - } -}); -Object.defineProperty(exports, "COMMENT_KEYS", { - enumerable: true, - get: function get() { - return _constants.COMMENT_KEYS; - } -}); -Object.defineProperty(exports, "LOGICAL_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.LOGICAL_OPERATORS; - } -}); -Object.defineProperty(exports, "UPDATE_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.UPDATE_OPERATORS; - } -}); -Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.EQUALITY_BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.COMPARISON_BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.BOOLEAN_BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.NUMBER_BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "BINARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.BINARY_OPERATORS; - } -}); -Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.BOOLEAN_UNARY_OPERATORS; - } -}); -Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.NUMBER_UNARY_OPERATORS; - } -}); -Object.defineProperty(exports, "STRING_UNARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.STRING_UNARY_OPERATORS; - } -}); -Object.defineProperty(exports, "UNARY_OPERATORS", { - enumerable: true, - get: function get() { - return _constants.UNARY_OPERATORS; - } -}); -Object.defineProperty(exports, "INHERIT_KEYS", { - enumerable: true, - get: function get() { - return _constants.INHERIT_KEYS; - } -}); -Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", { - enumerable: true, - get: function get() { - return _constants.BLOCK_SCOPED_SYMBOL; - } -}); -Object.defineProperty(exports, "NOT_LOCAL_BINDING", { - enumerable: true, - get: function get() { - return _constants.NOT_LOCAL_BINDING; - } -}); -exports.is = is; -exports.isType = isType; -exports.validate = validate; -exports.shallowEqual = shallowEqual; -exports.appendToMemberExpression = appendToMemberExpression; -exports.prependToMemberExpression = prependToMemberExpression; -exports.ensureBlock = ensureBlock; -exports.clone = clone; -exports.cloneWithoutLoc = cloneWithoutLoc; -exports.cloneDeep = cloneDeep; -exports.buildMatchMemberExpression = buildMatchMemberExpression; -exports.removeComments = removeComments; -exports.inheritsComments = inheritsComments; -exports.inheritTrailingComments = inheritTrailingComments; -exports.inheritLeadingComments = inheritLeadingComments; -exports.inheritInnerComments = inheritInnerComments; -exports.inherits = inherits; -exports.assertNode = assertNode; -exports.isNode = isNode; -exports.traverseFast = traverseFast; -exports.removeProperties = removeProperties; -exports.removePropertiesDeep = removePropertiesDeep; - -var _retrievers = require("./retrievers"); - -Object.defineProperty(exports, "getBindingIdentifiers", { - enumerable: true, - get: function get() { - return _retrievers.getBindingIdentifiers; - } -}); -Object.defineProperty(exports, "getOuterBindingIdentifiers", { - enumerable: true, - get: function get() { - return _retrievers.getOuterBindingIdentifiers; - } -}); - -var _validators = require("./validators"); - -Object.defineProperty(exports, "isBinding", { - enumerable: true, - get: function get() { - return _validators.isBinding; - } -}); -Object.defineProperty(exports, "isReferenced", { - enumerable: true, - get: function get() { - return _validators.isReferenced; - } -}); -Object.defineProperty(exports, "isValidIdentifier", { - enumerable: true, - get: function get() { - return _validators.isValidIdentifier; - } -}); -Object.defineProperty(exports, "isLet", { - enumerable: true, - get: function get() { - return _validators.isLet; - } -}); -Object.defineProperty(exports, "isBlockScoped", { - enumerable: true, - get: function get() { - return _validators.isBlockScoped; - } -}); -Object.defineProperty(exports, "isVar", { - enumerable: true, - get: function get() { - return _validators.isVar; - } -}); -Object.defineProperty(exports, "isSpecifierDefault", { - enumerable: true, - get: function get() { - return _validators.isSpecifierDefault; - } -}); -Object.defineProperty(exports, "isScope", { - enumerable: true, - get: function get() { - return _validators.isScope; - } -}); -Object.defineProperty(exports, "isImmutable", { - enumerable: true, - get: function get() { - return _validators.isImmutable; - } -}); -Object.defineProperty(exports, "isNodesEquivalent", { - enumerable: true, - get: function get() { - return _validators.isNodesEquivalent; - } -}); - -var _converters = require("./converters"); - -Object.defineProperty(exports, "toComputedKey", { - enumerable: true, - get: function get() { - return _converters.toComputedKey; - } -}); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function get() { - return _converters.toSequenceExpression; - } -}); -Object.defineProperty(exports, "toKeyAlias", { - enumerable: true, - get: function get() { - return _converters.toKeyAlias; - } -}); -Object.defineProperty(exports, "toIdentifier", { - enumerable: true, - get: function get() { - return _converters.toIdentifier; - } -}); -Object.defineProperty(exports, "toBindingIdentifierName", { - enumerable: true, - get: function get() { - return _converters.toBindingIdentifierName; - } -}); -Object.defineProperty(exports, "toStatement", { - enumerable: true, - get: function get() { - return _converters.toStatement; - } -}); -Object.defineProperty(exports, "toExpression", { - enumerable: true, - get: function get() { - return _converters.toExpression; - } -}); -Object.defineProperty(exports, "toBlock", { - enumerable: true, - get: function get() { - return _converters.toBlock; - } -}); -Object.defineProperty(exports, "valueToNode", { - enumerable: true, - get: function get() { - return _converters.valueToNode; - } -}); - -var _flow = require("./flow"); - -Object.defineProperty(exports, "createUnionTypeAnnotation", { - enumerable: true, - get: function get() { - return _flow.createUnionTypeAnnotation; - } -}); -Object.defineProperty(exports, "removeTypeDuplicates", { - enumerable: true, - get: function get() { - return _flow.removeTypeDuplicates; - } -}); -Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { - enumerable: true, - get: function get() { - return _flow.createTypeAnnotationBasedOnTypeof; - } -}); - -var _toFastProperties = require("to-fast-properties"); - -var _toFastProperties2 = _interopRequireDefault(_toFastProperties); - -var _clone = require("lodash/clone"); - -var _clone2 = _interopRequireDefault(_clone); - -var _uniq = require("lodash/uniq"); - -var _uniq2 = _interopRequireDefault(_uniq); - -require("./definitions/init"); - -var _definitions = require("./definitions"); - -var _react2 = require("./react"); - -var _react = _interopRequireWildcard(_react2); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var t = exports; - -function registerType(type) { - var is = t["is" + type]; - if (!is) { - is = t["is" + type] = function (node, opts) { - return t.is(type, node, opts); - }; - } - - t["assert" + type] = function (node, opts) { - opts = opts || {}; - if (!is(node, opts)) { - throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts)); - } - }; -} - -exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; -exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; -exports.NODE_FIELDS = _definitions.NODE_FIELDS; -exports.BUILDER_KEYS = _definitions.BUILDER_KEYS; -exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS; -exports.react = _react; - - -for (var type in t.VISITOR_KEYS) { - registerType(type); -} - -t.FLIPPED_ALIAS_KEYS = {}; - -(0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) { - t.ALIAS_KEYS[type].forEach(function (alias) { - var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || []; - types.push(type); - }); -}); - -(0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) { - t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type]; - registerType(type); -}); - -var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS)); - -function is(type, node, opts) { - if (!node) return false; - - var matches = isType(node.type, type); - if (!matches) return false; - - if (typeof opts === "undefined") { - return true; - } else { - return t.shallowEqual(node, opts); - } -} - -function isType(nodeType, targetType) { - if (nodeType === targetType) return true; - - if (t.ALIAS_KEYS[targetType]) return false; - - var aliases = t.FLIPPED_ALIAS_KEYS[targetType]; - if (aliases) { - if (aliases[0] === nodeType) return true; - - for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var alias = _ref; - - if (nodeType === alias) return true; - } - } - - return false; -} - -(0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) { - var keys = t.BUILDER_KEYS[type]; - - function builder() { - if (arguments.length > keys.length) { - throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length)); - } - - var node = {}; - node.type = type; - - var i = 0; - - for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _key = _ref2; - - var field = t.NODE_FIELDS[type][_key]; - - var arg = arguments[i++]; - if (arg === undefined) arg = (0, _clone2.default)(field.default); - - node[_key] = arg; - } - - for (var key in node) { - validate(node, key, node[key]); - } - - return node; - } - - t[type] = builder; - t[type[0].toLowerCase() + type.slice(1)] = builder; -}); - -var _loop = function _loop(_type) { - var newType = t.DEPRECATED_KEYS[_type]; - - function proxy(fn) { - return function () { - console.trace("The node type " + _type + " has been renamed to " + newType); - return fn.apply(this, arguments); - }; - } - - t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]); - t["is" + _type] = proxy(t["is" + newType]); - t["assert" + _type] = proxy(t["assert" + newType]); -}; - -for (var _type in t.DEPRECATED_KEYS) { - _loop(_type); -} - -function validate(node, key, val) { - if (!node) return; - - var fields = t.NODE_FIELDS[node.type]; - if (!fields) return; - - var field = fields[key]; - if (!field || !field.validate) return; - if (field.optional && val == null) return; - - field.validate(node, key, val); -} - -function shallowEqual(actual, expected) { - var keys = (0, _keys2.default)(expected); - - for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var key = _ref3; - - if (actual[key] !== expected[key]) { - return false; - } - } - - return true; -} - -function appendToMemberExpression(member, append, computed) { - member.object = t.memberExpression(member.object, member.property, member.computed); - member.property = append; - member.computed = !!computed; - return member; -} - -function prependToMemberExpression(member, prepend) { - member.object = t.memberExpression(prepend, member.object); - return member; -} - -function ensureBlock(node) { - var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body"; - - return node[key] = t.toBlock(node[key], node); -} - -function clone(node) { - if (!node) return node; - var newNode = {}; - for (var key in node) { - if (key[0] === "_") continue; - newNode[key] = node[key]; - } - return newNode; -} - -function cloneWithoutLoc(node) { - var newNode = clone(node); - delete newNode.loc; - return newNode; -} - -function cloneDeep(node) { - if (!node) return node; - var newNode = {}; - - for (var key in node) { - if (key[0] === "_") continue; - - var val = node[key]; - - if (val) { - if (val.type) { - val = t.cloneDeep(val); - } else if (Array.isArray(val)) { - val = val.map(t.cloneDeep); - } - } - - newNode[key] = val; - } - - return newNode; -} - -function buildMatchMemberExpression(match, allowPartial) { - var parts = match.split("."); - - return function (member) { - if (!t.isMemberExpression(member)) return false; - - var search = [member]; - var i = 0; - - while (search.length) { - var node = search.shift(); - - if (allowPartial && i === parts.length) { - return true; - } - - if (t.isIdentifier(node)) { - if (parts[i] !== node.name) return false; - } else if (t.isStringLiteral(node)) { - if (parts[i] !== node.value) return false; - } else if (t.isMemberExpression(node)) { - if (node.computed && !t.isStringLiteral(node.property)) { - return false; - } else { - search.push(node.object); - search.push(node.property); - continue; - } - } else { - return false; - } - - if (++i > parts.length) { - return false; - } - } - - return true; - }; -} - -function removeComments(node) { - for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) { - var _ref4; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref4 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref4 = _i4.value; - } - - var key = _ref4; - - delete node[key]; - } - return node; -} - -function inheritsComments(child, parent) { - inheritTrailingComments(child, parent); - inheritLeadingComments(child, parent); - inheritInnerComments(child, parent); - return child; -} - -function inheritTrailingComments(child, parent) { - _inheritComments("trailingComments", child, parent); -} - -function inheritLeadingComments(child, parent) { - _inheritComments("leadingComments", child, parent); -} - -function inheritInnerComments(child, parent) { - _inheritComments("innerComments", child, parent); -} - -function _inheritComments(key, child, parent) { - if (child && parent) { - child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean)); - } -} - -function inherits(child, parent) { - if (!child || !parent) return child; - - for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { - var _ref5; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref5 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref5 = _i5.value; - } - - var _key2 = _ref5; - - if (child[_key2] == null) { - child[_key2] = parent[_key2]; - } - } - - for (var key in parent) { - if (key[0] === "_") child[key] = parent[key]; - } - - for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) { - var _ref6; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref6 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref6 = _i6.value; - } - - var _key3 = _ref6; - - child[_key3] = parent[_key3]; - } - - t.inheritsComments(child, parent); - - return child; -} - -function assertNode(node) { - if (!isNode(node)) { - throw new TypeError("Not a valid node " + (node && node.type)); - } -} - -function isNode(node) { - return !!(node && _definitions.VISITOR_KEYS[node.type]); -} - -(0, _toFastProperties2.default)(t); -(0, _toFastProperties2.default)(t.VISITOR_KEYS); - -function traverseFast(node, enter, opts) { - if (!node) return; - - var keys = t.VISITOR_KEYS[node.type]; - if (!keys) return; - - opts = opts || {}; - enter(node, opts); - - for (var _iterator7 = keys, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) { - var _ref7; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref7 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref7 = _i7.value; - } - - var key = _ref7; - - var subNode = node[key]; - - if (Array.isArray(subNode)) { - for (var _iterator8 = subNode, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) { - var _ref8; - - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref8 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref8 = _i8.value; - } - - var _node = _ref8; - - traverseFast(_node, enter, opts); - } - } else { - traverseFast(subNode, enter, opts); - } - } -} - -var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; - -var CLEAR_KEYS_PLUS_COMMENTS = t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); - -function removeProperties(node, opts) { - opts = opts || {}; - var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; - for (var _iterator9 = map, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) { - var _ref9; - - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref9 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref9 = _i9.value; - } - - var _key4 = _ref9; - - if (node[_key4] != null) node[_key4] = undefined; - } - - for (var key in node) { - if (key[0] === "_" && node[key] != null) node[key] = undefined; - } - - var syms = (0, _getOwnPropertySymbols2.default)(node); - for (var _iterator10 = syms, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) { - var _ref10; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref10 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref10 = _i10.value; - } - - var sym = _ref10; - - node[sym] = null; - } -} - -function removePropertiesDeep(tree, opts) { - traverseFast(tree, removeProperties, opts); - return tree; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/react.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/react.js deleted file mode 100644 index 923ee12..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/react.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.isReactComponent = undefined; -exports.isCompatTag = isCompatTag; -exports.buildChildren = buildChildren; - -var _index = require("./index"); - -var t = _interopRequireWildcard(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component"); - -function isCompatTag(tagName) { - return !!tagName && /^[a-z]|\-/.test(tagName); -} - -function cleanJSXElementLiteralChild(child, args) { - var lines = child.value.split(/\r\n|\n|\r/); - - var lastNonEmptyLine = 0; - - for (var i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { - lastNonEmptyLine = i; - } - } - - var str = ""; - - for (var _i = 0; _i < lines.length; _i++) { - var line = lines[_i]; - - var isFirstLine = _i === 0; - var isLastLine = _i === lines.length - 1; - var isLastNonEmptyLine = _i === lastNonEmptyLine; - - var trimmedLine = line.replace(/\t/g, " "); - - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); - } - - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); - } - - if (trimmedLine) { - if (!isLastNonEmptyLine) { - trimmedLine += " "; - } - - str += trimmedLine; - } - } - - if (str) args.push(t.stringLiteral(str)); -} - -function buildChildren(node) { - var elems = []; - - for (var i = 0; i < node.children.length; i++) { - var child = node.children[i]; - - if (t.isJSXText(child)) { - cleanJSXElementLiteralChild(child, elems); - continue; - } - - if (t.isJSXExpressionContainer(child)) child = child.expression; - if (t.isJSXEmptyExpression(child)) continue; - - elems.push(child); - } - - return elems; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/retrievers.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/retrievers.js deleted file mode 100644 index ae7987f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/retrievers.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _create = require("babel-runtime/core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -exports.getBindingIdentifiers = getBindingIdentifiers; -exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; - -var _index = require("./index"); - -var t = _interopRequireWildcard(_index); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getBindingIdentifiers(node, duplicates, outerOnly) { - var search = [].concat(node); - var ids = (0, _create2.default)(null); - - while (search.length) { - var id = search.shift(); - if (!id) continue; - - var keys = t.getBindingIdentifiers.keys[id.type]; - - if (t.isIdentifier(id)) { - if (duplicates) { - var _ids = ids[id.name] = ids[id.name] || []; - _ids.push(id); - } else { - ids[id.name] = id; - } - continue; - } - - if (t.isExportDeclaration(id)) { - if (t.isDeclaration(id.declaration)) { - search.push(id.declaration); - } - continue; - } - - if (outerOnly) { - if (t.isFunctionDeclaration(id)) { - search.push(id.id); - continue; - } - - if (t.isFunctionExpression(id)) { - continue; - } - } - - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (id[key]) { - search = search.concat(id[key]); - } - } - } - } - - return ids; -} - -getBindingIdentifiers.keys = { - DeclareClass: ["id"], - DeclareFunction: ["id"], - DeclareModule: ["id"], - DeclareVariable: ["id"], - InterfaceDeclaration: ["id"], - TypeAlias: ["id"], - OpaqueType: ["id"], - - CatchClause: ["param"], - LabeledStatement: ["label"], - UnaryExpression: ["argument"], - AssignmentExpression: ["left"], - - ImportSpecifier: ["local"], - ImportNamespaceSpecifier: ["local"], - ImportDefaultSpecifier: ["local"], - ImportDeclaration: ["specifiers"], - - ExportSpecifier: ["exported"], - ExportNamespaceSpecifier: ["exported"], - ExportDefaultSpecifier: ["exported"], - - FunctionDeclaration: ["id", "params"], - FunctionExpression: ["id", "params"], - - ClassDeclaration: ["id"], - ClassExpression: ["id"], - - RestElement: ["argument"], - UpdateExpression: ["argument"], - - RestProperty: ["argument"], - ObjectProperty: ["value"], - - AssignmentPattern: ["left"], - ArrayPattern: ["elements"], - ObjectPattern: ["properties"], - - VariableDeclaration: ["declarations"], - VariableDeclarator: ["id"] -}; - -function getOuterBindingIdentifiers(node, duplicates) { - return getBindingIdentifiers(node, duplicates, true); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/validators.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/validators.js deleted file mode 100644 index ec30e55..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/lib/validators.js +++ /dev/null @@ -1,265 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _typeof2 = require("babel-runtime/helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _getIterator2 = require("babel-runtime/core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -exports.isBinding = isBinding; -exports.isReferenced = isReferenced; -exports.isValidIdentifier = isValidIdentifier; -exports.isLet = isLet; -exports.isBlockScoped = isBlockScoped; -exports.isVar = isVar; -exports.isSpecifierDefault = isSpecifierDefault; -exports.isScope = isScope; -exports.isImmutable = isImmutable; -exports.isNodesEquivalent = isNodesEquivalent; - -var _retrievers = require("./retrievers"); - -var _esutils = require("esutils"); - -var _esutils2 = _interopRequireDefault(_esutils); - -var _index = require("./index"); - -var t = _interopRequireWildcard(_index); - -var _constants = require("./constants"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBinding(node, parent) { - var keys = _retrievers.getBindingIdentifiers.keys[parent.type]; - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var val = parent[key]; - if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; - } else { - if (val === node) return true; - } - } - } - - return false; -} - -function isReferenced(node, parent) { - switch (parent.type) { - case "BindExpression": - return parent.object === node || parent.callee === node; - - case "MemberExpression": - case "JSXMemberExpression": - if (parent.property === node && parent.computed) { - return true; - } else if (parent.object === node) { - return true; - } else { - return false; - } - - case "MetaProperty": - return false; - - case "ObjectProperty": - if (parent.key === node) { - return parent.computed; - } - - case "VariableDeclarator": - return parent.id !== node; - - case "ArrowFunctionExpression": - case "FunctionDeclaration": - case "FunctionExpression": - for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var param = _ref; - - if (param === node) return false; - } - - return parent.id !== node; - - case "ExportSpecifier": - if (parent.source) { - return false; - } else { - return parent.local === node; - } - - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - - case "JSXAttribute": - return parent.name !== node; - - case "ClassProperty": - if (parent.key === node) { - return parent.computed; - } else { - return parent.value === node; - } - - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - - case "ClassDeclaration": - case "ClassExpression": - return parent.id !== node; - - case "ClassMethod": - case "ObjectMethod": - return parent.key === node && parent.computed; - - case "LabeledStatement": - return false; - - case "CatchClause": - return parent.param !== node; - - case "RestElement": - return false; - - case "AssignmentExpression": - return parent.right === node; - - case "AssignmentPattern": - return parent.right === node; - - case "ObjectPattern": - case "ArrayPattern": - return false; - } - - return true; -} - -function isValidIdentifier(name) { - if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) { - return false; - } else if (name === "await") { - return false; - } else { - return _esutils2.default.keyword.isIdentifierNameES6(name); - } -} - -function isLet(node) { - return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); -} - -function isBlockScoped(node) { - return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node); -} - -function isVar(node) { - return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; -} - -function isSpecifierDefault(specifier) { - return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" }); -} - -function isScope(node, parent) { - if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) { - return false; - } - - return t.isScopable(node); -} - -function isImmutable(node) { - if (t.isType(node.type, "Immutable")) return true; - - if (t.isIdentifier(node)) { - if (node.name === "undefined") { - return true; - } else { - return false; - } - } - - return false; -} - -function isNodesEquivalent(a, b) { - if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) { - return a === b; - } - - if (a.type !== b.type) { - return false; - } - - var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type); - - for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var field = _ref2; - - if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) { - return false; - } - - if (Array.isArray(a[field])) { - if (!Array.isArray(b[field])) { - return false; - } - if (a[field].length !== b[field].length) { - return false; - } - - for (var i = 0; i < a[field].length; i++) { - if (!isNodesEquivalent(a[field][i], b[field][i])) { - return false; - } - } - continue; - } - - if (!isNodesEquivalent(a[field], b[field])) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package-lock.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package-lock.json deleted file mode 100644 index 49fefe9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package-lock.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "babel-types", - "version": "6.25.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package.json deleted file mode 100644 index 7605eca..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "babel-types@^6.26.0", - "scope": null, - "escapedName": "babel-types", - "name": "babel-types", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "babel-types@>=6.26.0 <7.0.0", - "_id": "babel-types@6.26.0", - "_inCache": true, - "_location": "/babel-types", - "_nodeVersion": "6.9.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/babel-types-6.26.0.tgz_1502898852975_0.1106437393464148" - }, - "_npmUser": { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "raw": "babel-types@^6.26.0", - "scope": null, - "escapedName": "babel-types", - "name": "babel-types", - "rawSpec": "^6.26.0", - "spec": ">=6.26.0 <7.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-generator", - "/babel-helper-builder-react-jsx", - "/babel-helper-call-delegate", - "/babel-helper-define-map", - "/babel-helper-function-name", - "/babel-helper-get-function-arity", - "/babel-helper-hoist-variables", - "/babel-helper-optimise-call-expression", - "/babel-helper-regex", - "/babel-helper-replace-supers", - "/babel-plugin-transform-es2015-block-scoping", - "/babel-plugin-transform-es2015-classes", - "/babel-plugin-transform-es2015-duplicate-keys", - "/babel-plugin-transform-es2015-function-name", - "/babel-plugin-transform-es2015-modules-commonjs", - "/babel-plugin-transform-es2015-parameters", - "/babel-plugin-transform-es2015-shorthand-properties", - "/babel-plugin-transform-es2015-sticky-regex", - "/babel-plugin-transform-strict-mode", - "/babel-template", - "/babel-traverse", - "/regenerator-transform" - ], - "_resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "_shasum": "a3b073f94ab49eb6fa55cd65227a334380632497", - "_shrinkwrap": null, - "_spec": "babel-types@^6.26.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "devDependencies": { - "babel-generator": "^6.26.0", - "babylon": "^6.18.0" - }, - "directories": {}, - "dist": { - "shasum": "a3b073f94ab49eb6fa55cd65227a334380632497", - "tarball": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "name": "thejameskyle", - "email": "me@thejameskyle.com" - }, - { - "name": "sebmck", - "email": "sebmck@gmail.com" - }, - { - "name": "danez", - "email": "daniel@tschinder.de" - }, - { - "name": "hzoo", - "email": "hi@henryzoo.com" - }, - { - "name": "loganfsmyth", - "email": "loganfsmyth@gmail.com" - } - ], - "name": "babel-types", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-types" - }, - "scripts": {}, - "version": "6.26.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/CHANGELOG.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/CHANGELOG.md deleted file mode 100644 index f5f1794..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/CHANGELOG.md +++ /dev/null @@ -1,979 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babylon#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.4 (2017-06-18) - - * Fix comment attachment for call expressions (#575) (aardito2) - * Correctly put typeParameters on FunctionExpression (#585) (Daniel Tschinder) - -## 6.17.3 (2017-06-09) - - * Fix location info on FunctionTypeParam nodes (#565) (#571) (Michal Srb) - * Fix stmt value being the raw value (#557) (#558) (Daniel Tschinder) - -## 6.17.2 (2017-05-31) - - * Fixed disappearing comments following a trailing comma on the last property of an object literal or the last argument of a call expression (#478) (aardito2) - * Fix #437: only prohibit 'export type from "module" ' when flow is enabled (#438) (Kevin Gibbons) - * Fix handling of anonymous parameters in `flowParseObjectTypeMethodish`. (#526) (Max Schaefer) - * Convert argument of SpreadElement correctly to assignable (#518) (Daniel Tschinder) - -## 6.17.1 (2017-05-10) - - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on seperate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/LICENSE deleted file mode 100644 index d4c7fc5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/README.md deleted file mode 100644 index ad2a8fd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/README.md +++ /dev/null @@ -1,134 +0,0 @@ -

- babylon -

- -

- Babylon is a JavaScript parser used in Babel. -

- -

- Travis Status - Codecov Status -

- - - The latest ECMAScript version enabled by default (ES2017). - - Comment attachment. - - Support for JSX and Flow. - - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). - -## Credits - -Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), -thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). - -Significant diversions are expected to occur in the future such as streaming, EBNF definitions, sweet.js integration, interspatial parsing and more. - -## API - -### `babylon.parse(code, [options])` - -### `babylon.parseExpression(code, [options])` - -`parse()` parses the provided `code` as an entire ECMAScript program, while -`parseExpression()` tries to parse a single Expression with performance in -mind. When in doubt, use `.parse()`. - -### Options - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowSuperOutsideMethod**: TODO - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. - -- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. - -- **plugins**: Array containing the plugins that you want to enable. - -- **strictMode**: TODO - -### Output - -Babylon generates AST according to [Babel AST format][]. -It is based on [ESTree spec][] with the following deviations: - -> There is now an `estree` plugin which reverts these deviations - -- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] -- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] -- [MethodDefinition][] is replaced with [ClassMethod][] -- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] -- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. - -AST for JSX code is based on [Facebook JSX AST][] with the addition of one node type: - -- `JSXText` - -[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md -[ESTree spec]: https://github.com/estree/estree - -[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal -[Property]: https://github.com/estree/estree/blob/master/es5.md#property -[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition - -[StringLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#stringliteral -[NumericLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#numericliteral -[BooleanLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#booleanliteral -[NullLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#nullliteral -[RegExpLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#regexpliteral -[ObjectProperty]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectproperty -[ObjectMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectmethod -[ClassMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#classmethod -[Program]: https://github.com/babel/babylon/blob/master/ast/spec.md#programs -[BlockStatement]: https://github.com/babel/babylon/blob/master/ast/spec.md#blockstatement -[Directive]: https://github.com/babel/babylon/blob/master/ast/spec.md#directive -[DirectiveLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#directiveliteral -[FunctionExpression]: https://github.com/babel/babylon/blob/master/ast/spec.md#functionexpression - -[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md - -### Semver - -Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. - -For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. - -### Example - -```javascript -require("babylon").parse("code", { - // parse in strict mode and allow module declarations - sourceType: "module", - - plugins: [ - // enable jsx and flow syntax - "jsx", - "flow" - ] -}); -``` - -### Plugins - - - `estree` - - `jsx` - - `flow` - - `doExpressions` - - `objectRestSpread` - - `decorators` (Based on an outdated version of the Decorators proposal. Will be removed in a future version of `Babylon`) - - `classProperties` - - `exportExtensions` - - `asyncGenerators` - - `functionBind` - - `functionSent` - - `dynamicImport` - - `templateInvalidEscapes` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/babylon.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/babylon.js deleted file mode 100755 index 449ddfe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/babylon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var babylon = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = babylon.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/generate-identifier-regex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/generate-identifier-regex.js deleted file mode 100644 index 9b0ae7d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/bin/generate-identifier-regex.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -// Which Unicode version should be used? -const version = "9.0.0"; - -const start = require("unicode-" + version + "/Binary_Property/ID_Start/code-points.js") - .filter(function(ch) { return ch > 0x7f; }); -let last = -1; -const cont = [0x200c, 0x200d].concat( - require("unicode-" + version + "/Binary_Property/ID_Continue/code-points.js") - .filter(function(ch) { - return ch > 0x7f && search(start, ch, last + 1) == -1; - }) - ); - -function search(arr, ch, starting) { - for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) - if (arr[i] === ch) - return i; - return -1; -} - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - const hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - const astral = []; - let re = ""; - for (let i = 0, at = 0x10000; i < chars.length; i++) { - const from = chars[i]; - let to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return { nonASCII: re, astral: astral }; -} - -const startData = generate(start); -const contData = generate(cont); - -console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/lib/index.js deleted file mode 100644 index a914ac5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/babylon/lib/index.js +++ /dev/null @@ -1,7318 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/* eslint max-len: 0 */ - -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - -function makePredicate(words) { - words = words.split(" "); - return function (str) { - return words.indexOf(str) >= 0; - }; -} - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; - -// And the keywords - -var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; -var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by `bin/generate-identifier-regex.js`. -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 264, 8, 2, 36, 18, 0, 50, 29, 881, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 0, 32, 6124, 20, 754, 9486, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541]; -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - - pos += set[i + 1]; - if (pos >= code) return true; - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - return isInAstralSet(code, astralIdentifierStartCodes); -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -// A second optional argument can be given to further configure -var defaultOptions = { - // Source type ("script" or "module") for different semantics - sourceType: "script", - // Source filename. - sourceFilename: undefined, - // Line from which to start counting source. Useful for - // integration with other tools. - startLine: 1, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // TODO - allowSuperOutsideMethod: false, - // An array of plugins to enable - plugins: [], - // TODO - strictMode: null -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - for (var key in defaultOptions) { - options[key] = opts && key in opts ? opts[key] : defaultOptions[key]; - } - return options; -} - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; - - - - - - - - - - - -var classCallCheck = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; - - - - - - - - - - - -var inherits = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; -}; - - - - - - - - - - - -var possibleConstructorReturn = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; -}; - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var beforeExpr = true; -var startsExpr = true; -var isLoop = true; -var isAssign = true; -var prefix = true; -var postfix = true; - -var TokenType = function TokenType(label) { - var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, TokenType); - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -var KeywordTokenType = function (_TokenType) { - inherits(KeywordTokenType, _TokenType); - - function KeywordTokenType(name) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - classCallCheck(this, KeywordTokenType); - - options.keyword = name; - - return possibleConstructorReturn(this, _TokenType.call(this, name, options)); - } - - return KeywordTokenType; -}(TokenType); - -var BinopTokenType = function (_TokenType2) { - inherits(BinopTokenType, _TokenType2); - - function BinopTokenType(name, prec) { - classCallCheck(this, BinopTokenType); - return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec })); - } - - return BinopTokenType; -}(TokenType); - -var types = { - num: new TokenType("num", { startsExpr: startsExpr }), - regexp: new TokenType("regexp", { startsExpr: startsExpr }), - string: new TokenType("string", { startsExpr: startsExpr }), - name: new TokenType("name", { startsExpr: startsExpr }), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - parenR: new TokenType(")"), - comma: new TokenType(",", { beforeExpr: beforeExpr }), - semi: new TokenType(";", { beforeExpr: beforeExpr }), - colon: new TokenType(":", { beforeExpr: beforeExpr }), - doubleColon: new TokenType("::", { beforeExpr: beforeExpr }), - dot: new TokenType("."), - question: new TokenType("?", { beforeExpr: beforeExpr }), - arrow: new TokenType("=>", { beforeExpr: beforeExpr }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { beforeExpr: beforeExpr }), - backQuote: new TokenType("`", { startsExpr: startsExpr }), - dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - at: new TokenType("@"), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }), - assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }), - incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }), - prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - logicalOR: new BinopTokenType("||", 1), - logicalAND: new BinopTokenType("&&", 2), - bitwiseOR: new BinopTokenType("|", 3), - bitwiseXOR: new BinopTokenType("^", 4), - bitwiseAND: new BinopTokenType("&", 5), - equality: new BinopTokenType("==/!=", 6), - relational: new BinopTokenType("", 7), - bitShift: new BinopTokenType("<>", 8), - plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }), - modulo: new BinopTokenType("%", 10), - star: new BinopTokenType("*", 10), - slash: new BinopTokenType("/", 10), - exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true }) -}; - -var keywords = { - "break": new KeywordTokenType("break"), - "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }), - "catch": new KeywordTokenType("catch"), - "continue": new KeywordTokenType("continue"), - "debugger": new KeywordTokenType("debugger"), - "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }), - "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }), - "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }), - "finally": new KeywordTokenType("finally"), - "for": new KeywordTokenType("for", { isLoop: isLoop }), - "function": new KeywordTokenType("function", { startsExpr: startsExpr }), - "if": new KeywordTokenType("if"), - "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }), - "switch": new KeywordTokenType("switch"), - "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }), - "try": new KeywordTokenType("try"), - "var": new KeywordTokenType("var"), - "let": new KeywordTokenType("let"), - "const": new KeywordTokenType("const"), - "while": new KeywordTokenType("while", { isLoop: isLoop }), - "with": new KeywordTokenType("with"), - "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - "this": new KeywordTokenType("this", { startsExpr: startsExpr }), - "super": new KeywordTokenType("super", { startsExpr: startsExpr }), - "class": new KeywordTokenType("class"), - "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }), - "export": new KeywordTokenType("export"), - "import": new KeywordTokenType("import", { startsExpr: startsExpr }), - "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }), - "null": new KeywordTokenType("null", { startsExpr: startsExpr }), - "true": new KeywordTokenType("true", { startsExpr: startsExpr }), - "false": new KeywordTokenType("false", { startsExpr: startsExpr }), - "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }), - "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }), - "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }), - "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }) -}; - -// Map keyword names to token types. -Object.keys(keywords).forEach(function (name) { - types["_" + name] = keywords[name]; -}); - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; -} - -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; - -var types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - functionExpression: new TokContext("function", true) -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - var out = this.state.context.pop(); - if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types$1.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; - } -}; - -types.name.updateContext = function (prevType) { - this.state.exprAllowed = false; - - if (prevType === types._let || prevType === types._const || prevType === types._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; - } - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = function () { - if (this.curContext() !== types$1.braceStatement) { - this.state.context.push(types$1.functionExpression); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - this.state.exprAllowed = false; -}; - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - classCallCheck(this, Position); - - this.line = line; - this.column = col; -}; - -var SourceLocation = function SourceLocation(start, end) { - classCallCheck(this, SourceLocation); - - this.start = start; - this.end = end; -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } -} - -var State = function () { - function State() { - classCallCheck(this, State); - } - - State.prototype.init = function init(options, input) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - - this.input = input; - - this.potentialArrowAt = -1; - - this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false; - - this.labels = []; - - this.decorators = []; - - this.tokens = []; - - this.comments = []; - - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - - this.pos = this.lineStart = 0; - this.curLine = options.startLine; - - this.type = types.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - - this.invalidTemplateEscapePosition = null; - - this.exportedIdentifiers = []; - - return this; - }; - - // TODO - - - // TODO - - - // Used to signify the start of a potential arrow function - - - // Flags to track whether we are in a function, a generator. - - - // Labels in scope. - - - // Leading decorators. - - - // Token store. - - - // Comment store. - - - // Comment attachment store - - - // The current position of the tokenizer in the input. - - - // Properties of the current token: - // Its type - - - // For tokens that include more information than their type, the value - - - // Its start and end offset - - - // And, if locations are used, the {line, column} object - // corresponding to those offsets - - - // Position information for the previous token - - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - - - // TODO - - - // Names of exports store. `default` is stored as a name for both - // `export default foo;` and `export { foo as default };`. - - - State.prototype.curPosition = function curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - State.prototype.clone = function clone(skipArrays) { - var state = new State(); - for (var key in this) { - var val = this[key]; - - if ((!skipArrays || key === "context") && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - } - return state; - }; - - return State; -}(); - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(state) { - classCallCheck(this, Token); - - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); -}; - -// ## Tokenizer - -function codePointToString(code) { - // UTF-16 Decoding - if (code <= 0xFFFF) { - return String.fromCharCode(code); - } else { - return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00); - } -} - -var Tokenizer = function () { - function Tokenizer(options, input) { - classCallCheck(this, Tokenizer); - - this.state = new State(); - this.state.init(options, input); - } - - // Move to the next token - - Tokenizer.prototype.next = function next() { - if (!this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - }; - - // TODO - - Tokenizer.prototype.eat = function eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - }; - - // TODO - - Tokenizer.prototype.match = function match(type) { - return this.state.type === type; - }; - - // TODO - - Tokenizer.prototype.isKeyword = function isKeyword$$1(word) { - return isKeyword(word); - }; - - // TODO - - Tokenizer.prototype.lookahead = function lookahead() { - var old = this.state; - this.state = old.clone(true); - - this.isLookahead = true; - this.next(); - this.isLookahead = false; - - var curr = this.state.clone(true); - this.state = old; - return curr; - }; - - // Toggle strict mode. Re-reads the next number or string to please - // pedantic tests (`"use strict"; 010;` should fail). - - Tokenizer.prototype.setStrict = function setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - this.nextToken(); - }; - - Tokenizer.prototype.curContext = function curContext() { - return this.state.context[this.state.context.length - 1]; - }; - - // Read a single token, updating the parser object's token-related - // properties. - - Tokenizer.prototype.nextToken = function nextToken() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.input.length) return this.finishToken(types.eof); - - if (curContext.override) { - return curContext.override(this); - } else { - return this.readToken(this.fullCharCodeAtPos()); - } - }; - - Tokenizer.prototype.readToken = function readToken(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code) || code === 92 /* '\' */) { - return this.readWord(); - } else { - return this.getTokenFromCode(code); - } - }; - - Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() { - var code = this.input.charCodeAt(this.state.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - - var next = this.input.charCodeAt(this.state.pos + 1); - return (code << 10) + next - 0x35fdc00; - }; - - Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - - if (!this.isLookahead) { - this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - }; - - Tokenizer.prototype.skipBlockComment = function skipBlockComment() { - var startLoc = this.state.curPosition(); - var start = this.state.pos; - var end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - var match = void 0; - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) { - var start = this.state.pos; - var startLoc = this.state.curPosition(); - var ch = this.input.charCodeAt(this.state.pos += startSkip); - while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.state.pos; - ch = this.input.charCodeAt(this.state.pos); - } - - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - // Called at the start of the parse and after every token. Skips - // whitespace and comments, and. - - Tokenizer.prototype.skipSpace = function skipSpace() { - loop: while (this.state.pos < this.input.length) { - var ch = this.input.charCodeAt(this.state.pos); - switch (ch) { - case 32:case 160: - // ' ' - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10:case 8232:case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - // '/' - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - // '*' - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - break; - - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.state.pos; - } else { - break loop; - } - } - } - }; - - // Called at the end of every token. Sets `end`, `val`, and - // maintains `context` and `exprAllowed`, and skips the space after - // the token, so that the next one's `start` will point at the - // right position. - - Tokenizer.prototype.finishToken = function finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - var prevType = this.state.type; - this.state.type = type; - this.state.value = val; - - this.updateContext(prevType); - }; - - // ### Token reading - - // This is the function that is called to fetch the next token. It - // is somewhat obscure, because it works in character codes rather - // than characters, and because operator parsing has been inlined - // into it. - // - // All in the name of speed. - // - - - Tokenizer.prototype.readToken_dot = function readToken_dot() { - var next = this.input.charCodeAt(this.state.pos + 1); - if (next >= 48 && next <= 57) { - return this.readNumber(true); - } - - var next2 = this.input.charCodeAt(this.state.pos + 2); - if (next === 46 && next2 === 46) { - // 46 = dot '.' - this.state.pos += 3; - return this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - return this.finishToken(types.dot); - } - }; - - Tokenizer.prototype.readToken_slash = function readToken_slash() { - // '/' - if (this.state.exprAllowed) { - ++this.state.pos; - return this.readRegexp(); - } - - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.slash, 1); - } - }; - - Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) { - // '%*' - var type = code === 42 ? types.star : types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 42) { - // '*' - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61) { - width++; - type = types.assign; - } - - return this.finishOp(type, width); - }; - - Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) { - // '|&' - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - if (next === 61) return this.finishOp(types.assign, 2); - if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2); - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - }; - - Tokenizer.prototype.readToken_caret = function readToken_caret() { - // '^' - var next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.bitwiseXOR, 1); - } - }; - - Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) { - // '+-' - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(types.incDec, 2); - } - - if (next === 61) { - return this.finishOp(types.assign, 2); - } else { - return this.finishOp(types.plusMin, 1); - } - }; - - Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { - // '<>' - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1); - return this.finishOp(types.bitShift, size); - } - - if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - if (this.inModule) this.unexpected(); - // ` - -- [Usage](#usage) - * [Invalid ranges](#invalid-ranges) - * [Custom function](#custom-function) - * [Special characters](#special-characters) - + [plus](#plus) - + [pipe and tilde](#pipe-and-tilde) - + [angle bracket](#angle-bracket) - + [question mark](#question-mark) -- [Other useful libs](#other-useful-libs) -- [Running tests](#running-tests) -- [Contributing](#contributing) -- [Author](#author) -- [License](#license) - -_(Table of contents generated by [verb])_ - - - -## Usage - -```js -var range = require('fill-range'); - -range('a', 'e'); -//=> ['a', 'b', 'c', 'd', 'e'] -``` - -**Params** - -```js -range(start, stop, step, options, fn); -``` - - - `start`: **{String|Number}** the number or letter to start with - - `end`: **{String|Number}** the number or letter to end with - - `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers. - - `options`: **{Object}**: - + `makeRe`: return a regex-compatible string (still returned as an array for consistency) - + `step`: pass the step on the options as an alternative to passing it as an argument - + `silent`: `true` by default, set to false to throw errors for invalid ranges. - - `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character - - -**Examples** - -```js -range(1, 3) -//=> ['1', '2', '3'] - -range('1', '3') -//=> ['1', '2', '3'] - -range('0', '-5') -//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] - -range(-9, 9, 3) -//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) - -range('-1', '-10', '-2') -//=> [ '-1', '-3', '-5', '-7', '-9' ] - -range('1', '10', '2') -//=> [ '1', '3', '5', '7', '9' ] - -range('a', 'e') -//=> ['a', 'b', 'c', 'd', 'e'] - -range('a', 'e', 2) -//=> ['a', 'c', 'e'] - -range('A', 'E', 2) -//=> ['A', 'C', 'E'] -``` - -### Invalid ranges - -When an invalid range is passed, `null` is returned. - -```js -range('1.1', '2'); -//=> null - -range('a', '2'); -//=> null - -range(1, 10, 'foo'); -//=> null -``` - -If you want errors to be throw, pass `silent: false` on the options: - - -### Custom function - -Optionally pass a custom function as the third or fourth argument: - -```js -range('a', 'e', function (val, isNumber, pad, i) { - if (!isNumber) { - return String.fromCharCode(val) + i; - } - return val; -}); -//=> ['a0', 'b1', 'c2', 'd3', 'e4'] -``` - -### Special characters - -A special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case. - -```js -range('a', 'z', SPECIAL_CHARACTER_HERE); -``` - -**Supported characters** - - - `+`: repeat the given string `n` times - - `|`: create a regex-ready string, instead of an array - - `>`: join values to single array element - - `?`: randomize the given pattern using [randomatic] - -#### plus - -Character: _(`+`)_ - -Repeat the first argument the number of times passed on the second argument. - -**Examples:** - -```js -range('a', 3, '+'); -//=> ['a', 'a', 'a'] - -range('abc', 2, '+'); -//=> ['abc', 'abc'] -``` - -#### pipe and tilde - -Characters: _(`|` and `~`)_ - -Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. - -**Examples:** - -```js -range('a', 'c', '|'); -//=> ['(a|b|c)' - -range('a', 'c', '~'); -//=> ['[a-c]' - -range('a', 'z', '|5'); -//=> ['(a|f|k|p|u|z)' -``` - -**Automatic separator correction** - -To avoid this error: - -> `Range out of order in character class` - -Fill-range detects invalid sequences and uses the correct syntax. For example: - -**invalid** (regex) - -If you pass these: - -```js -range('a', 'z', '~5'); -// which would result in this -//=> ['[a-f-k-p-u-z]'] - -range('10', '20', '~'); -// which would result in this -//=> ['[10-20]'] -``` - -**valid** (regex) - -fill-range corrects them to this: - -```js -range('a', 'z', '~5'); -//=> ['(a|f|k|p|u|z)' - -range('10', '20', '~'); -//=> ['(10-20)' -``` - -#### angle bracket - -Character: _(`>`)_ - -Joins all values in the returned array to a single value. - -**Examples:** - -```js -range('a', 'e', '>'); -//=> ['abcde'] - -range('5', '8', '>'); -//=> ['5678'] - -range('2', '20', '2>'); -//=> ['2468101214161820'] -``` - - -#### question mark - -Character: _(`?`)_ - -Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. - -**Examples:** - -_(actual results would obviously be randomized)_ - -Generate a 5-character, uppercase, alphabetical string: - -```js -range('A', 5, '?'); -//=> ['NSHAK'] -``` - -Generate a 5-digit random number: - -```js -range('0', 5, '?'); -//=> ['36583'] -``` - -Generate a 10-character alpha-numeric string: - -```js -range('A0', 10, '?'); -//=> ['5YJD60VQNN'] -``` - -See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. - -## Other useful libs - * [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. - * [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - * [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. - * [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. - -## Running tests -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fill-range/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ - -[randomatic]: https://github.com/jonschlinkert/randomatic -[expand-range]: https://github.com/jonschlinkert/expand-range -[micromatch]: https://github.com/jonschlinkert/micromatch -[braces]: https://github.com/jonschlinkert/braces \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/index.js deleted file mode 100644 index 5657051..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/index.js +++ /dev/null @@ -1,408 +0,0 @@ -/*! - * fill-range - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isObject = require('isobject'); -var isNumber = require('is-number'); -var randomize = require('randomatic'); -var repeatStr = require('repeat-string'); -var repeat = require('repeat-element'); - -/** - * Expose `fillRange` - */ - -module.exports = fillRange; - -/** - * Return a range of numbers or letters. - * - * @param {String} `a` Start of the range - * @param {String} `b` End of the range - * @param {String} `step` Increment or decrement to use. - * @param {Function} `fn` Custom function to modify each element in the range. - * @return {Array} - */ - -function fillRange(a, b, step, options, fn) { - if (a == null || b == null) { - throw new Error('fill-range expects the first and second args to be strings.'); - } - - if (typeof step === 'function') { - fn = step; options = {}; step = null; - } - - if (typeof options === 'function') { - fn = options; options = {}; - } - - if (isObject(step)) { - options = step; step = ''; - } - - var expand, regex = false, sep = ''; - var opts = options || {}; - - if (typeof opts.silent === 'undefined') { - opts.silent = true; - } - - step = step || opts.step; - - // store a ref to unmodified arg - var origA = a, origB = b; - - b = (b.toString() === '-0') ? 0 : b; - - if (opts.optimize || opts.makeRe) { - step = step ? (step += '~') : step; - expand = true; - regex = true; - sep = '~'; - } - - // handle special step characters - if (typeof step === 'string') { - var match = stepRe().exec(step); - - if (match) { - var i = match.index; - var m = match[0]; - - // repeat string - if (m === '+') { - return repeat(a, b); - - // randomize a, `b` times - } else if (m === '?') { - return [randomize(a, b)]; - - // expand right, no regex reduction - } else if (m === '>') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - - // expand to an array, or if valid create a reduced - // string for a regex logic `or` - } else if (m === '|') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - regex = true; - sep = m; - - // expand to an array, or if valid create a reduced - // string for a regex range - } else if (m === '~') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - regex = true; - sep = m; - } - } else if (!isNumber(step)) { - if (!opts.silent) { - throw new TypeError('fill-range: invalid step.'); - } - return null; - } - } - - if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) { - if (!opts.silent) { - throw new RangeError('fill-range: invalid range arguments.'); - } - return null; - } - - // has neither a letter nor number, or has both letters and numbers - // this needs to be after the step logic - if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) { - if (!opts.silent) { - throw new RangeError('fill-range: invalid range arguments.'); - } - return null; - } - - // validate arguments - var isNumA = isNumber(zeros(a)); - var isNumB = isNumber(zeros(b)); - - if ((!isNumA && isNumB) || (isNumA && !isNumB)) { - if (!opts.silent) { - throw new TypeError('fill-range: first range argument is incompatible with second.'); - } - return null; - } - - // by this point both are the same, so we - // can use A to check going forward. - var isNum = isNumA; - var num = formatStep(step); - - // is the range alphabetical? or numeric? - if (isNum) { - // if numeric, coerce to an integer - a = +a; b = +b; - } else { - // otherwise, get the charCode to expand alpha ranges - a = a.charCodeAt(0); - b = b.charCodeAt(0); - } - - // is the pattern descending? - var isDescending = a > b; - - // don't create a character class if the args are < 0 - if (a < 0 || b < 0) { - expand = false; - regex = false; - } - - // detect padding - var padding = isPadded(origA, origB); - var res, pad, arr = []; - var ii = 0; - - // character classes, ranges and logical `or` - if (regex) { - if (shouldExpand(a, b, num, isNum, padding, opts)) { - // make sure the correct separator is used - if (sep === '|' || sep === '~') { - sep = detectSeparator(a, b, num, isNum, isDescending); - } - return wrap([origA, origB], sep, opts); - } - } - - while (isDescending ? (a >= b) : (a <= b)) { - if (padding && isNum) { - pad = padding(a); - } - - // custom function - if (typeof fn === 'function') { - res = fn(a, isNum, pad, ii++); - - // letters - } else if (!isNum) { - if (regex && isInvalidChar(a)) { - res = null; - } else { - res = String.fromCharCode(a); - } - - // numbers - } else { - res = formatPadding(a, pad); - } - - // add result to the array, filtering any nulled values - if (res !== null) arr.push(res); - - // increment or decrement - if (isDescending) { - a -= num; - } else { - a += num; - } - } - - // now that the array is expanded, we need to handle regex - // character classes, ranges or logical `or` that wasn't - // already handled before the loop - if ((regex || expand) && !opts.noexpand) { - // make sure the correct separator is used - if (sep === '|' || sep === '~') { - sep = detectSeparator(a, b, num, isNum, isDescending); - } - if (arr.length === 1 || a < 0 || b < 0) { return arr; } - return wrap(arr, sep, opts); - } - - return arr; -} - -/** - * Wrap the string with the correct regex - * syntax. - */ - -function wrap(arr, sep, opts) { - if (sep === '~') { sep = '-'; } - var str = arr.join(sep); - var pre = opts && opts.regexPrefix; - - // regex logical `or` - if (sep === '|') { - str = pre ? pre + str : str; - str = '(' + str + ')'; - } - - // regex character class - if (sep === '-') { - str = (pre && pre === '^') - ? pre + str - : str; - str = '[' + str + ']'; - } - return [str]; -} - -/** - * Check for invalid characters - */ - -function isCharClass(a, b, step, isNum, isDescending) { - if (isDescending) { return false; } - if (isNum) { return a <= 9 && b <= 9; } - if (a < b) { return step === 1; } - return false; -} - -/** - * Detect the correct separator to use - */ - -function shouldExpand(a, b, num, isNum, padding, opts) { - if (isNum && (a > 9 || b > 9)) { return false; } - return !padding && num === 1 && a < b; -} - -/** - * Detect the correct separator to use - */ - -function detectSeparator(a, b, step, isNum, isDescending) { - var isChar = isCharClass(a, b, step, isNum, isDescending); - if (!isChar) { - return '|'; - } - return '~'; -} - -/** - * Correctly format the step based on type - */ - -function formatStep(step) { - return Math.abs(step >> 0) || 1; -} - -/** - * Format padding, taking leading `-` into account - */ - -function formatPadding(ch, pad) { - var res = pad ? pad + ch : ch; - if (pad && ch.toString().charAt(0) === '-') { - res = '-' + pad + ch.toString().substr(1); - } - return res.toString(); -} - -/** - * Check for invalid characters - */ - -function isInvalidChar(str) { - var ch = toStr(str); - return ch === '\\' - || ch === '[' - || ch === ']' - || ch === '^' - || ch === '(' - || ch === ')' - || ch === '`'; -} - -/** - * Convert to a string from a charCode - */ - -function toStr(ch) { - return String.fromCharCode(ch); -} - - -/** - * Step regex - */ - -function stepRe() { - return /\?|>|\||\+|\~/g; -} - -/** - * Return true if `val` has either a letter - * or a number - */ - -function noAlphaNum(val) { - return /[a-z0-9]/i.test(val); -} - -/** - * Return true if `val` has both a letter and - * a number (invalid) - */ - -function hasBoth(val) { - return /[a-z][0-9]|[0-9][a-z]/i.test(val); -} - -/** - * Normalize zeros for checks - */ - -function zeros(val) { - if (/^-*0+$/.test(val.toString())) { - return '0'; - } - return val; -} - -/** - * Return true if `val` has leading zeros, - * or a similar valid pattern. - */ - -function hasZeros(val) { - return /[^.]\.|^-*0+[0-9]/.test(val); -} - -/** - * If the string is padded, returns a curried function with - * the a cached padding string, or `false` if no padding. - * - * @param {*} `origA` String or number. - * @return {String|Boolean} - */ - -function isPadded(origA, origB) { - if (hasZeros(origA) || hasZeros(origB)) { - var alen = length(origA); - var blen = length(origB); - - var len = alen >= blen - ? alen - : blen; - - return function (a) { - return repeatStr('0', len - length(a)); - }; - } - return false; -} - -/** - * Get the string length of `val` - */ - -function length(val) { - return val.toString().length; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/package.json deleted file mode 100644 index 931ef90..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range/package.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "fill-range@^2.1.0", - "scope": null, - "escapedName": "fill-range", - "name": "fill-range", - "rawSpec": "^2.1.0", - "spec": ">=2.1.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/expand-range" - ] - ], - "_from": "fill-range@>=2.1.0 <3.0.0", - "_id": "fill-range@2.2.3", - "_inCache": true, - "_location": "/fill-range", - "_nodeVersion": "5.0.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "raw": "fill-range@^2.1.0", - "scope": null, - "escapedName": "fill-range", - "name": "fill-range", - "rawSpec": "^2.1.0", - "spec": ">=2.1.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/expand-range" - ], - "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "_shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", - "_shrinkwrap": null, - "_spec": "fill-range@^2.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/expand-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "dependencies": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - }, - "description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.", - "devDependencies": { - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", - "tarball": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "6cb50d5c679d9e6d9e8ad97bb2efd63a8c8da610", - "homepage": "https://github.com/jonschlinkert/fill-range", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "expand", - "expansion", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - } - ], - "name": "fill-range", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/fill-range.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "micromatch", - "expand-range", - "braces", - "is-glob" - ] - } - }, - "version": "2.2.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/README.md deleted file mode 100644 index 034832e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/README.md +++ /dev/null @@ -1,33 +0,0 @@ - -# find-index - -finds an item in an array matching a predicate function, -and returns its index - -fast both when `thisArg` is used and also when it isn't: [jsPerf](http://jsperf.com/array-prototype-findindex-shims) - -### usage -```bash -npm install find-index -``` -```js -findIndex = require('find-index') -findLastIndex = require('find-index/last') -``` - findIndex(array, callback[, thisArg]) - findLastIndex(array, callback[, thisArg]) - Parameters: - array - The array to operate on. - callback - Function to execute on each value in the array, taking three arguments: - element - The current element being processed in the array. - index - The index of the current element being processed in the array. - array - The array findIndex was called upon. - thisArg - Object to use as this when executing callback. - -based on [array-findindex](https://www.npmjs.org/package/array-findindex) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/index.js deleted file mode 100644 index 61bff61..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/index.js +++ /dev/null @@ -1,26 +0,0 @@ -function findIndex(array, predicate, self) { - var len = array.length; - var i; - if (len === 0) return -1; - if (typeof predicate !== 'function') { - throw new TypeError(predicate + ' must be a function'); - } - - if (self) { - for (i = 0; i < len; i++) { - if (predicate.call(self, array[i], i, array)) { - return i; - } - } - } else { - for (i = 0; i < len; i++) { - if (predicate(array[i], i, array)) { - return i; - } - } - } - - return -1; -} - -module.exports = findIndex diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/last.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/last.js deleted file mode 100644 index 186739a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/last.js +++ /dev/null @@ -1,26 +0,0 @@ -function findLastIndex(array, predicate, self) { - var len = array.length; - var i; - if (len === 0) return -1; - if (typeof predicate !== 'function') { - throw new TypeError(predicate + ' must be a function'); - } - - if (self) { - for (i = len - 1; i >= 0; i--) { - if (predicate.call(self, array[i], i, array)) { - return i; - } - } - } else { - for (i = len - 1; i >= 0; i--) { - if (predicate(array[i], i, array)) { - return i; - } - } - } - - return -1; -} - -module.exports = findLastIndex diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/package.json deleted file mode 100644 index 4e5ad93..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-index/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "find-index@^0.1.1", - "scope": null, - "escapedName": "find-index", - "name": "find-index", - "rawSpec": "^0.1.1", - "spec": ">=0.1.1 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base" - ] - ], - "_from": "find-index@>=0.1.1 <0.2.0", - "_id": "find-index@0.1.1", - "_inCache": true, - "_location": "/find-index", - "_npmUser": { - "name": "jsdf", - "email": "james@jsdf.co" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "raw": "find-index@^0.1.1", - "scope": null, - "escapedName": "find-index", - "name": "find-index", - "rawSpec": "^0.1.1", - "spec": ">=0.1.1 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/glob2base" - ], - "_resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "_shasum": "675d358b2ca3892d795a1ab47232f8b6e2e0dde4", - "_shrinkwrap": null, - "_spec": "find-index@^0.1.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base", - "author": { - "name": "James Friend", - "email": "james@jsdf.co", - "url": "http://jsdf.co/" - }, - "bugs": { - "url": "https://github.com/jsdf/find-index/issues" - }, - "dependencies": {}, - "description": "finds an item in an array matching a predicate function, and returns its index", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "675d358b2ca3892d795a1ab47232f8b6e2e0dde4", - "tarball": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz" - }, - "files": [ - "index.js", - "last.js" - ], - "homepage": "https://github.com/jsdf/find-index", - "keywords": [ - "array", - "findindex" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jsdf", - "email": "james@jsdf.co" - } - ], - "name": "find-index", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jsdf/find-index.git" - }, - "scripts": { - "test": "node test/test" - }, - "version": "0.1.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/index.js deleted file mode 100644 index 7ff0e2b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/index.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -var path = require('path'); -var pathExists = require('path-exists'); -var Promise = require('pinkie-promise'); - -function splitPath(x) { - return path.resolve(x || '').split(path.sep); -} - -function join(parts, filename) { - return path.resolve(parts.join(path.sep) + path.sep, filename); -} - -module.exports = function (filename, opts) { - opts = opts || {}; - - var parts = splitPath(opts.cwd); - - return new Promise(function (resolve) { - (function find() { - var fp = join(parts, filename); - - pathExists(fp).then(function (exists) { - if (exists) { - resolve(fp); - } else if (parts.pop()) { - find(); - } else { - resolve(null); - } - }); - })(); - }); -}; - -module.exports.sync = function (filename, opts) { - opts = opts || {}; - - var parts = splitPath(opts.cwd); - var len = parts.length; - - while (len--) { - var fp = join(parts, filename); - - if (pathExists.sync(fp)) { - return fp; - } - - parts.pop(); - } - - return null; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/package.json deleted file mode 100644 index a3f381b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "find-up@^1.0.0", - "scope": null, - "escapedName": "find-up", - "name": "find-up", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/read-pkg-up" - ] - ], - "_from": "find-up@>=1.0.0 <2.0.0", - "_id": "find-up@1.1.2", - "_inCache": true, - "_location": "/find-up", - "_nodeVersion": "4.3.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/find-up-1.1.2.tgz_1457199955637_0.3445317060686648" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "raw": "find-up@^1.0.0", - "scope": null, - "escapedName": "find-up", - "name": "find-up", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/read-pkg-up" - ], - "_resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "_shasum": "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f", - "_shrinkwrap": null, - "_spec": "find-up@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/read-pkg-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/find-up/issues" - }, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "description": "Find a file by walking up parent directories", - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f", - "tarball": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "f2d7c1ff74fbac82b2cff038e311ef4b075d9184", - "homepage": "https://github.com/sindresorhus/find-up", - "keywords": [ - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "file", - "search", - "match", - "package", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "find-up", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/find-up.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.1.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/readme.md deleted file mode 100644 index 9ea0611..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/find-up/readme.md +++ /dev/null @@ -1,72 +0,0 @@ -# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) - -> Find a file by walking up parent directories - - -## Install - -``` -$ npm install --save find-up -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - ├── unicorn.png - └── foo - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const findUp = require('find-up'); - -findUp('unicorn.png').then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); -``` - - -## API - -### findUp(filename, [options]) - -Returns a promise for the filepath or `null`. - -### findUp.sync(filename, [options]) - -Returns a filepath or `null`. - -#### filename - -Type: `string` - -Filename of the file to find. - -#### options - -##### cwd - -Type: `string` -Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/README.md deleted file mode 100644 index c8c4a0b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# findup-sync [![Build Status](https://travis-ci.org/js-cli/node-findup-sync.svg)](https://travis-ci.org/js-cli/node-findup-sync) [![NPM version](https://badge.fury.io/js/findup-sync.svg)](http://badge.fury.io/js/findup-sync) - -> Find the first file matching a given pattern in the current directory or the nearest ancestor directory. - -Matching is done with [micromatch][], please report any matching related issues on that repository. - -## Install with [npm](npmjs.org) - -```bash -npm i findup-sync --save -``` - -## Usage - -```js -var findup = require('findup-sync'); -findup(patternOrPatterns [, micromatchOptions]); - -// Start looking in the CWD. -var filepath1 = findup('{a,b}*.txt'); - -// Start looking somewhere else, and ignore case (probably a good idea). -var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true}); -``` - -* `patterns` **{String|Array}**: Glob pattern(s) or file path(s) to match against. -* `options` **{Object}**: Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here. -* `returns` **{String}**: Returns the first matching file. - -## Running tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing - -In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/) - -For bugs and feature requests, [please create an issue](https://github.com/cowboy/node-findup-sync/issues). - -## Release History - -2015-01-30 - v0.4.0 - Refactored, not also uses [micromatch][] instead of minimatch. -2015-09-14 - v0.3.0 - updated glob to ~5.0. -2014-12-17 - v0.2.1 - Updated to glob 4.3. -2014-12-16 - v0.2.0 - Removed lodash, updated to glob 4.x. -2014-03-14 - v0.1.3 - Updated dependencies. -2013-03-08 - v0.1.2 - Updated dependencies. Fixed a Node 0.9.x bug. Updated unit tests to work cross-platform. -2012-11-15 - v0.1.1 - Now works without an options object. -2012-11-01 - v0.1.0 - Initial release. - -## Authors - -**"Cowboy" Ben Alman** - -+ [github/cowboy](https://github.com/cowboy) -+ [twitter/cowboy](http://twitter.com/cowboy) - -## License - -Copyright (c) 2012-2016 "Cowboy" Ben Alman -Released under the MIT license - -[micromatch]: http://github.com/jonschlinkert/micromatch diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/index.js deleted file mode 100644 index b843495..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/index.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -/** - * Module dependencies - */ - -var fs = require('fs'); -var path = require('path'); -var isGlob = require('is-glob'); -var resolveDir = require('resolve-dir'); -var detect = require('detect-file'); -var mm = require('micromatch'); - -/** - * @param {String|Array} `pattern` Glob pattern or file path(s) to match against. - * @param {Object} `options` Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify the `options.cwd` property here. - * @return {String} Returns the first matching file. - * @api public - */ - -module.exports = function(patterns, options) { - options = options || {}; - var cwd = path.resolve(resolveDir(options.cwd || '')); - - if (typeof patterns === 'string') { - return lookup(cwd, [patterns], options); - } - - if (!Array.isArray(patterns)) { - throw new TypeError('findup-sync expects a string or array as the first argument.'); - } - - return lookup(cwd, patterns, options); -}; - -function lookup(cwd, patterns, options) { - var len = patterns.length; - var idx = -1; - var res; - - while (++idx < len) { - if (isGlob(patterns[idx])) { - res = matchFile(cwd, patterns[idx], options); - } else { - res = findFile(cwd, patterns[idx], options); - } - if (res) { - return res; - } - } - - var dir = path.dirname(cwd); - if (dir === cwd) { - return null; - } - return lookup(dir, patterns, options); -} - -function matchFile(cwd, pattern, opts) { - var isMatch = mm.matcher(pattern, opts); - var files = tryReaddirSync(cwd); - var len = files.length; - var idx = -1; - - while (++idx < len) { - var name = files[idx]; - var fp = path.join(cwd, name); - if (isMatch(name) || isMatch(fp)) { - return fp; - } - } - return null; -} - -function findFile(cwd, filename, options) { - var fp = cwd ? path.resolve(cwd, filename) : filename; - return detect(fp, options); -} - -function tryReaddirSync(fp) { - try { - return fs.readdirSync(fp); - } catch(err) {} - return []; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/package.json deleted file mode 100644 index 13c5ec7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "findup-sync@^0.4.2", - "scope": null, - "escapedName": "findup-sync", - "name": "findup-sync", - "rawSpec": "^0.4.2", - "spec": ">=0.4.2 <0.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "findup-sync@>=0.4.2 <0.5.0", - "_id": "findup-sync@0.4.3", - "_inCache": true, - "_location": "/findup-sync", - "_nodeVersion": "0.10.41", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/findup-sync-0.4.3.tgz_1476308790543_0.40729925991036" - }, - "_npmUser": { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - "_npmVersion": "2.15.2", - "_phantomChildren": {}, - "_requested": { - "raw": "findup-sync@^0.4.2", - "scope": null, - "escapedName": "findup-sync", - "name": "findup-sync", - "rawSpec": "^0.4.2", - "spec": ">=0.4.2 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", - "_shasum": "40043929e7bc60adf0b7f4827c4c6e75a0deca12", - "_shrinkwrap": null, - "_spec": "findup-sync@^0.4.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "\"Cowboy\" Ben Alman", - "url": "http://benalman.com" - }, - "bugs": { - "url": "https://github.com/cowboy/node-findup-sync/issues" - }, - "dependencies": { - "detect-file": "^0.1.0", - "is-glob": "^2.0.1", - "micromatch": "^2.3.7", - "resolve-dir": "^0.1.0" - }, - "description": "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.", - "devDependencies": { - "fs-exists-sync": "^0.1.0", - "grunt": "^1.0.1", - "grunt-contrib-jshint": "^0.12.0", - "is-absolute": "^0.2.3", - "minimist": "^1.2.0", - "mocha": "^2.4.5", - "normalize-path": "^2.0.1", - "os-homedir": "^1.0.1", - "resolve": "^1.1.7" - }, - "directories": {}, - "dist": { - "shasum": "40043929e7bc60adf0b7f4827c4c6e75a0deca12", - "tarball": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "index.js" - ], - "gitHead": "701fd1044e1e26936aa066a35281ffdfb0b37d43", - "homepage": "https://github.com/cowboy/node-findup-sync", - "keywords": [ - "file", - "find", - "find-up", - "findup", - "glob", - "match", - "pattern", - "resolve", - "search" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "cowboy", - "email": "cowboy@rj3.net" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - { - "name": "tkellen", - "email": "tyler@sleekcode.net" - } - ], - "name": "findup-sync", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/cowboy/node-findup-sync.git" - }, - "scripts": { - "test": "grunt && mocha" - }, - "version": "0.4.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/LICENSE deleted file mode 100644 index 3ca2d3f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Blaine Bublitz, Tyler Kellen and other contributors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/README.md deleted file mode 100644 index 8941a89..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Fined [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage][coveralls-img]][coveralls-url] - -> Find a file given a declaration of locations - -[![NPM][npm-img]][npm-url] - -## Usage - -```js -var fined = require('fined'); - -fined({ path: 'path/to/file', extensions: ['.js', '.json'] }); -// => { path: '/absolute/path/to/file.js', extension: '.js' } (if file exists) -// => null (if file does not exist) - -var opts = { - name: '.app', - cwd: '.', - extensions: { - 'rc': 'default-rc-loader', - '.yml': 'default-yml-loader', - }, -}; - -fined({ path: '.' }, opts); -// => { path: '/absolute/of/cwd/.app.yml', extension: { '.yml': 'default-yml-loader' } } - -fined({ path: '~', extensions: { 'rc': 'some-special-rc-loader' } }, opts); -// => { path: '/User/home/.apprc', extension: { 'rc': 'some-special-rc-loader' } } -``` - -## API - -### fined(pathObj, opts) => object | null - -#### Arguments: - -* **pathObj** [string | object] : a path setting for finding a file. -* **opts** [object] : a plain object supplements `pathObj`. - - `pathObj` and `opts` can have same properties: - - * **path** [string] : a path string. - * **name** [string] : a basename. - * **extensions**: [string | array | object] : extensions. - * **cwd**: a base directory of `path` and for finding up. - * **findUp**: [boolean] : a flag to find up. - -#### Return: - -This function returns a plain object which consists of following properties if a file exists otherwise null. - - * **path** : an absolute path - * **extension** : a string or a plain object of extension. - - -## License - -MIT - -[npm-img]: https://nodei.co/npm/fined.png -[npm-url]: https://nodei.co/npm/fined/ -[travis-img]: https://travis-ci.org/js-cli/fined.svg?branch=master -[travis-url]: https://travis-ci.org/js-cli/fined -[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/js-cli/fined?branch=master&svg=true -[appveyor-url]: https://ci.appveyor.com/project/js-cli/fined -[coveralls-img]: https://coveralls.io/repos/github/js-cli/fined/badge.svg?branch=master -[coveralls-url]: https://coveralls.io/github/js-cli/fined?branch=master diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/index.js deleted file mode 100644 index db46a9b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/index.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var path = require('path'); - -var isPlainObject = require('is-plain-object'); -var pick = require('object.pick'); -var defaults = require('object.defaults/immutable'); -var expandTilde = require('expand-tilde'); -var parsePath = require('parse-filepath'); - - -function fined(pathObj, defaultObj) { - var expandedPath = expandPath(pathObj, defaultObj); - return expandedPath ? findWithExpandedPath(expandedPath) : null; -} - -function expandPath(pathObj, defaultObj) { - if (!isPlainObject(defaultObj)) { - defaultObj = {}; - } - - if (isString(pathObj)) { - pathObj = { path: pathObj }; - } - - if (!isPlainObject(pathObj)) { - pathObj = {}; - } - - pathObj = defaults(pathObj, defaultObj); - - var filePath; - if (!isString(pathObj.path)) { - return null; - } - // Execution of toString is for a String object. - if (isString(pathObj.name) && pathObj.name) { - if (pathObj.path) { - filePath = expandTilde(pathObj.path.toString()); - filePath = path.join(filePath, pathObj.name.toString()); - } else { - filePath = pathObj.name.toString(); - } - } else { - filePath = expandTilde(pathObj.path.toString()); - } - - var extArr = createExtensionArray(pathObj.extensions); - var extMap = createExtensionMap(pathObj.extensions); - - var basedir = isString(pathObj.cwd) ? pathObj.cwd.toString() : '.'; - basedir = path.resolve(expandTilde(basedir)); - - var findUp = !!pathObj.findUp; - - var parsed = parsePath(filePath); - if (parsed.isAbsolute) { - filePath = filePath.slice(parsed.root.length); - findUp = false; - basedir = parsed.root; - /* istanbul ignore if */ - } else if (parsed.root) { // Expanded path has a drive letter on Windows. - filePath = filePath.slice(parsed.root.length); - basedir = path.resolve(parsed.root); - } - - return { - path: filePath, - basedir: basedir, - findUp: findUp, - extArr: extArr, - extMap: extMap, - }; -} - -function findWithExpandedPath(expanded) { - var found = expanded.findUp ? - findUpFile(expanded.basedir, expanded.path, expanded.extArr) : - findFile(expanded.basedir, expanded.path, expanded.extArr); - - if (!found) { - return null; - } - - if (expanded.extMap) { - found.extension = pick(expanded.extMap, found.extension); - } - return found; -} - -function findFile(basedir, relpath, extArr) { - var noExtPath = path.resolve(basedir, relpath); - for (var i = 0, n = extArr.length; i < n; i++) { - var filepath = noExtPath + extArr[i]; - try { - fs.statSync(filepath); - return { path: filepath, extension: extArr[i] }; - } catch (e) {} - } - - return null; -} - -function findUpFile(basedir, filepath, extArr) { - var lastdir; - do { - var found = findFile(basedir, filepath, extArr); - if (found) { - return found; - } - - lastdir = basedir; - basedir = path.dirname(basedir); - } while (lastdir !== basedir); - - return null; -} - -function createExtensionArray(exts) { - if (isString(exts)) { - return [exts]; - } - - if (Array.isArray(exts)) { - exts = exts.filter(isString); - return (exts.length > 0) ? exts : ['']; - } - - if (isPlainObject(exts)) { - exts = Object.keys(exts); - return (exts.length > 0) ? exts : ['']; - } - - return ['']; -} - -function createExtensionMap(exts) { - if (!isPlainObject(exts)) { - return null; - } - - if (isEmpty(exts)) { - return { '': null }; - } - - return exts; -} - -function isEmpty(object) { - return !Object.keys(object).length; -} - -function isString(value) { - if (typeof value === 'string') { - return true; - } - - if (Object.prototype.toString.call(value) === '[object String]') { - return true; - } - - return false; -} - -module.exports = fined; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/LICENSE deleted file mode 100644 index 1e49edf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/README.md deleted file mode 100644 index d1892b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# expand-tilde [![NPM version](https://img.shields.io/npm/v/expand-tilde.svg?style=flat)](https://www.npmjs.com/package/expand-tilde) [![NPM downloads](https://img.shields.io/npm/dm/expand-tilde.svg?style=flat)](https://npmjs.org/package/expand-tilde) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-tilde.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-tilde) - -> Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save expand-tilde -``` - -## Usage - -See the [Bash documentation for Tilde Expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html). - -```js -var expandTilde = require('expand-tilde'); - -expandTilde('~') -//=> '/Users/jonschlinkert' - -expandTilde('~+') -//=> process.cwd() -``` - -## Run tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## About - -### Related projects - -* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 08, 2016._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/index.js deleted file mode 100644 index d4e4706..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * expand-tilde - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -var homedir = require('homedir-polyfill'); -var path = require('path'); - -module.exports = function expandTilde(filepath) { - var home = homedir(); - - if (filepath.charCodeAt(0) === 126 /* ~ */) { - if (filepath.charCodeAt(1) === 43 /* + */) { - return path.join(process.cwd(), filepath.slice(2)); - } - return home ? path.join(home, filepath.slice(1)) : filepath; - } - - return filepath; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/package.json deleted file mode 100644 index 548aaa4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/node_modules/expand-tilde/package.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "expand-tilde@^2.0.2", - "scope": null, - "escapedName": "expand-tilde", - "name": "expand-tilde", - "rawSpec": "^2.0.2", - "spec": ">=2.0.2 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined" - ] - ], - "_from": "expand-tilde@>=2.0.2 <3.0.0", - "_id": "expand-tilde@2.0.2", - "_inCache": true, - "_location": "/fined/expand-tilde", - "_nodeVersion": "5.1.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/expand-tilde-2.0.2.tgz_1481174955304_0.04378351103514433" - }, - "_npmUser": { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - "_npmVersion": "3.7.5", - "_phantomChildren": {}, - "_requested": { - "raw": "expand-tilde@^2.0.2", - "scope": null, - "escapedName": "expand-tilde", - "name": "expand-tilde", - "rawSpec": "^2.0.2", - "spec": ">=2.0.2 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fined" - ], - "_resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "_shasum": "97e801aa052df02454de46b02bf621642cdc8502", - "_shrinkwrap": null, - "_spec": "expand-tilde@^2.0.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/expand-tilde/issues" - }, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "description": "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.", - "devDependencies": { - "gulp-format-md": "^0.1.9", - "is-windows": "^0.2.0", - "mocha": "^2.5.3" - }, - "directories": {}, - "dist": { - "shasum": "97e801aa052df02454de46b02bf621642cdc8502", - "tarball": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "2389f5d93903c43bc26ed57b02a24b432d1dee89", - "homepage": "https://github.com/jonschlinkert/expand-tilde", - "keywords": [ - "cwd", - "expand", - "expansion", - "filepath", - "home", - "path", - "pwd", - "tilde", - "user", - "userhome" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "expand-tilde", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/expand-tilde.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "braces", - "expand-brackets", - "is-glob", - "micromatch" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "2.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/package.json deleted file mode 100644 index eeab976..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fined/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "fined@^1.0.1", - "scope": null, - "escapedName": "fined", - "name": "fined", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "fined@>=1.0.1 <2.0.0", - "_id": "fined@1.1.0", - "_inCache": true, - "_location": "/fined", - "_nodeVersion": "0.10.41", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/fined-1.1.0.tgz_1497815142655_0.9839172274805605" - }, - "_npmUser": { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - "_npmVersion": "2.15.2", - "_phantomChildren": { - "homedir-polyfill": "1.0.1" - }, - "_requested": { - "raw": "fined@^1.0.1", - "scope": null, - "escapedName": "fined", - "name": "fined", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", - "_shasum": "b37dc844b76a2f5e7081e884f7c0ae344f153476", - "_shrinkwrap": null, - "_spec": "fined@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "JS CLI Team", - "url": "https://github.com/js-cli" - }, - "bugs": { - "url": "https://github.com/js-cli/fined/issues" - }, - "contributors": [ - { - "name": "Takayuki Sato", - "email": "sttk.xslet@gmail.com" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "description": "Find a file given a declaration of locations", - "devDependencies": { - "eslint": "^1.7.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.19.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.3.5", - "jscs-preset-gulp": "^1.0.0", - "mocha": "^2.4.5" - }, - "directories": {}, - "dist": { - "shasum": "b37dc844b76a2f5e7081e884f7c0ae344f153476", - "tarball": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js", - "LICENSE" - ], - "gitHead": "02513d1f0fad7412d2d29349ff8f55e87156b7db", - "homepage": "https://github.com/js-cli/fined#readme", - "keywords": [], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - } - ], - "name": "fined", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/js-cli/fined.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs .", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/index.js deleted file mode 100644 index 2481550..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/index.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; -var util = require('util'); -var Transform = require('stream').Transform; - -function ctor(options, transform) { - util.inherits(FirstChunk, Transform); - - if (typeof options === 'function') { - transform = options; - options = {}; - } - - if (typeof transform !== 'function') { - throw new Error('transform function required'); - } - - function FirstChunk(options2) { - if (!(this instanceof FirstChunk)) { - return new FirstChunk(options2); - } - - Transform.call(this, options2); - - this._firstChunk = true; - this._transformCalled = false; - this._minSize = options.minSize; - } - - FirstChunk.prototype._transform = function (chunk, enc, cb) { - this._enc = enc; - - if (this._firstChunk) { - this._firstChunk = false; - - if (this._minSize == null) { - transform.call(this, chunk, enc, cb); - this._transformCalled = true; - return; - } - - this._buffer = chunk; - cb(); - return; - } - - if (this._minSize == null) { - this.push(chunk); - cb(); - return; - } - - if (this._buffer.length < this._minSize) { - this._buffer = Buffer.concat([this._buffer, chunk]); - cb(); - return; - } - - if (this._buffer.length >= this._minSize) { - transform.call(this, this._buffer.slice(), enc, function () { - this.push(chunk); - cb(); - }.bind(this)); - this._transformCalled = true; - this._buffer = false; - return; - } - - this.push(chunk); - cb(); - }; - - FirstChunk.prototype._flush = function (cb) { - if (!this._buffer) { - cb(); - return; - } - - if (this._transformCalled) { - this.push(this._buffer); - cb(); - } else { - transform.call(this, this._buffer.slice(), this._enc, cb); - } - }; - - return FirstChunk; -} - -module.exports = function () { - return ctor.apply(ctor, arguments)(); -}; - -module.exports.ctor = ctor; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/package.json deleted file mode 100644 index eabe8de..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "first-chunk-stream@^1.0.0", - "scope": null, - "escapedName": "first-chunk-stream", - "name": "first-chunk-stream", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom" - ] - ], - "_from": "first-chunk-stream@>=1.0.0 <2.0.0", - "_id": "first-chunk-stream@1.0.0", - "_inCache": true, - "_location": "/first-chunk-stream", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.21", - "_phantomChildren": {}, - "_requested": { - "raw": "first-chunk-stream@^1.0.0", - "scope": null, - "escapedName": "first-chunk-stream", - "name": "first-chunk-stream", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs/strip-bom" - ], - "_resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "_shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", - "_shrinkwrap": null, - "_spec": "first-chunk-stream@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/first-chunk-stream/issues" - }, - "dependencies": {}, - "description": "Transform the first chunk in a stream", - "devDependencies": { - "concat-stream": "^1.4.5", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "59bfb50cd905f60d7c394cd3d9acaab4e6ad934e", - "tarball": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8b0b1750edcc30fa2b2071245198181e925be619", - "homepage": "https://github.com/sindresorhus/first-chunk-stream", - "keywords": [ - "buffer", - "stream", - "streams", - "transform", - "first", - "chunk", - "size", - "min", - "minimum" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "first-chunk-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/first-chunk-stream.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/readme.md deleted file mode 100644 index f8909c8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/first-chunk-stream/readme.md +++ /dev/null @@ -1,62 +0,0 @@ -# first-chunk-stream [![Build Status](https://travis-ci.org/sindresorhus/first-chunk-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/first-chunk-stream) - -> Transform the first chunk in a stream - -Useful if you want to do something to the first chunk. - -You can also set the minimum size of that chunk. - - -## Install - -```sh -$ npm install --save first-chunk-stream -``` - - -## Usage - -```js -var fs = require('fs'); -var concat = require('concat-stream'); -var firstChunk = require('first-chunk-stream'); - -// unicorn.txt => unicorn rainbow -// `highWaterMark: 1` means it will only read 1 byte at the time -fs.createReadStream('unicorn.txt', {highWaterMark: 1}) - .pipe(firstChunk({minSize: 7}, function (chunk, enc, cb) { - this.push(chunk.toUpperCase()); - cb(); - })) - .pipe(concat(function (data) { - console.log(data); - //=> UNICORN rainbow - })); -``` - - -## API - -### firstChunk([options], transform) - -#### options.minSize - -Type: `number` - -The minimum size of the first chunk. - -#### transform(chunk, encoding, callback) - -*Required* -Type: `function` - -The [function](http://nodejs.org/docs/latest/api/stream.html#stream_transform_transform_chunk_encoding_callback) that gets the first chunk. - -### firstChunk.ctor() - -Instead of returning a [stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform_1) instance, `firstChunk.ctor()` returns a constructor for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.npmignore deleted file mode 100644 index a1dca7a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.npmignore +++ /dev/null @@ -1 +0,0 @@ -*.flags.json diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.travis.yml deleted file mode 100644 index e37da77..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" -matrix: - fast_finish: true - allow_failures: - - node_js: 0.11 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/LICENSE deleted file mode 100644 index a55f5b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Tyler Kellen - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/README.md deleted file mode 100644 index a431fe3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# flagged-respawn [![Build Status](https://secure.travis-ci.org/js-cli/js-flagged-respawn.svg)](http://travis-ci.org/js-cli/js-flagged-respawn) -> A tool for respawning node binaries when special flags are present. - -[![NPM](https://nodei.co/npm/flagged-respawn.png)](https://nodei.co/npm/flagged-respawn/) - -## What is it? - -Say you wrote a command line tool that runs arbitrary javascript (e.g. task runner, test framework, etc). For the sake of discussion, let's pretend it's a testing harness you've named `testify`. - -Everything is going splendidly until one day you decide to test some code that relies on a feature behind a v8 flag in node (`--harmony`, for example). Without much thought, you run `testify --harmony spec tests.js`. - -It doesn't work. After digging around for a bit, you realize this produces a [`process.argv`](http://nodejs.org/docs/latest/api/process.html#process_process_argv) of: - -`['node', '/usr/local/bin/test', '--harmony', 'spec', 'tests.js']` - -Crap. The `--harmony` flag is in the wrong place! It should be applied to the **node** command, not our binary. What we actually wanted was this: - -`['node', '--harmony', '/usr/local/bin/test', 'spec', 'tests.js']` - -Flagged-respawn fixes this problem and handles all the edge cases respawning creates, such as: -- Providing a method to determine if a respawn is needed. -- Piping stderr/stdout from the child into the parent. -- Making the parent process exit with the same code as the child. -- If the child is killed, making the parent exit with the same signal. - -To see it in action, clone this repository and run `npm install` / `npm run respawn` / `npm run nospawn`. - -## Sample Usage - -```js -#!/usr/bin/env node - -const flaggedRespawn = require('flagged-respawn'); - -// get a list of all possible v8 flags for the running version of node -const v8flags = require('v8flags').fetch(); - -flaggedRespawn(v8flags, process.argv, function (ready, child) { - if (ready) { - console.log('Running!'); - // your cli code here - } else { - console.log('Special flags found, respawning.'); - } - if (process.pid !== child.pid) { - console.log('Respawned to PID:', child.pid); - } -}); - -``` - -## Release History - -* 2016-03-22 - v0.3.2 - fix issue with v8 flags values being dropped -* 2014-09-12 - v0.3.1 - use `{ stdio: 'inherit' }` for spawn to maintain colors -* 2014-09-11 - v0.3.0 - for real this time -* 2014-09-11 - v0.2.0 - cleanup -* 2014-09-04 - v0.1.1 - initial release diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/index.js deleted file mode 100644 index b123400..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const reorder = require('./lib/reorder'); -const respawn = require('./lib/respawn'); - -module.exports = function (flags, argv, execute) { - if (!flags) { - throw new Error('You must specify flags to respawn with.'); - } - if (!argv) { - throw new Error('You must specify an argv array.'); - } - var proc = process; - var reordered = reorder(flags, argv); - var ready = JSON.stringify(argv) === JSON.stringify(reordered); - if (!ready) { - proc = respawn(reordered); - } - execute(ready, proc); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/reorder.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/reorder.js deleted file mode 100644 index 556a7d1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/reorder.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = function (flags, argv) { - if (!argv) { - argv = process.argv; - } - var args = [argv[1]]; - argv.slice(2).forEach(function (arg) { - var flag = arg.split('=')[0]; - if (flags.indexOf(flag) !== -1) { - args.unshift(arg); - } else { - args.push(arg); - } - }); - args.unshift(argv[0]); - return args; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/respawn.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/respawn.js deleted file mode 100644 index 0865853..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/lib/respawn.js +++ /dev/null @@ -1,15 +0,0 @@ -const spawn = require('child_process').spawn; - -module.exports = function (argv) { - var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' }); - child.on('exit', function (code, signal) { - process.on('exit', function () { - if (signal) { - process.kill(process.pid, signal); - } else { - process.exit(code); - } - }); - }); - return child; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/package.json deleted file mode 100644 index 1de9c9d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "flagged-respawn@^0.3.2", - "scope": null, - "escapedName": "flagged-respawn", - "name": "flagged-respawn", - "rawSpec": "^0.3.2", - "spec": ">=0.3.2 <0.4.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "flagged-respawn@>=0.3.2 <0.4.0", - "_id": "flagged-respawn@0.3.2", - "_inCache": true, - "_location": "/flagged-respawn", - "_nodeVersion": "0.12.12", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/flagged-respawn-0.3.2.tgz_1458638775261_0.252670707879588" - }, - "_npmUser": { - "name": "tusbar", - "email": "b@pk.am" - }, - "_npmVersion": "2.14.9", - "_phantomChildren": {}, - "_requested": { - "raw": "flagged-respawn@^0.3.2", - "scope": null, - "escapedName": "flagged-respawn", - "name": "flagged-respawn", - "rawSpec": "^0.3.2", - "spec": ">=0.3.2 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", - "_shasum": "ff191eddcd7088a675b2610fffc976be9b8074b5", - "_shrinkwrap": null, - "_spec": "flagged-respawn@^0.3.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "Tyler Kellen", - "url": "http://goingslowly.com/" - }, - "bugs": { - "url": "https://github.com/js-cli/js-flagged-respawn/issues" - }, - "dependencies": {}, - "description": "A tool for respawning node binaries when special flags are present.", - "devDependencies": { - "chai": "~1.9.1", - "mocha": "~1.21.4", - "v8flags": "~1.0.1" - }, - "directories": {}, - "dist": { - "shasum": "ff191eddcd7088a675b2610fffc976be9b8074b5", - "tarball": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "gitHead": "5467529adb5512292c8dd341691ba75b2293ed7e", - "homepage": "https://github.com/js-cli/js-flagged-respawn", - "keywords": [ - "respawn flags" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/js-cli/js-flagged-respawn/blob/master/LICENSE" - } - ], - "main": "index.js", - "maintainers": [ - { - "name": "tkellen", - "email": "tyler@sleekcode.net" - }, - { - "name": "tusbar", - "email": "b@pk.am" - } - ], - "name": "flagged-respawn", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/js-cli/js-flagged-respawn.git" - }, - "scripts": { - "nospawn": "node test/bin/respawner test", - "respawn": "node test/bin/respawner --harmony test", - "test": "mocha -R spec test" - }, - "version": "0.3.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/exit_code.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/exit_code.js deleted file mode 100644 index f2fff2d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/exit_code.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node - -const flaggedRespawn = require('../../'); - -flaggedRespawn(['--harmony'], process.argv, function (ready) { - - if (ready) { - setTimeout(function () { - process.exit(100); - }, 100); - } - -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/respawner.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/respawner.js deleted file mode 100644 index 71348ba..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/respawner.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -const flaggedRespawn = require('../../'); - -// get a list of all possible v8 flags for the running version of node -const v8flags = require('v8flags').fetch(); - -flaggedRespawn(v8flags, process.argv, function (ready, child) { - if (ready) { - console.log('Running!'); - } else { - console.log('Special flags found, respawning.'); - } - if (child.pid !== process.pid) { - console.log('Respawned to PID:', child.pid); - } -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/signal.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/signal.js deleted file mode 100644 index f4a1edf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/bin/signal.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -const flaggedRespawn = require('../../'); - -flaggedRespawn(['--harmony'], process.argv, function (ready, child) { - - if (ready) { - setTimeout(function() { - process.exit(); - }, 100); - } else { - console.log('got child!'); - child.kill('SIGHUP'); - } - -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/index.js deleted file mode 100644 index d83fce3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flagged-respawn/test/index.js +++ /dev/null @@ -1,99 +0,0 @@ -const expect = require('chai').expect; -const exec = require('child_process').exec; - -const reorder = require('../lib/reorder'); -const flaggedRespawn = require('../'); - -describe('flaggedRespawn', function () { - var flags = ['--harmony', '--use_strict', '--stack_size'] - - describe('reorder', function () { - - it('should re-order args, placing special flags first', function () { - var needsRespawn = ['node', 'file.js', '--flag', '--harmony', 'command']; - var noRespawnNeeded = ['node', 'bin/flagged-respawn', 'thing']; - expect(reorder(flags, needsRespawn)) - .to.deep.equal(['node', '--harmony', 'file.js', '--flag', 'command']); - expect(reorder(flags, noRespawnNeeded)) - .to.deep.equal(noRespawnNeeded); - }); - - it('should keep flags values when not placed first', function () { - var args = ['node', 'file.js', '--stack_size=2048']; - var expected = ['node', '--stack_size=2048', 'file.js']; - expect(reorder(flags, args)).to.deep.equal(expected); - }); - - it('should ignore special flags when they are in the correct position', function () { - var args = ['node', '--harmony', 'file.js', '--flag']; - expect(reorder(flags, reorder(flags, args))).to.deep.equal(args); - }); - - }); - - describe('execute', function () { - - it('should throw if no flags are specified', function () { - expect(function () { flaggedRespawn.execute(); }).to.throw; - }); - - it('should throw if no argv is specified', function () { - expect(function () { flaggedRespawn.execute(flags); }).to.throw; - }); - - it('should respawn and pipe stderr/stdout to parent', function (done) { - exec('node ./test/bin/respawner.js --harmony', function (err, stdout, stderr) { - expect(stdout.replace(/[0-9]/g, '')).to.equal('Special flags found, respawning.\nRespawned to PID: \nRunning!\n'); - done(); - }); - }); - - it('should respawn and pass exit code from child to parent', function (done) { - exec('node ./test/bin/exit_code.js --harmony', function (err, stdout, stderr) { - expect(err.code).to.equal(100); - done(); - }); - }); - - it.skip('should respawn; if child is killed, parent should exit with same signal', function (done) { - // TODO: figure out why travis hates this - exec('node ./test/bin/signal.js --harmony', function (err, stdout, stderr) { - console.log('err', err); - console.log('stdout', stdout); - console.log('stderr', stderr); - expect(err.signal).to.equal('SIGHUP'); - done(); - }); - }); - - it('should call back with ready as true when respawn is not needed', function () { - var argv = ['node', './test/bin/respawner']; - flaggedRespawn(flags, argv, function (ready) { - expect(ready).to.be.true; - }); - }); - - it('should call back with ready as false when respawn is needed', function () { - var argv = ['node', './test/bin/respawner', '--harmony']; - flaggedRespawn(flags, argv, function (ready) { - expect(ready).to.be.false; - }); - }); - - it('should call back with the child process when ready', function () { - var argv = ['node', './test/bin/respawner', '--harmony']; - flaggedRespawn(flags, argv, function (ready, child) { - expect(child.pid).to.not.equal(process.pid); - }); - }); - - it('should call back with own process when respawn not needed', function () { - var argv = ['node', './test/bin/respawner']; - flaggedRespawn(flags, argv, function (ready, child) { - expect(child.pid).to.equal(process.pid); - }); - }); - - }); - -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/LICENSE deleted file mode 100644 index 0ae8ca0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 Toby Zerner - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/README.md deleted file mode 100644 index aa92bac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/README.md +++ /dev/null @@ -1,30 +0,0 @@ -**Gulp wrapper for Flarum JavaScript compilation.** - -This package sets up a [Gulp](http://gulpjs.com/) program that compiles JavaScript for use in Flarum. Example usage: - -```js -// Gulpfile.js -var gulp = require('flarum-gulp'); - -gulp({ - files: [ - 'bower_components/foo/bar.js' - ], - modules: { - 'vendor/package': 'src/**/*.js' - } -}); -``` - -```bash -$ gulp # compile -$ gulp watch # compile and watch for changes -``` - -## Options - -* `files` An array of individual files to concatenate. -* `modules` A map of module prefixes to their source files. - * Modules are transpiled to ES5 using Babel, including `Object.assign`. - * JSX is converted into Mithril's `m` syntax. -* `outputFile` The resulting file to write to. Defaults to `dist/extension.js`. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/index.js deleted file mode 100644 index 39e0aa2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/index.js +++ /dev/null @@ -1,75 +0,0 @@ -var path = require('path'); -var gulp = require('gulp'); -var concat = require('gulp-concat'); -var babel = require('gulp-babel'); -var cached = require('gulp-cached'); -var remember = require('gulp-remember'); -var order = require('gulp-order'); -var streamqueue = require('streamqueue'); -var file = require('gulp-file'); -var babelCore = require('babel-core'); - -function handleError(e) { - console.log(e.toString()); - this.emit('end'); -} - -module.exports = function(options) { - options = options || {}; - - options.files = options.files || []; - options.modules = options.modules || {}; - options.outputFile = options.outputFile || 'dist/extension.js'; - - gulp.task('default', function() { - var stream = streamqueue({objectMode: true}); - - if (options.includeHelpers) { - stream.queue(file('helpers.js', babelCore.buildExternalHelpers(null, 'global'), {src: true})); - } - - stream.queue(gulp.src(options.files)); - - for (var prefix in options.modules) { - var modules = options.modules[prefix]; - - stream.queue( - gulp.src(modules) - .pipe(order(Array.isArray(modules) ? modules : [modules])) - .pipe(cached('modules')) - .pipe(babel({ - presets: [require('babel-preset-es2015'), require('babel-preset-react')], - plugins: [ - [require('babel-plugin-transform-react-jsx'), {'pragma': 'm'}], - require('babel-plugin-transform-es2015-modules-systemjs'), - require('babel-plugin-transform-object-assign'), - require('babel-plugin-external-helpers') - ], - moduleIds: true, - moduleRoot: prefix - })) - .on('error', handleError) - .pipe(remember('modules')) - ); - } - - return stream.done() - .pipe(concat(path.basename(options.outputFile), {newLine: ';\n'})) - .pipe(gulp.dest(path.dirname(options.outputFile))); - }); - - gulp.task('watch', ['default'], function () { - gulp.watch(options.files, ['default']); - - for (var prefix in options.modules) { - var watcher = gulp.watch(options.modules[prefix], ['default']); - - watcher.on('change', function (event) { - if (event.type === 'deleted') { - delete cached.caches['modules' + prefix][event.path]; - remember.forget('modules' + prefix, event.path); - } - }); - } - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/package.json deleted file mode 100644 index 29ca7bc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "flarum-gulp@^0.2.0", - "scope": null, - "escapedName": "flarum-gulp", - "name": "flarum-gulp", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum" - ] - ], - "_from": "flarum-gulp@>=0.2.0 <0.3.0", - "_id": "flarum-gulp@0.2.0", - "_inCache": true, - "_location": "/flarum-gulp", - "_nodeVersion": "4.1.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/flarum-gulp-0.2.0.tgz_1458255465995_0.2928906574379653" - }, - "_npmUser": { - "name": "tobscure", - "email": "toby.zerner@gmail.com" - }, - "_npmVersion": "3.8.1", - "_phantomChildren": {}, - "_requested": { - "raw": "flarum-gulp@^0.2.0", - "scope": null, - "escapedName": "flarum-gulp", - "name": "flarum-gulp", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/flarum-gulp/-/flarum-gulp-0.2.0.tgz", - "_shasum": "92a29ad65b66fe94c71ca3c6991c9456ff3987a5", - "_shrinkwrap": null, - "_spec": "flarum-gulp@^0.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum", - "author": { - "name": "Toby Zerner", - "email": "toby.zerner@gmail.com", - "url": "http://tobyzerner.com" - }, - "bugs": { - "url": "https://github.com/flarum/flarum-gulp/issues" - }, - "dependencies": { - "babel-core": "^6.5.0", - "babel-plugin-external-helpers": "^6.5.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.5.0", - "babel-plugin-transform-object-assign": "^6.5.0", - "babel-plugin-transform-react-jsx": "^6.5.0", - "babel-plugin-transform-runtime": "^6.5.0", - "babel-preset-es2015": "^6.5.0", - "babel-preset-react": "^6.5.0", - "gulp-babel": "^6.0.0", - "gulp-cached": "^1.0.4", - "gulp-concat": "^2.5.2", - "gulp-file": "^0.2.0", - "gulp-order": "^1.1.1", - "gulp-remember": "^0.3.0", - "streamqueue": "^0.1.3" - }, - "description": "Gulp wrapper for Flarum JavaScript compilation.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "92a29ad65b66fe94c71ca3c6991c9456ff3987a5", - "tarball": "https://registry.npmjs.org/flarum-gulp/-/flarum-gulp-0.2.0.tgz" - }, - "gitHead": "9a3cace9038897a597cd31f82f887b90973b2395", - "homepage": "https://github.com/flarum/flarum-gulp", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "tobscure", - "email": "toby.zerner@gmail.com" - } - ], - "name": "flarum-gulp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/flarum/flarum-gulp.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "0.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/LICENSE deleted file mode 100644 index d734237..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/README.md deleted file mode 100644 index 874e189..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![NPM total downloads](https://img.shields.io/npm/dt/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-in) - -> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save for-in -``` - -## Usage - -```js -var forIn = require('for-in'); - -var obj = {a: 'foo', b: 'bar', c: 'baz'}; -var values = []; -var keys = []; - -forIn(obj, function (value, key, o) { - keys.push(key); - values.push(value); -}); - -console.log(keys); -//=> ['a', 'b', 'c']; - -console.log(values); -//=> ['foo', 'bar', 'baz']; -``` - -## About - -### Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") -* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") -* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 16 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [paulirish](https://github.com/paulirish) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/index.js deleted file mode 100644 index 0b5f95f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * for-in - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function forIn(obj, fn, thisArg) { - for (var key in obj) { - if (fn.call(thisArg, obj[key], key, obj) === false) { - break; - } - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/package.json deleted file mode 100644 index 1e25a99..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-in/package.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "for-in@^1.0.1", - "scope": null, - "escapedName": "for-in", - "name": "for-in", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own" - ] - ], - "_from": "for-in@>=1.0.1 <2.0.0", - "_id": "for-in@1.0.2", - "_inCache": true, - "_location": "/for-in", - "_nodeVersion": "7.5.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/for-in-1.0.2.tgz_1488298375632_0.9562143329530954" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.1.2", - "_phantomChildren": {}, - "_requested": { - "raw": "for-in@^1.0.1", - "scope": null, - "escapedName": "for-in", - "name": "for-in", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/for-own", - "/object.defaults/for-own" - ], - "_resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "_shasum": "81068d295a8142ec0ac726c6e2200c30fb6d5e80", - "_shrinkwrap": null, - "_spec": "for-in@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/for-in/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Paul Irish", - "url": "http://paulirish.com" - } - ], - "dependencies": {}, - "description": "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "directories": {}, - "dist": { - "shasum": "81068d295a8142ec0ac726c6e2200c30fb6d5e80", - "tarball": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "5f97ad4f6556e938d9b71614259ddd8044a081e3", - "homepage": "https://github.com/jonschlinkert/for-in", - "keywords": [ - "for", - "for-in", - "for-own", - "has", - "has-own", - "hasOwn", - "in", - "key", - "keys", - "object", - "own", - "value" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "for-in", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/for-in.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-flatten", - "collection-map", - "for-own" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/LICENSE deleted file mode 100644 index d290fe0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, 2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/README.md deleted file mode 100644 index fd56877..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# for-own [![NPM version](https://img.shields.io/npm/v/for-own.svg?style=flat)](https://www.npmjs.com/package/for-own) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![NPM total downloads](https://img.shields.io/npm/dt/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-own.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-own) - -> Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save for-own -``` - -## Usage - -```js -var forOwn = require('for-own'); - -var obj = {a: 'foo', b: 'bar', c: 'baz'}; -var values = []; -var keys = []; - -forOwn(obj, function (value, key, o) { - keys.push(key); - values.push(value); -}); - -console.log(keys); -//=> ['a', 'b', 'c']; - -console.log(values); -//=> ['foo', 'bar', 'baz']; -``` - -## About - -### Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") -* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") -* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 10 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [javiercejudo](https://github.com/javiercejudo) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/index.js deleted file mode 100644 index 74e2d75..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * for-own - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var forIn = require('for-in'); -var hasOwn = Object.prototype.hasOwnProperty; - -module.exports = function forOwn(obj, fn, thisArg) { - forIn(obj, function(val, key) { - if (hasOwn.call(obj, key)) { - return fn.call(thisArg, obj[key], key, obj); - } - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/package.json deleted file mode 100644 index a1c3c15..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/for-own/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "for-own@^0.1.4", - "scope": null, - "escapedName": "for-own", - "name": "for-own", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.omit" - ] - ], - "_from": "for-own@>=0.1.4 <0.2.0", - "_id": "for-own@0.1.5", - "_inCache": true, - "_location": "/for-own", - "_nodeVersion": "7.5.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/for-own-0.1.5.tgz_1488159172480_0.8725875311065465" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.1.2", - "_phantomChildren": {}, - "_requested": { - "raw": "for-own@^0.1.4", - "scope": null, - "escapedName": "for-own", - "name": "for-own", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/object.omit" - ], - "_resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "_shasum": "5265c681a4f294dabbf17c9509b6763aa84510ce", - "_shrinkwrap": null, - "_spec": "for-own@^0.1.4", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/object.omit", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/for-own/issues" - }, - "contributors": [ - { - "name": "Javier Cejudo", - "email": "javier@javiercejudo.com", - "url": "https://www.javiercejudo.com" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "for-in": "^1.0.1" - }, - "description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "directories": {}, - "dist": { - "shasum": "5265c681a4f294dabbf17c9509b6763aa84510ce", - "tarball": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "e64ee3492f218c812011ec3feff4194e9272d2a1", - "homepage": "https://github.com/jonschlinkert/for-own", - "keywords": [ - "for", - "for-in", - "for-own", - "has", - "has-own", - "hasOwn", - "key", - "keys", - "object", - "own", - "value" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "for-own", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/for-own.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-flatten", - "collection-map", - "for-in" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.5" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/LICENSE deleted file mode 100644 index e28e603..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/README.md deleted file mode 100644 index 60c429c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# fs-exists-sync [![NPM version](https://img.shields.io/npm/v/fs-exists-sync.svg?style=flat)](https://www.npmjs.com/package/fs-exists-sync) [![NPM downloads](https://img.shields.io/npm/dm/fs-exists-sync.svg?style=flat)](https://npmjs.org/package/fs-exists-sync) [![Build Status](https://img.shields.io/travis/jonschlinkert/fs-exists-sync.svg?style=flat)](https://travis-ci.org/jonschlinkert/fs-exists-sync) - -> Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info. - -## Install -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install fs-exists-sync --save -``` - -## Usage - -```js -var exists = require('fs-exists-sync'); - -console.log(exists('.')); -//=> true -console.log(exists(process.cwd())); -//=> true -console.log(exists('README.md')); -//=> true -console.log(exists('foo.txt')); -//=> false -console.log(exists('')); -//=> false -console.log(exists()); -//=> false -``` - -## Why another "exists" lib? - -I just want a _simple replacement for `fs.existsSync`_. Here is what I found: - -- [path-exists][]: Has dependencies to support a promises API -- [fs-exists][]: async only -- [file-exists][]: returns `false` if the path exists but is a directory. -- [exists][]: nothing to do with `fs`. - -## API - -## Related projects - -You might also be interested in these projects: - -* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) -* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath) -* [try-open](https://www.npmjs.com/package/try-open): Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the… [more](https://www.npmjs.com/package/try-open) | [homepage](https://github.com/jonschlinkert/try-open) - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fs-exists-sync/issues/new). - -## Building docs -Generate readme and API documentation with [verb][]: - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb][] is installed globally: - -```sh -$ verb -``` - -## Running tests -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/fs-exists-sync/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 09, 2016._ - -[verb]: https://github.com/verbose/verb -[path-exists]: https://github.com/sindresorhus/path-exists -[fs-exists]: https://github.com/meryn/fs-exists -[file-exists]: https://github.com/scottcorgan/file-exists -[exists]: https://github.com/tjmehta/exists - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/index.js deleted file mode 100644 index b7f00c7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * fs-exists-sync (https://github.com/jonschlinkert/fs-exists-sync) - * - * Copyright (c) 2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var fs = require('fs'); - -module.exports = function(filepath) { - try { - (fs.accessSync || fs.statSync)(filepath); - return true; - } catch (err) {} - return false; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/package.json deleted file mode 100644 index 68d4744..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/fs-exists-sync/package.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "fs-exists-sync@^0.1.0", - "scope": null, - "escapedName": "fs-exists-sync", - "name": "fs-exists-sync", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/detect-file" - ] - ], - "_from": "fs-exists-sync@>=0.1.0 <0.2.0", - "_id": "fs-exists-sync@0.1.0", - "_inCache": true, - "_location": "/fs-exists-sync", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/fs-exists-sync-0.1.0.tgz_1460202025245_0.6282676137052476" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "fs-exists-sync@^0.1.0", - "scope": null, - "escapedName": "fs-exists-sync", - "name": "fs-exists-sync", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/detect-file" - ], - "_resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "_shasum": "982d6893af918e72d08dec9e8673ff2b5a8d6add", - "_shrinkwrap": null, - "_spec": "fs-exists-sync@^0.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/detect-file", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/fs-exists-sync/issues" - }, - "dependencies": {}, - "description": "Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.", - "devDependencies": { - "gulp-format-md": "^0.1.7", - "mocha": "^2.4.5" - }, - "directories": {}, - "dist": { - "shasum": "982d6893af918e72d08dec9e8673ff2b5a8d6add", - "tarball": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "3b44654977775bac2d1151520c9b6257249a6374", - "homepage": "https://github.com/jonschlinkert/fs-exists-sync", - "keywords": [ - "access", - "check", - "exist", - "exists", - "file", - "file-system", - "filepath", - "filesystem", - "fs", - "is-file", - "isfile", - "path", - "stat", - "sync" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "fs-exists-sync", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/fs-exists-sync.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb", - "path-exists", - "fs-exists", - "file-exists", - "exists" - ], - "related": { - "list": [ - "try-open", - "parse-filepath", - "is-absolute" - ] - }, - "run": true, - "toc": false, - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/LICENSE-MIT b/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/LICENSE-MIT deleted file mode 100644 index 8c1a833..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Kyle Robinson Young - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/README.md deleted file mode 100644 index f7d6c3b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/README.md +++ /dev/null @@ -1,181 +0,0 @@ -# gaze [![Build Status](https://travis-ci.org/shama/gaze.png?branch=master)](https://travis-ci.org/shama/gaze) - -A globbing fs.watch wrapper built from the best parts of other fine watch libs. -Compatible with Node.js 0.10/0.8, Windows, OSX and Linux. - -![gaze](http://dontkry.com/images/repos/gaze.png) - -## Usage -Install the module with: `npm install gaze` or place into your `package.json` -and run `npm install`. - -```javascript -var gaze = require('gaze'); - -// Watch all .js files/dirs in process.cwd() -gaze('**/*.js', function(err, watcher) { - // Files have all started watching - // watcher === this - - // Get all watched files - console.log(this.watched()); - - // On file changed - this.on('changed', function(filepath) { - console.log(filepath + ' was changed'); - }); - - // On file added - this.on('added', function(filepath) { - console.log(filepath + ' was added'); - }); - - // On file deleted - this.on('deleted', function(filepath) { - console.log(filepath + ' was deleted'); - }); - - // On changed/added/deleted - this.on('all', function(event, filepath) { - console.log(filepath + ' was ' + event); - }); - - // Get watched files with relative paths - console.log(this.relative()); -}); - -// Also accepts an array of patterns -gaze(['stylesheets/*.css', 'images/**/*.png'], function() { - // Add more patterns later to be watched - this.add(['js/*.js']); -}); -``` - -### Alternate Interface - -```javascript -var Gaze = require('gaze').Gaze; - -var gaze = new Gaze('**/*'); - -// Files have all started watching -gaze.on('ready', function(watcher) { }); - -// A file has been added/changed/deleted has occurred -gaze.on('all', function(event, filepath) { }); -``` - -### Errors - -```javascript -gaze('**/*', function() { - this.on('error', function(err) { - // Handle error here - }); -}); -``` - -### Minimatch / Glob - -See [isaacs's minimatch](https://github.com/isaacs/minimatch) for more -information on glob patterns. - -## Documentation - -### gaze(patterns, [options], callback) - -* `patterns` {String|Array} File patterns to be matched -* `options` {Object} -* `callback` {Function} - * `err` {Error | null} - * `watcher` {Object} Instance of the Gaze watcher - -### Class: gaze.Gaze - -Create a Gaze object by instanting the `gaze.Gaze` class. - -```javascript -var Gaze = require('gaze').Gaze; -var gaze = new Gaze(pattern, options, callback); -``` - -#### Properties - -* `options` The options object passed in. - * `interval` {integer} Interval to pass to fs.watchFile - * `debounceDelay` {integer} Delay for events called in succession for the same - file/event - -#### Events - -* `ready(watcher)` When files have been globbed and watching has begun. -* `all(event, filepath)` When an `added`, `changed` or `deleted` event occurs. -* `added(filepath)` When a file has been added to a watch directory. -* `changed(filepath)` When a file has been changed. -* `deleted(filepath)` When a file has been deleted. -* `renamed(newPath, oldPath)` When a file has been renamed. -* `end()` When the watcher is closed and watches have been removed. -* `error(err)` When an error occurs. -* `nomatch` When no files have been matched. - -#### Methods - -* `emit(event, [...])` Wrapper for the EventEmitter.emit. - `added`|`changed`|`deleted` events will also trigger the `all` event. -* `close()` Unwatch all files and reset the watch instance. -* `add(patterns, callback)` Adds file(s) patterns to be watched. -* `remove(filepath)` removes a file or directory from being watched. Does not - recurse directories. -* `watched()` Returns the currently watched files. -* `relative([dir, unixify])` Returns the currently watched files with relative paths. - * `dir` {string} Only return relative files for this directory. - * `unixify` {boolean} Return paths with `/` instead of `\\` if on Windows. - -## FAQs - -### Why Another `fs.watch` Wrapper? -I liked parts of other `fs.watch` wrappers but none had all the features I -needed. This lib combines the features I needed from other fine watch libs: -Speedy data behavior from -[paulmillr's chokidar](https://github.com/paulmillr/chokidar), API interface -from [mikeal's watch](https://github.com/mikeal/watch) and file globbing using -[isaacs's glob](https://github.com/isaacs/node-glob) which is also used by -[cowboy's Grunt](https://github.com/gruntjs/grunt). - -### How do I fix the error `EMFILE: Too many opened files.`? -This is because of your system's max opened file limit. For OSX the default is -very low (256). Increase your limit temporarily with `ulimit -n 10480`, the -number being the new max limit. - -## Contributing -In lieu of a formal styleguide, take care to maintain the existing coding style. -Add unit tests for any new or changed functionality. Lint and test your code -using [grunt](http://gruntjs.com/). - -## Release History -* 0.5.2 - Fix for ENOENT error with non-existent symlinks. -* 0.5.1 - Use setImmediate (process.nextTick for node v0.8) to defer ready/nomatch events (@amasad). -* 0.5.0 - Process is now kept alive while watching files. Emits a nomatch event when no files are matching. -* 0.4.3 - Track file additions in newly created folders (@brett-shwom). -* 0.4.2 - Fix .remove() method to remove a single file in a directory (@kaelzhang). Fixing Cannot call method 'call' of undefined (@krasimir). Track new file additions within folders (@brett-shwom). -* 0.4.1 - Fix watchDir not respecting close in race condition (@chrisirhc). -* 0.4.0 - Drop support for node v0.6. Use globule for file matching. Avoid node v0.10 path.resolve/join errors. Register new files when added to non-existent folder. Multiple instances can now poll the same files (@jpommerening). -* 0.3.4 - Code clean up. Fix path must be strings errors (@groner). Fix incorrect added events (@groner). -* 0.3.3 - Fix for multiple patterns with negate. -* 0.3.2 - Emit `end` before removeAllListeners. -* 0.3.1 - Fix added events within subfolder patterns. -* 0.3.0 - Handle safewrite events, `forceWatchMethod` option removed, bug fixes and watch optimizations (@rgaskill). -* 0.2.2 - Fix issue where subsequent add calls dont get watched (@samcday). removeAllListeners on close. -* 0.2.1 - Fix issue with invalid `added` events in current working dir. -* 0.2.0 - Support and mark folders with `path.sep`. Add `forceWatchMethod` option. Support `renamed` events. -* 0.1.6 - Recognize the `cwd` option properly -* 0.1.5 - Catch too many open file errors -* 0.1.4 - Really fix the race condition with 2 watches -* 0.1.3 - Fix race condition with 2 watches -* 0.1.2 - Read triggering changed event fix -* 0.1.1 - Minor fixes -* 0.1.0 - Initial release - -## License -Copyright (c) 2013 Kyle Robinson Young -Licensed under the MIT license. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/gaze.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/gaze.js deleted file mode 100644 index 28c2653..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/gaze.js +++ /dev/null @@ -1,439 +0,0 @@ -/* - * gaze - * https://github.com/shama/gaze - * - * Copyright (c) 2013 Kyle Robinson Young - * Licensed under the MIT license. - */ - -'use strict'; - -// libs -var util = require('util'); -var EE = require('events').EventEmitter; -var fs = require('fs'); -var path = require('path'); -var globule = require('globule'); -var helper = require('./helper'); - -// shim setImmediate for node v0.8 -var setImmediate = require('timers').setImmediate; -if (typeof setImmediate !== 'function') { - setImmediate = process.nextTick; -} - -// globals -var delay = 10; - -// `Gaze` EventEmitter object to return in the callback -function Gaze(patterns, opts, done) { - var self = this; - EE.call(self); - - // If second arg is the callback - if (typeof opts === 'function') { - done = opts; - opts = {}; - } - - // Default options - opts = opts || {}; - opts.mark = true; - opts.interval = opts.interval || 100; - opts.debounceDelay = opts.debounceDelay || 500; - opts.cwd = opts.cwd || process.cwd(); - this.options = opts; - - // Default done callback - done = done || function() {}; - - // Remember our watched dir:files - this._watched = Object.create(null); - - // Store watchers - this._watchers = Object.create(null); - - // Store watchFile listeners - this._pollers = Object.create(null); - - // Store patterns - this._patterns = []; - - // Cached events for debouncing - this._cached = Object.create(null); - - // Set maxListeners - if (this.options.maxListeners) { - this.setMaxListeners(this.options.maxListeners); - Gaze.super_.prototype.setMaxListeners(this.options.maxListeners); - delete this.options.maxListeners; - } - - // Initialize the watch on files - if (patterns) { - this.add(patterns, done); - } - - // keep the process alive - this._keepalive = setInterval(function() {}, 200); - - return this; -} -util.inherits(Gaze, EE); - -// Main entry point. Start watching and call done when setup -module.exports = function gaze(patterns, opts, done) { - return new Gaze(patterns, opts, done); -}; -module.exports.Gaze = Gaze; - -// Override the emit function to emit `all` events -// and debounce on duplicate events per file -Gaze.prototype.emit = function() { - var self = this; - var args = arguments; - - var e = args[0]; - var filepath = args[1]; - var timeoutId; - - // If not added/deleted/changed/renamed then just emit the event - if (e.slice(-2) !== 'ed') { - Gaze.super_.prototype.emit.apply(self, args); - return this; - } - - // Detect rename event, if added and previous deleted is in the cache - if (e === 'added') { - Object.keys(this._cached).forEach(function(oldFile) { - if (self._cached[oldFile].indexOf('deleted') !== -1) { - args[0] = e = 'renamed'; - [].push.call(args, oldFile); - delete self._cached[oldFile]; - return false; - } - }); - } - - // If cached doesnt exist, create a delay before running the next - // then emit the event - var cache = this._cached[filepath] || []; - if (cache.indexOf(e) === -1) { - helper.objectPush(self._cached, filepath, e); - clearTimeout(timeoutId); - timeoutId = setTimeout(function() { - delete self._cached[filepath]; - }, this.options.debounceDelay); - // Emit the event and `all` event - Gaze.super_.prototype.emit.apply(self, args); - Gaze.super_.prototype.emit.apply(self, ['all', e].concat([].slice.call(args, 1))); - } - - // Detect if new folder added to trigger for matching files within folder - if (e === 'added') { - if (helper.isDir(filepath)) { - fs.readdirSync(filepath).map(function(file) { - return path.join(filepath, file); - }).filter(function(file) { - return globule.isMatch(self._patterns, file, self.options); - }).forEach(function(file) { - self.emit('added', file); - }); - } - } - - return this; -}; - -// Close watchers -Gaze.prototype.close = function(_reset) { - var self = this; - _reset = _reset === false ? false : true; - Object.keys(self._watchers).forEach(function(file) { - self._watchers[file].close(); - }); - self._watchers = Object.create(null); - Object.keys(this._watched).forEach(function(dir) { - self._unpollDir(dir); - }); - if (_reset) { - self._watched = Object.create(null); - setTimeout(function() { - self.emit('end'); - self.removeAllListeners(); - clearInterval(self._keepalive); - }, delay + 100); - } - return self; -}; - -// Add file patterns to be watched -Gaze.prototype.add = function(files, done) { - if (typeof files === 'string') { files = [files]; } - this._patterns = helper.unique.apply(null, [this._patterns, files]); - files = globule.find(this._patterns, this.options); - this._addToWatched(files); - this.close(false); - this._initWatched(done); -}; - -// Dont increment patterns and dont call done if nothing added -Gaze.prototype._internalAdd = function(file, done) { - var files = []; - if (helper.isDir(file)) { - files = [helper.markDir(file)].concat(globule.find(this._patterns, this.options)); - } else { - if (globule.isMatch(this._patterns, file, this.options)) { - files = [file]; - } - } - if (files.length > 0) { - this._addToWatched(files); - this.close(false); - this._initWatched(done); - } -}; - -// Remove file/dir from `watched` -Gaze.prototype.remove = function(file) { - var self = this; - if (this._watched[file]) { - // is dir, remove all files - this._unpollDir(file); - delete this._watched[file]; - } else { - // is a file, find and remove - Object.keys(this._watched).forEach(function(dir) { - var index = self._watched[dir].indexOf(file); - if (index !== -1) { - self._unpollFile(file); - self._watched[dir].splice(index, 1); - return false; - } - }); - } - if (this._watchers[file]) { - this._watchers[file].close(); - } - return this; -}; - -// Return watched files -Gaze.prototype.watched = function() { - return this._watched; -}; - -// Returns `watched` files with relative paths to process.cwd() -Gaze.prototype.relative = function(dir, unixify) { - var self = this; - var relative = Object.create(null); - var relDir, relFile, unixRelDir; - var cwd = this.options.cwd || process.cwd(); - if (dir === '') { dir = '.'; } - dir = helper.markDir(dir); - unixify = unixify || false; - Object.keys(this._watched).forEach(function(dir) { - relDir = path.relative(cwd, dir) + path.sep; - if (relDir === path.sep) { relDir = '.'; } - unixRelDir = unixify ? helper.unixifyPathSep(relDir) : relDir; - relative[unixRelDir] = self._watched[dir].map(function(file) { - relFile = path.relative(path.join(cwd, relDir) || '', file || ''); - if (helper.isDir(file)) { - relFile = helper.markDir(relFile); - } - if (unixify) { - relFile = helper.unixifyPathSep(relFile); - } - return relFile; - }); - }); - if (dir && unixify) { - dir = helper.unixifyPathSep(dir); - } - return dir ? relative[dir] || [] : relative; -}; - -// Adds files and dirs to watched -Gaze.prototype._addToWatched = function(files) { - for (var i = 0; i < files.length; i++) { - var file = files[i]; - var filepath = path.resolve(this.options.cwd, file); - - var dirname = (helper.isDir(file)) ? filepath : path.dirname(filepath); - dirname = helper.markDir(dirname); - - // If a new dir is added - if (helper.isDir(file) && !(filepath in this._watched)) { - helper.objectPush(this._watched, filepath, []); - } - - if (file.slice(-1) === '/') { filepath += path.sep; } - helper.objectPush(this._watched, path.dirname(filepath) + path.sep, filepath); - - // add folders into the mix - var readdir = fs.readdirSync(dirname); - for (var j = 0; j < readdir.length; j++) { - var dirfile = path.join(dirname, readdir[j]); - if (fs.lstatSync(dirfile).isDirectory()) { - helper.objectPush(this._watched, dirname, dirfile + path.sep); - } - } - } - return this; -}; - -Gaze.prototype._watchDir = function(dir, done) { - var self = this; - var timeoutId; - try { - this._watchers[dir] = fs.watch(dir, function(event) { - // race condition. Let's give the fs a little time to settle down. so we - // don't fire events on non existent files. - clearTimeout(timeoutId); - timeoutId = setTimeout(function() { - // race condition. Ensure that this directory is still being watched - // before continuing. - if ((dir in self._watchers) && fs.existsSync(dir)) { - done(null, dir); - } - }, delay + 100); - }); - } catch (err) { - return this._handleError(err); - } - return this; -}; - -Gaze.prototype._unpollFile = function(file) { - if (this._pollers[file]) { - fs.unwatchFile(file, this._pollers[file] ); - delete this._pollers[file]; - } - return this; -}; - -Gaze.prototype._unpollDir = function(dir) { - this._unpollFile(dir); - for (var i = 0; i < this._watched[dir].length; i++) { - this._unpollFile(this._watched[dir][i]); - } -}; - -Gaze.prototype._pollFile = function(file, done) { - var opts = { persistent: true, interval: this.options.interval }; - if (!this._pollers[file]) { - this._pollers[file] = function(curr, prev) { - done(null, file); - }; - try { - fs.watchFile(file, opts, this._pollers[file]); - } catch (err) { - return this._handleError(err); - } - } - return this; -}; - -// Initialize the actual watch on `watched` files -Gaze.prototype._initWatched = function(done) { - var self = this; - var cwd = this.options.cwd || process.cwd(); - var curWatched = Object.keys(self._watched); - - // if no matching files - if (curWatched.length < 1) { - // Defer to emitting to give a chance to attach event handlers. - setImmediate(function () { - self.emit('ready', self); - if (done) { done.call(self, null, self); } - self.emit('nomatch'); - }); - return; - } - - helper.forEachSeries(curWatched, function(dir, next) { - dir = dir || ''; - var files = self._watched[dir]; - // Triggered when a watched dir has an event - self._watchDir(dir, function(event, dirpath) { - var relDir = cwd === dir ? '.' : path.relative(cwd, dir); - relDir = relDir || ''; - - fs.readdir(dirpath, function(err, current) { - if (err) { return self.emit('error', err); } - if (!current) { return; } - - try { - // append path.sep to directories so they match previous. - current = current.map(function(curPath) { - if (fs.existsSync(path.join(dir, curPath)) && fs.lstatSync(path.join(dir, curPath)).isDirectory()) { - return curPath + path.sep; - } else { - return curPath; - } - }); - } catch (err) { - // race condition-- sometimes the file no longer exists - } - - // Get watched files for this dir - var previous = self.relative(relDir); - - // If file was deleted - previous.filter(function(file) { - return current.indexOf(file) < 0; - }).forEach(function(file) { - if (!helper.isDir(file)) { - var filepath = path.join(dir, file); - self.remove(filepath); - self.emit('deleted', filepath); - } - }); - - // If file was added - current.filter(function(file) { - return previous.indexOf(file) < 0; - }).forEach(function(file) { - // Is it a matching pattern? - var relFile = path.join(relDir, file); - // Add to watch then emit event - self._internalAdd(relFile, function() { - self.emit('added', path.join(dir, file)); - }); - }); - - }); - }); - - // Watch for change/rename events on files - files.forEach(function(file) { - if (helper.isDir(file)) { return; } - self._pollFile(file, function(err, filepath) { - // Only emit changed if the file still exists - // Prevents changed/deleted duplicate events - if (fs.existsSync(filepath)) { - self.emit('changed', filepath); - } - }); - }); - - next(); - }, function() { - - // Return this instance of Gaze - // delay before ready solves a lot of issues - setTimeout(function() { - self.emit('ready', self); - if (done) { done.call(self, null, self); } - }, delay + 100); - - }); -}; - -// If an error, handle it here -Gaze.prototype._handleError = function(err) { - if (err.code === 'EMFILE') { - return this.emit('error', new Error('EMFILE: Too many opened files.')); - } - return this.emit('error', err); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/helper.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/helper.js deleted file mode 100644 index e1ccc80..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/lib/helper.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -var path = require('path'); -var helper = module.exports = {}; - -// Returns boolean whether filepath is dir terminated -helper.isDir = function isDir(dir) { - if (typeof dir !== 'string') { return false; } - return (dir.slice(-(path.sep.length)) === path.sep); -}; - -// Create a `key:[]` if doesnt exist on `obj` then push or concat the `val` -helper.objectPush = function objectPush(obj, key, val) { - if (obj[key] == null) { obj[key] = []; } - if (Array.isArray(val)) { obj[key] = obj[key].concat(val); } - else if (val) { obj[key].push(val); } - return obj[key] = helper.unique(obj[key]); -}; - -// Ensures the dir is marked with path.sep -helper.markDir = function markDir(dir) { - if (typeof dir === 'string' && - dir.slice(-(path.sep.length)) !== path.sep && - dir !== '.') { - dir += path.sep; - } - return dir; -}; - -// Changes path.sep to unix ones for testing -helper.unixifyPathSep = function unixifyPathSep(filepath) { - return (process.platform === 'win32') ? String(filepath).replace(/\\/g, '/') : filepath; -}; - -/** - * Lo-Dash 1.0.1 - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.4.4 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. - * Available under MIT license - */ -helper.unique = function unique() { var array = Array.prototype.concat.apply(Array.prototype, arguments); var result = []; for (var i = 0; i < array.length; i++) { if (result.indexOf(array[i]) === -1) { result.push(array[i]); } } return result; }; - -/** - * Copyright (c) 2010 Caolan McMahon - * Available under MIT license - */ -helper.forEachSeries = function forEachSeries(arr, iterator, callback) { - if (!arr.length) { return callback(); } - var completed = 0; - var iterate = function() { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function() {}; - } else { - completed += 1; - if (completed === arr.length) { - callback(null); - } else { - iterate(); - } - } - }); - }; - iterate(); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/package.json deleted file mode 100644 index 7209d6e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/gaze/package.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "gaze@^0.5.1", - "scope": null, - "escapedName": "gaze", - "name": "gaze", - "rawSpec": "^0.5.1", - "spec": ">=0.5.1 <0.6.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher" - ] - ], - "_from": "gaze@>=0.5.1 <0.6.0", - "_id": "gaze@0.5.2", - "_inCache": true, - "_location": "/gaze", - "_nodeVersion": "4.0.0", - "_npmUser": { - "name": "shama", - "email": "kyle@dontkry.com" - }, - "_npmVersion": "3.3.4", - "_phantomChildren": {}, - "_requested": { - "raw": "gaze@^0.5.1", - "scope": null, - "escapedName": "gaze", - "name": "gaze", - "rawSpec": "^0.5.1", - "spec": ">=0.5.1 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-watcher" - ], - "_resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", - "_shasum": "40b709537d24d1d45767db5a908689dfe69ac44f", - "_shrinkwrap": null, - "_spec": "gaze@^0.5.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher", - "author": { - "name": "Kyle Robinson Young", - "email": "kyle@dontkry.com" - }, - "bugs": { - "url": "https://github.com/shama/gaze/issues" - }, - "contributors": [ - { - "name": "Kyle Robinson Young", - "url": "http://dontkry.com" - }, - { - "name": "Sam Day", - "url": "http://sam.is-super-awesome.com" - }, - { - "name": "Roarke Gaskill", - "url": "http://starkinvestments.com" - }, - { - "name": "Lance Pollard", - "url": "http://lancepollard.com/" - }, - { - "name": "Daniel Fagnan", - "url": "http://hydrocodedesign.com/" - }, - { - "name": "Jonas", - "url": "http://jpommerening.github.io/" - }, - { - "name": "Chris Chua", - "url": "http://sirh.cc/" - }, - { - "name": "Kael Zhang", - "url": "http://kael.me" - }, - { - "name": "Krasimir Tsonev", - "url": "http://krasimirtsonev.com/blog" - }, - { - "name": "brett-shwom" - } - ], - "dependencies": { - "globule": "~0.1.0" - }, - "description": "A globbing fs.watch wrapper built from the best parts of other fine watch libs.", - "devDependencies": { - "async": "~0.2.10", - "grunt": "~0.4.1", - "grunt-benchmark": "~0.2.0", - "grunt-cli": "~0.1.13", - "grunt-contrib-jshint": "~0.6.0", - "grunt-contrib-nodeunit": "~0.2.0", - "rimraf": "~2.2.6" - }, - "directories": {}, - "dist": { - "shasum": "40b709537d24d1d45767db5a908689dfe69ac44f", - "tarball": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "lib", - "LICENSE-MIT" - ], - "gitHead": "52007df64a841ccf52b9f9cd617cd24a4e2ddf8b", - "homepage": "https://github.com/shama/gaze", - "keywords": [ - "watch", - "glob" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/shama/gaze/blob/master/LICENSE-MIT" - } - ], - "main": "lib/gaze", - "maintainers": [ - { - "name": "joshperry", - "email": "josh@6bit.com" - }, - { - "name": "shama", - "email": "kyle@dontkry.com" - } - ], - "name": "gaze", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/shama/gaze.git" - }, - "scripts": { - "test": "grunt nodeunit -v" - }, - "version": "0.5.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/index.js deleted file mode 100644 index 0f1aeb3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -module.exports = function (cb) { - var stdin = process.stdin; - var ret = ''; - - if (stdin.isTTY) { - setImmediate(cb, ''); - return; - } - - stdin.setEncoding('utf8'); - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret += chunk; - } - }); - - stdin.on('end', function () { - cb(ret); - }); -}; - -module.exports.buffer = function (cb) { - var stdin = process.stdin; - var ret = []; - var len = 0; - - if (stdin.isTTY) { - setImmediate(cb, new Buffer('')); - return; - } - - stdin.on('readable', function () { - var chunk; - - while (chunk = stdin.read()) { - ret.push(chunk); - len += chunk.length; - } - }); - - stdin.on('end', function () { - cb(Buffer.concat(ret, len)); - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/package.json deleted file mode 100644 index c43debf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "get-stdin@^4.0.1", - "scope": null, - "escapedName": "get-stdin", - "name": "get-stdin", - "rawSpec": "^4.0.1", - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/dateformat" - ] - ], - "_from": "get-stdin@>=4.0.1 <5.0.0", - "_id": "get-stdin@4.0.1", - "_inCache": true, - "_location": "/get-stdin", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "raw": "get-stdin@^4.0.1", - "scope": null, - "escapedName": "get-stdin", - "name": "get-stdin", - "rawSpec": "^4.0.1", - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/dateformat", - "/strip-indent" - ], - "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "_shrinkwrap": null, - "_spec": "get-stdin@^4.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/dateformat", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/get-stdin/issues" - }, - "dependencies": {}, - "description": "Easier stdin", - "devDependencies": { - "ava": "0.0.4", - "buffer-equal": "0.0.1" - }, - "directories": {}, - "dist": { - "shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe", - "tarball": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f", - "homepage": "https://github.com/sindresorhus/get-stdin", - "keywords": [ - "std", - "stdin", - "stdio", - "concat", - "buffer", - "stream", - "process", - "stream" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "get-stdin", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/get-stdin.git" - }, - "scripts": { - "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js" - }, - "version": "4.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/readme.md deleted file mode 100644 index bc1d32a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/get-stdin/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin) - -> Easier stdin - - -## Install - -```sh -$ npm install --save get-stdin -``` - - -## Usage - -```js -// example.js -var stdin = require('get-stdin'); - -stdin(function (data) { - console.log(data); - //=> unicorns -}); -``` - -```sh -$ echo unicorns | node example.js -unicorns -``` - - -## API - -### stdin(callback) - -Get `stdin` as a string. - -### stdin.buffer(callback) - -Get `stdin` as a buffer. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/README.md deleted file mode 100644 index 1da2e82..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) - -> Returns an object with the (non-glob) base path and the actual pattern. - -Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. - -## Install with [npm](npmjs.org) - -```bash -npm i glob-base --save -``` - -## Related projects -* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. -* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. -* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - -## Usage - -```js -var globBase = require('glob-base'); - -globBase('a/b/.git/'); -//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) - -globBase('a/b/**/e'); -//=> { base: 'a/b', isGlob: true, glob: '**/e' } - -globBase('a/b/*.{foo,bar}'); -//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } - -globBase('a/b/.git/**'); -//=> { base: 'a/b/.git', isGlob: true, glob: '**' } - -globBase('a/b/c/*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } - -globBase('a/b/c/.*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } - -globBase('a/b/{c,d}'); -//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } - -globBase('!*.min.js'); -//=> { base: '.', isGlob: true, glob: '!*.min.js' } - -globBase('!foo'); -//=> { base: '.', isGlob: true, glob: '!foo' } - -globBase('!foo/(a|b).min.js'); -//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } - -globBase(''); -//=> { base: '.', isGlob: false, glob: '' } - -globBase('**/*.md'); -//=> { base: '.', isGlob: true, glob: '**/*.md' } - -globBase('**/*.min.js'); -//=> { base: '.', isGlob: true, glob: '**/*.min.js' } - -globBase('**/.*'); -//=> { base: '.', isGlob: true, glob: '**/.*' } - -globBase('**/d'); -//=> { base: '.', isGlob: true, glob: '**/d' } - -globBase('*.*'); -//=> { base: '.', isGlob: true, glob: '*.*' } - -globBase('*.min.js'); -//=> { base: '.', isGlob: true, glob: '*.min.js' } - -globBase('*/*'); -//=> { base: '.', isGlob: true, glob: '*/*' } - -globBase('*b'); -//=> { base: '.', isGlob: true, glob: '*b' } - -globBase('.'); -//=> { base: '.', isGlob: false, glob: '.' } - -globBase('.*'); -//=> { base: '.', isGlob: true, glob: '.*' } - -globBase('./*'); -//=> { base: '.', isGlob: true, glob: '*' } - -globBase('/a'); -//=> { base: '/', isGlob: false, glob: 'a' } - -globBase('@(a|b)/e.f.g/'); -//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } - -globBase('[a-c]b*'); -//=> { base: '.', isGlob: true, glob: '[a-c]b*' } - -globBase('a'); -//=> { base: '.', isGlob: false, glob: 'a' } - -globBase('a.min.js'); -//=> { base: '.', isGlob: false, glob: 'a.min.js' } - -globBase('a/'); -//=> { base: 'a/', isGlob: false, glob: '' } - -globBase('a/**/j/**/z/*.md'); -//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } - -globBase('a/*/c/*.md'); -//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } - -globBase('a/?/c.md'); -//=> { base: 'a', isGlob: true, glob: '?/c.md' } - -globBase('a/??/c.js'); -//=> { base: 'a', isGlob: true, glob: '??/c.js' } - -globBase('a?b'); -//=> { base: '.', isGlob: true, glob: 'a?b' } - -globBase('bb'); -//=> { base: '.', isGlob: false, glob: 'bb' } - -globBase('c.md'); -//=> { base: '.', isGlob: false, glob: 'c.md' } -``` - -## Running tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues) - - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/index.js deleted file mode 100644 index 564b4a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * glob-base - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var path = require('path'); -var parent = require('glob-parent'); -var isGlob = require('is-glob'); - -module.exports = function globBase(pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('glob-base expects a string.'); - } - - var res = {}; - res.base = parent(pattern); - res.isGlob = isGlob(pattern); - - if (res.base !== '.') { - res.glob = pattern.substr(res.base.length); - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - } else { - res.glob = pattern; - } - - if (!res.isGlob) { - res.base = dirname(pattern); - res.glob = res.base !== '.' - ? pattern.substr(res.base.length) - : pattern; - } - - if (res.glob.substr(0, 2) === './') { - res.glob = res.glob.substr(2); - } - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - return res; -}; - -function dirname(glob) { - if (glob.slice(-1) === '/') return glob; - return path.dirname(glob); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/package.json deleted file mode 100644 index c423c7e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob-base@^0.3.0", - "scope": null, - "escapedName": "glob-base", - "name": "glob-base", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/parse-glob" - ] - ], - "_from": "glob-base@>=0.3.0 <0.4.0", - "_id": "glob-base@0.3.0", - "_inCache": true, - "_location": "/glob-base", - "_nodeVersion": "0.12.7", - "_npmUser": { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "raw": "glob-base@^0.3.0", - "scope": null, - "escapedName": "glob-base", - "name": "glob-base", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "_shrinkwrap": null, - "_spec": "glob-base@^0.3.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/parse-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/glob-base/issues" - }, - "dependencies": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "description": "Returns an object with the (non-glob) base path and the actual pattern.", - "devDependencies": { - "mocha": "*", - "should": "^5.1.0" - }, - "directories": {}, - "dist": { - "shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "tarball": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", - "homepage": "https://github.com/jonschlinkert/glob-base", - "keywords": [ - "base", - "directory", - "dirname", - "expression", - "glob", - "parent", - "path", - "pattern", - "regex", - "regular", - "root" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "glob-base", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/glob-base.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.3.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.npmignore deleted file mode 100644 index 33e391f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.DS_Store -npm-debug.log -coverage diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.travis.yml deleted file mode 100644 index 18fc42f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "iojs-v3" - - "iojs-v2" - - "iojs-v1" - - "0.12" - - "0.10" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/LICENSE deleted file mode 100644 index 734076d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/README.md deleted file mode 100644 index ff5310d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/README.md +++ /dev/null @@ -1,43 +0,0 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. - -[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) - -Usage ------ -```sh -npm install glob-parent --save -``` - -```js -var globParent = require('glob-parent'); - -globParent('path/to/*.js'); // 'path/to' -globParent('/root/path/to/*.js'); // '/root/path/to' -globParent('/*.js'); // '/' -globParent('*.js'); // '.' -globParent('**/*.js'); // '.' -globParent('path/{to,from}'); // 'path' -globParent('path/!(to|from)'); // 'path' -globParent('path/?(to|from)'); // 'path' -globParent('path/+(to|from)'); // 'path' -globParent('path/*(to|from)'); // 'path' -globParent('path/@(to|from)'); // 'path' -globParent('path/**/*'); // 'path' - -// if provided a non-glob path, returns the nearest dir -globParent('path/foo/bar.js'); // 'path/foo' -globParent('path/foo/'); // 'path/foo' -globParent('path/foo'); // 'path' (see issue #3 for details) - -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/index.js deleted file mode 100644 index 61615f1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var path = require('path'); -var isglob = require('is-glob'); - -module.exports = function globParent(str) { - str += 'a'; // preserves full path in case of trailing path separator - do {str = path.dirname(str)} while (isglob(str)); - return str; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/package.json deleted file mode 100644 index c51124a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob-parent@^2.0.0", - "scope": null, - "escapedName": "glob-parent", - "name": "glob-parent", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base" - ] - ], - "_from": "glob-parent@>=2.0.0 <3.0.0", - "_id": "glob-parent@2.0.0", - "_inCache": true, - "_location": "/glob-parent", - "_nodeVersion": "3.0.0", - "_npmUser": { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - }, - "_npmVersion": "2.13.3", - "_phantomChildren": {}, - "_requested": { - "raw": "glob-parent@^2.0.0", - "scope": null, - "escapedName": "glob-parent", - "name": "glob-parent", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-base" - ], - "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "_shrinkwrap": null, - "_spec": "glob-parent@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-base", - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/glob-parent/issues" - }, - "dependencies": { - "is-glob": "^2.0.0" - }, - "description": "Strips glob magic from a string to provide the parent path", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" - }, - "directories": {}, - "dist": { - "shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "tarball": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" - }, - "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d", - "homepage": "https://github.com/es128/glob-parent", - "keywords": [ - "glob", - "parent", - "strip", - "path", - "directory", - "base" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "es128", - "email": "elan.shanker+npm@gmail.com" - } - ], - "name": "glob-parent", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" - }, - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "version": "2.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/test.js deleted file mode 100644 index 01156d2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-parent/test.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var gp = require('./'); -var assert = require('assert'); - -describe('glob-parent', function() { - it('should strip glob magic to return parent path', function() { - assert.equal(gp('path/to/*.js'), 'path/to'); - assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); - assert.equal(gp('/*.js'), '/'); - assert.equal(gp('*.js'), '.'); - assert.equal(gp('**/*.js'), '.'); - assert.equal(gp('path/{to,from}'), 'path'); - assert.equal(gp('path/!(to|from)'), 'path'); - assert.equal(gp('path/?(to|from)'), 'path'); - assert.equal(gp('path/+(to|from)'), 'path'); - assert.equal(gp('path/*(to|from)'), 'path'); - assert.equal(gp('path/@(to|from)'), 'path'); - assert.equal(gp('path/**/*'), 'path'); - assert.equal(gp('path/**/subdir/foo.*'), 'path'); - }); - - it('should return parent dirname from non-glob paths', function() { - assert.equal(gp('path/foo/bar.js'), 'path/foo'); - assert.equal(gp('path/foo/'), 'path/foo'); - assert.equal(gp('path/foo'), 'path'); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/LICENSE deleted file mode 100755 index 4f482f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/README.md deleted file mode 100644 index b0dbd45..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# glob-stream [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] - - -## Information - - - - - - - - - - - - - -
Packageglob-stream
DescriptionFile system globs as a stream
Node Version>= 0.9
- -This is a simple wrapper around node-glob to make it streamy. - -## Usage - -```javascript -var gs = require('glob-stream'); - -var stream = gs.create("./files/**/*.coffee", {options}); - -stream.on('data', function(file){ - // file has path, base, and cwd attrs -}); -``` - -You can pass any combination of globs. One caveat is that you can not only pass a glob negation, you must give it at least one positive glob so it knows where to start. All given must match for the file to be returned. - -### Options - -- cwd - - Default is `process.cwd()` -- base - - Default is everything before a glob starts (see [glob2base](https://github.com/wearefractal/glob2base)) -- cwdbase - - Default is `false` - - When true it is the same as saying opt.base = opt.cwd - -This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options - -#### Glob - -```javascript -var stream = gs.create(["./**/*.js", "!./node_modules/**/*.*"]); -``` - -[npm-url]: https://npmjs.org/package/glob-stream -[npm-image]: https://badge.fury.io/js/glob-stream.png - -[travis-url]: https://travis-ci.org/wearefractal/glob-stream -[travis-image]: https://travis-ci.org/wearefractal/glob-stream.png?branch=master - -[coveralls-url]: https://coveralls.io/r/wearefractal/glob-stream -[coveralls-image]: https://coveralls.io/repos/wearefractal/glob-stream/badge.png - -[depstat-url]: https://david-dm.org/wearefractal/glob-stream -[depstat-image]: https://david-dm.org/wearefractal/glob-stream.png - -[david-url]: https://david-dm.org/wearefractal/glob-stream -[david-image]: https://david-dm.org/wearefractal/glob-stream.png?theme=shields.io diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/index.js deleted file mode 100644 index 0960c7c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/index.js +++ /dev/null @@ -1,117 +0,0 @@ -/*jslint node: true */ - -'use strict'; - -var through2 = require('through2'); -var Combine = require('ordered-read-streams'); -var unique = require('unique-stream'); - -var glob = require('glob'); -var minimatch = require('minimatch'); -var glob2base = require('glob2base'); -var path = require('path'); - -var gs = { - // creates a stream for a single glob or filter - createStream: function(ourGlob, negatives, opt) { - if (!negatives) negatives = []; - if (!opt) opt = {}; - if (typeof opt.cwd !== 'string') opt.cwd = process.cwd(); - if (typeof opt.dot !== 'boolean') opt.dot = false; - if (typeof opt.silent !== 'boolean') opt.silent = true; - if (typeof opt.nonull !== 'boolean') opt.nonull = false; - if (typeof opt.cwdbase !== 'boolean') opt.cwdbase = false; - if (opt.cwdbase) opt.base = opt.cwd; - - // remove path relativity to make globs make sense - ourGlob = unrelative(opt.cwd, ourGlob); - negatives = negatives.map(unrelative.bind(null, opt.cwd)); - - // create globbing stuff - var globber = new glob.Glob(ourGlob, opt); - - // extract base path from glob - var basePath = opt.base ? opt.base : glob2base(globber); - - // create stream and map events from globber to it - var stream = through2.obj(negatives.length ? filterNegatives : undefined); - - globber.on('error', stream.emit.bind(stream, 'error')); - globber.on('end', function(/* some args here so can't use bind directly */){ - stream.end(); - }); - globber.on('match', function(filename) { - stream.write({ - cwd: opt.cwd, - base: basePath, - path: path.resolve(opt.cwd, filename) - }); - }); - - return stream; - - function filterNegatives(filename, enc, cb) { - var matcha = isMatch.bind(null, filename, opt); - if (negatives.every(matcha)) { - cb(null, filename); // pass - } else { - cb(); // ignore - } - } - }, - - // creates a stream for multiple globs or filters - create: function(globs, opt) { - if (!opt) opt = {}; - - // only one glob no need to aggregate - if (!Array.isArray(globs)) return gs.createStream(globs, null, opt); - - var positives = globs.filter(isPositive); - var negatives = globs.filter(isNegative); - - if (positives.length === 0) throw new Error("Missing positive glob"); - - // only one positive glob no need to aggregate - if (positives.length === 1) return gs.createStream(positives[0], negatives, opt); - - // create all individual streams - var streams = positives.map(function(glob){ - return gs.createStream(glob, negatives, opt); - }); - - // then just pipe them to a single unique stream and return it - var aggregate = new Combine(streams); - var uniqueStream = unique('path'); - - return aggregate.pipe(uniqueStream); - } -}; - -function isMatch(file, opt, pattern) { - if (typeof pattern === 'string') return minimatch(file.path, pattern, opt); - if (pattern instanceof RegExp) return pattern.test(file.path); - return true; // unknown glob type? -} - -function isNegative(pattern) { - if (typeof pattern !== 'string') return true; - if (pattern[0] === '!') return true; - return false; -} - -function isPositive(pattern) { - return !isNegative(pattern); -} - -function unrelative(cwd, glob) { - var mod = ''; - if (glob[0] === '!') { - mod = glob[0]; - glob = glob.slice(1); - } - return mod+path.resolve(cwd, glob); -} - - -module.exports = gs; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/README.md deleted file mode 100644 index d458bc2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/browser.js deleted file mode 100644 index 7d05159..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/browser.js +++ /dev/null @@ -1,1159 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - -},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ -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 []; - - var expansions = expand(escapeBraces(str)); - return expansions.filter(identity).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) { - 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 = /^(.*,)+(.+)?$/.test(m.body); - 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]).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post) - : ['']; - 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) - : ['']; - - 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) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - expansions.push([pre, N[j], post[k]].join('')) - } - } - - return expansions; -} - - -},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } -} - -},{}],4:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/minimatch.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/minimatch.js deleted file mode 100644 index ec4c05c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,912 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/package.json deleted file mode 100644 index 99183e4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/minimatch/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "minimatch@^2.0.1", - "scope": null, - "escapedName": "minimatch", - "name": "minimatch", - "rawSpec": "^2.0.1", - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream" - ] - ], - "_from": "minimatch@>=2.0.1 <3.0.0", - "_id": "minimatch@2.0.10", - "_inCache": true, - "_location": "/glob-stream/minimatch", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "_npmVersion": "3.1.0", - "_phantomChildren": {}, - "_requested": { - "raw": "minimatch@^2.0.1", - "scope": null, - "escapedName": "minimatch", - "name": "minimatch", - "rawSpec": "^2.0.1", - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "_shrinkwrap": null, - "_spec": "minimatch@^2.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", - "description": "a glob matcher in javascript", - "devDependencies": { - "browserify": "^9.0.3", - "standard": "^3.7.2", - "tap": "^1.2.0" - }, - "directories": {}, - "dist": { - "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js", - "browser.js" - ], - "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "minimatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare", - "test": "tap test/*.js" - }, - "version": "2.0.10" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e80..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 6307220..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/package.json deleted file mode 100644 index 1ef8507..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": ">=1.0.33-1 <1.1.0-0", - "spec": ">=1.0.33-1 <1.1.0-0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2" - ] - ], - "_from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "_id": "readable-stream@1.0.34", - "_inCache": true, - "_location": "/glob-stream/readable-stream", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": ">=1.0.33-1 <1.1.0-0", - "spec": ">=1.0.33-1 <1.1.0-0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_shrinkwrap": null, - "_spec": "readable-stream@>=1.0.33-1 <1.1.0-0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "homepage": "https://github.com/isaacs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "1.0.34" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/.npmignore deleted file mode 100644 index 1e1dcab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.jshintrc -.travis.yml \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/README.md deleted file mode 100644 index 11259a5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - function (chunk, enc, cb) { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/package.json deleted file mode 100644 index e39c079..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "through2@^0.6.1", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^0.6.1", - "spec": ">=0.6.1 <0.7.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream" - ] - ], - "_from": "through2@>=0.6.1 <0.7.0", - "_id": "through2@0.6.5", - "_inCache": true, - "_location": "/glob-stream/through2", - "_npmUser": { - "name": "bryce", - "email": "bryce@ravenwall.com" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "raw": "through2@^0.6.1", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^0.6.1", - "spec": ">=0.6.1 <0.7.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "_shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", - "_shrinkwrap": null, - "_spec": "through2@^0.6.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "dependencies": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - }, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": ">=0.9.0 <0.10.0-0", - "stream-spigot": ">=3.0.4 <3.1.0-0", - "tape": ">=2.14.0 <2.15.0-0" - }, - "directories": {}, - "dist": { - "shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", - "tarball": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - }, - "gitHead": "ba4a87875f2c82323c10023e36f4ae4b386c1bf8", - "homepage": "https://github.com/rvagg/through2", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "name": "through2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "version": "0.6.5" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/through2.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/through2.js deleted file mode 100644 index 5b7a880..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/package.json deleted file mode 100644 index 111c317..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob-stream@^3.1.5", - "scope": null, - "escapedName": "glob-stream", - "name": "glob-stream", - "rawSpec": "^3.1.5", - "spec": ">=3.1.5 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "glob-stream@>=3.1.5 <4.0.0", - "_id": "glob-stream@3.1.18", - "_inCache": true, - "_location": "/glob-stream", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "2.1.6", - "_phantomChildren": { - "brace-expansion": "1.1.8", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31", - "xtend": "4.0.1" - }, - "_requested": { - "raw": "glob-stream@^3.1.5", - "scope": null, - "escapedName": "glob-stream", - "name": "glob-stream", - "rawSpec": "^3.1.5", - "spec": ">=3.1.5 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "_shasum": "9170a5f12b790306fdfe598f313f8f7954fd143b", - "_shrinkwrap": null, - "_spec": "glob-stream@^3.1.5", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/glob-stream/issues" - }, - "dependencies": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" - }, - "description": "File system globs as a stream", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.0", - "istanbul-coveralls": "^1.0.1", - "jshint": "^2.5.10", - "mocha": "^2.0.0", - "mocha-lcov-reporter": "0.0.1", - "rimraf": "^2.2.5", - "should": "^4.3.0" - }, - "directories": {}, - "dist": { - "shasum": "9170a5f12b790306fdfe598f313f8f7954fd143b", - "tarball": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz" - }, - "engines": { - "node": ">= 0.9" - }, - "files": [ - "index.js" - ], - "gitHead": "472b98e7a0a747a3c72454337def65cebc4fb78e", - "homepage": "http://github.com/wearefractal/glob-stream", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/glob-stream/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } - ], - "name": "glob-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/glob-stream.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && istanbul-coveralls", - "test": "mocha --reporter spec && jshint" - }, - "version": "3.1.18" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.npmignore deleted file mode 100644 index b5ef13a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.travis.yml deleted file mode 100644 index 33ad9f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/LICENSE deleted file mode 100755 index 4f482f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/README.md deleted file mode 100644 index 129311e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# glob-watcher [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] - -## Information - - - - - - - - - - - - - -
Packageglob-watcher
DescriptionWatch globs
Node Version>= 0.9
- -## Usage - -```javascript -var watch = require('glob-watcher'); - -// callback interface -watch(["./*.js", "!./something.js"], function(evt){ - // evt has what file changed and all that jazz -}); - -// EE interface -var watcher = watch(["./*.js", "!./something.js"]); -watcher.on('change', function(evt) { - // evt has what file changed and all that jazz -}); - -// add files after it has been created -watcher.add("./somefolder/somefile.js"); -``` - - -[npm-url]: https://npmjs.org/package/glob-watcher -[npm-image]: https://badge.fury.io/js/glob-watcher.png - -[travis-url]: https://travis-ci.org/wearefractal/glob-watcher -[travis-image]: https://travis-ci.org/wearefractal/glob-watcher.png?branch=master - -[coveralls-url]: https://coveralls.io/r/wearefractal/glob-watcher -[coveralls-image]: https://coveralls.io/repos/wearefractal/glob-watcher/badge.png - -[depstat-url]: https://david-dm.org/wearefractal/glob-watcher -[depstat-image]: https://david-dm.org/wearefractal/glob-watcher.png - -[david-url]: https://david-dm.org/wearefractal/glob-watcher -[david-image]: https://david-dm.org/wearefractal/glob-watcher.png?theme=shields.io diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/index.js deleted file mode 100644 index 907defd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var gaze = require('gaze'); -var EventEmitter = require('events').EventEmitter; - -module.exports = function(glob, opts, cb) { - var out = new EventEmitter(); - - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - - var watcher = gaze(glob, opts, function(err, rwatcher){ - if (err) out.emit('error', err); - rwatcher.on('all', function(evt, path, old){ - var outEvt = {type: evt, path: path}; - if(old) outEvt.old = old; - out.emit('change', outEvt); - if(cb) cb(outEvt); - }); - }); - - watcher.on('end', out.emit.bind(out, 'end')); - watcher.on('error', out.emit.bind(out, 'error')); - watcher.on('ready', out.emit.bind(out, 'ready')); - watcher.on('nomatch', out.emit.bind(out, 'nomatch')); - - out.end = function(){ - return watcher.close(); - }; - out.add = function(){ - return watcher.add.apply(watcher, arguments); - }; - out.remove = function(){ - return watcher.remove(); - }; - out._watcher = watcher; - - return out; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/package.json deleted file mode 100644 index ee285dd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob-watcher@^0.0.6", - "scope": null, - "escapedName": "glob-watcher", - "name": "glob-watcher", - "rawSpec": "^0.0.6", - "spec": ">=0.0.6 <0.0.7", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "glob-watcher@>=0.0.6 <0.0.7", - "_id": "glob-watcher@0.0.6", - "_inCache": true, - "_location": "/glob-watcher", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "1.4.7", - "_phantomChildren": {}, - "_requested": { - "raw": "glob-watcher@^0.0.6", - "scope": null, - "escapedName": "glob-watcher", - "name": "glob-watcher", - "rawSpec": "^0.0.6", - "spec": ">=0.0.6 <0.0.7", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "_shasum": "b95b4a8df74b39c83298b0c05c978b4d9a3b710b", - "_shrinkwrap": null, - "_spec": "glob-watcher@^0.0.6", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/glob-watcher/issues" - }, - "dependencies": { - "gaze": "^0.5.1" - }, - "description": "Watch globs", - "devDependencies": { - "coveralls": "^2.6.1", - "istanbul": "^0.2.3", - "jshint": "^2.4.1", - "mkdirp": "^0.3.5", - "mocha": "^1.17.0", - "mocha-lcov-reporter": "0.0.1", - "rimraf": "^2.2.5", - "should": "^2.1.1" - }, - "directories": {}, - "dist": { - "shasum": "b95b4a8df74b39c83298b0c05c978b4d9a3b710b", - "tarball": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz" - }, - "engines": { - "node": ">= 0.9" - }, - "homepage": "http://github.com/wearefractal/glob-watcher", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/glob-watcher/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } - ], - "name": "glob-watcher", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/glob-watcher.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "test": "mocha --reporter spec && jshint" - }, - "version": "0.0.6" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/fixtures/test.coffee b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/fixtures/test.coffee deleted file mode 100644 index 4be3c45..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/fixtures/test.coffee +++ /dev/null @@ -1 +0,0 @@ -test test \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/main.js deleted file mode 100644 index 2903e8f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-watcher/test/main.js +++ /dev/null @@ -1,87 +0,0 @@ -var watch = require('../'); -var should = require('should'); -var path = require('path'); -var fs = require('fs'); -var rimraf = require('rimraf'); -var mkdirp = require('mkdirp'); - -require('mocha'); - -describe('glob-watcher', function() { - it('should return a valid file struct via EE', function(done) { - var expectedName = path.join(__dirname, "./fixtures/stuff/temp.coffee"); - var fname = path.join(__dirname, "./fixtures/**/temp.coffee"); - mkdirp.sync(path.dirname(expectedName)); - fs.writeFileSync(expectedName, "testing"); - - var watcher = watch(fname); - watcher.on('change', function(evt) { - should.exist(evt); - should.exist(evt.path); - should.exist(evt.type); - evt.type.should.equal('changed'); - evt.path.should.equal(expectedName); - watcher.end(); - }); - watcher.on('end', function(){ - rimraf.sync(expectedName); - done(); - }); - setTimeout(function(){ - fs.writeFileSync(expectedName, "test test"); - }, 125); - }); - - it('should emit nomatch via EE', function(done) { - var fname = path.join(__dirname, "./doesnt_exist_lol/temp.coffee"); - - var watcher = watch(fname); - watcher.on('nomatch', function() { - done(); - }); - }); - - it('should return a valid file struct via callback', function(done) { - var expectedName = path.join(__dirname, "./fixtures/stuff/test.coffee"); - var fname = path.join(__dirname, "./fixtures/**/test.coffee"); - mkdirp.sync(path.dirname(expectedName)); - fs.writeFileSync(expectedName, "testing"); - - var watcher = watch(fname, function(evt) { - should.exist(evt); - should.exist(evt.path); - should.exist(evt.type); - evt.type.should.equal('changed'); - evt.path.should.equal(expectedName); - watcher.end(); - }); - - watcher.on('end', function(){ - rimraf.sync(expectedName); - done(); - }); - setTimeout(function(){ - fs.writeFileSync(expectedName, "test test"); - }, 200); - }); - - it('should not return a non-matching file struct via callback', function(done) { - var expectedName = path.join(__dirname, "./fixtures/test123.coffee"); - var fname = path.join(__dirname, "./fixtures/**/test.coffee"); - mkdirp.sync(path.dirname(expectedName)); - fs.writeFileSync(expectedName, "testing"); - - var watcher = watch(fname, function(evt) { - throw new Error("Should not have been called! "+evt.path); - }); - - setTimeout(function(){ - fs.writeFileSync(expectedName, "test test"); - }, 200); - - setTimeout(function(){ - rimraf.sync(expectedName); - done(); - }, 1500); - }); -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/README.md deleted file mode 100644 index 258257e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/README.md +++ /dev/null @@ -1,369 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) - -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Negation - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird, and for the time being, this should be -avoided. The behavior will change or be deprecated in version 5. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'DIR'` - Path exists, and is not a directory - * `'FILE'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nonegate` Suppress `negate` behavior. (See below.) -* `nocomment` Suppress `comment` behavior. (See below.) -* `nonull` Return the pattern when no matches are found. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of patterns to exclude matches. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/common.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/common.js deleted file mode 100644 index cd7c824..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/common.js +++ /dev/null @@ -1,237 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.isAbsolute = process.platform === "win32" ? absWin : absUnix -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var Minimatch = minimatch.Minimatch - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - var result = splitDeviceRe.exec(p) - var device = result[1] || '' - var isUnc = device && device.charAt(1) !== ':' - var isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { nonegate: true }) - } - - return { - matcher: new Minimatch(pattern, { nonegate: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = options.cwd - self.changedCwd = path.resolve(options.cwd) !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - self.nomount = !!options.nomount - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - return !(/\/$/.test(e)) - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (exports.isAbsolute(f)) { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else if (self.realpath) { - abs = path.resolve(f) - } - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/glob.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/glob.js deleted file mode 100644 index eac0693..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/glob.js +++ /dev/null @@ -1,740 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -glob.hasMagic = function (pattern, options_) { - var options = util._extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - var n = this.minimatch.set.length - this._processing = 0 - this.matches = new Array(n) - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - - function done () { - --self._processing - if (self._processing <= 0) - self._finish() - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (this.matches[index][e]) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = this._makeAbs(e) - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - if (this.mark) - e = this._mark(e) - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er) - return cb() - - var isSym = lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) return this.emit('error', er) - if (!this.silent) console.error('glob error', er) - break - } - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && !stat.isDirectory()) - return cb(null, false, stat) - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return cb() - - return cb(null, c, stat) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index d458bc2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/browser.js deleted file mode 100644 index 7d05159..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/browser.js +++ /dev/null @@ -1,1159 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - -},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ -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 []; - - var expansions = expand(escapeBraces(str)); - return expansions.filter(identity).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) { - 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 = /^(.*,)+(.+)?$/.test(m.body); - 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]).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post) - : ['']; - 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) - : ['']; - - 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) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - expansions.push([pre, N[j], post[k]].join('')) - } - } - - return expansions; -} - - -},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } -} - -},{}],4:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (Array.isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/minimatch.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index ec4c05c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,912 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index ffdaa42..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "minimatch@^2.0.1", - "scope": null, - "escapedName": "minimatch", - "name": "minimatch", - "rawSpec": "^2.0.1", - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob" - ] - ], - "_from": "minimatch@>=2.0.1 <3.0.0", - "_id": "minimatch@2.0.10", - "_inCache": true, - "_location": "/glob/minimatch", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "_npmVersion": "3.1.0", - "_phantomChildren": {}, - "_requested": { - "raw": "minimatch@^2.0.1", - "scope": null, - "escapedName": "minimatch", - "name": "minimatch", - "rawSpec": "^2.0.1", - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "_shrinkwrap": null, - "_spec": "minimatch@^2.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", - "description": "a glob matcher in javascript", - "devDependencies": { - "browserify": "^9.0.3", - "standard": "^3.7.2", - "tap": "^1.2.0" - }, - "directories": {}, - "dist": { - "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", - "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js", - "browser.js" - ], - "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "minimatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare", - "test": "tap test/*.js" - }, - "version": "2.0.10" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/package.json deleted file mode 100644 index 7bc7842..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob@^4.3.1", - "scope": null, - "escapedName": "glob", - "name": "glob", - "rawSpec": "^4.3.1", - "spec": ">=4.3.1 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream" - ] - ], - "_from": "glob@>=4.3.1 <5.0.0", - "_id": "glob@4.5.3", - "_inCache": true, - "_location": "/glob", - "_nodeVersion": "1.4.2", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "2.7.1", - "_phantomChildren": { - "brace-expansion": "1.1.8" - }, - "_requested": { - "raw": "glob@^4.3.1", - "scope": null, - "escapedName": "glob", - "name": "glob", - "rawSpec": "^4.3.1", - "spec": ">=4.3.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "_shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "_shrinkwrap": null, - "_spec": "glob@^4.3.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - }, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^0.5.0", - "tick": "0.0.6" - }, - "directories": {}, - "dist": { - "shasum": "c6cb73d3226c1efef04de3c56d012f03377ee15f", - "tarball": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "gitHead": "a4e461ab59a837eee80a4d8dbdbf5ae1054a646f", - "homepage": "https://github.com/isaacs/node-glob", - "license": "ISC", - "main": "glob.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "bash benchclean.sh", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "npm run profclean && tap test/*.js", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "4.5.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/sync.js deleted file mode 100644 index f4f5e36..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob/sync.js +++ /dev/null @@ -1,457 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var isAbsolute = common.isAbsolute -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = fs.realpathSync(p, this.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this.matches[index][e] = true - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - var abs = this._makeAbs(e) - if (this.mark) - e = this._mark(e) - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[this._makeAbs(e)] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - // lstat failed, doesn't exist - return null - } - - var isSym = lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) throw er - if (!this.silent) console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this.matches[index][prefix] = true -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - return false - } - - if (lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/LICENSE deleted file mode 100755 index 7cbe012..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/README.md deleted file mode 100644 index c14fa38..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# glob2base [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] - - -## Information - - - - - - - - - - - - - -
Packageglob2base
DescriptionExtracts a base path from a node-glob instance
Node Version>= 0.10
- -## Usage - -The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens. - -```javascript -var glob2base = require('glob2base'); -var glob = require('glob'); - -// js/ -glob2base(new glob.Glob('js/**/*.js')); - -// css/test/ -glob2base(new glob.Glob('css/test/{a,b}/*.css')); - -// pages/whatever/ -glob2base(new glob.Glob('pages/whatever/index.html')); -``` - -## Like what we do? - -[gittip-url]: https://www.gittip.com/WeAreFractal/ -[gittip-image]: http://img.shields.io/gittip/WeAreFractal.svg - -[downloads-image]: http://img.shields.io/npm/dm/glob2base.svg -[npm-url]: https://npmjs.org/package/glob2base -[npm-image]: http://img.shields.io/npm/v/glob2base.svg - -[travis-url]: https://travis-ci.org/wearefractal/glob2base -[travis-image]: http://img.shields.io/travis/wearefractal/glob2base.svg - -[coveralls-url]: https://coveralls.io/r/wearefractal/glob2base -[coveralls-image]: http://img.shields.io/coveralls/wearefractal/glob2base/master.svg diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/index.js deleted file mode 100644 index 307e3f2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -var path = require('path'); -var findIndex = require('find-index'); - -var flattenGlob = function(arr){ - var out = []; - var flat = true; - for(var i = 0; i < arr.length; i++) { - if (typeof arr[i] !== 'string') { - flat = false; - break; - } - out.push(arr[i]); - } - - // last one is a file or specific dir - // so we pop it off - if (flat) { - out.pop(); - } - return out; -}; - -var flattenExpansion = function(set) { - var first = set[0]; - var toCompare = set.slice(1); - - // find index where the diff is - var idx = findIndex(first, function(v, idx){ - if (typeof v !== 'string') { - return true; - } - - var matched = toCompare.every(function(arr){ - return v === arr[idx]; - }); - - return !matched; - }); - - return first.slice(0, idx); -}; - -var setToBase = function(set) { - // normal something/*.js - if (set.length <= 1) { - return flattenGlob(set[0]); - } - // has expansion - return flattenExpansion(set); -}; - -module.exports = function(glob) { - var set = glob.minimatch.set; - var baseParts = setToBase(set); - var basePath = path.normalize(baseParts.join(path.sep))+path.sep; - return basePath; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/package.json deleted file mode 100644 index 28c691a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob2base/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob2base@^0.0.12", - "scope": null, - "escapedName": "glob2base", - "name": "glob2base", - "rawSpec": "^0.0.12", - "spec": ">=0.0.12 <0.0.13", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream" - ] - ], - "_from": "glob2base@>=0.0.12 <0.0.13", - "_id": "glob2base@0.0.12", - "_inCache": true, - "_location": "/glob2base", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "2.1.6", - "_phantomChildren": {}, - "_requested": { - "raw": "glob2base@^0.0.12", - "scope": null, - "escapedName": "glob2base", - "name": "glob2base", - "rawSpec": "^0.0.12", - "spec": ">=0.0.12 <0.0.13", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "_shasum": "9d419b3e28f12e83a362164a277055922c9c0d56", - "_shrinkwrap": null, - "_spec": "glob2base@^0.0.12", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/glob2base/issues" - }, - "dependencies": { - "find-index": "^0.1.1" - }, - "description": "Extracts a base path from a node-glob instance", - "devDependencies": { - "coveralls": "^2.6.1", - "glob": "^4.0.0", - "istanbul": "^0.3.2", - "jshint": "^2.4.1", - "jshint-stylish": "^1.0.0", - "mocha": "^2.0.0", - "mocha-lcov-reporter": "^0.0.1", - "should": "^4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "9d419b3e28f12e83a362164a277055922c9c0d56", - "tarball": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "d3fadacea415f4676fd431c90cd2205a2f1e6b26", - "homepage": "http://github.com/wearefractal/glob2base", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/glob2base/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } - ], - "name": "glob2base", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/glob2base.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "lint": "jshint index.js --reporter node_modules/jshint-stylish/stylish.js --exclude node_modules", - "test": "npm run-script lint && mocha --reporter spec" - }, - "version": "0.0.12" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/LICENSE deleted file mode 100644 index 1e49edf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/README.md deleted file mode 100644 index 4c8280e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# global-modules [![NPM version](https://img.shields.io/npm/v/global-modules.svg?style=flat)](https://www.npmjs.com/package/global-modules) [![NPM downloads](https://img.shields.io/npm/dm/global-modules.svg?style=flat)](https://npmjs.org/package/global-modules) [![Build Status](https://img.shields.io/travis/jonschlinkert/global-modules.svg?style=flat)](https://travis-ci.org/jonschlinkert/global-modules) - -The directory used by npm for globally installed npm modules. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save global-modules -``` - -## Usage - -```js -var dir = require('global-modules'); -//=> '/usr/local/lib/node_modules' (depends on OS) -``` - -## About - -### Related projects - -* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") -* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's global .gitconfig.") -* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.") -* [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique "npm" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths "Returns an array of unique "npm" directories based on the user's platform and environment.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/global-modules/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 26, 2016._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/index.js deleted file mode 100644 index 5fbab57..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * global-modules - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -var path = require('path'); -var prefix = require('global-prefix'); -var isWindows = require('is-windows'); - -if (isWindows()) { - module.exports = path.resolve(prefix, 'node_modules'); -} else { - module.exports = path.resolve(prefix, 'lib/node_modules'); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/package.json deleted file mode 100644 index bff19e2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "global-modules@^0.2.3", - "scope": null, - "escapedName": "global-modules", - "name": "global-modules", - "rawSpec": "^0.2.3", - "spec": ">=0.2.3 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir" - ] - ], - "_from": "global-modules@>=0.2.3 <0.3.0", - "_id": "global-modules@0.2.3", - "_inCache": true, - "_location": "/global-modules", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/global-modules-0.2.3.tgz_1469511881835_0.8791879329364747" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "global-modules@^0.2.3", - "scope": null, - "escapedName": "global-modules", - "name": "global-modules", - "rawSpec": "^0.2.3", - "spec": ">=0.2.3 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/resolve-dir" - ], - "_resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "_shasum": "ea5a3bed42c6d6ce995a4f8a1269b5dae223828d", - "_shrinkwrap": null, - "_spec": "global-modules@^0.2.3", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/global-modules/issues" - }, - "dependencies": { - "global-prefix": "^0.1.4", - "is-windows": "^0.2.0" - }, - "description": "The directory used by npm for globally installed npm modules.", - "devDependencies": { - "fs-exists-sync": "^0.1.0", - "gulp-format-md": "^0.1.9", - "mocha": "^2.5.3" - }, - "directories": {}, - "dist": { - "shasum": "ea5a3bed42c6d6ce995a4f8a1269b5dae223828d", - "tarball": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "49887f70849463067e3c771473d8c16f5cfb76cc", - "homepage": "https://github.com/jonschlinkert/global-modules", - "keywords": [ - "directory", - "dirname", - "global", - "module", - "package", - "path", - "prefix", - "resolve" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "global-modules", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/global-modules.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "global-prefix", - "git-config-path", - "npm-paths", - "contains-path" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.2.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/LICENSE deleted file mode 100644 index 1e49edf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/README.md deleted file mode 100644 index 6a227e2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# global-prefix [![NPM version](https://img.shields.io/npm/v/global-prefix.svg?style=flat)](https://www.npmjs.com/package/global-prefix) [![NPM downloads](https://img.shields.io/npm/dm/global-prefix.svg?style=flat)](https://npmjs.org/package/global-prefix) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/global-prefix.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/global-prefix) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/global-prefix.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/global-prefix) - -> Get the npm global path prefix. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save global-prefix -``` - -This is based on the code used by npm internally to resolve the global prefix. - -## Usage - -```js -var prefix = require('global-prefix'); -//=> '/usr/local' -``` - -## About - -### Related projects - -* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.") -* [global-paths](https://www.npmjs.com/package/global-paths): Returns an array of unique "global" directories based on the user's platform and environment. The… [more](https://github.com/jonschlinkert/global-paths) | [homepage](https://github.com/jonschlinkert/global-paths "Returns an array of unique "global" directories based on the user's platform and environment. The resulting paths can be used for doing lookups for generators or other globally installed npm packages. Node.js / JavaScript.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 16 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [rmbaad](https://github.com/rmbaad) | -| 1 | [jason-chang](https://github.com/jason-chang) | -| 1 | [jorrit](https://github.com/jorrit) | -| 1 | [mathiasvr](https://github.com/mathiasvr) | -| 1 | [tunnckoCore](https://github.com/tunnckoCore) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 30, 2016._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/index.js deleted file mode 100644 index fa19422..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/index.js +++ /dev/null @@ -1,84 +0,0 @@ -/*! - * global-prefix - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -var homedir = require('homedir-polyfill'); -var path = require('path'); -var ini = require('ini'); -var fs = require('fs') - -var prefix; - -if (process.env.PREFIX) { - prefix = process.env.PREFIX; -} else { - // Start by checking if the global prefix is set by the user - var home = homedir(); - if (home) { - // homedir() returns undefined if $HOME not set; path.resolve requires strings - var userConfig = path.resolve(home, '.npmrc'); - prefix = readPrefix(userConfig); - } - - if (!prefix) { - // Otherwise find the path of npm - var npm = npmPath(); - if (npm) { - // Check the built-in npm config file - var builtinConfig = path.resolve(npm, '..', '..', 'npmrc'); - prefix = readPrefix(builtinConfig); - - if (prefix) { - // Now the global npm config can also be checked. - var globalConfig = path.resolve(prefix, 'etc', 'npmrc'); - prefix = readPrefix(globalConfig) || prefix; - } - } - - if (!prefix) fallback(); - } -} - -function fallback() { - var isWindows = require('is-windows'); - if (isWindows()) { - // c:\node\node.exe --> prefix=c:\node\ - prefix = process.env.APPDATA - ? path.join(process.env.APPDATA, 'npm') - : path.dirname(process.execPath); - } else { - // /usr/local/bin/node --> prefix=/usr/local - prefix = path.dirname(path.dirname(process.execPath)); - - // destdir only is respected on Unix - if (process.env.DESTDIR) { - prefix = path.join(process.env.DESTDIR, prefix); - } - } -} - -function npmPath() { - try { - return fs.realpathSync(require('which').sync('npm')); - } catch (ex) { - } - return false; -} - -function readPrefix(configPath) { - try { - var data = fs.readFileSync(configPath, 'utf-8'); - var config = ini.parse(data); - if (config.prefix) return config.prefix; - } catch (ex) { - // file not found - } - return false; -} - -module.exports = prefix; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/package.json deleted file mode 100644 index 89be0a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix/package.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "global-prefix@^0.1.4", - "scope": null, - "escapedName": "global-prefix", - "name": "global-prefix", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules" - ] - ], - "_from": "global-prefix@>=0.1.4 <0.2.0", - "_id": "global-prefix@0.1.5", - "_inCache": true, - "_location": "/global-prefix", - "_nodeVersion": "5.1.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/global-prefix-0.1.5.tgz_1480528187282_0.7493393055628985" - }, - "_npmUser": { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - "_npmVersion": "3.7.5", - "_phantomChildren": {}, - "_requested": { - "raw": "global-prefix@^0.1.4", - "scope": null, - "escapedName": "global-prefix", - "name": "global-prefix", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/global-modules" - ], - "_resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "_shasum": "8d3bc6b8da3ca8112a160d8d496ff0462bfef78f", - "_shrinkwrap": null, - "_spec": "global-prefix@^0.1.4", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-modules", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/global-prefix/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Alexandr Bogachev", - "email": "kuksikus@gmail.com", - "url": "https://github.com/rmbaad" - }, - { - "name": "JasonChang", - "email": "chaoyue.chang@qq.com", - "url": "https://packagist.org/packages/jason-chang" - }, - { - "name": "Jorrit Schippers", - "url": "https://www.ncode.nl" - }, - { - "name": "Mathias Rasmussen", - "url": "https://github.com/mathiasvr" - }, - { - "name": "Charlike Mike Reagent", - "url": "http://i.am.charlike.online" - } - ], - "dependencies": { - "homedir-polyfill": "^1.0.0", - "ini": "^1.3.4", - "is-windows": "^0.2.0", - "which": "^1.2.12" - }, - "description": "Get the npm global path prefix.", - "devDependencies": { - "fs-exists-sync": "^0.1.0", - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "directories": {}, - "dist": { - "shasum": "8d3bc6b8da3ca8112a160d8d496ff0462bfef78f", - "tarball": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "eef31e4309f28a570ac022428e3b8ddc0b25a44b", - "homepage": "https://github.com/jonschlinkert/global-prefix", - "keywords": [ - "global", - "module", - "modules", - "npm", - "path", - "prefix", - "resolve" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "global-prefix", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/global-prefix.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "global-modules", - "global-paths" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.5" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/globals.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/globals.json deleted file mode 100644 index 99ae89f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/globals.json +++ /dev/null @@ -1,1294 +0,0 @@ -{ - "builtin": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "System": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "es5": { - "Array": false, - "Boolean": false, - "constructor": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "propertyIsEnumerable": false, - "RangeError": false, - "ReferenceError": false, - "RegExp": false, - "String": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false - }, - "es6": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "System": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "browser": { - "addEventListener": false, - "alert": false, - "AnalyserNode": false, - "Animation": false, - "AnimationEffectReadOnly": false, - "AnimationEffectTiming": false, - "AnimationEffectTimingReadOnly": false, - "AnimationEvent": false, - "AnimationPlaybackEvent": false, - "AnimationTimeline": false, - "applicationCache": false, - "ApplicationCache": false, - "ApplicationCacheErrorEvent": false, - "atob": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioDestinationNode": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioProcessingEvent": false, - "AutocompleteErrorEvent": false, - "BarProp": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "blur": false, - "btoa": false, - "Cache": false, - "caches": false, - "CacheStorage": false, - "cancelAnimationFrame": false, - "cancelIdleCallback": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "CDATASection": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "CharacterData": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "ClientRect": false, - "ClientRectList": false, - "ClipboardEvent": false, - "close": false, - "closed": false, - "CloseEvent": false, - "Comment": false, - "CompositionEvent": false, - "confirm": false, - "console": false, - "ConvolverNode": false, - "createImageBitmap": false, - "Credential": false, - "CredentialsContainer": false, - "crypto": false, - "Crypto": false, - "CryptoKey": false, - "CSS": false, - "CSSAnimation": false, - "CSSFontFaceRule": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSMediaRule": false, - "CSSPageRule": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSSupportsRule": false, - "CSSTransition": false, - "CSSUnknownRule": false, - "CSSViewportRule": false, - "customElements": false, - "CustomEvent": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "Debug": false, - "defaultStatus": false, - "defaultstatus": false, - "DelayNode": false, - "DeviceMotionEvent": false, - "DeviceOrientationEvent": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "Document": false, - "DocumentFragment": false, - "DocumentTimeline": false, - "DocumentType": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMParser": false, - "DOMSettableTokenList": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "Element": false, - "ElementTimeControl": false, - "ErrorEvent": false, - "event": false, - "Event": false, - "EventSource": false, - "EventTarget": false, - "external": false, - "FederatedCredential": false, - "fetch": false, - "File": false, - "FileError": false, - "FileList": false, - "FileReader": false, - "find": false, - "focus": false, - "FocusEvent": false, - "FontFace": false, - "FormData": false, - "frameElement": false, - "frames": false, - "GainNode": false, - "Gamepad": false, - "GamepadButton": false, - "GamepadEvent": false, - "getComputedStyle": false, - "getSelection": false, - "HashChangeEvent": false, - "Headers": false, - "history": false, - "History": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAppletElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBaseElement": false, - "HTMLBlockquoteElement": false, - "HTMLBodyElement": false, - "HTMLBRElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLContentElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDListElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHRElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLIsIndexElement": false, - "HTMLKeygenElement": false, - "HTMLLabelElement": false, - "HTMLLayerElement": false, - "HTMLLegendElement": false, - "HTMLLIElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLObjectElement": false, - "HTMLOListElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLShadowElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBEnvironment": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "Image": false, - "ImageBitmap": false, - "ImageData": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "InputEvent": false, - "InputMethodContext": false, - "IntersectionObserver": false, - "IntersectionObserverEntry": false, - "Intl": false, - "KeyboardEvent": false, - "KeyframeEffect": false, - "KeyframeEffectReadOnly": false, - "length": false, - "localStorage": false, - "location": false, - "Location": false, - "locationbar": false, - "matchMedia": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyError": false, - "MediaKeyEvent": false, - "MediaKeyMessageEvent": false, - "MediaKeys": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaList": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaSource": false, - "MediaRecorder": false, - "MediaStream": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "menubar": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MimeType": false, - "MimeTypeArray": false, - "MouseEvent": false, - "moveBy": false, - "moveTo": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "name": false, - "NamedNodeMap": false, - "navigator": false, - "Navigator": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "Notification": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "offscreenBuffering": false, - "onbeforeunload": true, - "onblur": true, - "onerror": true, - "onfocus": true, - "onload": true, - "onresize": true, - "onunload": true, - "open": false, - "openDatabase": false, - "opener": false, - "opera": false, - "Option": false, - "OscillatorNode": false, - "outerHeight": false, - "outerWidth": false, - "PageTransitionEvent": false, - "pageXOffset": false, - "pageYOffset": false, - "parent": false, - "PasswordCredential": false, - "Path2D": false, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "PeriodicWave": false, - "Permissions": false, - "PermissionStatus": false, - "personalbar": false, - "Plugin": false, - "PluginArray": false, - "PopStateEvent": false, - "postMessage": false, - "print": false, - "ProcessingInstruction": false, - "ProgressEvent": false, - "PromiseRejectionEvent": false, - "prompt": false, - "PushManager": false, - "PushSubscription": false, - "RadioNodeList": false, - "Range": false, - "ReadableByteStream": false, - "ReadableStream": false, - "removeEventListener": false, - "Request": false, - "requestAnimationFrame": false, - "requestIdleCallback": false, - "resizeBy": false, - "resizeTo": false, - "Response": false, - "RTCIceCandidate": false, - "RTCSessionDescription": false, - "RTCPeerConnection": false, - "screen": false, - "Screen": false, - "screenLeft": false, - "ScreenOrientation": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "ScriptProcessorNode": false, - "scroll": false, - "scrollbars": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "ShadowRoot": false, - "SharedKeyframeList": false, - "SharedWorker": false, - "showModalDialog": false, - "SiteBoundCredential": false, - "speechSynthesis": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "status": false, - "statusbar": false, - "stop": false, - "Storage": false, - "StorageEvent": false, - "styleMedia": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubtleCrypto": false, - "SVGAElement": false, - "SVGAltGlyphDefElement": false, - "SVGAltGlyphElement": false, - "SVGAltGlyphItemElement": false, - "SVGAngle": false, - "SVGAnimateColorElement": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPathData": false, - "SVGAnimatedPoints": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGColor": false, - "SVGColorProfileElement": false, - "SVGColorProfileRule": false, - "SVGComponentTransferFunctionElement": false, - "SVGCSSRule": false, - "SVGCursorElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGDiscardElement": false, - "SVGDocument": false, - "SVGElement": false, - "SVGElementInstance": false, - "SVGElementInstanceList": false, - "SVGEllipseElement": false, - "SVGEvent": false, - "SVGExternalResourcesRequired": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGFilterPrimitiveStandardAttributes": false, - "SVGFitToViewBox": false, - "SVGFontElement": false, - "SVGFontFaceElement": false, - "SVGFontFaceFormatElement": false, - "SVGFontFaceNameElement": false, - "SVGFontFaceSrcElement": false, - "SVGFontFaceUriElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGlyphElement": false, - "SVGGlyphRefElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGHKernElement": false, - "SVGICCColor": false, - "SVGImageElement": false, - "SVGLangSpace": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLinearGradientElement": false, - "SVGLineElement": false, - "SVGLocatable": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGMissingGlyphElement": false, - "SVGMPathElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPaint": false, - "SVGPathElement": false, - "SVGPathSeg": false, - "SVGPathSegArcAbs": false, - "SVGPathSegArcRel": false, - "SVGPathSegClosePath": false, - "SVGPathSegCurvetoCubicAbs": false, - "SVGPathSegCurvetoCubicRel": false, - "SVGPathSegCurvetoCubicSmoothAbs": false, - "SVGPathSegCurvetoCubicSmoothRel": false, - "SVGPathSegCurvetoQuadraticAbs": false, - "SVGPathSegCurvetoQuadraticRel": false, - "SVGPathSegCurvetoQuadraticSmoothAbs": false, - "SVGPathSegCurvetoQuadraticSmoothRel": false, - "SVGPathSegLinetoAbs": false, - "SVGPathSegLinetoHorizontalAbs": false, - "SVGPathSegLinetoHorizontalRel": false, - "SVGPathSegLinetoRel": false, - "SVGPathSegLinetoVerticalAbs": false, - "SVGPathSegLinetoVerticalRel": false, - "SVGPathSegList": false, - "SVGPathSegMovetoAbs": false, - "SVGPathSegMovetoRel": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGRenderingIntent": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStylable": false, - "SVGStyleElement": false, - "SVGSVGElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTests": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformable": false, - "SVGTransformList": false, - "SVGTRefElement": false, - "SVGTSpanElement": false, - "SVGUnitTypes": false, - "SVGURIReference": false, - "SVGUseElement": false, - "SVGViewElement": false, - "SVGViewSpec": false, - "SVGVKernElement": false, - "SVGZoomAndPan": false, - "SVGZoomEvent": false, - "Text": false, - "TextDecoder": false, - "TextEncoder": false, - "TextEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TimeEvent": false, - "TimeRanges": false, - "toolbar": false, - "top": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransitionEvent": false, - "TreeWalker": false, - "UIEvent": false, - "URL": false, - "URLSearchParams": false, - "ValidityState": false, - "VTTCue": false, - "WaveShaperNode": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLProgram": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLTexture": false, - "WebGLUniformLocation": false, - "WebSocket": false, - "WheelEvent": false, - "window": false, - "Window": false, - "Worker": false, - "XDomainRequest": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestProgressEvent": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathException": false, - "XPathExpression": false, - "XPathNamespace": false, - "XPathNSResolver": false, - "XPathResult": false, - "XSLTProcessor": false - }, - "worker": { - "applicationCache": false, - "atob": false, - "Blob": false, - "BroadcastChannel": false, - "btoa": false, - "Cache": false, - "caches": false, - "clearInterval": false, - "clearTimeout": false, - "close": true, - "console": false, - "fetch": false, - "FileReaderSync": false, - "FormData": false, - "Headers": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "ImageData": false, - "importScripts": true, - "indexedDB": false, - "location": false, - "MessageChannel": false, - "MessagePort": false, - "name": false, - "navigator": false, - "Notification": false, - "onclose": true, - "onconnect": true, - "onerror": true, - "onlanguagechange": true, - "onmessage": true, - "onoffline": true, - "ononline": true, - "onrejectionhandled": true, - "onunhandledrejection": true, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "postMessage": true, - "Promise": false, - "Request": false, - "Response": false, - "self": true, - "ServiceWorkerRegistration": false, - "setInterval": false, - "setTimeout": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "URLSearchParams": false, - "WebSocket": false, - "Worker": false, - "XMLHttpRequest": false - }, - "node": { - "__dirname": false, - "__filename": false, - "arguments": false, - "Buffer": false, - "clearImmediate": false, - "clearInterval": false, - "clearTimeout": false, - "console": false, - "exports": true, - "GLOBAL": false, - "global": false, - "Intl": false, - "module": false, - "process": false, - "require": false, - "root": false, - "setImmediate": false, - "setInterval": false, - "setTimeout": false - }, - "commonjs": { - "exports": true, - "module": false, - "require": false, - "global": false - }, - "amd": { - "define": false, - "require": false - }, - "mocha": { - "after": false, - "afterEach": false, - "before": false, - "beforeEach": false, - "context": false, - "describe": false, - "it": false, - "mocha": false, - "run": false, - "setup": false, - "specify": false, - "suite": false, - "suiteSetup": false, - "suiteTeardown": false, - "teardown": false, - "test": false, - "xcontext": false, - "xdescribe": false, - "xit": false, - "xspecify": false - }, - "jasmine": { - "afterAll": false, - "afterEach": false, - "beforeAll": false, - "beforeEach": false, - "describe": false, - "expect": false, - "fail": false, - "fdescribe": false, - "fit": false, - "it": false, - "jasmine": false, - "pending": false, - "runs": false, - "spyOn": false, - "spyOnProperty": false, - "waits": false, - "waitsFor": false, - "xdescribe": false, - "xit": false - }, - "jest": { - "afterAll": false, - "afterEach": false, - "beforeAll": false, - "beforeEach": false, - "check": false, - "describe": false, - "expect": false, - "gen": false, - "it": false, - "fdescribe": false, - "fit": false, - "jest": false, - "pit": false, - "require": false, - "test": false, - "xdescribe": false, - "xit": false, - "xtest": false - }, - "qunit": { - "asyncTest": false, - "deepEqual": false, - "equal": false, - "expect": false, - "module": false, - "notDeepEqual": false, - "notEqual": false, - "notOk": false, - "notPropEqual": false, - "notStrictEqual": false, - "ok": false, - "propEqual": false, - "QUnit": false, - "raises": false, - "start": false, - "stop": false, - "strictEqual": false, - "test": false, - "throws": false - }, - "phantomjs": { - "console": true, - "exports": true, - "phantom": true, - "require": true, - "WebPage": true - }, - "couch": { - "emit": false, - "exports": false, - "getRow": false, - "log": false, - "module": false, - "provides": false, - "require": false, - "respond": false, - "send": false, - "start": false, - "sum": false - }, - "rhino": { - "defineClass": false, - "deserialize": false, - "gc": false, - "help": false, - "importClass": false, - "importPackage": false, - "java": false, - "load": false, - "loadClass": false, - "Packages": false, - "print": false, - "quit": false, - "readFile": false, - "readUrl": false, - "runCommand": false, - "seal": false, - "serialize": false, - "spawn": false, - "sync": false, - "toint32": false, - "version": false - }, - "nashorn": { - "__DIR__": false, - "__FILE__": false, - "__LINE__": false, - "com": false, - "edu": false, - "exit": false, - "Java": false, - "java": false, - "javafx": false, - "JavaImporter": false, - "javax": false, - "JSAdapter": false, - "load": false, - "loadWithNewGlobal": false, - "org": false, - "Packages": false, - "print": false, - "quit": false - }, - "wsh": { - "ActiveXObject": true, - "Enumerator": true, - "GetObject": true, - "ScriptEngine": true, - "ScriptEngineBuildVersion": true, - "ScriptEngineMajorVersion": true, - "ScriptEngineMinorVersion": true, - "VBArray": true, - "WScript": true, - "WSH": true, - "XDomainRequest": true - }, - "jquery": { - "$": false, - "jQuery": false - }, - "yui": { - "Y": false, - "YUI": false, - "YUI_config": false - }, - "shelljs": { - "cat": false, - "cd": false, - "chmod": false, - "config": false, - "cp": false, - "dirs": false, - "echo": false, - "env": false, - "error": false, - "exec": false, - "exit": false, - "find": false, - "grep": false, - "ls": false, - "ln": false, - "mkdir": false, - "mv": false, - "popd": false, - "pushd": false, - "pwd": false, - "rm": false, - "sed": false, - "set": false, - "target": false, - "tempdir": false, - "test": false, - "touch": false, - "which": false - }, - "prototypejs": { - "$": false, - "$$": false, - "$A": false, - "$break": false, - "$continue": false, - "$F": false, - "$H": false, - "$R": false, - "$w": false, - "Abstract": false, - "Ajax": false, - "Autocompleter": false, - "Builder": false, - "Class": false, - "Control": false, - "Draggable": false, - "Draggables": false, - "Droppables": false, - "Effect": false, - "Element": false, - "Enumerable": false, - "Event": false, - "Field": false, - "Form": false, - "Hash": false, - "Insertion": false, - "ObjectRange": false, - "PeriodicalExecuter": false, - "Position": false, - "Prototype": false, - "Scriptaculous": false, - "Selector": false, - "Sortable": false, - "SortableObserver": false, - "Sound": false, - "Template": false, - "Toggle": false, - "Try": false - }, - "meteor": { - "$": false, - "_": false, - "Accounts": false, - "AccountsClient": false, - "AccountsServer": false, - "AccountsCommon": false, - "App": false, - "Assets": false, - "Blaze": false, - "check": false, - "Cordova": false, - "DDP": false, - "DDPServer": false, - "DDPRateLimiter": false, - "Deps": false, - "EJSON": false, - "Email": false, - "HTTP": false, - "Log": false, - "Match": false, - "Meteor": false, - "Mongo": false, - "MongoInternals": false, - "Npm": false, - "Package": false, - "Plugin": false, - "process": false, - "Random": false, - "ReactiveDict": false, - "ReactiveVar": false, - "Router": false, - "ServiceConfiguration": false, - "Session": false, - "share": false, - "Spacebars": false, - "Template": false, - "Tinytest": false, - "Tracker": false, - "UI": false, - "Utils": false, - "WebApp": false, - "WebAppInternals": false - }, - "mongo": { - "_isWindows": false, - "_rand": false, - "BulkWriteResult": false, - "cat": false, - "cd": false, - "connect": false, - "db": false, - "getHostName": false, - "getMemInfo": false, - "hostname": false, - "ISODate": false, - "listFiles": false, - "load": false, - "ls": false, - "md5sumFile": false, - "mkdir": false, - "Mongo": false, - "NumberInt": false, - "NumberLong": false, - "ObjectId": false, - "PlanCache": false, - "print": false, - "printjson": false, - "pwd": false, - "quit": false, - "removeFile": false, - "rs": false, - "sh": false, - "UUID": false, - "version": false, - "WriteResult": false - }, - "applescript": { - "$": false, - "Application": false, - "Automation": false, - "console": false, - "delay": false, - "Library": false, - "ObjC": false, - "ObjectSpecifier": false, - "Path": false, - "Progress": false, - "Ref": false - }, - "serviceworker": { - "caches": false, - "Cache": false, - "CacheStorage": false, - "Client": false, - "clients": false, - "Clients": false, - "ExtendableEvent": false, - "ExtendableMessageEvent": false, - "FetchEvent": false, - "importScripts": false, - "registration": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerGlobalScope": false, - "ServiceWorkerMessageEvent": false, - "ServiceWorkerRegistration": false, - "skipWaiting": false, - "WindowClient": false - }, - "atomtest": { - "advanceClock": false, - "fakeClearInterval": false, - "fakeClearTimeout": false, - "fakeSetInterval": false, - "fakeSetTimeout": false, - "resetTimeouts": false, - "waitsForPromise": false - }, - "embertest": { - "andThen": false, - "click": false, - "currentPath": false, - "currentRouteName": false, - "currentURL": false, - "fillIn": false, - "find": false, - "findWithAssert": false, - "keyEvent": false, - "pauseTest": false, - "resumeTest": false, - "triggerEvent": false, - "visit": false - }, - "protractor": { - "$": false, - "$$": false, - "browser": false, - "By": false, - "by": false, - "DartObject": false, - "element": false, - "protractor": false - }, - "shared-node-browser": { - "clearInterval": false, - "clearTimeout": false, - "console": false, - "setInterval": false, - "setTimeout": false - }, - "webextensions": { - "browser": false, - "chrome": false, - "opr": false - }, - "greasemonkey": { - "GM_addStyle": false, - "GM_deleteValue": false, - "GM_getResourceText": false, - "GM_getResourceURL": false, - "GM_getValue": false, - "GM_info": false, - "GM_listValues": false, - "GM_log": false, - "GM_openInTab": false, - "GM_registerMenuCommand": false, - "GM_setClipboard": false, - "GM_setValue": false, - "GM_xmlhttpRequest": false, - "unsafeWindow": false - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/index.js deleted file mode 100644 index a02ef24..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./globals.json'); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/package.json deleted file mode 100644 index d9d6ab7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "globals@^9.18.0", - "scope": null, - "escapedName": "globals", - "name": "globals", - "rawSpec": "^9.18.0", - "spec": ">=9.18.0 <10.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse" - ] - ], - "_from": "globals@>=9.18.0 <10.0.0", - "_id": "globals@9.18.0", - "_inCache": true, - "_location": "/globals", - "_nodeVersion": "8.0.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/globals-9.18.0.tgz_1496827524121_0.8153965487144887" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "5.0.0", - "_phantomChildren": {}, - "_requested": { - "raw": "globals@^9.18.0", - "scope": null, - "escapedName": "globals", - "name": "globals", - "rawSpec": "^9.18.0", - "spec": ">=9.18.0 <10.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-traverse" - ], - "_resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "_shasum": "aa3896b3e69b487f17e31ed2143d69a8e30c2d8a", - "_shrinkwrap": null, - "_spec": "globals@^9.18.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-traverse", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "dependencies": {}, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "shasum": "aa3896b3e69b487f17e31ed2143d69a8e30c2d8a", - "tarball": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "globals.json" - ], - "gitHead": "09ba8754235e5953507b8d0543d65098bc7bb78d", - "homepage": "https://github.com/sindresorhus/globals#readme", - "keywords": [ - "globals", - "global", - "identifiers", - "variables", - "vars", - "jshint", - "eslint", - "environments" - ], - "license": "MIT", - "maintainers": [ - { - "name": "byk", - "email": "ben@byk.im" - }, - { - "name": "lo1tuma", - "email": "schreck.mathias@gmail.com" - }, - { - "name": "nzakas", - "email": "nicholas@nczconsulting.com" - }, - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "globals", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "9.18.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/readme.md deleted file mode 100644 index 5314bbb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globals/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# globals [![Build Status](https://travis-ci.org/sindresorhus/globals.svg?branch=master)](https://travis-ci.org/sindresorhus/globals) - -> Global identifiers from different JavaScript environments - -Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged. - -It's just a [JSON file](globals.json), so use it in whatever environment you like. - -**This module [no longer accepts](https://github.com/sindresorhus/globals/issues/82) new environments. If you need it for ESLint, just [create a plugin](http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins).** - - -## Install - -``` -$ npm install --save globals -``` - - -## Usage - -```js -var globals = require('globals'); - -console.log(globals.browser); -/* -{ - addEventListener: false, - applicationCache: false, - ArrayBuffer: false, - atob: false, - ... -} -*/ -``` - -Each global is given a value of `true` or `false`. A value of `true` indicates that the variable may be overwritten. A value of `false` indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be `false` unless we hear otherwise. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.jshintrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.jshintrc deleted file mode 100644 index 2c40c44..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.jshintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "unused": true, - "boss": true, - "eqnull": true, - "node": true, - "es5": true -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.npmignore deleted file mode 100644 index 2ccbe46..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.travis.yml deleted file mode 100644 index cbace30..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_script: - - npm install -g grunt-cli diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/Gruntfile.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/Gruntfile.js deleted file mode 100644 index c3f7d74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/Gruntfile.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -module.exports = function(grunt) { - - // Project configuration. - grunt.initConfig({ - nodeunit: { - files: ['test/**/*_test.js'], - }, - jshint: { - options: { - jshintrc: '.jshintrc' - }, - gruntfile: { - src: 'Gruntfile.js' - }, - lib: { - src: ['lib/**/*.js'] - }, - test: { - src: ['test/*.js'] - }, - }, - watch: { - gruntfile: { - files: '<%= jshint.gruntfile.src %>', - tasks: ['jshint:gruntfile'] - }, - lib: { - files: '<%= jshint.lib.src %>', - tasks: ['jshint:lib', 'nodeunit'] - }, - test: { - files: '<%= jshint.test.src %>', - tasks: ['jshint:test', 'nodeunit'] - }, - }, - }); - - // These plugins provide necessary tasks. - grunt.loadNpmTasks('grunt-contrib-nodeunit'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-watch'); - - // Default task. - grunt.registerTask('default', ['jshint', 'nodeunit']); - -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/LICENSE-MIT b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/LICENSE-MIT deleted file mode 100644 index bb2aad6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 "Cowboy" Ben Alman - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/README.md deleted file mode 100644 index 656b1ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# globule [![Build Status](https://secure.travis-ci.org/cowboy/node-globule.png?branch=master)](http://travis-ci.org/cowboy/node-globule) - -An easy-to-use wildcard globbing library. - -## Getting Started -Install the module with: `npm install globule` - -```javascript -var globule = require('globule'); -var filepaths = globule.find('**/*.js'); -``` - -## Documentation - -### globule.find -Returns a unique array of all file or directory paths that match the given globbing pattern(s). This method accepts either comma separated globbing patterns or an array of globbing patterns. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant. - -```js -globule.find(patterns [, options]) -``` - -The `options` object supports all [glob][] library options, along with a few extras. These are the most commonly used: - -* `filter` Either a valid [fs.Stats method name](http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats) or a function that will be passed the matched `src` filepath and `options` object as arguments. This function should return a `Boolean` value. -* `nonull` Retain globbing patterns in result set even if they fail to match files. -* `matchBase` Patterns without slashes will match just the basename part. Eg. this makes `*.js` work like `**/*.js`. -* `srcBase` Patterns will be matched relative to the specified path instead of the current working directory. This is a synonym for `cwd`. -* `prefixBase` Any specified `srcBase` will be prefixed to all returned filepaths. - -[glob]: https://github.com/isaacs/node-glob - -### globule.match -Match one or more globbing patterns against one or more file paths. Returns a uniqued array of all file paths that match any of the specified globbing patterns. Both the `patterns` and `filepaths` arguments can be a single string or array of strings. Paths matching patterns that begin with `!` will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant. - -```js -grunt.file.match(patterns, filepaths [, options]) -``` - -### globule.isMatch -This method contains the same signature and logic as the `globule.match` method, but returns `true` if any files were matched, otherwise `false`. - -```js -grunt.file.isMatch(patterns, filepaths [, options]) -``` - -### globule.mapping -Given a set of source file paths, returns an array of src-dest file mapping objects. Both src and dest paths may be renamed, depending on the options specified. - -```js -globule.mapping(filepaths [, options]) -``` - -In addition to the options the `globule.find` method supports, the options object also supports these properties: - -* `srcBase` The directory from which patterns are matched. Any string specified as `srcBase` is effectively stripped from the beginning of all matched paths. -* `destBase` The specified path is prefixed to all `dest` filepaths. -* `ext` Remove anything after (and including) the first `.` in the destination path, then append this value. -* `extDot` Change the behavior of `ext`, `"first"` and `"last"` will remove anything after the first or last `.` in the destination filename, respectively. Defaults to `"first"`. -* `flatten` Remove the path component from all matched src files. The src file path is still joined to the specified destBase. -* `rename` If specified, this function will be responsible for returning the final `dest` filepath. By default, it flattens paths (if specified), changes extensions (if specified) and joins the matched path to the `destBase`. - -### globule.findMapping -This method is a convenience wrapper around the `globule.find` and `globule.mapping` methods. - -```js -globule.findMapping(patterns [, options]) -``` - - -## Examples - -Given the files `foo/a.js` and `foo/b.js`: - -### srcBase and destBase - -```js -globule.find("foo/*.js") -// ["foo/a.js", "foo/b.js"] - -globule.find("*.js", {srcBase: "foo"}) -// ["a.js", "b.js"] - -globule.find("*.js", {srcBase: "foo", prefixBase: true}) -// ["foo/a.js", "foo/b.js"] -``` - -```js -globule.findMapping("foo/*.js") -// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}] - -globule.findMapping("foo/*.js", {destBase: "bar"}) -// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}] - -globule.findMapping("*.js", {srcBase: "foo", destBase: "bar"}) -// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}] -``` - -```js -globule.mapping(["foo/a.js", "foo/b.js"]) -// [{src: "foo/a.js", dest: "foo/a.js"}, {src: "foo/b.js", dest: "foo/b.js"}] - -globule.mapping(["foo/a.js", "foo/b.js"], {destBase: "bar"}) -// [{src: "foo/a.js", dest: "bar/foo/a.js"}, {src: "foo/b.js", dest: "bar/foo/b.js"}] - -globule.mapping(["a.js", "b.js"], {srcBase: "foo", destBase: "bar"}) -// [{src: "foo/a.js", dest: "bar/a.js"}, {src: "foo/b.js", dest: "bar/b.js"}] -``` - -## Contributing -In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). - -## Release History -_(Nothing yet)_ - -## License -Copyright (c) 2013 "Cowboy" Ben Alman -Licensed under the MIT license. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/lib/globule.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/lib/globule.js deleted file mode 100644 index 01017b9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/lib/globule.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - * globule - * https://github.com/cowboy/node-globule - * - * Copyright (c) 2013 "Cowboy" Ben Alman - * Licensed under the MIT license. - */ - -'use strict'; - -var fs = require('fs'); -var path = require('path'); - -var _ = require('lodash'); -var glob = require('glob'); -var minimatch = require('minimatch'); - -// The module. -var globule = exports; - -// Process specified wildcard glob patterns or filenames against a -// callback, excluding and uniquing files in the result set. -function processPatterns(patterns, fn) { - return _.flatten(patterns).reduce(function(result, pattern) { - if (pattern.indexOf('!') === 0) { - // If the first character is ! all matches via this pattern should be - // removed from the result set. - pattern = pattern.slice(1); - return _.difference(result, fn(pattern)); - } else { - // Otherwise, add all matching filepaths to the result set. - return _.union(result, fn(pattern)); - } - }, []); -} - -// Match a filepath or filepaths against one or more wildcard patterns. Returns -// all matching filepaths. This behaves just like minimatch.match, but supports -// any number of patterns. -globule.match = function(patterns, filepaths, options) { - // Return empty set if either patterns or filepaths was omitted. - if (patterns == null || filepaths == null) { return []; } - // Normalize patterns and filepaths to arrays. - if (!_.isArray(patterns)) { patterns = [patterns]; } - if (!_.isArray(filepaths)) { filepaths = [filepaths]; } - // Return empty set if there are no patterns or filepaths. - if (patterns.length === 0 || filepaths.length === 0) { return []; } - // Return all matching filepaths. - return processPatterns(patterns, function(pattern) { - return minimatch.match(filepaths, pattern, options || {}); - }); -}; - -// Match a filepath or filepaths against one or more wildcard patterns. Returns -// true if any of the patterns match. -globule.isMatch = function() { - return globule.match.apply(null, arguments).length > 0; -}; - -// Return an array of all file paths that match the given wildcard patterns. -globule.find = function() { - var args = _.toArray(arguments); - // If the last argument is an options object, remove it from args. - var options = _.isPlainObject(args[args.length - 1]) ? args.pop() : {}; - // Use the first argument if it's an Array, otherwise use all arguments. - var patterns = _.isArray(args[0]) ? args[0] : args; - // Return empty set if there are no patterns or filepaths. - if (patterns.length === 0) { return []; } - var srcBase = options.srcBase || options.cwd; - // Create glob-specific options object. - var globOptions = _.extend({}, options); - if (srcBase) { - globOptions.cwd = srcBase; - } - // Get all matching filepaths. - var matches = processPatterns(patterns, function(pattern) { - return glob.sync(pattern, globOptions); - }); - // If srcBase and prefixBase were specified, prefix srcBase to matched paths. - if (srcBase && options.prefixBase) { - matches = matches.map(function(filepath) { - return path.join(srcBase, filepath); - }); - } - // Filter result set? - if (options.filter) { - matches = matches.filter(function(filepath) { - // If srcBase was specified but prefixBase was NOT, prefix srcBase - // temporarily, for filtering. - if (srcBase && !options.prefixBase) { - filepath = path.join(srcBase, filepath); - } - try { - if (_.isFunction(options.filter)) { - return options.filter(filepath, options); - } else { - // If the file is of the right type and exists, this should work. - return fs.statSync(filepath)[options.filter](); - } - } catch(err) { - // Otherwise, it's probably not the right type. - return false; - } - }); - } - return matches; -}; - -var pathSeparatorRe = /[\/\\]/g; -var extDotRe = { - first: /(\.[^\/]*)?$/, - last: /(\.[^\/\.]*)?$/, -}; -function rename(dest, options) { - // Flatten path? - if (options.flatten) { - dest = path.basename(dest); - } - // Change the extension? - if (options.ext) { - dest = dest.replace(extDotRe[options.extDot], options.ext); - } - // Join dest and destBase? - if (options.destBase) { - dest = path.join(options.destBase, dest); - } - return dest; -} - -// Build a mapping of src-dest filepaths from the given set of filepaths. -globule.mapping = function(filepaths, options) { - // Return empty set if filepaths was omitted. - if (filepaths == null) { return []; } - options = _.defaults({}, options, { - extDot: 'first', - rename: rename, - }); - var files = []; - var fileByDest = {}; - // Find all files matching pattern, using passed-in options. - filepaths.forEach(function(src) { - // Generate destination filename. - var dest = options.rename(src, options); - // Prepend srcBase to all src paths. - if (options.srcBase) { - src = path.join(options.srcBase, src); - } - // Normalize filepaths to be unix-style. - dest = dest.replace(pathSeparatorRe, '/'); - src = src.replace(pathSeparatorRe, '/'); - // Map correct src path to dest path. - if (fileByDest[dest]) { - // If dest already exists, push this src onto that dest's src array. - fileByDest[dest].src.push(src); - } else { - // Otherwise create a new src-dest file mapping object. - files.push({ - src: [src], - dest: dest, - }); - // And store a reference for later use. - fileByDest[dest] = files[files.length - 1]; - } - }); - return files; -}; - -// Return a mapping of src-dest filepaths from files matching the given -// wildcard patterns. -globule.findMapping = function(patterns, options) { - return globule.mapping(globule.find(patterns, options), options); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.npmignore deleted file mode 100644 index 2af4b71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -test/a/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.travis.yml deleted file mode 100644 index baa0031..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/LICENSE deleted file mode 100644 index 0c44ae7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/README.md deleted file mode 100644 index 6e27df6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Glob - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -## Attention: node-glob users! - -The API has changed dramatically between 2.x and 3.x. This library is -now 100% JavaScript, and the integer flags have been replaced with an -options object. - -Also, there's an event emitter class, proper tests, and all the other -things you've come to expect from node modules. - -And best of all, no compilation! - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Features - -Please see the [minimatch -documentation](https://github.com/isaacs/minimatch) for more details. - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options] - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instanting the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `error` The error encountered. When an error is encountered, the - glob object is in an undefined state, and should be discarded. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `abort` Stop the search. - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the glob object, as well. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. It will cause - ELOOP to be triggered one level sooner in the case of cyclical - symbolic links. -* `silent` When an unusual error is encountered - when attempting to read a directory, a warning will be printed to - stderr. Set the `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered - when attempting to read a directory, the process will just continue on - in search of other matches. Set the `strict` option to raise an error - in these cases. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary to - set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `sync` Perform a synchronous glob search. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. - Set this flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that case-insensitive - filesystems will sometimes result in glob returning results that are - case-insensitively matched anyway, since readdir and stat will not - raise an error. -* `debug` Set to enable debug logging in minimatch and glob. -* `globDebug` Set to enable debug logging in glob, but not minimatch. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. **Note that this is different from the way that `**` is -handled by ruby's `Dir` class.** - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the statCache object is reused between glob calls. - -Users are thus advised not to use a glob result as a -guarantee of filesystem state in the face of rapid changes. -For the vast majority of operations, this is never a problem. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/g.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/g.js deleted file mode 100644 index be122df..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/g.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "test/a/**/[cg]/../[cg]" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/usr-local.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/usr-local.js deleted file mode 100644 index 327a425..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/examples/usr-local.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "{./*/*,/*,/usr/local/*}" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/glob.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/glob.js deleted file mode 100644 index 891c883..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/glob.js +++ /dev/null @@ -1,643 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// readdir(PREFIX) as ENTRIES -// If fails, END -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $]) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - - - -module.exports = glob - -var fs = require("graceful-fs") -, minimatch = require("minimatch") -, Minimatch = minimatch.Minimatch -, inherits = require("inherits") -, EE = require("events").EventEmitter -, path = require("path") -, isDir = {} -, assert = require("assert").ok - -function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} - if (!options) options = {} - - if (typeof options === "number") { - deprecated() - return - } - - var g = new Glob(pattern, options, cb) - return g.sync ? g.found : g -} - -glob.fnmatch = deprecated - -function deprecated () { - throw new Error("glob's interface has changed. Please see the docs.") -} - -glob.sync = globSync -function globSync (pattern, options) { - if (typeof options === "number") { - deprecated() - return - } - - options = options || {} - options.sync = true - return glob(pattern, options) -} - - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options, cb) - } - - if (typeof cb === "function") { - this.on("error", cb) - this.on("end", function (matches) { - cb(null, matches) - }) - } - - options = options || {} - - this.EOF = {} - this._emitQueue = [] - - this.maxDepth = options.maxDepth || 1000 - this.maxLength = options.maxLength || Infinity - this.statCache = options.statCache || {} - - this.changedCwd = false - var cwd = process.cwd() - if (!options.hasOwnProperty("cwd")) this.cwd = cwd - else { - this.cwd = options.cwd - this.changedCwd = path.resolve(options.cwd) !== cwd - } - - this.root = options.root || path.resolve(this.cwd, "/") - this.root = path.resolve(this.root) - if (process.platform === "win32") - this.root = this.root.replace(/\\/g, "/") - - this.nomount = !!options.nomount - - if (!pattern) { - throw new Error("must provide pattern") - } - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - this.strict = options.strict !== false - this.dot = !!options.dot - this.mark = !!options.mark - this.sync = !!options.sync - this.nounique = !!options.nounique - this.nonull = !!options.nonull - this.nosort = !!options.nosort - this.nocase = !!options.nocase - this.stat = !!options.stat - - this.debug = !!options.debug || !!options.globDebug - if (this.debug) - this.log = console.error - - this.silent = !!options.silent - - var mm = this.minimatch = new Minimatch(pattern, options) - this.options = mm.options - pattern = this.pattern = mm.pattern - - this.error = null - this.aborted = false - - EE.call(this) - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - this.minimatch.set.forEach(iterator.bind(this)) - function iterator (pattern, i, set) { - this._process(pattern, 0, i, function (er) { - if (er) this.emit("error", er) - if (-- n <= 0) this._finish() - }) - } -} - -Glob.prototype.log = function () {} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - - var nou = this.nounique - , all = nou ? [] : {} - - for (var i = 0, l = this.matches.length; i < l; i ++) { - var matches = this.matches[i] - this.log("matches[%d] =", i, matches) - // do like the shell, and spit out the literal glob - if (!matches) { - if (this.nonull) { - var literal = this.minimatch.globSet[i] - if (nou) all.push(literal) - else all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) all.push.apply(all, m) - else m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) all = Object.keys(all) - - if (!this.nosort) { - all = all.sort(this.nocase ? alphasorti : alphasort) - } - - if (this.mark) { - // at *some* point we statted all of these - all = all.map(function (m) { - var sc = this.statCache[m] - if (!sc) - return m - var isDir = (Array.isArray(sc) || sc === 2) - if (isDir && m.slice(-1) !== "/") { - return m + "/" - } - if (!isDir && m.slice(-1) === "/") { - return m.replace(/\/+$/, "") - } - return m - }, this) - } - - this.log("emitting end", all) - - this.EOF = this.found = all - this.emitMatch(this.EOF) -} - -function alphasorti (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return alphasort(a, b) -} - -function alphasort (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit("abort") -} - -Glob.prototype.pause = function () { - if (this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = true - this.emit("pause") -} - -Glob.prototype.resume = function () { - if (!this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = false - this.emit("resume") - this._processEmitQueue() - //process.nextTick(this.emit.bind(this, "resume")) -} - -Glob.prototype.emitMatch = function (m) { - this._emitQueue.push(m) - this._processEmitQueue() -} - -Glob.prototype._processEmitQueue = function (m) { - while (!this._processingEmitQueue && - !this.paused) { - this._processingEmitQueue = true - var m = this._emitQueue.shift() - if (!m) { - this._processingEmitQueue = false - break - } - - this.log('emit!', m === this.EOF ? "end" : "match") - - this.emit(m === this.EOF ? "end" : "match", m) - this._processingEmitQueue = false - } -} - -Glob.prototype._process = function (pattern, depth, index, cb_) { - assert(this instanceof Glob) - - var cb = function cb (er, res) { - assert(this instanceof Glob) - if (this.paused) { - if (!this._processQueue) { - this._processQueue = [] - this.once("resume", function () { - var q = this._processQueue - this._processQueue = null - q.forEach(function (cb) { cb() }) - }) - } - this._processQueue.push(cb_.bind(this, er, res)) - } else { - cb_.call(this, er, res) - } - }.bind(this) - - if (this.aborted) return cb() - - if (depth > this.maxDepth) return cb() - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === "string") { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - prefix = pattern.join("/") - this._stat(prefix, function (exists, isDir) { - // either it's there, or it isn't. - // nothing more to do, either way. - if (exists) { - if (prefix && isAbsolute(prefix) && !this.nomount) { - if (prefix.charAt(0) === "/") { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - } - } - - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][prefix] = true - this.emitMatch(prefix) - } - return cb() - }) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n) - prefix = prefix.join("/") - break - } - - // get the list of entries. - var read - if (prefix === null) read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) { - prefix = path.join("/", prefix) - } - read = prefix = path.resolve(prefix) - - // if (process.platform === "win32") - // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") - - this.log('absolute: ', prefix, this.root, pattern, read) - } else { - read = prefix - } - - this.log('readdir(%j)', read, this.cwd, this.root) - - return this._readdir(read, function (er, entries) { - if (er) { - // not a directory! - // this means that, whatever else comes after this, it can never match - return cb() - } - - // globstar is special - if (pattern[n] === minimatch.GLOBSTAR) { - // test without the globstar, and with every child both below - // and replacing the globstar. - var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] - entries.forEach(function (e) { - if (e.charAt(0) === "." && !this.dot) return - // instead of the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) - // below the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) - }, this) - - // now asyncForEach over this - var l = s.length - , errState = null - s.forEach(function (gsPattern) { - this._process(gsPattern, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l <= 0) return cb() - }) - }, this) - - return - } - - // not a globstar - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = pattern[n] - if (typeof pn === "string") { - var found = entries.indexOf(pn) !== -1 - entries = found ? entries[pn] : [] - } else { - var rawGlob = pattern[n]._glob - , dotOk = this.dot || rawGlob.charAt(0) === "." - - entries = entries.filter(function (e) { - return (e.charAt(0) !== "." || dotOk) && - (typeof pattern[n] === "string" && e === pattern[n] || - e.match(pattern[n])) - }) - } - - // If n === pattern.length - 1, then there's no need for the extra stat - // *unless* the user has specified "mark" or "stat" explicitly. - // We know that they exist, since the readdir returned them. - if (n === pattern.length - 1 && - !this.mark && - !this.stat) { - entries.forEach(function (e) { - if (prefix) { - if (prefix !== "/") e = prefix + "/" + e - else e = prefix + e - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path.join(this.root, e) - } - - if (process.platform === "win32") - e = e.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][e] = true - this.emitMatch(e) - }, this) - return cb.call(this) - } - - - // now test all the remaining entries as stand-ins for that part - // of the pattern. - var l = entries.length - , errState = null - if (l === 0) return cb() // no matches possible - entries.forEach(function (e) { - var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) - this._process(p, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l === 0) return cb.call(this) - }) - }, this) - }) - -} - -Glob.prototype._stat = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - this.log('stat', [this.cwd, f, '=', abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterStat(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var exists = this.statCache[f] - , isDir = exists && (Array.isArray(exists) || exists === 2) - if (this.sync) return cb.call(this, !!exists, isDir) - return process.nextTick(cb.bind(this, !!exists, isDir)) - } - - if (this.sync) { - var er, stat - try { - stat = fs.statSync(abs) - } catch (e) { - er = e - } - this._afterStat(f, abs, cb, er, stat) - } else { - fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) - } -} - -Glob.prototype._afterStat = function (f, abs, cb, er, stat) { - var exists - assert(this instanceof Glob) - - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { - this.log("should be ENOTDIR, fake it") - - er = new Error("ENOTDIR, not a directory '" + abs + "'") - er.path = abs - er.code = "ENOTDIR" - stat = null - } - - if (er || !stat) { - exists = false - } else { - exists = stat.isDirectory() ? 2 : 1 - } - this.statCache[f] = this.statCache[f] || exists - cb.call(this, !!exists, exists === 2) -} - -Glob.prototype._readdir = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (isAbsolute(f)) { - abs = f - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - this.log('readdir', [this.cwd, f, abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterReaddir(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var c = this.statCache[f] - if (Array.isArray(c)) { - if (this.sync) return cb.call(this, null, c) - return process.nextTick(cb.bind(this, null, c)) - } - - if (!c || c === 1) { - // either ENOENT or ENOTDIR - var code = c ? "ENOTDIR" : "ENOENT" - , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) - er.path = f - er.code = code - this.log(f, er) - if (this.sync) return cb.call(this, er) - return process.nextTick(cb.bind(this, er)) - } - - // at this point, c === 2, meaning it's a dir, but we haven't - // had to read it yet, or c === true, meaning it's *something* - // but we don't have any idea what. Need to read it, either way. - } - - if (this.sync) { - var er, entries - try { - entries = fs.readdirSync(abs) - } catch (e) { - er = e - } - return this._afterReaddir(f, abs, cb, er, entries) - } - - fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) -} - -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { - assert(this instanceof Glob) - if (entries && !er) { - this.statCache[f] = entries - // if we haven't asked to stat everything for suresies, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. This also gets us one step - // further into ELOOP territory. - if (!this.mark && !this.stat) { - entries.forEach(function (e) { - if (f === "/") e = f + e - else e = f + "/" + e - this.statCache[e] = true - }, this) - } - - return cb.call(this, er, entries) - } - - // now handle errors, and cache the information - if (er) switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. - this.statCache[f] = 1 - return cb.call(this, er) - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.statCache[f] = false - return cb.call(this, er) - default: // some unusual error. Treat as failure. - this.statCache[f] = false - if (this.strict) this.emit("error", er) - if (!this.silent) console.error("glob error", er) - return cb.call(this, er) - } -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/package.json deleted file mode 100644 index 40466c8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "glob@~3.1.21", - "scope": null, - "escapedName": "glob", - "name": "glob", - "rawSpec": "~3.1.21", - "spec": ">=3.1.21 <3.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule" - ] - ], - "_from": "glob@>=3.1.21 <3.2.0", - "_id": "glob@3.1.21", - "_inCache": true, - "_location": "/globule/glob", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "1.2.12", - "_phantomChildren": {}, - "_requested": { - "raw": "glob@~3.1.21", - "scope": null, - "escapedName": "glob", - "name": "glob", - "rawSpec": "~3.1.21", - "spec": ">=3.1.21 <3.2.0", - "type": "range" - }, - "_requiredBy": [ - "/globule" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "_shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd", - "_shrinkwrap": null, - "_spec": "glob@~3.1.21", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "dependencies": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - }, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "1", - "tap": "~0.4.0" - }, - "directories": {}, - "dist": { - "shasum": "d29e0a055dea5138f4d07ed40e8982e83c2066cd", - "tarball": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz" - }, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "BSD", - "main": "glob.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "3.1.21" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/00-setup.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/00-setup.js deleted file mode 100644 index 245afaf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/00-setup.js +++ /dev/null @@ -1,176 +0,0 @@ -// just a little pre-run script to set up the fixtures. -// zz-finish cleans it up - -var mkdirp = require("mkdirp") -var path = require("path") -var i = 0 -var tap = require("tap") -var fs = require("fs") -var rimraf = require("rimraf") - -var files = -[ "a/.abcdef/x/y/z/a" -, "a/abcdef/g/h" -, "a/abcfed/g/h" -, "a/b/c/d" -, "a/bc/e/f" -, "a/c/d/c/b" -, "a/cb/e/f" -] - -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") -var symlinkFrom = "../.." - -files = files.map(function (f) { - return path.resolve(__dirname, f) -}) - -tap.test("remove fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "remove fixtures") - t.end() - }) -}) - -files.forEach(function (f) { - tap.test(f, function (t) { - var d = path.dirname(f) - mkdirp(d, 0755, function (er) { - if (er) { - t.fail(er) - return t.bailout() - } - fs.writeFile(f, "i like tests", function (er) { - t.ifError(er, "make file") - t.end() - }) - }) - }) -}) - -if (process.platform !== "win32") { - tap.test("symlinky", function (t) { - var d = path.dirname(symlinkTo) - console.error("mkdirp", d) - mkdirp(d, 0755, function (er) { - t.ifError(er) - fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { - t.ifError(er, "make symlink") - t.end() - }) - }) - }) -} - -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { - w = "/tmp/glob-test/" + w - tap.test("create " + w, function (t) { - mkdirp(w, function (er) { - if (er) - throw er - t.pass(w) - t.end() - }) - }) -}) - - -// generate the bash pattern test-fixtures if possible -if (process.platform === "win32" || !process.env.TEST_REGEN) { - console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") - return -} - -var spawn = require("child_process").spawn; -var globs = - // put more patterns here. - // anything that would be directly in / should be in /tmp/glob-test - ["test/a/*/+(c|g)/./d" - ,"test/a/**/[cg]/../[cg]" - ,"test/a/{b,c,d,e,f}/**/g" - ,"test/a/b/**" - ,"test/**/g" - ,"test/a/abc{fed,def}/g/h" - ,"test/a/abc{fed/g,def}/**/" - ,"test/a/abc{fed/g,def}/**///**/" - ,"test/**/a/**/" - ,"test/+(a|b|c)/a{/,bc*}/**" - ,"test/*/*/*/f" - ,"test/**/f" - ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" - ,"{./*/*,/tmp/glob-test/*}" - ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! - ,"test/a/!(symlink)/**" - ] -var bashOutput = {} -var fs = require("fs") - -globs.forEach(function (pattern) { - tap.test("generate fixture " + pattern, function (t) { - var cmd = "shopt -s globstar && " + - "shopt -s extglob && " + - "shopt -s nullglob && " + - // "shopt >&2; " + - "eval \'for i in " + pattern + "; do echo $i; done\'" - var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) - var out = [] - cp.stdout.on("data", function (c) { - out.push(c) - }) - cp.stderr.pipe(process.stderr) - cp.on("close", function (code) { - out = flatten(out) - if (!out) - out = [] - else - out = cleanResults(out.split(/\r*\n/)) - - bashOutput[pattern] = out - t.notOk(code, "bash test should finish nicely") - t.end() - }) - }) -}) - -tap.test("save fixtures", function (t) { - var fname = path.resolve(__dirname, "bash-results.json") - var data = JSON.stringify(bashOutput, null, 2) + "\n" - fs.writeFile(fname, data, function (er) { - t.ifError(er) - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -function flatten (chunks) { - var s = 0 - chunks.forEach(function (c) { s += c.length }) - var out = new Buffer(s) - s = 0 - chunks.forEach(function (c) { - c.copy(out, s) - s += c.length - }) - - return out.toString().trim() -} - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-comparison.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-comparison.js deleted file mode 100644 index 239ed1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-comparison.js +++ /dev/null @@ -1,63 +0,0 @@ -// basic test -// show that it does the same thing by default as the shell. -var tap = require("tap") -, child_process = require("child_process") -, bashResults = require("./bash-results.json") -, globs = Object.keys(bashResults) -, glob = require("../") -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -globs.forEach(function (pattern) { - var expect = bashResults[pattern] - // anything regarding the symlink thing will fail on windows, so just skip it - if (process.platform === "win32" && - expect.some(function (m) { - return /\/symlink\//.test(m) - })) - return - - tap.test(pattern, function (t) { - glob(pattern, function (er, matches) { - if (er) - throw er - - // sort and unmark, just to match the shell results - matches = cleanResults(matches) - - t.deepEqual(matches, expect, pattern) - t.end() - }) - }) - - tap.test(pattern + " sync", function (t) { - var matches = cleanResults(glob.sync(pattern)) - - t.deepEqual(matches, expect, "should match shell") - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') - }) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-results.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-results.json deleted file mode 100644 index c227449..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/bash-results.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "test/a/*/+(c|g)/./d": [ - "test/a/b/c/./d" - ], - "test/a/**/[cg]/../[cg]": [ - "test/a/abcdef/g/../g", - "test/a/abcfed/g/../g", - "test/a/b/c/../c", - "test/a/c/../c", - "test/a/c/d/c/../c", - "test/a/symlink/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" - ], - "test/a/{b,c,d,e,f}/**/g": [], - "test/a/b/**": [ - "test/a/b", - "test/a/b/c", - "test/a/b/c/d" - ], - "test/**/g": [ - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed,def}/g/h": [ - "test/a/abcdef/g/h", - "test/a/abcfed/g/h" - ], - "test/a/abc{fed/g,def}/**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed/g,def}/**///**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/**/a/**/": [ - "test/a", - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/b", - "test/a/b/c", - "test/a/bc", - "test/a/bc/e", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/cb", - "test/a/cb/e", - "test/a/symlink", - "test/a/symlink/a", - "test/a/symlink/a/b", - "test/a/symlink/a/b/c", - "test/a/symlink/a/b/c/a", - "test/a/symlink/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" - ], - "test/+(a|b|c)/a{/,bc*}/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h" - ], - "test/*/*/*/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/**/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" - ], - "{./*/*,/tmp/glob-test/*}": [ - "./examples/g.js", - "./examples/usr-local.js", - "./node_modules/graceful-fs", - "./node_modules/inherits", - "./node_modules/minimatch", - "./node_modules/mkdirp", - "./node_modules/rimraf", - "./node_modules/tap", - "./test/00-setup.js", - "./test/a", - "./test/bash-comparison.js", - "./test/bash-results.json", - "./test/cwd-test.js", - "./test/mark.js", - "./test/nocase-nomagic.js", - "./test/pause-resume.js", - "./test/root-nomount.js", - "./test/root.js", - "./test/zz-cleanup.js", - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq" - ], - "{/tmp/glob-test/*,*}": [ - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq", - "examples", - "glob.js", - "LICENSE", - "node_modules", - "package.json", - "README.md", - "test" - ], - "test/a/!(symlink)/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h", - "test/a/b", - "test/a/b/c", - "test/a/b/c/d", - "test/a/bc", - "test/a/bc/e", - "test/a/bc/e/f", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/c/d/c/b", - "test/a/cb", - "test/a/cb/e", - "test/a/cb/e/f" - ] -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/cwd-test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/cwd-test.js deleted file mode 100644 index 352c27e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/cwd-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing cwd and searching for **/d", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('**/d', function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('a', function (t) { - glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'b/c/d', 'c/d' ]) - t.end() - }) - }) - - t.test('a/b', function (t) { - glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('a/b/', function (t) { - glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('.', function (t) { - glob('**/d', {cwd: process.cwd()}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/mark.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/mark.js deleted file mode 100644 index ed68a33..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/mark.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require("tap").test -var glob = require('../') -process.chdir(__dirname) - -test("mark, no / on pattern", function (t) { - glob("a/*", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - - if (process.platform !== "win32") - expect.push('a/symlink/') - - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, no / on pattern", function (t) { - glob("a/*", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef', - 'a/abcfed', - 'a/b', - 'a/bc', - 'a/c', - 'a/cb' ] - - if (process.platform !== "win32") - expect.push('a/symlink') - t.same(results, expect) - t.end() - }) -}) - -test("mark=true, / on pattern", function (t) { - glob("a/*/", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, / on pattern", function (t) { - glob("a/*/", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/nocase-nomagic.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/nocase-nomagic.js deleted file mode 100644 index d862970..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/nocase-nomagic.js +++ /dev/null @@ -1,113 +0,0 @@ -var fs = require('graceful-fs'); -var test = require('tap').test; -var glob = require('../'); - -test('mock fs', function(t) { - var stat = fs.stat - var statSync = fs.statSync - var readdir = fs.readdir - var readdirSync = fs.readdirSync - - function fakeStat(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = { isDirectory: function() { return true } } - break - case '/tmp/a': - ret = { isDirectory: function() { return false } } - break - } - return ret - } - - fs.stat = function(path, cb) { - var f = fakeStat(path); - if (f) { - process.nextTick(function() { - cb(null, f) - }) - } else { - stat.call(fs, path, cb) - } - } - - fs.statSync = function(path) { - return fakeStat(path) || statSync.call(fs, path) - } - - function fakeReaddir(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = [ 'a', 'A' ] - break - case '/': - ret = ['tmp', 'tMp', 'tMP', 'TMP'] - } - return ret - } - - fs.readdir = function(path, cb) { - var f = fakeReaddir(path) - if (f) - process.nextTick(function() { - cb(null, f) - }) - else - readdir.call(fs, path, cb) - } - - fs.readdirSync = function(path) { - return fakeReaddir(path) || readdirSync.call(fs, path) - } - - t.pass('mocked') - t.end() -}) - -test('nocase, nomagic', function(t) { - var n = 2 - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/a', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) - glob('/tmp/A', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) -}) - -test('nocase, with some magic', function(t) { - t.plan(2) - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/pause-resume.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/pause-resume.js deleted file mode 100644 index e1ffbab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -// show that no match events happen while paused. -var tap = require("tap") -, child_process = require("child_process") -// just some gnarly pattern with lots of matches -, pattern = "test/a/!(symlink)/**" -, bashResults = require("./bash-results.json") -, patterns = Object.keys(bashResults) -, glob = require("../") -, Glob = glob.Glob -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -var globResults = [] -tap.test("use a Glob object, and pause/resume it", function (t) { - var g = new Glob(pattern) - , paused = false - , res = [] - , expect = bashResults[pattern] - - g.on("pause", function () { - console.error("pause") - }) - - g.on("resume", function () { - console.error("resume") - }) - - g.on("match", function (m) { - t.notOk(g.paused, "must not be paused") - globResults.push(m) - g.pause() - t.ok(g.paused, "must be paused") - setTimeout(g.resume.bind(g), 10) - }) - - g.on("end", function (matches) { - t.pass("reached glob end") - globResults = cleanResults(globResults) - matches = cleanResults(matches) - t.deepEqual(matches, globResults, - "end event matches should be the same as match events") - - t.deepEqual(matches, expect, - "glob matches should be the same as bash results") - - t.end() - }) -}) - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root-nomount.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root-nomount.js deleted file mode 100644 index 3ac5979..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root-nomount.js +++ /dev/null @@ -1,39 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing root and searching for /b*/**", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) - }) - - t.test('a', function (t) { - glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root.js deleted file mode 100644 index 95c23f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/root.js +++ /dev/null @@ -1,46 +0,0 @@ -var t = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -var glob = require('../') -var path = require('path') - -t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) -}) - - -t.test('a', function (t) { - console.error("root=" + path.resolve('a')) - glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { - t.ifError(er) - var wanted = [ - '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' - ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - }) - - t.like(matches, wanted) - t.end() - }) -}) - -t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - })) - t.end() - }) -}) - -t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/zz-cleanup.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/zz-cleanup.js deleted file mode 100644 index e085f0f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob/test/zz-cleanup.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove the fixtures -var tap = require("tap") -, rimraf = require("rimraf") -, path = require("path") - -tap.test("cleanup fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "removed") - t.end() - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/README.md deleted file mode 100644 index 01af3d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* keeps track of how many file descriptors are open, and by default - limits this to 1024. Any further requests to open a file are put in a - queue until new slots become available. If 1024 turns out to be too - much, it decreases the limit further. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## Configuration - -The maximum number of open file descriptors that graceful-fs manages may -be adjusted by setting `fs.MAX_OPEN` to a different number. The default -is 1024. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/graceful-fs.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index ca91152..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,442 +0,0 @@ -// this keeps a queue of opened file descriptors, and will make -// fs operations wait until some have closed before trying to open more. - -var fs = exports = module.exports = {} -fs._originalFs = require("fs") - -Object.getOwnPropertyNames(fs._originalFs).forEach(function(prop) { - var desc = Object.getOwnPropertyDescriptor(fs._originalFs, prop) - Object.defineProperty(fs, prop, desc) -}) - -var queue = [] - , constants = require("constants") - -fs._curOpen = 0 - -fs.MIN_MAX_OPEN = 64 -fs.MAX_OPEN = 1024 - -// prevent EMFILE errors -function OpenReq (path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb -} - -function noop () {} - -fs.open = gracefulOpen - -function gracefulOpen (path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new OpenReq(path, flags, mode, cb)) - setTimeout(flush) - return - } - open(path, flags, mode, function (er, fd) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - // that was too many. reduce max, get back in queue. - // this should only happen once in a great while, and only - // if the ulimit -n is set lower than 1024. - fs.MAX_OPEN = fs._curOpen - 1 - return fs.open(path, flags, mode, cb) - } - cb(er, fd) - }) -} - -function open (path, flags, mode, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.open.call(fs, path, flags, mode, function (er, fd) { - if (er) onclose() - cb(er, fd) - }) -} - -fs.openSync = function (path, flags, mode) { - var ret - ret = fs._originalFs.openSync.call(fs, path, flags, mode) - fs._curOpen ++ - return ret -} - -function onclose () { - fs._curOpen -- - flush() -} - -function flush () { - while (fs._curOpen < fs.MAX_OPEN) { - var req = queue.shift() - if (!req) return - switch (req.constructor.name) { - case 'OpenReq': - open(req.path, req.flags || "r", req.mode || 0777, req.cb) - break - case 'ReaddirReq': - readdir(req.path, req.cb) - break - case 'ReadFileReq': - readFile(req.path, req.options, req.cb) - break - case 'WriteFileReq': - writeFile(req.path, req.data, req.options, req.cb) - break - default: - throw new Error('Unknown req type: ' + req.constructor.name) - } - } -} - -fs.close = function (fd, cb) { - cb = cb || noop - fs._originalFs.close.call(fs, fd, function (er) { - onclose() - cb(er) - }) -} - -fs.closeSync = function (fd) { - try { - return fs._originalFs.closeSync.call(fs, fd) - } finally { - onclose() - } -} - - -// readdir takes a fd as well. -// however, the sync version closes it right away, so -// there's no need to wrap. -// It would be nice to catch when it throws an EMFILE, -// but that's relatively rare anyway. - -fs.readdir = gracefulReaddir - -function gracefulReaddir (path, cb) { - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new ReaddirReq(path, cb)) - setTimeout(flush) - return - } - - readdir(path, function (er, files) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.readdir(path, cb) - } - cb(er, files) - }) -} - -function readdir (path, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.readdir.call(fs, path, function (er, files) { - onclose() - cb(er, files) - }) -} - -function ReaddirReq (path, cb) { - this.path = path - this.cb = cb -} - - -fs.readFile = gracefulReadFile - -function gracefulReadFile(path, options, cb) { - if (typeof options === "function") cb = options, options = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new ReadFileReq(path, options, cb)) - setTimeout(flush) - return - } - - readFile(path, options, function (er, data) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.readFile(path, options, cb) - } - cb(er, data) - }) -} - -function readFile (path, options, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.readFile.call(fs, path, options, function (er, data) { - onclose() - cb(er, data) - }) -} - -function ReadFileReq (path, options, cb) { - this.path = path - this.options = options - this.cb = cb -} - - - - -fs.writeFile = gracefulWriteFile - -function gracefulWriteFile(path, data, options, cb) { - if (typeof options === "function") cb = options, options = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new WriteFileReq(path, data, options, cb)) - setTimeout(flush) - return - } - - writeFile(path, data, options, function (er) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.writeFile(path, data, options, cb) - } - cb(er) - }) -} - -function writeFile (path, data, options, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.writeFile.call(fs, path, data, options, function (er) { - onclose() - cb(er) - }) -} - -function WriteFileReq (path, data, options, cb) { - this.path = path - this.data = data - this.options = options - this.cb = cb -} - - -// (re-)implement some things that are known busted or missing. - -var constants = require("constants") - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/package.json deleted file mode 100644 index 6590047..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "graceful-fs@~1.2.0", - "scope": null, - "escapedName": "graceful-fs", - "name": "graceful-fs", - "rawSpec": "~1.2.0", - "spec": ">=1.2.0 <1.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob" - ] - ], - "_from": "graceful-fs@>=1.2.0 <1.3.0", - "_id": "graceful-fs@1.2.3", - "_inCache": true, - "_location": "/globule/graceful-fs", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "1.3.2", - "_phantomChildren": {}, - "_requested": { - "raw": "graceful-fs@~1.2.0", - "scope": null, - "escapedName": "graceful-fs", - "name": "graceful-fs", - "rawSpec": "~1.2.0", - "spec": ">=1.2.0 <1.3.0", - "type": "range" - }, - "_requiredBy": [ - "/globule/glob" - ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "_shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364", - "_shrinkwrap": null, - "_spec": "graceful-fs@~1.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "dependencies": {}, - "deprecated": "graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.", - "description": "A drop-in replacement for fs, making various improvements.", - "devDependencies": {}, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364", - "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" - }, - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs#readme", - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "main": "graceful-fs.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "graceful-fs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.2.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/open.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 930d532..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,46 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is not fs', function (t) { - t.notEqual(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var start = fs._curOpen - var fd = fs.openSync(__filename, 'r') - t.equal(fs._curOpen, start + 1) - fs.closeSync(fd) - t.equal(fs._curOpen, start) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - t.equal(fs._curOpen, start + 1) - fs.close(fd, function (er) { - if (er) throw er - t.equal(fs._curOpen, start) - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var start = fs._curOpen - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - t.end() - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/ulimit.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/ulimit.js deleted file mode 100644 index 8d0882d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/graceful-fs/test/ulimit.js +++ /dev/null @@ -1,158 +0,0 @@ -var test = require('tap').test - -// simulated ulimit -// this is like graceful-fs, but in reverse -var fs_ = require('fs') -var fs = require('../graceful-fs.js') -var files = fs.readdirSync(__dirname) - -// Ok, no more actual file reading! - -var fds = 0 -var nextFd = 60 -var limit = 8 -fs_.open = function (path, flags, mode, cb) { - process.nextTick(function() { - ++fds - if (fds >= limit) { - --fds - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - return cb(er) - } else { - cb(null, nextFd++) - } - }) -} - -fs_.openSync = function (path, flags, mode) { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - throw er - } else { - ++fds - return nextFd++ - } -} - -fs_.close = function (fd, cb) { - process.nextTick(function () { - --fds - cb() - }) -} - -fs_.closeSync = function (fd) { - --fds -} - -fs_.readdir = function (path, cb) { - process.nextTick(function() { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - return cb(er) - } else { - ++fds - process.nextTick(function () { - --fds - cb(null, [__filename, "some-other-file.js"]) - }) - } - }) -} - -fs_.readdirSync = function (path) { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - throw er - } else { - return [__filename, "some-other-file.js"] - } -} - - -test('open emfile autoreduce', function (t) { - fs.MIN_MAX_OPEN = 4 - t.equal(fs.MAX_OPEN, 1024) - - var max = 12 - for (var i = 0; i < max; i++) { - fs.open(__filename, 'r', next(i)) - } - - var phase = 0 - - var expect = - [ [ 0, 60, null, 1024, 4, 12, 1 ], - [ 1, 61, null, 1024, 4, 12, 2 ], - [ 2, 62, null, 1024, 4, 12, 3 ], - [ 3, 63, null, 1024, 4, 12, 4 ], - [ 4, 64, null, 1024, 4, 12, 5 ], - [ 5, 65, null, 1024, 4, 12, 6 ], - [ 6, 66, null, 1024, 4, 12, 7 ], - [ 7, 67, null, 6, 4, 5, 1 ], - [ 8, 68, null, 6, 4, 5, 2 ], - [ 9, 69, null, 6, 4, 5, 3 ], - [ 10, 70, null, 6, 4, 5, 4 ], - [ 11, 71, null, 6, 4, 5, 5 ] ] - - var actual = [] - - function next (i) { return function (er, fd) { - if (er) - throw er - actual.push([i, fd, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds]) - - if (i === max - 1) { - t.same(actual, expect) - t.ok(fs.MAX_OPEN < limit) - t.end() - } - - fs.close(fd) - } } -}) - -test('readdir emfile autoreduce', function (t) { - fs.MAX_OPEN = 1024 - var max = 12 - for (var i = 0; i < max; i ++) { - fs.readdir(__dirname, next(i)) - } - - var expect = - [ [0,[__filename,"some-other-file.js"],null,7,4,7,7], - [1,[__filename,"some-other-file.js"],null,7,4,7,6], - [2,[__filename,"some-other-file.js"],null,7,4,7,5], - [3,[__filename,"some-other-file.js"],null,7,4,7,4], - [4,[__filename,"some-other-file.js"],null,7,4,7,3], - [5,[__filename,"some-other-file.js"],null,7,4,6,2], - [6,[__filename,"some-other-file.js"],null,7,4,5,1], - [7,[__filename,"some-other-file.js"],null,7,4,4,0], - [8,[__filename,"some-other-file.js"],null,7,4,3,3], - [9,[__filename,"some-other-file.js"],null,7,4,2,2], - [10,[__filename,"some-other-file.js"],null,7,4,1,1], - [11,[__filename,"some-other-file.js"],null,7,4,0,0] ] - - var actual = [] - - function next (i) { return function (er, files) { - if (er) - throw er - var line = [i, files, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds ] - actual.push(line) - - if (i === max - 1) { - t.ok(fs.MAX_OPEN < limit) - t.same(actual, expect) - t.end() - } - } } -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/README.md deleted file mode 100644 index b2beaed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/README.md +++ /dev/null @@ -1,51 +0,0 @@ -A dead simple way to do inheritance in JS. - - var inherits = require("inherits") - - function Animal () { - this.alive = true - } - Animal.prototype.say = function (what) { - console.log(what) - } - - inherits(Dog, Animal) - function Dog () { - Dog.super.apply(this) - } - Dog.prototype.sniff = function () { - this.say("sniff sniff") - } - Dog.prototype.bark = function () { - this.say("woof woof") - } - - inherits(Chihuahua, Dog) - function Chihuahua () { - Chihuahua.super.apply(this) - } - Chihuahua.prototype.bark = function () { - this.say("yip yip") - } - - // also works - function Cat () { - Cat.super.apply(this) - } - Cat.prototype.hiss = function () { - this.say("CHSKKSS!!") - } - inherits(Cat, Animal, { - meow: function () { this.say("miao miao") } - }) - Cat.prototype.purr = function () { - this.say("purr purr") - } - - - var c = new Chihuahua - assert(c instanceof Chihuahua) - assert(c instanceof Dog) - assert(c instanceof Animal) - -The actual function is laughably small. 10-lines small. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/inherits.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/inherits.js deleted file mode 100644 index 061b396..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/inherits.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = inherits - -function inherits (c, p, proto) { - proto = proto || {} - var e = {} - ;[c.prototype, proto].forEach(function (s) { - Object.getOwnPropertyNames(s).forEach(function (k) { - e[k] = Object.getOwnPropertyDescriptor(s, k) - }) - }) - c.prototype = Object.create(p.prototype, e) - c.super = p -} - -//function Child () { -// Child.super.call(this) -// console.error([this -// ,this.constructor -// ,this.constructor === Child -// ,this.constructor.super === Parent -// ,Object.getPrototypeOf(this) === Child.prototype -// ,Object.getPrototypeOf(Object.getPrototypeOf(this)) -// === Parent.prototype -// ,this instanceof Child -// ,this instanceof Parent]) -//} -//function Parent () {} -//inherits(Child, Parent) -//new Child diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/package.json deleted file mode 100644 index d66aeab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/inherits/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "inherits@1", - "scope": null, - "escapedName": "inherits", - "name": "inherits", - "rawSpec": "1", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob" - ] - ], - "_from": "inherits@>=1.0.0 <2.0.0", - "_id": "inherits@1.0.2", - "_inCache": true, - "_location": "/globule/inherits", - "_nodeVersion": "2.2.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "_npmVersion": "3.2.2", - "_phantomChildren": {}, - "_requested": { - "raw": "inherits@1", - "scope": null, - "escapedName": "inherits", - "name": "inherits", - "rawSpec": "1", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/globule/glob" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "_shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b", - "_shrinkwrap": null, - "_spec": "inherits@1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "dependencies": {}, - "description": "A tiny simple way to do classic inheritance in js", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented" - ], - "main": "./inherits.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "inherits", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/inherits.git" - }, - "scripts": {}, - "version": "1.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/LICENSE.txt deleted file mode 100644 index cc08239..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.4.3, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud Inc. - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/README.md deleted file mode 100644 index 3b8c332..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Lo-Dash v1.0.2 - -A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). - -## Download - -* Lo-Dash builds (for modern environments):
-[Development](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.js) and -[Production](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.min.js) - -* Lo-Dash compatibility builds (for legacy and modern environments):
-[Development](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.compat.js) and -[Production](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.compat.min.js) - -* Underscore compatibility builds:
-[Development](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.underscore.js) and -[Production](https://raw.github.com/lodash/lodash/v1.0.2/dist/lodash.underscore.min.js) - -* For optimal file size, [create a custom build](http://lodash.com/custom-builds) with only the features you need - -## Dive in - -We’ve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests). - -For a list of upcoming features, check out our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). - -The full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog). - -## Installation and usage - -In browsers: - -```html - -``` - -Using [`npm`](http://npmjs.org/): - -```bash -npm install lodash - -npm install -g lodash -npm link lodash -``` - -To avoid potential issues, update `npm` before installing Lo-Dash: - -```bash -npm install npm -g -``` - -In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/): - -```js -var _ = require('lodash'); - -// or as a drop-in replacement for Underscore -var _ = require('lodash/lodash.underscore'); -``` - -**Note:** If Lo-Dash is installed globally, run [`npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it. - -In [RingoJS v0.7.0-](http://ringojs.org/): - -```js -var _ = require('lodash')._; -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('lodash.js'); -``` - -In an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require({ - 'paths': { - 'underscore': 'path/to/lodash' - } -}, -['underscore'], function(_) { - console.log(_.VERSION); -}); -``` - -## Resources - -For more information check out these articles, screencasts, and other videos over Lo-Dash: - - * Posts - - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) - - * Videos - - [Introducing Lo-Dash](https://vimeo.com/44154599) - - [Lo-Dash optimizations and custom builds](https://vimeo.com/44154601) - - [Lo-Dash’s origin and why it’s a better utility belt](https://vimeo.com/44154600) - - [Unit testing in Lo-Dash](https://vimeo.com/45865290) - - [Lo-Dash’s approach to native method use](https://vimeo.com/48576012) - - [CascadiaJS: Lo-Dash for a better utility belt](http://www.youtube.com/watch?v=dpPy4f_SeEk) - -## Features - - * AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.) - * [_(…)](http://lodash.com/docs#_) supports intuitive chaining - * [_.at](http://lodash.com/docs#at) for cherry-picking collection values - * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods - * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays and objects - * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument - * [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early - * [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties - * [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties - * [_.isPlainObject](http://lodash.com/docs#isPlainObject) checks if values are created by the `Object` constructor - * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) - * [_.partial](http://lodash.com/docs#partial) and [_.partialRight](http://lodash.com/docs#partialRight) for partial application without `this` binding - * [_.template](http://lodash.com/docs#template) supports [*“imports”* options](http://lodash.com/docs#templateSettings_imports), [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6), and [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * [_.where](http://lodash.com/docs#where) supports deep object comparisons - * [_.clone](http://lodash.com/docs#clone), [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), - [and more…](http://lodash.com/docs "_.assign, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept `callback` and `thisArg` arguments - * [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray), - [and more…](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.some, _.sortBy, _.where") accept strings - * [_.filter](http://lodash.com/docs#filter), [_.find](http://lodash.com/docs#find), [_.map](http://lodash.com/docs#map), - [and more…](http://lodash.com/docs "_.countBy, _.every, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* and *“_.where”* `callback` shorthands - -## Support - -Lo-Dash has been tested in at least Chrome 5~24, Firefox 1~18, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.20, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/dist/lodash.compat.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/dist/lodash.compat.js deleted file mode 100644 index 925e7fc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/globule/node_modules/lodash/dist/lodash.compat.js +++ /dev/null @@ -1,5152 +0,0 @@ -/** - * @license - * Lo-Dash 1.0.2 (Custom Build) - * Build: `lodash -o ./dist/lodash.compat.js` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.4.4 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. - * Available under MIT license - */ -;(function(window, undefined) { - - /** Detect free variable `exports` */ - var freeExports = typeof exports == 'object' && exports; - - /** Detect free variable `module` */ - var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; - - /** Detect free variable `global` and use it as `window` */ - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal) { - window = freeGlobal; - } - - /** Used for array and object method references */ - var arrayRef = [], - objectRef = {}; - - /** Used to generate unique IDs */ - var idCounter = 0; - - /** Used internally to indicate various things */ - var indicatorObject = objectRef; - - /** Used by `cachedContains` as the default size when optimizations are enabled for large arrays */ - var largeArraySize = 30; - - /** Used to restore the original `_` reference in `noConflict` */ - var oldDash = window._; - - /** Used to match HTML entities */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g; - - /** Used to match empty string literals in compiled template source */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match regexp flags from their coerced string values */ - var reFlags = /\w*$/; - - /** Used to detect if a method is native */ - var reNative = RegExp('^' + - (objectRef.valueOf + '') - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/valueOf|for [^\]]+/g, '.+?') + '$' - ); - - /** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6 - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match "interpolate" template delimiters */ - var reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to ensure capturing order of template delimiters */ - var reNoMatch = /($^)/; - - /** Used to match HTML characters */ - var reUnescapedHtml = /[&<>"']/g; - - /** Used to match unescaped characters in compiled string literals */ - var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - - /** Used to fix the JScript [[DontEnum]] bug */ - var shadowed = [ - 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', - 'toLocaleString', 'toString', 'valueOf' - ]; - - /** Used to make template sourceURLs easier to identify */ - var templateCounter = 0; - - /** Native method shortcuts */ - var ceil = Math.ceil, - concat = arrayRef.concat, - floor = Math.floor, - getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, - hasOwnProperty = objectRef.hasOwnProperty, - push = arrayRef.push, - toString = objectRef.toString; - - /* Native method shortcuts for methods with the same name as other `lodash` methods */ - var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind, - nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray, - nativeIsFinite = window.isFinite, - nativeIsNaN = window.isNaN, - nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys, - nativeMax = Math.max, - nativeMin = Math.min, - nativeRandom = Math.random; - - /** `Object#toString` result shortcuts */ - var argsClass = '[object Arguments]', - arrayClass = '[object Array]', - boolClass = '[object Boolean]', - dateClass = '[object Date]', - funcClass = '[object Function]', - numberClass = '[object Number]', - objectClass = '[object Object]', - regexpClass = '[object RegExp]', - stringClass = '[object String]'; - - /** Detect various environments */ - var isIeOpera = !!window.attachEvent, - isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera); - - /* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */ - var isBindFast = nativeBind && !isV8; - - /* Detect if `Object.keys` exists and is inferred to be fast (IE, Opera, V8) */ - var isKeysFast = nativeKeys && (isIeOpera || isV8); - - /** - * Detect the JScript [[DontEnum]] bug: - * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are - * made non-enumerable as well. - */ - var hasDontEnumBug; - - /** - * Detect if a `prototype` properties are enumerable by default: - * - * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 - * (if the prototype or a property on the prototype has been set) - * incorrectly sets a function's `prototype` property [[Enumerable]] - * value to `true`. - */ - var hasEnumPrototype; - - /** Detect if own properties are iterated after inherited properties (IE < 9) */ - var iteratesOwnLast; - - /** - * Detect if `Array#shift` and `Array#splice` augment array-like objects - * incorrectly: - * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` - * and `splice()` functions that fail to remove the last element, `value[0]`, - * of array-like objects even though the `length` property is set to `0`. - * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` - * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. - */ - var hasObjectSpliceBug = (hasObjectSpliceBug = { '0': 1, 'length': 1 }, - arrayRef.splice.call(hasObjectSpliceBug, 0, 1), hasObjectSpliceBug[0]); - - /** Detect if `arguments` object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1) */ - var nonEnumArgs = true; - - (function() { - var props = []; - function ctor() { this.x = 1; } - ctor.prototype = { 'valueOf': 1, 'y': 1 }; - for (var prop in new ctor) { props.push(prop); } - for (prop in arguments) { nonEnumArgs = !prop; } - - hasDontEnumBug = !/valueOf/.test(props); - hasEnumPrototype = ctor.propertyIsEnumerable('prototype'); - iteratesOwnLast = props[0] != 'x'; - }(1)); - - /** Detect if `arguments` objects are `Object` objects (all but Opera < 10.5) */ - var argsAreObjects = arguments.constructor == Object; - - /** Detect if `arguments` objects [[Class]] is unresolvable (Firefox < 4, IE < 9) */ - var noArgsClass = !isArguments(arguments); - - /** - * Detect lack of support for accessing string characters by index: - * - * IE < 8 can't access characters by index and IE 8 can only access - * characters by index on string literals. - */ - var noCharByIndex = ('x'[0] + Object('x')[0]) != 'xx'; - - /** - * Detect if a DOM node's [[Class]] is unresolvable (IE < 9) - * and that the JS engine won't error when attempting to coerce an object to - * a string without a `toString` function. - */ - try { - var noNodeClass = toString.call(document) == objectClass && !({ 'toString': 0 } + ''); - } catch(e) { } - - /** Used to identify object classifications that `_.clone` supports */ - var cloneableClasses = {}; - cloneableClasses[funcClass] = false; - cloneableClasses[argsClass] = cloneableClasses[arrayClass] = - cloneableClasses[boolClass] = cloneableClasses[dateClass] = - cloneableClasses[numberClass] = cloneableClasses[objectClass] = - cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; - - /** Used to lookup a built-in constructor by [[Class]] */ - var ctorByClass = {}; - ctorByClass[arrayClass] = Array; - ctorByClass[boolClass] = Boolean; - ctorByClass[dateClass] = Date; - ctorByClass[objectClass] = Object; - ctorByClass[numberClass] = Number; - ctorByClass[regexpClass] = RegExp; - ctorByClass[stringClass] = String; - - /** Used to determine if values are of the language type Object */ - var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false - }; - - /** Used to escape characters for inclusion in compiled string literals */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object, that wraps the given `value`, to enable method - * chaining. - * - * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, - * and `unshift` - * - * The chainable wrapper functions are: - * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, `compose`, - * `concat`, `countBy`, `debounce`, `defaults`, `defer`, `delay`, `difference`, - * `filter`, `flatten`, `forEach`, `forIn`, `forOwn`, `functions`, `groupBy`, - * `initial`, `intersection`, `invert`, `invoke`, `keys`, `map`, `max`, `memoize`, - * `merge`, `min`, `object`, `omit`, `once`, `pairs`, `partial`, `partialRight`, - * `pick`, `pluck`, `push`, `range`, `reject`, `rest`, `reverse`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, - * `union`, `uniq`, `unshift`, `values`, `where`, `without`, `wrap`, and `zip` - * - * The non-chainable wrapper functions are: - * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, `identity`, - * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, - * `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, `isObject`, - * `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, `lastIndexOf`, - * `mixin`, `noConflict`, `pop`, `random`, `reduce`, `reduceRight`, `result`, - * `shift`, `size`, `some`, `sortedIndex`, `template`, `unescape`, and `uniqueId` - * - * The wrapper functions `first` and `last` return wrapped values when `n` is - * passed, otherwise they return unwrapped values. - * - * @name _ - * @constructor - * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. - */ - function lodash(value) { - // exit early if already wrapped, even if wrapped by a different `lodash` constructor - if (value && typeof value == 'object' && value.__wrapped__) { - return value; - } - // allow invoking `lodash` without the `new` operator - if (!(this instanceof lodash)) { - return new lodash(value); - } - this.__wrapped__ = value; - } - - /** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type String - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': lodash - } - }; - - /*--------------------------------------------------------------------------*/ - - /** - * The template used to create iterator functions. - * - * @private - * @param {Obect} data The data object used to populate the text. - * @returns {String} Returns the interpolated text. - */ - var iteratorTemplate = function(obj) { - - var __p = 'var index, iterable = ' + - (obj.firstArg ) + - ', result = iterable;\nif (!iterable) return result;\n' + - (obj.top ) + - ';\n'; - if (obj.arrays) { - __p += 'var length = iterable.length; index = -1;\nif (' + - (obj.arrays ) + - ') { '; - if (obj.noCharByIndex) { - __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; - } ; - __p += '\n while (++index < length) {\n ' + - (obj.loop ) + - '\n }\n}\nelse { '; - } else if (obj.nonEnumArgs) { - __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + - (obj.loop ) + - '\n }\n } else { '; - } ; - - if (obj.hasEnumPrototype) { - __p += '\n var skipProto = typeof iterable == \'function\';\n '; - } ; - - if (obj.isKeysFast && obj.useHas) { - __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n '; - if (obj.hasEnumPrototype) { - __p += 'if (!(skipProto && index == \'prototype\')) {\n '; - } ; - __p += - (obj.loop ) + - ''; - if (obj.hasEnumPrototype) { - __p += '}\n'; - } ; - __p += ' } '; - } else { - __p += '\n for (index in iterable) {'; - if (obj.hasEnumPrototype || obj.useHas) { - __p += '\n if ('; - if (obj.hasEnumPrototype) { - __p += '!(skipProto && index == \'prototype\')'; - } if (obj.hasEnumPrototype && obj.useHas) { - __p += ' && '; - } if (obj.useHas) { - __p += 'hasOwnProperty.call(iterable, index)'; - } ; - __p += ') { '; - } ; - __p += - (obj.loop ) + - '; '; - if (obj.hasEnumPrototype || obj.useHas) { - __p += '\n }'; - } ; - __p += '\n } '; - } ; - - if (obj.hasDontEnumBug) { - __p += '\n\n var ctor = iterable.constructor;\n '; - for (var k = 0; k < 7; k++) { - __p += '\n index = \'' + - (obj.shadowed[k] ) + - '\';\n if ('; - if (obj.shadowed[k] == 'constructor') { - __p += '!(ctor && ctor.prototype === iterable) && '; - } ; - __p += 'hasOwnProperty.call(iterable, index)) {\n ' + - (obj.loop ) + - '\n } '; - } ; - - } ; - - if (obj.arrays || obj.nonEnumArgs) { - __p += '\n}'; - } ; - __p += - (obj.bottom ) + - ';\nreturn result'; - - - return __p - }; - - /** Reusable iterator options for `assign` and `defaults` */ - var defaultsIteratorOptions = { - 'args': 'object, source, guard', - 'top': - 'var args = arguments,\n' + - ' argsIndex = 0,\n' + - " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + - 'while (++argsIndex < argsLength) {\n' + - ' iterable = args[argsIndex];\n' + - ' if (iterable && objectTypes[typeof iterable]) {', - 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", - 'bottom': ' }\n}' - }; - - /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ - var eachIteratorOptions = { - 'args': 'collection, callback, thisArg', - 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg)", - 'arrays': "typeof length == 'number'", - 'loop': 'if (callback(iterable[index], index, collection) === false) return result' - }; - - /** Reusable iterator options for `forIn` and `forOwn` */ - var forOwnIteratorOptions = { - 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, - 'arrays': false - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a function optimized to search large arrays for a given `value`, - * starting at `fromIndex`, using strict equality for comparisons, i.e. `===`. - * - * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=0] The index to search from. - * @param {Number} [largeSize=30] The length at which an array is considered large. - * @returns {Boolean} Returns `true`, if `value` is found, else `false`. - */ - function cachedContains(array, fromIndex, largeSize) { - fromIndex || (fromIndex = 0); - - var length = array.length, - isLarge = (length - fromIndex) >= (largeSize || largeArraySize); - - if (isLarge) { - var cache = {}, - index = fromIndex - 1; - - while (++index < length) { - // manually coerce `value` to a string because `hasOwnProperty`, in some - // older versions of Firefox, coerces objects incorrectly - var key = array[index] + ''; - (hasOwnProperty.call(cache, key) ? cache[key] : (cache[key] = [])).push(array[index]); - } - } - return function(value) { - if (isLarge) { - var key = value + ''; - return hasOwnProperty.call(cache, key) && indexOf(cache[key], value) > -1; - } - return indexOf(array, value, fromIndex) > -1; - } - } - - /** - * Used by `_.max` and `_.min` as the default `callback` when a given - * `collection` is a string value. - * - * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. - */ - function charAtCallback(value) { - return value.charCodeAt(0); - } - - /** - * Used by `sortBy` to compare transformed `collection` values, stable sorting - * them in ascending order. - * - * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. - */ - function compareAscending(a, b) { - var ai = a.index, - bi = b.index; - - a = a.criteria; - b = b.criteria; - - // ensure a stable sort in V8 and other engines - // http://code.google.com/p/v8/issues/detail?id=90 - if (a !== b) { - if (a > b || typeof a == 'undefined') { - return 1; - } - if (a < b || typeof b == 'undefined') { - return -1; - } - } - return ai < bi ? -1 : 1; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` binding - * of `thisArg` and prepends any `partialArgs` to the arguments passed to the - * bound function. - * - * @private - * @param {Function|String} func The function to bind or the method name. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Array} partialArgs An array of arguments to be partially applied. - * @param {Object} [rightIndicator] Used to indicate partially applying arguments from the right. - * @returns {Function} Returns the new bound function. - */ - function createBound(func, thisArg, partialArgs, rightIndicator) { - var isFunc = isFunction(func), - isPartial = !partialArgs, - key = thisArg; - - // juggle arguments - if (isPartial) { - partialArgs = thisArg; - } - if (!isFunc) { - thisArg = func; - } - - function bound() { - // `Function#bind` spec - // http://es5.github.com/#x15.3.4.5 - var args = arguments, - thisBinding = isPartial ? this : thisArg; - - if (!isFunc) { - func = thisArg[key]; - } - if (partialArgs.length) { - args = args.length - ? (args = slice(args), rightIndicator ? args.concat(partialArgs) : partialArgs.concat(args)) - : partialArgs; - } - if (this instanceof bound) { - // ensure `new bound` is an instance of `bound` and `func` - noop.prototype = func.prototype; - thisBinding = new noop; - noop.prototype = null; - - // mimic the constructor's `return` behavior - // http://es5.github.com/#x13.2.2 - var result = func.apply(thisBinding, args); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisBinding, args); - } - return bound; - } - - /** - * Produces a callback bound to an optional `thisArg`. If `func` is a property - * name, the created callback will return the property value for a given element. - * If `func` is an object, the created callback will return `true` for elements - * that contain the equivalent object properties, otherwise it will return `false`. - * - * @private - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount=3] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - */ - function createCallback(func, thisArg, argCount) { - if (func == null) { - return identity; - } - var type = typeof func; - if (type != 'function') { - if (type != 'object') { - return function(object) { - return object[func]; - }; - } - var props = keys(func); - return function(object) { - var length = props.length, - result = false; - while (length--) { - if (!(result = isEqual(object[props[length]], func[props[length]], indicatorObject))) { - break; - } - } - return result; - }; - } - if (typeof thisArg != 'undefined') { - if (argCount === 1) { - return function(value) { - return func.call(thisArg, value); - }; - } - if (argCount === 2) { - return function(a, b) { - return func.call(thisArg, a, b); - }; - } - if (argCount === 4) { - return function(accumulator, value, index, object) { - return func.call(thisArg, accumulator, value, index, object); - }; - } - return function(value, index, object) { - return func.call(thisArg, value, index, object); - }; - } - return func; - } - - /** - * Creates compiled iteration functions. - * - * @private - * @param {Object} [options1, options2, ...] The compile options object(s). - * arrays - A string of code to determine if the iterable is an array or array-like. - * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop. - * args - A string of comma separated arguments the iteration function will accept. - * top - A string of code to execute before the iteration branches. - * loop - A string of code to execute in the object loop. - * bottom - A string of code to execute after the iteration branches. - * - * @returns {Function} Returns the compiled function. - */ - function createIterator() { - var data = { - // support properties - 'hasDontEnumBug': hasDontEnumBug, - 'hasEnumPrototype': hasEnumPrototype, - 'isKeysFast': isKeysFast, - 'nonEnumArgs': nonEnumArgs, - 'noCharByIndex': noCharByIndex, - 'shadowed': shadowed, - - // iterator options - 'arrays': 'isArray(iterable)', - 'bottom': '', - 'loop': '', - 'top': '', - 'useHas': true - }; - - // merge options into a template data object - for (var object, index = 0; object = arguments[index]; index++) { - for (var key in object) { - data[key] = object[key]; - } - } - var args = data.args; - data.firstArg = /^[^,]+/.exec(args)[0]; - - // create the function factory - var factory = Function( - 'createCallback, hasOwnProperty, isArguments, isArray, isString, ' + - 'objectTypes, nativeKeys', - 'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}' - ); - // return the compiled function - return factory( - createCallback, hasOwnProperty, isArguments, isArray, isString, - objectTypes, nativeKeys - ); - } - - /** - * A function compiled to iterate `arguments` objects, arrays, objects, and - * strings consistenly across environments, executing the `callback` for each - * element in the `collection`. The `callback` is bound to `thisArg` and invoked - * with three arguments; (value, index|key, collection). Callbacks may exit - * iteration early by explicitly returning `false`. - * - * @private - * @type Function - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. - */ - var each = createIterator(eachIteratorOptions); - - /** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeStringChar(match) { - return '\\' + stringEscapes[match]; - } - - /** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeHtmlChar(match) { - return htmlEscapes[match]; - } - - /** - * Checks if `value` is a DOM node in IE < 9. - * - * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM node, else `false`. - */ - function isNode(value) { - // IE < 9 presents DOM nodes as `Object` objects except they have `toString` - // methods that are `typeof` "string" and still can coerce nodes to strings - return typeof value.toString != 'function' && typeof (value + '') == 'string'; - } - - /** - * A no-operation function. - * - * @private - */ - function noop() { - // no operation performed - } - - /** - * Slices the `collection` from the `start` index up to, but not including, - * the `end` index. - * - * Note: This function is used, instead of `Array#slice`, to support node lists - * in IE < 9 and to ensure dense arrays are returned. - * - * @private - * @param {Array|Object|String} collection The collection to slice. - * @param {Number} start The start index. - * @param {Number} end The end index. - * @returns {Array} Returns the new array. - */ - function slice(array, start, end) { - start || (start = 0); - if (typeof end == 'undefined') { - end = array ? array.length : 0; - } - var index = -1, - length = end - start || 0, - result = Array(length < 0 ? 0 : length); - - while (++index < length) { - result[index] = array[start + index]; - } - return result; - } - - /** - * Used by `unescape` to convert HTML entities to characters. - * - * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. - */ - function unescapeHtmlChar(match) { - return htmlUnescapes[match]; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if `value` is an `arguments` object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an `arguments` object, else `false`. - * @example - * - * (function() { return _.isArguments(arguments); })(1, 2, 3); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return toString.call(value) == argsClass; - } - // fallback for browsers that can't detect `arguments` objects by [[Class]] - if (noArgsClass) { - isArguments = function(value) { - return value ? hasOwnProperty.call(value, 'callee') : false; - }; - } - - /** - * Iterates over `object`'s own and inherited enumerable properties, executing - * the `callback` for each property. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, key, object). Callbacks may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * function Dog(name) { - * this.name = name; - * } - * - * Dog.prototype.bark = function() { - * alert('Woof, woof!'); - * }; - * - * _.forIn(new Dog('Dagny'), function(value, key) { - * alert(key); - * }); - * // => alerts 'name' and 'bark' (order is not guaranteed) - */ - var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { - 'useHas': false - }); - - /** - * Iterates over an object's own enumerable properties, executing the `callback` - * for each property. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, key, object). Callbacks may exit iteration early by explicitly - * returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { - * alert(key); - * }); - * // => alerts '0', '1', and 'length' (order is not guaranteed) - */ - var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); - - /** - * Checks if `value` is an array. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an array, else `false`. - * @example - * - * (function() { return _.isArray(arguments); })(); - * // => false - * - * _.isArray([1, 2, 3]); - * // => true - */ - var isArray = nativeIsArray || function(value) { - // `instanceof` may cause a memory leak in IE 7 if `value` is a host object - // http://ajaxian.com/archives/working-aroung-the-instanceof-memory-leak - return (argsAreObjects && value instanceof Array) || toString.call(value) == arrayClass; - }; - - /** - * Creates an array composed of the own enumerable property names of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (order is not guaranteed) - */ - var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - if ((hasEnumPrototype && typeof object == 'function') || - (nonEnumArgs && object.length && isArguments(object))) { - return shimKeys(object); - } - return nativeKeys(object); - }; - - /** - * A fallback implementation of `isPlainObject` that checks if a given `value` - * is an object created by the `Object` constructor, assuming objects created - * by the `Object` constructor have no inherited enumerable properties and that - * there are no `Object.prototype` extensions. - * - * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`. - */ - function shimIsPlainObject(value) { - // avoid non-objects and false positives for `arguments` objects - var result = false; - if (!(value && typeof value == 'object') || isArguments(value)) { - return result; - } - // check that the constructor is `Object` (i.e. `Object instanceof Object`) - var ctor = value.constructor; - if ((!isFunction(ctor) && (!noNodeClass || !isNode(value))) || ctor instanceof ctor) { - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - if (iteratesOwnLast) { - forIn(value, function(value, key, object) { - result = !hasOwnProperty.call(object, key); - return false; - }); - return result === false; - } - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - forIn(value, function(value, key) { - result = key; - }); - return result === false || hasOwnProperty.call(value, result); - } - return result; - } - - /** - * A fallback implementation of `Object.keys` that produces an array of the - * given object's own enumerable property names. - * - * @private - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - */ - function shimKeys(object) { - var result = []; - forOwn(object, function(value, key) { - result.push(key); - }); - return result; - } - - /** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Used to convert HTML entities to characters */ - var htmlUnescapes = invert(htmlEscapes); - - /*--------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources will overwrite propery assignments of previous - * sources. If a `callback` function is passed, it will be executed to produce - * the assigned values. The `callback` is bound to `thisArg` and invoked with - * two arguments; (objectValue, sourceValue). - * - * @static - * @memberOf _ - * @type Function - * @alias extend - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. - * @example - * - * _.assign({ 'name': 'moe' }, { 'age': 40 }); - * // => { 'name': 'moe', 'age': 40 } - * - * var defaults = _.partialRight(_.assign, function(a, b) { - * return typeof a == 'undefined' ? b : a; - * }); - * - * var food = { 'name': 'apple' }; - * defaults(food, { 'name': 'banana', 'type': 'fruit' }); - * // => { 'name': 'apple', 'type': 'fruit' } - */ - var assign = createIterator(defaultsIteratorOptions, { - 'top': - defaultsIteratorOptions.top.replace(';', - ';\n' + - "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + - ' var callback = createCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + - "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + - ' callback = args[--argsLength];\n' + - '}' - ), - 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' - }); - - /** - * Creates a clone of `value`. If `deep` is `true`, nested objects will also - * be cloned, otherwise they will be assigned by reference. If a `callback` - * function is passed, it will be executed to produce the cloned values. If - * `callback` returns `undefined`, cloning will be handled by the method instead. - * The `callback` is bound to `thisArg` and invoked with one argument; (value). - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Array} [stackA=[]] Internally used to track traversed source objects. - * @param- {Array} [stackB=[]] Internally used to associate clones with source counterparts. - * @returns {Mixed} Returns the cloned `value`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * var shallow = _.clone(stooges); - * shallow[0] === stooges[0]; - * // => true - * - * var deep = _.clone(stooges, true); - * deep[0] === stooges[0]; - * // => false - * - * _.mixin({ - * 'clone': _.partialRight(_.clone, function(value) { - * return _.isElement(value) ? value.cloneNode(false) : undefined; - * }) - * }); - * - * var clone = _.clone(document.body); - * clone.childNodes.length; - * // => 0 - */ - function clone(value, deep, callback, thisArg, stackA, stackB) { - var result = value; - - // allows working with "Collections" methods without using their `callback` - // argument, `index|key`, for this method's `callback` - if (typeof deep == 'function') { - thisArg = callback; - callback = deep; - deep = false; - } - if (typeof callback == 'function') { - callback = typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg, 1); - result = callback(result); - - var done = typeof result != 'undefined'; - if (!done) { - result = value; - } - } - // inspect [[Class]] - var isObj = isObject(result); - if (isObj) { - var className = toString.call(result); - if (!cloneableClasses[className] || (noNodeClass && isNode(result))) { - return result; - } - var isArr = isArray(result); - } - // shallow clone - if (!isObj || !deep) { - return isObj && !done - ? (isArr ? slice(result) : assign({}, result)) - : result; - } - var ctor = ctorByClass[className]; - switch (className) { - case boolClass: - case dateClass: - return done ? result : new ctor(+result); - - case numberClass: - case stringClass: - return done ? result : new ctor(result); - - case regexpClass: - return done ? result : ctor(result.source, reFlags.exec(result)); - } - // check for circular references and return corresponding clone - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // init cloned object - if (!done) { - result = isArr ? ctor(result.length) : {}; - - // add array properties assigned by `RegExp#exec` - if (isArr) { - if (hasOwnProperty.call(value, 'index')) { - result.index = value.index; - } - if (hasOwnProperty.call(value, 'input')) { - result.input = value.input; - } - } - } - // add the source value to the stack of traversed objects - // and associate it with its clone - stackA.push(value); - stackB.push(result); - - // recursively populate clone (susceptible to call stack limits) - (isArr ? forEach : forOwn)(done ? result : value, function(objValue, key) { - result[key] = clone(objValue, deep, callback, undefined, stackA, stackB); - }); - - return result; - } - - /** - * Creates a deep clone of `value`. If a `callback` function is passed, it will - * be executed to produce the cloned values. If `callback` returns the value it - * was passed, cloning will be handled by the method instead. The `callback` is - * bound to `thisArg` and invoked with one argument; (value). - * - * Note: This function is loosely based on the structured clone algorithm. Functions - * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and - * objects created by constructors other than `Object` are cloned to plain `Object` objects. - * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the deep cloned `value`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * var deep = _.cloneDeep(stooges); - * deep[0] === stooges[0]; - * // => false - * - * var view = { - * 'label': 'docs', - * 'node': element - * }; - * - * var clone = _.cloneDeep(view, function(value) { - * return _.isElement(value) ? value.cloneNode(true) : value; - * }); - * - * clone.node == view.node; - * // => false - */ - function cloneDeep(value, callback, thisArg) { - return clone(value, true, callback, thisArg); - } - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Internally used to allow working with `_.reduce` - * without using its callback's `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var food = { 'name': 'apple' }; - * _.defaults(food, { 'name': 'banana', 'type': 'fruit' }); - * // => { 'name': 'apple', 'type': 'fruit' } - */ - var defaults = createIterator(defaultsIteratorOptions); - - /** - * Creates a sorted array of all enumerable properties, own and inherited, - * of `object` that have function values. - * - * @static - * @memberOf _ - * @alias methods - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names that have function values. - * @example - * - * _.functions(_); - * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] - */ - function functions(object) { - var result = []; - forIn(object, function(value, key) { - if (isFunction(value)) { - result.push(key); - } - }); - return result.sort(); - } - - /** - * Checks if the specified object `property` exists and is a direct property, - * instead of an inherited property. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. - * @example - * - * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); - * // => true - */ - function has(object, property) { - return object ? hasOwnProperty.call(object, property) : false; - } - - /** - * Creates an object composed of the inverted keys and values of the given `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. - * @example - * - * _.invert({ 'first': 'moe', 'second': 'larry' }); - * // => { 'moe': 'first', 'larry': 'second' } (order is not guaranteed) - */ - function invert(object) { - var index = -1, - props = keys(object), - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index]; - result[object[key]] = key; - } - return result; - } - - /** - * Checks if `value` is a boolean value. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a boolean value, else `false`. - * @example - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || toString.call(value) == boolClass; - } - - /** - * Checks if `value` is a date. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a date, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - */ - function isDate(value) { - return value instanceof Date || toString.call(value) == dateClass; - } - - /** - * Checks if `value` is a DOM element. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - */ - function isElement(value) { - return value ? value.nodeType === 1 : false; - } - - /** - * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a - * length of `0` and objects with no own enumerable properties are considered - * "empty". - * - * @static - * @memberOf _ - * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true`, if the `value` is empty, else `false`. - * @example - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({}); - * // => true - * - * _.isEmpty(''); - * // => true - */ - function isEmpty(value) { - var result = true; - if (!value) { - return result; - } - var className = toString.call(value), - length = value.length; - - if ((className == arrayClass || className == stringClass || - className == argsClass || (noArgsClass && isArguments(value))) || - (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { - return !length; - } - forOwn(value, function() { - return (result = false); - }); - return result; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent to each other. If `callback` is passed, it will be executed to - * compare values. If `callback` returns `undefined`, comparisons will be handled - * by the method instead. The `callback` is bound to `thisArg` and invoked with - * two arguments; (a, b). - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Object} [stackA=[]] Internally used track traversed `a` objects. - * @param- {Object} [stackB=[]] Internally used track traversed `b` objects. - * @returns {Boolean} Returns `true`, if the values are equvalent, else `false`. - * @example - * - * var moe = { 'name': 'moe', 'age': 40 }; - * var copy = { 'name': 'moe', 'age': 40 }; - * - * moe == copy; - * // => false - * - * _.isEqual(moe, copy); - * // => true - * - * var words = ['hello', 'goodbye']; - * var otherWords = ['hi', 'goodbye']; - * - * _.isEqual(words, otherWords, function(a, b) { - * var reGreet = /^(?:hello|hi)$/i, - * aGreet = _.isString(a) && reGreet.test(a), - * bGreet = _.isString(b) && reGreet.test(b); - * - * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; - * }); - * // => true - */ - function isEqual(a, b, callback, thisArg, stackA, stackB) { - // used to indicate that when comparing objects, `a` has at least the properties of `b` - var whereIndicator = callback === indicatorObject; - if (callback && !whereIndicator) { - callback = typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg, 2); - var result = callback(a, b); - if (typeof result != 'undefined') { - return !!result; - } - } - // exit early for identical values - if (a === b) { - // treat `+0` vs. `-0` as not equal - return a !== 0 || (1 / a == 1 / b); - } - var type = typeof a, - otherType = typeof b; - - // exit early for unlike primitive values - if (a === a && - (!a || (type != 'function' && type != 'object')) && - (!b || (otherType != 'function' && otherType != 'object'))) { - return false; - } - // exit early for `null` and `undefined`, avoiding ES3's Function#call behavior - // http://es5.github.com/#x15.3.4.4 - if (a == null || b == null) { - return a === b; - } - // compare [[Class]] names - var className = toString.call(a), - otherClass = toString.call(b); - - if (className == argsClass) { - className = objectClass; - } - if (otherClass == argsClass) { - otherClass = objectClass; - } - if (className != otherClass) { - return false; - } - switch (className) { - case boolClass: - case dateClass: - // coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0`, treating invalid dates coerced to `NaN` as not equal - return +a == +b; - - case numberClass: - // treat `NaN` vs. `NaN` as equal - return a != +a - ? b != +b - // but treat `+0` vs. `-0` as not equal - : (a == 0 ? (1 / a == 1 / b) : a == +b); - - case regexpClass: - case stringClass: - // coerce regexes to strings (http://es5.github.com/#x15.10.6.4) - // treat string primitives and their corresponding object instances as equal - return a == b + ''; - } - var isArr = className == arrayClass; - if (!isArr) { - // unwrap any `lodash` wrapped values - if (a.__wrapped__ || b.__wrapped__) { - return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, callback, thisArg, stackA, stackB); - } - // exit for functions and DOM nodes - if (className != objectClass || (noNodeClass && (isNode(a) || isNode(b)))) { - return false; - } - // in older versions of Opera, `arguments` objects have `Array` constructors - var ctorA = !argsAreObjects && isArguments(a) ? Object : a.constructor, - ctorB = !argsAreObjects && isArguments(b) ? Object : b.constructor; - - // non `Object` object instances with different constructors are not equal - if (ctorA != ctorB && !( - isFunction(ctorA) && ctorA instanceof ctorA && - isFunction(ctorB) && ctorB instanceof ctorB - )) { - return false; - } - } - // assume cyclic structures are equal - // the algorithm for detecting cyclic structures is adapted from ES 5.1 - // section 15.12.3, abstract operation `JO` (http://es5.github.com/#x15.12.3) - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == a) { - return stackB[length] == b; - } - } - var size = 0; - result = true; - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - // recursively compare objects and arrays (susceptible to call stack limits) - if (isArr) { - length = a.length; - size = b.length; - - // compare lengths to determine if a deep comparison is necessary - result = size == a.length; - if (!result && !whereIndicator) { - return result; - } - // deep compare the contents, ignoring non-numeric properties - while (size--) { - var index = length, - value = b[size]; - - if (whereIndicator) { - while (index--) { - if ((result = isEqual(a[index], value, callback, thisArg, stackA, stackB))) { - break; - } - } - } else if (!(result = isEqual(a[size], value, callback, thisArg, stackA, stackB))) { - break; - } - } - return result; - } - // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` - // which, in this case, is more costly - forIn(b, function(value, key, b) { - if (hasOwnProperty.call(b, key)) { - // count the number of properties. - size++; - // deep compare each property value. - return (result = hasOwnProperty.call(a, key) && isEqual(a[key], value, callback, thisArg, stackA, stackB)); - } - }); - - if (result && !whereIndicator) { - // ensure both objects have the same number of properties - forIn(a, function(value, key, a) { - if (hasOwnProperty.call(a, key)) { - // `size` will be `-1` if `a` has more properties than `b` - return (result = --size > -1); - } - }); - } - return result; - } - - /** - * Checks if `value` is, or can be coerced to, a finite number. - * - * Note: This is not the same as native `isFinite`, which will return true for - * booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is finite, else `false`. - * @example - * - * _.isFinite(-101); - * // => true - * - * _.isFinite('10'); - * // => true - * - * _.isFinite(true); - * // => false - * - * _.isFinite(''); - * // => false - * - * _.isFinite(Infinity); - * // => false - */ - function isFinite(value) { - return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); - } - - /** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ - function isFunction(value) { - return typeof value == 'function'; - } - // fallback for older versions of Chrome and Safari - if (isFunction(/x/)) { - isFunction = function(value) { - return value instanceof Function || toString.call(value) == funcClass; - }; - } - - /** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.com/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return value ? objectTypes[typeof value] : false; - } - - /** - * Checks if `value` is `NaN`. - * - * Note: This is not the same as native `isNaN`, which will return `true` for - * `undefined` and other values. See http://es5.github.com/#x15.1.2.4. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // `NaN` as a primitive is the only value that is not equal to itself - // (perform the [[Class]] check first to avoid errors with some host objects in IE) - return isNumber(value) && value != +value - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(undefined); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is a number. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a number, else `false`. - * @example - * - * _.isNumber(8.4 * 5); - * // => true - */ - function isNumber(value) { - return typeof value == 'number' || toString.call(value) == numberClass; - } - - /** - * Checks if a given `value` is an object created by the `Object` constructor. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`. - * @example - * - * function Stooge(name, age) { - * this.name = name; - * this.age = age; - * } - * - * _.isPlainObject(new Stooge('moe', 40)); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'name': 'moe', 'age': 40 }); - * // => true - */ - var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && typeof value == 'object')) { - return false; - } - var valueOf = value.valueOf, - objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? value == objProto || (getPrototypeOf(value) == objProto && !isArguments(value)) - : shimIsPlainObject(value); - }; - - /** - * Checks if `value` is a regular expression. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a regular expression, else `false`. - * @example - * - * _.isRegExp(/moe/); - * // => true - */ - function isRegExp(value) { - return value instanceof RegExp || toString.call(value) == regexpClass; - } - - /** - * Checks if `value` is a string. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a string, else `false`. - * @example - * - * _.isString('moe'); - * // => true - */ - function isString(value) { - return typeof value == 'string' || toString.call(value) == stringClass; - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - */ - function isUndefined(value) { - return typeof value == 'undefined'; - } - - /** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined`, into the destination object. Subsequent sources - * will overwrite propery assignments of previous sources. If a `callback` function - * is passed, it will be executed to produce the merged values of the destination - * and source properties. If `callback` returns `undefined`, merging will be - * handled by the method instead. The `callback` is bound to `thisArg` and - * invoked with two arguments; (objectValue, sourceValue). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize merging properties. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Object} [deepIndicator] Internally used to indicate that `stackA` - * and `stackB` are arrays of traversed objects instead of source objects. - * @param- {Array} [stackA=[]] Internally used to track traversed source objects. - * @param- {Array} [stackB=[]] Internally used to associate values with their - * source counterparts. - * @returns {Object} Returns the destination object. - * @example - * - * var names = { - * 'stooges': [ - * { 'name': 'moe' }, - * { 'name': 'larry' } - * ] - * }; - * - * var ages = { - * 'stooges': [ - * { 'age': 40 }, - * { 'age': 50 } - * ] - * }; - * - * _.merge(names, ages); - * // => { 'stooges': [{ 'name': 'moe', 'age': 40 }, { 'name': 'larry', 'age': 50 }] } - * - * var food = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var otherFood = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(food, otherFood, function(a, b) { - * return _.isArray(a) ? a.concat(b) : undefined; - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } - */ - function merge(object, source, deepIndicator) { - var args = arguments, - index = 0, - length = 2; - - if (!isObject(object)) { - return object; - } - if (deepIndicator === indicatorObject) { - var callback = args[3], - stackA = args[4], - stackB = args[5]; - } else { - stackA = []; - stackB = []; - - // allows working with `_.reduce` and `_.reduceRight` without - // using their `callback` arguments, `index|key` and `collection` - if (typeof deepIndicator != 'number') { - length = args.length; - } - if (length > 3 && typeof args[length - 2] == 'function') { - callback = createCallback(args[--length - 1], args[length--], 2); - } else if (length > 2 && typeof args[length - 1] == 'function') { - callback = args[--length]; - } - } - while (++index < length) { - (isArray(args[index]) ? forEach : forOwn)(args[index], function(source, key) { - var found, - isArr, - result = source, - value = object[key]; - - if (source && ((isArr = isArray(source)) || isPlainObject(source))) { - // avoid merging previously merged cyclic sources - var stackLength = stackA.length; - while (stackLength--) { - if ((found = stackA[stackLength] == source)) { - value = stackB[stackLength]; - break; - } - } - if (!found) { - value = isArr - ? (isArray(value) ? value : []) - : (isPlainObject(value) ? value : {}); - - if (callback) { - result = callback(value, source); - if (typeof result != 'undefined') { - value = result; - } - } - // add `source` and associated `value` to the stack of traversed objects - stackA.push(source); - stackB.push(value); - - // recursively merge objects and arrays (susceptible to call stack limits) - if (!callback) { - value = merge(value, source, indicatorObject, callback, stackA, stackB); - } - } - } - else { - if (callback) { - result = callback(value, source); - if (typeof result == 'undefined') { - result = source; - } - } - if (typeof result != 'undefined') { - value = result; - } - } - object[key] = value; - }); - } - return object; - } - - /** - * Creates a shallow clone of `object` excluding the specified properties. - * Property names may be specified as individual arguments or as arrays of - * property names. If a `callback` function is passed, it will be executed - * for each property in the `object`, omitting the properties `callback` - * returns truthy for. The `callback` is bound to `thisArg` and invoked - * with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. - * @example - * - * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); - * // => { 'name': 'moe' } - * - * _.omit({ 'name': 'moe', 'age': 40 }, function(value) { - * return typeof value == 'number'; - * }); - * // => { 'name': 'moe' } - */ - function omit(object, callback, thisArg) { - var isFunc = typeof callback == 'function', - result = {}; - - if (isFunc) { - callback = createCallback(callback, thisArg); - } else { - var props = concat.apply(arrayRef, arguments); - } - forIn(object, function(value, key, object) { - if (isFunc - ? !callback(value, key, object) - : indexOf(props, key, 1) < 0 - ) { - result[key] = value; - } - }); - return result; - } - - /** - * Creates a two dimensional array of the given object's key-value pairs, - * i.e. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. - * @example - * - * _.pairs({ 'moe': 30, 'larry': 40 }); - * // => [['moe', 30], ['larry', 40]] (order is not guaranteed) - */ - function pairs(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; - } - - /** - * Creates a shallow clone of `object` composed of the specified properties. - * Property names may be specified as individual arguments or as arrays of property - * names. If `callback` is passed, it will be executed for each property in the - * `object`, picking the properties `callback` returns truthy for. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function called - * per iteration or properties to pick, either as individual arguments or arrays. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. - * @example - * - * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); - * // => { 'name': 'moe' } - * - * _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) { - * return key.charAt(0) != '_'; - * }); - * // => { 'name': 'moe' } - */ - function pick(object, callback, thisArg) { - var result = {}; - if (typeof callback != 'function') { - var index = 0, - props = concat.apply(arrayRef, arguments), - length = isObject(object) ? props.length : 0; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - } else { - callback = createCallback(callback, thisArg); - forIn(object, function(value, key, object) { - if (callback(value, key, object)) { - result[key] = value; - } - }); - } - return result; - } - - /** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] - */ - function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates an array of elements from the specified indexes, or keys, of the - * `collection`. Indexes may be specified as individual arguments or as arrays - * of indexes. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Array|Number|String} [index1, index2, ...] The indexes of - * `collection` to retrieve, either as individual arguments or arrays. - * @returns {Array} Returns a new array of elements corresponding to the - * provided indexes. - * @example - * - * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); - * // => ['a', 'c', 'e'] - * - * _.at(['moe', 'larry', 'curly'], 0, 2); - * // => ['moe', 'curly'] - */ - function at(collection) { - var index = -1, - props = concat.apply(arrayRef, slice(arguments, 1)), - length = props.length, - result = Array(length); - - if (noCharByIndex && isString(collection)) { - collection = collection.split(''); - } - while(++index < length) { - result[index] = collection[props[index]]; - } - return result; - } - - /** - * Checks if a given `target` element is present in a `collection` using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @alias include - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. - * @example - * - * _.contains([1, 2, 3], 1); - * // => true - * - * _.contains([1, 2, 3], 1, 2); - * // => false - * - * _.contains({ 'name': 'moe', 'age': 40 }, 'moe'); - * // => true - * - * _.contains('curly', 'ur'); - * // => true - */ - function contains(collection, target, fromIndex) { - var index = -1, - length = collection ? collection.length : 0, - result = false; - - fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; - if (typeof length == 'number') { - result = (isString(collection) - ? collection.indexOf(target, fromIndex) - : indexOf(collection, target, fromIndex) - ) > -1; - } else { - each(collection, function(value) { - if (++index >= fromIndex) { - return !(result = value === target); - } - }); - } - return result; - } - - /** - * Creates an object composed of keys returned from running each element of the - * `collection` through the given `callback`. The corresponding value of each key - * is the number of times the key was returned by the `callback`. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - function countBy(collection, callback, thisArg) { - var result = {}; - callback = createCallback(callback, thisArg); - - forEach(collection, function(value, key, collection) { - key = callback(value, key, collection) + ''; - (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); - }); - return result; - } - - /** - * Checks if the `callback` returns a truthy value for **all** elements of a - * `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements pass the callback check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * // using "_.pluck" callback shorthand - * _.every(stooges, 'age'); - * // => true - * - * // using "_.where" callback shorthand - * _.every(stooges, { 'age': 50 }); - * // => false - */ - function every(collection, callback, thisArg) { - var result = true; - callback = createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (!(result = !!callback(collection[index], index, collection))) { - break; - } - } - } else { - each(collection, function(value, index, collection) { - return (result = !!callback(value, index, collection)); - }); - } - return result; - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * the `callback` returns truthy for. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias select - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. - * @example - * - * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [2, 4, 6] - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.filter(food, 'organic'); - * // => [{ 'name': 'carrot', 'organic': true, 'type': 'vegetable' }] - * - * // using "_.where" callback shorthand - * _.filter(food, { 'type': 'fruit' }); - * // => [{ 'name': 'apple', 'organic': false, 'type': 'fruit' }] - */ - function filter(collection, callback, thisArg) { - var result = []; - callback = createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (callback(value, index, collection)) { - result.push(value); - } - } - } else { - each(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result.push(value); - } - }); - } - return result; - } - - /** - * Examines each element in a `collection`, returning the first that the `callback` - * returns truthy for. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the element that passed the callback check, - * else `undefined`. - * @example - * - * var even = _.find([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => 2 - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'banana', 'organic': true, 'type': 'fruit' }, - * { 'name': 'beet', 'organic': false, 'type': 'vegetable' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * var veggie = _.find(food, { 'type': 'vegetable' }); - * // => { 'name': 'beet', 'organic': false, 'type': 'vegetable' } - * - * // using "_.pluck" callback shorthand - * var healthy = _.find(food, 'organic'); - * // => { 'name': 'banana', 'organic': true, 'type': 'fruit' } - */ - function find(collection, callback, thisArg) { - var result; - callback = createCallback(callback, thisArg); - - forEach(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result = value; - return false; - } - }); - return result; - } - - /** - * Iterates over a `collection`, executing the `callback` for each element in - * the `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). Callbacks may exit iteration early - * by explicitly returning `false`. - * - * @static - * @memberOf _ - * @alias each - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. - * @example - * - * _([1, 2, 3]).forEach(alert).join(','); - * // => alerts each number and returns '1,2,3' - * - * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert); - * // => alerts each number value (order is not guaranteed) - */ - function forEach(collection, callback, thisArg) { - if (callback && typeof thisArg == 'undefined' && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (callback(collection[index], index, collection) === false) { - break; - } - } - } else { - each(collection, callback, thisArg); - } - return collection; - } - - /** - * Creates an object composed of keys returned from running each element of the - * `collection` through the `callback`. The corresponding value of each key is - * an array of elements passed to `callback` that returned the key. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false` - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using "_.pluck" callback shorthand - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - function groupBy(collection, callback, thisArg) { - var result = {}; - callback = createCallback(callback, thisArg); - - forEach(collection, function(value, key, collection) { - key = callback(value, key, collection) + ''; - (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); - }); - return result; - } - - /** - * Invokes the method named by `methodName` on each element in the `collection`, - * returning an array of the results of each invoked method. Additional arguments - * will be passed to each invoked method. If `methodName` is a function, it will - * be invoked for, and `this` bound to, each element in the `collection`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or - * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - function invoke(collection, methodName) { - var args = slice(arguments, 2), - index = -1, - isFunc = typeof methodName == 'function', - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - forEach(collection, function(value) { - result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); - }); - return result; - } - - /** - * Creates an array of values by running each element in the `collection` - * through the `callback`. The `callback` is bound to `thisArg` and invoked with - * three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias collect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. - * @example - * - * _.map([1, 2, 3], function(num) { return num * 3; }); - * // => [3, 6, 9] - * - * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); - * // => [3, 6, 9] (order is not guaranteed) - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * // using "_.pluck" callback shorthand - * _.map(stooges, 'name'); - * // => ['moe', 'larry'] - */ - function map(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - callback = createCallback(callback, thisArg); - if (isArray(collection)) { - while (++index < length) { - result[index] = callback(collection[index], index, collection); - } - } else { - each(collection, function(value, key, collection) { - result[++index] = callback(value, key, collection); - }); - } - return result; - } - - /** - * Retrieves the maximum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.max(stooges, function(stooge) { return stooge.age; }); - * // => { 'name': 'larry', 'age': 50 }; - * - * // using "_.pluck" callback shorthand - * _.max(stooges, 'age'); - * // => { 'name': 'larry', 'age': 50 }; - */ - function max(collection, callback, thisArg) { - var computed = -Infinity, - result = computed; - - if (!callback && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (value > result) { - result = value; - } - } - } else { - callback = !callback && isString(collection) - ? charAtCallback - : createCallback(callback, thisArg); - - each(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current > computed) { - computed = current; - result = value; - } - }); - } - return result; - } - - /** - * Retrieves the minimum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to `thisArg` - * and invoked with three arguments; (value, index, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.min(stooges, function(stooge) { return stooge.age; }); - * // => { 'name': 'moe', 'age': 40 }; - * - * // using "_.pluck" callback shorthand - * _.min(stooges, 'age'); - * // => { 'name': 'moe', 'age': 40 }; - */ - function min(collection, callback, thisArg) { - var computed = Infinity, - result = computed; - - if (!callback && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (value < result) { - result = value; - } - } - } else { - callback = !callback && isString(collection) - ? charAtCallback - : createCallback(callback, thisArg); - - each(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current < computed) { - computed = current; - result = value; - } - }); - } - return result; - } - - /** - * Retrieves the value of a specified property from all elements in the `collection`. - * - * @static - * @memberOf _ - * @type Function - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.pluck(stooges, 'name'); - * // => ['moe', 'larry'] - */ - var pluck = map; - - /** - * Reduces a `collection` to a value that is the accumulated result of running - * each element in the `collection` through the `callback`, where each successive - * `callback` execution consumes the return value of the previous execution. - * If `accumulator` is not passed, the first element of the `collection` will be - * used as the initial `accumulator` value. The `callback` is bound to `thisArg` - * and invoked with four arguments; (accumulator, value, index|key, collection). - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var sum = _.reduce([1, 2, 3], function(sum, num) { - * return sum + num; - * }); - * // => 6 - * - * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { - * result[key] = num * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6, 'c': 9 } - */ - function reduce(collection, callback, accumulator, thisArg) { - var noaccum = arguments.length < 3; - callback = createCallback(callback, thisArg, 4); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - if (noaccum) { - accumulator = collection[++index]; - } - while (++index < length) { - accumulator = callback(accumulator, collection[index], index, collection); - } - } else { - each(collection, function(value, index, collection) { - accumulator = noaccum - ? (noaccum = false, value) - : callback(accumulator, value, index, collection) - }); - } - return accumulator; - } - - /** - * This method is similar to `_.reduce`, except that it iterates over a - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var list = [[0, 1], [2, 3], [4, 5]]; - * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - function reduceRight(collection, callback, accumulator, thisArg) { - var iterable = collection, - length = collection ? collection.length : 0, - noaccum = arguments.length < 3; - - if (typeof length != 'number') { - var props = keys(collection); - length = props.length; - } else if (noCharByIndex && isString(collection)) { - iterable = collection.split(''); - } - callback = createCallback(callback, thisArg, 4); - forEach(collection, function(value, index, collection) { - index = props ? props[--length] : --length; - accumulator = noaccum - ? (noaccum = false, iterable[index]) - : callback(accumulator, iterable[index], index, collection); - }); - return accumulator; - } - - /** - * The opposite of `_.filter`, this method returns the elements of a - * `collection` that `callback` does **not** return truthy for. - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that did **not** pass the - * callback check. - * @example - * - * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [1, 3, 5] - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.reject(food, 'organic'); - * // => [{ 'name': 'apple', 'organic': false, 'type': 'fruit' }] - * - * // using "_.where" callback shorthand - * _.reject(food, { 'type': 'fruit' }); - * // => [{ 'name': 'carrot', 'organic': true, 'type': 'vegetable' }] - */ - function reject(collection, callback, thisArg) { - callback = createCallback(callback, thisArg); - return filter(collection, function(value, index, collection) { - return !callback(value, index, collection); - }); - } - - /** - * Creates an array of shuffled `array` values, using a version of the - * Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. - * @example - * - * _.shuffle([1, 2, 3, 4, 5, 6]); - * // => [4, 1, 6, 3, 5, 2] - */ - function shuffle(collection) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - forEach(collection, function(value) { - var rand = floor(nativeRandom() * (++index + 1)); - result[index] = result[rand]; - result[rand] = value; - }); - return result; - } - - /** - * Gets the size of the `collection` by returning `collection.length` for arrays - * and array-like objects or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. - * @example - * - * _.size([1, 2]); - * // => 2 - * - * _.size({ 'one': 1, 'two': 2, 'three': 3 }); - * // => 3 - * - * _.size('curly'); - * // => 5 - */ - function size(collection) { - var length = collection ? collection.length : 0; - return typeof length == 'number' ? length : keys(collection).length; - } - - /** - * Checks if the `callback` returns a truthy value for **any** element of a - * `collection`. The function returns as soon as it finds passing value, and - * does not iterate over the entire `collection`. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passes the callback check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.some(food, 'organic'); - * // => true - * - * // using "_.where" callback shorthand - * _.some(food, { 'type': 'meat' }); - * // => false - */ - function some(collection, callback, thisArg) { - var result; - callback = createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if ((result = callback(collection[index], index, collection))) { - break; - } - } - } else { - each(collection, function(value, index, collection) { - return !(result = callback(value, index, collection)); - }); - } - return !!result; - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in the `collection` through the `callback`. This method - * performs a stable sort, that is, it will preserve the original sort order of - * equal elements. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. - * @example - * - * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); - * // => [3, 1, 2] - * - * // using "_.pluck" callback shorthand - * _.sortBy(['banana', 'strawberry', 'apple'], 'length'); - * // => ['apple', 'banana', 'strawberry'] - */ - function sortBy(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - callback = createCallback(callback, thisArg); - forEach(collection, function(value, key, collection) { - result[++index] = { - 'criteria': callback(value, key, collection), - 'index': index, - 'value': value - }; - }); - - length = result.length; - result.sort(compareAscending); - while (length--) { - result[length] = result[length].value; - } - return result; - } - - /** - * Converts the `collection` to an array. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. - * @example - * - * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); - * // => [2, 3, 4] - */ - function toArray(collection) { - if (collection && typeof collection.length == 'number') { - return noCharByIndex && isString(collection) - ? collection.split('') - : slice(collection); - } - return values(collection); - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * that have the given `properties`. When checking `properties`, this method - * performs a deep comparison between values to determine if they are equivalent - * to each other. - * - * @static - * @memberOf _ - * @type Function - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.where(stooges, { 'age': 40 }); - * // => [{ 'name': 'moe', 'age': 40 }] - */ - var where = filter; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values of `array` removed. The values - * `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result.push(value); - } - } - return result; - } - - /** - * Creates an array of `array` elements not present in the other arrays - * using strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] Arrays to check. - * @returns {Array} Returns a new array of `array` elements not present in the - * other arrays. - * @example - * - * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); - * // => [1, 3, 4] - */ - function difference(array) { - var index = -1, - length = array ? array.length : 0, - flattened = concat.apply(arrayRef, arguments), - contains = cachedContains(flattened, length), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * Gets the first element of the `array`. If a number `n` is passed, the first - * `n` elements of the `array` are returned. If a `callback` function is passed, - * the first elements the `callback` returns truthy for are returned. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias head, take - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called - * per element or the number of elements to return. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. - * @example - * - * _.first([1, 2, 3]); - * // => 1 - * - * _.first([1, 2, 3], 2); - * // => [1, 2] - * - * _.first([1, 2, 3], function(num) { - * return num < 3; - * }); - * // => [1, 2] - * - * var food = [ - * { 'name': 'banana', 'organic': true }, - * { 'name': 'beet', 'organic': false }, - * ]; - * - * // using "_.pluck" callback shorthand - * _.first(food, 'organic'); - * // => [{ 'name': 'banana', 'organic': true }] - * - * var food = [ - * { 'name': 'apple', 'type': 'fruit' }, - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.first(food, { 'type': 'fruit' }); - * // => [{ 'name': 'apple', 'type': 'fruit' }, { 'name': 'banana', 'type': 'fruit' }] - */ - function first(array, callback, thisArg) { - if (array) { - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = -1; - callback = createCallback(callback, thisArg); - while (++index < length && callback(array[index], index, array)) { - n++; - } - } else { - n = callback; - if (n == null || thisArg) { - return array[0]; - } - } - return slice(array, 0, nativeMin(nativeMax(0, n), length)); - } - } - - /** - * Flattens a nested array (the nesting can be to any depth). If `shallow` is - * truthy, `array` will only be flattened a single level. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @param {Boolean} shallow A flag to indicate only flattening a single level. - * @returns {Array} Returns a new flattened array. - * @example - * - * _.flatten([1, [2], [3, [[4]]]]); - * // => [1, 2, 3, 4]; - * - * _.flatten([1, [2], [3, [[4]]]], true); - * // => [1, 2, 3, [[4]]]; - */ - function flatten(array, shallow) { - var index = -1, - length = array ? array.length : 0, - result = []; - - while (++index < length) { - var value = array[index]; - - // recursively flatten arrays (susceptible to call stack limits) - if (isArray(value)) { - push.apply(result, shallow ? value : flatten(value)); - } else { - result.push(value); - } - } - return result; - } - - /** - * Gets the index at which the first occurrence of `value` is found using - * strict equality for comparisons, i.e. `===`. If the `array` is already - * sorted, passing `true` for `fromIndex` will run a faster binary search. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` to - * perform a binary search on a sorted `array`. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2); - * // => 1 - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 4 - * - * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); - * // => 2 - */ - function indexOf(array, value, fromIndex) { - var index = -1, - length = array ? array.length : 0; - - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1; - } else if (fromIndex) { - index = sortedIndex(array, value); - return array[index] === value ? index : -1; - } - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Gets all but the last element of `array`. If a number `n` is passed, the - * last `n` elements are excluded from the result. If a `callback` function - * is passed, the last elements the `callback` returns truthy for are excluded - * from the result. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called - * per element or the number of elements to exclude. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - * - * _.initial([1, 2, 3], 2); - * // => [1] - * - * _.initial([1, 2, 3], function(num) { - * return num > 1; - * }); - * // => [1] - * - * var food = [ - * { 'name': 'beet', 'organic': false }, - * { 'name': 'carrot', 'organic': true } - * ]; - * - * // using "_.pluck" callback shorthand - * _.initial(food, 'organic'); - * // => [{ 'name': 'beet', 'organic': false }] - * - * var food = [ - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' }, - * { 'name': 'carrot', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.initial(food, { 'type': 'vegetable' }); - * // => [{ 'name': 'banana', 'type': 'fruit' }] - */ - function initial(array, callback, thisArg) { - if (!array) { - return []; - } - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = length; - callback = createCallback(callback, thisArg); - while (index-- && callback(array[index], index, array)) { - n++; - } - } else { - n = (callback == null || thisArg) ? 1 : callback || n; - } - return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); - } - - /** - * Computes the intersection of all the passed-in arrays using strict equality - * for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique elements that are present - * in **all** of the arrays. - * @example - * - * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2] - */ - function intersection(array) { - var args = arguments, - argsLength = args.length, - cache = { '0': {} }, - index = -1, - length = array ? array.length : 0, - isLarge = length >= 100, - result = [], - seen = result; - - outer: - while (++index < length) { - var value = array[index]; - if (isLarge) { - var key = value + ''; - var inited = hasOwnProperty.call(cache[0], key) - ? !(seen = cache[0][key]) - : (seen = cache[0][key] = []); - } - if (inited || indexOf(seen, value) < 0) { - if (isLarge) { - seen.push(value); - } - var argsIndex = argsLength; - while (--argsIndex) { - if (!(cache[argsIndex] || (cache[argsIndex] = cachedContains(args[argsIndex], 0, 100)))(value)) { - continue outer; - } - } - result.push(value); - } - } - return result; - } - - /** - * Gets the last element of the `array`. If a number `n` is passed, the last - * `n` elements of the `array` are returned. If a `callback` function is passed, - * the last elements the `callback` returns truthy for are returned. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index, array). - * - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called - * per element or the number of elements to return. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - * - * _.last([1, 2, 3], 2); - * // => [2, 3] - * - * _.last([1, 2, 3], function(num) { - * return num > 1; - * }); - * // => [2, 3] - * - * var food = [ - * { 'name': 'beet', 'organic': false }, - * { 'name': 'carrot', 'organic': true } - * ]; - * - * // using "_.pluck" callback shorthand - * _.last(food, 'organic'); - * // => [{ 'name': 'carrot', 'organic': true }] - * - * var food = [ - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' }, - * { 'name': 'carrot', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.last(food, { 'type': 'vegetable' }); - * // => [{ 'name': 'beet', 'type': 'vegetable' }, { 'name': 'carrot', 'type': 'vegetable' }] - */ - function last(array, callback, thisArg) { - if (array) { - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = length; - callback = createCallback(callback, thisArg); - while (index-- && callback(array[index], index, array)) { - n++; - } - } else { - n = callback; - if (n == null || thisArg) { - return array[length - 1]; - } - } - return slice(array, nativeMax(0, length - n)); - } - } - - /** - * Gets the index at which the last occurrence of `value` is found using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); - * // => 4 - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 1 - */ - function lastIndexOf(array, value, fromIndex) { - var index = array ? array.length : 0; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Creates an object composed from arrays of `keys` and `values`. Pass either - * a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or - * two arrays, one of `keys` and one of corresponding `values`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and - * corresponding values. - * @example - * - * _.object(['moe', 'larry'], [30, 40]); - * // => { 'moe': 30, 'larry': 40 } - */ - function object(keys, values) { - var index = -1, - length = keys ? keys.length : 0, - result = {}; - - while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; - } else { - result[key[0]] = key[1]; - } - } - return result; - } - - /** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to but not including `end`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or descrement by. - * @returns {Array} Returns a new range array. - * @example - * - * _.range(10); - * // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - * - * _.range(1, 11); - * // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - * - * _.range(0, 30, 5); - * // => [0, 5, 10, 15, 20, 25] - * - * _.range(0, -10, -1); - * // => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9] - * - * _.range(0); - * // => [] - */ - function range(start, end, step) { - start = +start || 0; - step = +step || 1; - - if (end == null) { - end = start; - start = 0; - } - // use `Array(length)` so V8 will avoid the slower "dictionary" mode - // http://youtu.be/XAqIpGU8ZZk#t=17m25s - var index = -1, - length = nativeMax(0, ceil((end - start) / step)), - result = Array(length); - - while (++index < length) { - result[index] = start; - start += step; - } - return result; - } - - /** - * The opposite of `_.initial`, this method gets all but the first value of `array`. - * If a number `n` is passed, the first `n` values are excluded from the result. - * If a `callback` function is passed, the first elements the `callback` returns - * truthy for are excluded from the result. The `callback` is bound to `thisArg` - * and invoked with three arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias drop, tail - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called - * per element or the number of elements to exclude. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. - * @example - * - * _.rest([1, 2, 3]); - * // => [2, 3] - * - * _.rest([1, 2, 3], 2); - * // => [3] - * - * _.rest([1, 2, 3], function(num) { - * return num < 3; - * }); - * // => [3] - * - * var food = [ - * { 'name': 'banana', 'organic': true }, - * { 'name': 'beet', 'organic': false }, - * ]; - * - * // using "_.pluck" callback shorthand - * _.rest(food, 'organic'); - * // => [{ 'name': 'beet', 'organic': false }] - * - * var food = [ - * { 'name': 'apple', 'type': 'fruit' }, - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.rest(food, { 'type': 'fruit' }); - * // => [{ 'name': 'beet', 'type': 'vegetable' }] - */ - function rest(array, callback, thisArg) { - if (typeof callback != 'number' && callback != null) { - var n = 0, - index = -1, - length = array ? array.length : 0; - - callback = createCallback(callback, thisArg); - while (++index < length && callback(array[index], index, array)) { - n++; - } - } else { - n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); - } - return slice(array, n); - } - - /** - * Uses a binary search to determine the smallest index at which the `value` - * should be inserted into `array` in order to maintain the sort order of the - * sorted `array`. If `callback` is passed, it will be executed for `value` and - * each element in `array` to compute their sort ranking. The `callback` is - * bound to `thisArg` and invoked with one argument; (value). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to iterate over. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which the value should be inserted - * into `array`. - * @example - * - * _.sortedIndex([20, 30, 50], 40); - * // => 2 - * - * // using "_.pluck" callback shorthand - * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 2 - * - * var dict = { - * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } - * }; - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return dict.wordToNumber[word]; - * }); - * // => 2 - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return this.wordToNumber[word]; - * }, dict); - * // => 2 - */ - function sortedIndex(array, value, callback, thisArg) { - var low = 0, - high = array ? array.length : low; - - // explicitly reference `identity` for better inlining in Firefox - callback = callback ? createCallback(callback, thisArg, 1) : identity; - value = callback(value); - - while (low < high) { - var mid = (low + high) >>> 1; - callback(array[mid]) < value - ? low = mid + 1 - : high = mid; - } - return low; - } - - /** - * Computes the union of the passed-in arrays using strict equality for - * comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique values, in order, that are - * present in one or more of the arrays. - * @example - * - * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2, 3, 101, 10] - */ - function union() { - return uniq(concat.apply(arrayRef, arguments)); - } - - /** - * Creates a duplicate-value-free version of the `array` using strict equality - * for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` - * for `isSorted` will run a faster algorithm. If `callback` is passed, each - * element of `array` is passed through a callback` before uniqueness is computed. - * The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the propeties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. - * @example - * - * _.uniq([1, 2, 1, 3, 1]); - * // => [1, 2, 3] - * - * _.uniq([1, 1, 2, 2, 3], true); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); }); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math); - * // => [1, 2, 3] - * - * // using "_.pluck" callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniq(array, isSorted, callback, thisArg) { - var index = -1, - length = array ? array.length : 0, - result = [], - seen = result; - - // juggle arguments - if (typeof isSorted == 'function') { - thisArg = callback; - callback = isSorted; - isSorted = false; - } - // init value cache for large arrays - var isLarge = !isSorted && length >= 75; - if (isLarge) { - var cache = {}; - } - if (callback) { - seen = []; - callback = createCallback(callback, thisArg); - } - while (++index < length) { - var value = array[index], - computed = callback ? callback(value, index, array) : value; - - if (isLarge) { - var key = computed + ''; - var inited = hasOwnProperty.call(cache, key) - ? !(seen = cache[key]) - : (seen = cache[key] = []); - } - if (isSorted - ? !index || seen[seen.length - 1] !== computed - : inited || indexOf(seen, computed) < 0 - ) { - if (callback || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * Creates an array with all occurrences of the passed values removed using - * strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] Values to remove. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); - * // => [2, 3, 4] - */ - function without(array) { - var index = -1, - length = array ? array.length : 0, - contains = cachedContains(arguments, 1), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * Groups the elements of each array at their corresponding indexes. Useful for - * separate data sources that are coordinated through matching array indexes. - * For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix - * in a similar fashion. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. - * @example - * - * _.zip(['moe', 'larry'], [30, 40], [true, false]); - * // => [['moe', 30, true], ['larry', 40, false]] - */ - function zip(array) { - var index = -1, - length = array ? max(pluck(arguments, 'length')) : 0, - result = Array(length); - - while (++index < length) { - result[index] = pluck(arguments, index); - } - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a function that is restricted to executing `func` only after it is - * called `n` times. The `func` is executed with the `this` binding of the - * created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Number} n The number of times the function must be called before - * it is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var renderNotes = _.after(notes.length, render); - * _.forEach(notes, function(note) { - * note.asyncSave({ 'success': renderNotes }); - * }); - * // `renderNotes` is run once, after all notes have saved - */ - function after(n, func) { - if (n < 1) { - return func(); - } - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any additional `bind` arguments to those - * passed to the bound function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var func = function(greeting) { - * return greeting + ' ' + this.name; - * }; - * - * func = _.bind(func, { 'name': 'moe' }, 'hi'); - * func(); - * // => 'hi moe' - */ - function bind(func, thisArg) { - // use `Function#bind` if it exists and is fast - // (in V8 `Function#bind` is slower except when partially applied) - return isBindFast || (nativeBind && arguments.length > 2) - ? nativeBind.call.apply(nativeBind, arguments) - : createBound(func, thisArg, slice(arguments, 2)); - } - - /** - * Binds methods on `object` to `object`, overwriting the existing method. - * Method names may be specified as individual arguments or as arrays of method - * names. If no method names are provided, all the function properties of `object` - * will be bound. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] Method names on the object to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'onClick': function() { alert('clicked ' + this.label); } - * }; - * - * _.bindAll(view); - * jQuery('#docs').on('click', view.onClick); - * // => alerts 'clicked docs', when the button is clicked - */ - function bindAll(object) { - var funcs = concat.apply(arrayRef, arguments), - index = funcs.length > 1 ? 0 : (funcs = functions(object), -1), - length = funcs.length; - - while (++index < length) { - var key = funcs[index]; - object[key] = bind(object[key], object); - } - return object; - } - - /** - * Creates a function that, when called, invokes the method at `object[key]` - * and prepends any additional `bindKey` arguments to those passed to the bound - * function. This method differs from `_.bind` by allowing bound functions to - * reference methods that will be redefined or don't yet exist. - * See http://michaux.ca/articles/lazy-function-definition-pattern. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} key The key of the method. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'name': 'moe', - * 'greet': function(greeting) { - * return greeting + ' ' + this.name; - * } - * }; - * - * var func = _.bindKey(object, 'greet', 'hi'); - * func(); - * // => 'hi moe' - * - * object.greet = function(greeting) { - * return greeting + ', ' + this.name + '!'; - * }; - * - * func(); - * // => 'hi, moe!' - */ - function bindKey(object, key) { - return createBound(object, key, slice(arguments, 2)); - } - - /** - * Creates a function that is the composition of the passed functions, - * where each function consumes the return value of the function that follows. - * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - * Each function is executed with the `this` binding of the composed function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. - * @example - * - * var greet = function(name) { return 'hi ' + name; }; - * var exclaim = function(statement) { return statement + '!'; }; - * var welcome = _.compose(exclaim, greet); - * welcome('moe'); - * // => 'hi moe!' - */ - function compose() { - var funcs = arguments; - return function() { - var args = arguments, - length = funcs.length; - - while (length--) { - args = [funcs[length].apply(this, args)]; - } - return args[0]; - }; - } - - /** - * Creates a function that will delay the execution of `func` until after - * `wait` milliseconds have elapsed since the last time it was invoked. Pass - * `true` for `immediate` to cause debounce to invoke `func` on the leading, - * instead of the trailing, edge of the `wait` timeout. Subsequent calls to - * the debounced function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Boolean} immediate A flag to indicate execution is on the leading - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * var lazyLayout = _.debounce(calculateLayout, 300); - * jQuery(window).on('resize', lazyLayout); - */ - function debounce(func, wait, immediate) { - var args, - result, - thisArg, - timeoutId; - - function delayed() { - timeoutId = null; - if (!immediate) { - result = func.apply(thisArg, args); - } - } - return function() { - var isImmediate = immediate && !timeoutId; - args = arguments; - thisArg = this; - - clearTimeout(timeoutId); - timeoutId = setTimeout(delayed, wait); - - if (isImmediate) { - result = func.apply(thisArg, args); - } - return result; - }; - } - - /** - * Executes the `func` function after `wait` milliseconds. Additional arguments - * will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the `setTimeout` timeout id. - * @example - * - * var log = _.bind(console.log, console); - * _.delay(log, 1000, 'logged later'); - * // => 'logged later' (Appears after one second.) - */ - function delay(func, wait) { - var args = slice(arguments, 2); - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * Defers executing the `func` function until the current call stack has cleared. - * Additional arguments will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the `setTimeout` timeout id. - * @example - * - * _.defer(function() { alert('deferred'); }); - * // returns from the function before `alert` is called - */ - function defer(func) { - var args = slice(arguments, 1); - return setTimeout(function() { func.apply(undefined, args); }, 1); - } - // use `setImmediate` if it's available in Node.js - if (isV8 && freeModule && typeof setImmediate == 'function') { - defer = bind(setImmediate, window); - } - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * passed, it will be used to determine the cache key for storing the result - * based on the arguments passed to the memoized function. By default, the first - * argument passed to the memoized function is used as the cache key. The `func` - * is executed with the `this` binding of the memoized function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var fibonacci = _.memoize(function(n) { - * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); - * }); - */ - function memoize(func, resolver) { - var cache = {}; - return function() { - var key = (resolver ? resolver.apply(this, arguments) : arguments[0]) + ''; - return hasOwnProperty.call(cache, key) - ? cache[key] - : (cache[key] = func.apply(this, arguments)); - }; - } - - /** - * Creates a function that is restricted to execute `func` once. Repeat calls to - * the function will return the value of the first call. The `func` is executed - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` executes `createApplication` once - */ - function once(func) { - var ran, - result; - - return function() { - if (ran) { - return result; - } - ran = true; - result = func.apply(this, arguments); - - // clear the `func` variable so the function may be garbage collected - func = null; - return result; - }; - } - - /** - * Creates a function that, when called, invokes `func` with any additional - * `partial` arguments prepended to those passed to the new function. This - * method is similar to `_.bind`, except it does **not** alter the `this` binding. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { return greeting + ' ' + name; }; - * var hi = _.partial(greet, 'hi'); - * hi('moe'); - * // => 'hi moe' - */ - function partial(func) { - return createBound(func, slice(arguments, 1)); - } - - /** - * This method is similar to `_.partial`, except that `partial` arguments are - * appended to those passed to the new function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var defaultsDeep = _.partialRight(_.merge, _.defaults); - * - * var options = { - * 'variable': 'data', - * 'imports': { 'jq': $ } - * }; - * - * defaultsDeep(options, _.templateSettings); - * - * options.variable - * // => 'data' - * - * options.imports - * // => { '_': _, 'jq': $ } - */ - function partialRight(func) { - return createBound(func, slice(arguments, 1), null, indicatorObject); - } - - /** - * Creates a function that, when executed, will only call the `func` - * function at most once per every `wait` milliseconds. If the throttled - * function is invoked more than once during the `wait` timeout, `func` will - * also be called on the trailing edge of the timeout. Subsequent calls to the - * throttled function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @returns {Function} Returns the new throttled function. - * @example - * - * var throttled = _.throttle(updatePosition, 100); - * jQuery(window).on('scroll', throttled); - */ - function throttle(func, wait) { - var args, - result, - thisArg, - timeoutId, - lastCalled = 0; - - function trailingCall() { - lastCalled = new Date; - timeoutId = null; - result = func.apply(thisArg, args); - } - return function() { - var now = new Date, - remaining = wait - (now - lastCalled); - - args = arguments; - thisArg = this; - - if (remaining <= 0) { - clearTimeout(timeoutId); - timeoutId = null; - lastCalled = now; - result = func.apply(thisArg, args); - } - else if (!timeoutId) { - timeoutId = setTimeout(trailingCall, remaining); - } - return result; - }; - } - - /** - * Creates a function that passes `value` to the `wrapper` function as its - * first argument. Additional arguments passed to the function are appended - * to those passed to the `wrapper` function. The `wrapper` is executed with - * the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var hello = function(name) { return 'hello ' + name; }; - * hello = _.wrap(hello, function(func) { - * return 'before, ' + func('moe') + ', after'; - * }); - * hello(); - * // => 'before, hello moe, after' - */ - function wrap(value, wrapper) { - return function() { - var args = [value]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. - * @example - * - * _.escape('Moe, Larry & Curly'); - * // => 'Moe, Larry & Curly' - */ - function escape(string) { - return string == null ? '' : (string + '').replace(reUnescapedHtml, escapeHtmlChar); - } - - /** - * This function returns the first argument passed to it. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. - * @example - * - * var moe = { 'name': 'moe' }; - * moe === _.identity(moe); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Adds functions properties of `object` to the `lodash` function and chainable - * wrapper. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @example - * - * _.mixin({ - * 'capitalize': function(string) { - * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); - * } - * }); - * - * _.capitalize('moe'); - * // => 'Moe' - * - * _('moe').capitalize(); - * // => 'Moe' - */ - function mixin(object) { - forEach(functions(object), function(methodName) { - var func = lodash[methodName] = object[methodName]; - - lodash.prototype[methodName] = function() { - var args = [this.__wrapped__]; - push.apply(args, arguments); - return new lodash(func.apply(lodash, args)); - }; - }); - } - - /** - * Reverts the '_' variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @memberOf _ - * @category Utilities - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - window._ = oldDash; - return this; - } - - /** - * Produces a random number between `min` and `max` (inclusive). If only one - * argument is passed, a number between `0` and the given number will be returned. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. - * @example - * - * _.random(0, 5); - * // => a number between 0 and 5 - * - * _.random(5); - * // => also a number between 0 and 5 - */ - function random(min, max) { - if (min == null && max == null) { - max = 1; - } - min = +min || 0; - if (max == null) { - max = min; - min = 0; - } - return min + floor(nativeRandom() * ((+max || 0) - min + 1)); - } - - /** - * Resolves the value of `property` on `object`. If `property` is a function, - * it will be invoked and its result returned, else the property value is - * returned. If `object` is falsey, then `null` is returned. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. - * @example - * - * var object = { - * 'cheese': 'crumpets', - * 'stuff': function() { - * return 'nonsense'; - * } - * }; - * - * _.result(object, 'cheese'); - * // => 'crumpets' - * - * _.result(object, 'stuff'); - * // => 'nonsense' - */ - function result(object, property) { - var value = object ? object[property] : undefined; - return isFunction(value) ? object[property]() : value; - } - - /** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` - * build and using precompiled templates, or loading Lo-Dash in a sandbox. - * - * For more information on precompiling templates see: - * http://lodash.com/#custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} text The template text. - * @param {Obect} data The data object used to populate the text. - * @param {Object} options The options object. - * escape - The "escape" delimiter regexp. - * evaluate - The "evaluate" delimiter regexp. - * interpolate - The "interpolate" delimiter regexp. - * sourceURL - The sourceURL of the template's compiled source. - * variable - The data object variable name. - * - * @returns {Function|String} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'moe' }); - * // => 'hello moe' - * - * var list = '<% _.forEach(people, function(name) { %>
  • <%= name %>
  • <% }); %>'; - * _.template(list, { 'people': ['moe', 'larry'] }); - * // => '
  • moe
  • larry
  • ' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<%- value %>', { 'value': ' -``` - -Then in both cases, you can simply replace native `JSON` calls with `JSON5`: - -```js -var obj = JSON5.parse('{unquoted:"key",trailing:"comma",}'); -var str = JSON5.stringify(obj); -``` - -`JSON5.parse` supports all of the JSON5 features listed above (*TODO: except -Unicode*), as well as the native [`reviver` argument][json-parse]. - -[json-parse]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse - -`JSON5.stringify` mainly avoids quoting keys where possible, but we hope to -keep expanding it in the future (e.g. to also output trailing commas). -It supports the native [`replacer` and `space` arguments][json-stringify], -as well. *(TODO: Any implemented `toJSON` methods aren’t used today.)* - -[json-stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify - - -### Extras - -If you’re running this on Node, you can also register a JSON5 `require()` hook -to let you `require()` `.json5` files just like you can `.json` files: - -```js -require('json5/lib/require'); -require('./path/to/foo'); // tries foo.json5 after foo.js, foo.json, etc. -require('./path/to/bar.json5'); -``` - -This module also provides a `json5` executable (requires Node) for converting -JSON5 files to JSON: - -```sh -json5 -c path/to/foo.json5 # generates path/to/foo.json -``` - - -## Development - -```sh -git clone git://github.com/aseemk/json5.git -cd json5 -npm install -npm test -``` - -As the `package.json5` file states, be sure to run `npm run build` on changes -to `package.json5`, since npm requires `package.json`. - -Feel free to [file issues](https://github.com/aseemk/json5/issues) and submit -[pull requests](https://github.com/aseemk/json5/pulls) — contributions are -welcome. If you do submit a pull request, please be sure to add or update the -tests, and ensure that `npm test` continues to pass. - - -## License - -MIT. See [LICENSE.md](./LICENSE.md) for details. - - -## Credits - -[Michael Bolin](http://bolinfest.com/) independently arrived at and published -some of these same ideas with awesome explanations and detail. -Recommended reading: -[Suggested Improvements to JSON](http://bolinfest.com/essays/json.html) - -[Douglas Crockford](http://www.crockford.com/) of course designed and built -JSON, but his state machine diagrams on the [JSON website](http://json.org/), -as cheesy as it may sound, gave me motivation and confidence that building a -new parser to implement these ideas this was within my reach! -This code is also modeled directly off of Doug’s open-source [json_parse.js][] -parser. I’m super grateful for that clean and well-documented code. - -[json_parse.js]: https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js - -[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific -supporter, contributing multiple patches and ideas. Thanks Max! - -[Andrew Eisenberg](https://github.com/aeisenberg) has contributed the -`stringify` method. - -[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely -with ES5 and is actively maintaining this project. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/cli.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/cli.js deleted file mode 100755 index 9b72f6d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/cli.js +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env node - -// cli.js -// JSON5 command-line interface. -// -// This is pretty minimal for now; just supports compiling files via `-c`. -// TODO More useful functionality, like output path, watch, etc.? - -var FS = require('fs'); -var JSON5 = require('./json5'); -var Path = require('path'); - -var USAGE = [ - 'Usage: json5 -c path/to/file.json5 ...', - 'Compiles JSON5 files into sibling JSON files with the same basenames.', -].join('\n'); - -// if valid, args look like [node, json5, -c, file1, file2, ...] -var args = process.argv; - -if (args.length < 4 || args[2] !== '-c') { - console.error(USAGE); - process.exit(1); -} - -var cwd = process.cwd(); -var files = args.slice(3); - -// iterate over each file and convert JSON5 files to JSON: -files.forEach(function (file) { - var path = Path.resolve(cwd, file); - var basename = Path.basename(path, '.json5'); - var dirname = Path.dirname(path); - - var json5 = FS.readFileSync(path, 'utf8'); - var obj = JSON5.parse(json5); - var json = JSON.stringify(obj, null, 4); // 4 spaces; TODO configurable? - - path = Path.join(dirname, basename + '.json'); - FS.writeFileSync(path, json, 'utf8'); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/json5.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/json5.js deleted file mode 100644 index 4a4590d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/json5.js +++ /dev/null @@ -1,770 +0,0 @@ -// json5.js -// Modern JSON. See README.md for details. -// -// This file is based directly off of Douglas Crockford's json_parse.js: -// https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js - -var JSON5 = (typeof exports === 'object' ? exports : {}); - -JSON5.parse = (function () { - "use strict"; - -// This is a function that can parse a JSON5 text, producing a JavaScript -// data structure. It is a simple, recursive descent parser. It does not use -// eval or regular expressions, so it can be used as a model for implementing -// a JSON5 parser in other languages. - -// We are defining the function inside of another function to avoid creating -// global variables. - - var at, // The index of the current character - lineNumber, // The current line number - columnNumber, // The current column number - ch, // The current character - escapee = { - "'": "'", - '"': '"', - '\\': '\\', - '/': '/', - '\n': '', // Replace escaped newlines in strings w/ empty string - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t' - }, - ws = [ - ' ', - '\t', - '\r', - '\n', - '\v', - '\f', - '\xA0', - '\uFEFF' - ], - text, - - renderChar = function (chr) { - return chr === '' ? 'EOF' : "'" + chr + "'"; - }, - - error = function (m) { - -// Call error when something is wrong. - - var error = new SyntaxError(); - // beginning of message suffix to agree with that provided by Gecko - see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse - error.message = m + " at line " + lineNumber + " column " + columnNumber + " of the JSON5 data. Still to read: " + JSON.stringify(text.substring(at - 1, at + 19)); - error.at = at; - // These two property names have been chosen to agree with the ones in Gecko, the only popular - // environment which seems to supply this info on JSON.parse - error.lineNumber = lineNumber; - error.columnNumber = columnNumber; - throw error; - }, - - next = function (c) { - -// If a c parameter is provided, verify that it matches the current character. - - if (c && c !== ch) { - error("Expected " + renderChar(c) + " instead of " + renderChar(ch)); - } - -// Get the next character. When there are no more characters, -// return the empty string. - - ch = text.charAt(at); - at++; - columnNumber++; - if (ch === '\n' || ch === '\r' && peek() !== '\n') { - lineNumber++; - columnNumber = 0; - } - return ch; - }, - - peek = function () { - -// Get the next character without consuming it or -// assigning it to the ch varaible. - - return text.charAt(at); - }, - - identifier = function () { - -// Parse an identifier. Normally, reserved words are disallowed here, but we -// only use this for unquoted object keys, where reserved words are allowed, -// so we don't check for those here. References: -// - http://es5.github.com/#x7.6 -// - https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Variables -// - http://docstore.mik.ua/orelly/webprog/jscript/ch02_07.htm -// TODO Identifiers can have Unicode "letters" in them; add support for those. - - var key = ch; - - // Identifiers must start with a letter, _ or $. - if ((ch !== '_' && ch !== '$') && - (ch < 'a' || ch > 'z') && - (ch < 'A' || ch > 'Z')) { - error("Bad identifier as unquoted key"); - } - - // Subsequent characters can contain digits. - while (next() && ( - ch === '_' || ch === '$' || - (ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9'))) { - key += ch; - } - - return key; - }, - - number = function () { - -// Parse a number value. - - var number, - sign = '', - string = '', - base = 10; - - if (ch === '-' || ch === '+') { - sign = ch; - next(ch); - } - - // support for Infinity (could tweak to allow other words): - if (ch === 'I') { - number = word(); - if (typeof number !== 'number' || isNaN(number)) { - error('Unexpected word for number'); - } - return (sign === '-') ? -number : number; - } - - // support for NaN - if (ch === 'N' ) { - number = word(); - if (!isNaN(number)) { - error('expected word to be NaN'); - } - // ignore sign as -NaN also is NaN - return number; - } - - if (ch === '0') { - string += ch; - next(); - if (ch === 'x' || ch === 'X') { - string += ch; - next(); - base = 16; - } else if (ch >= '0' && ch <= '9') { - error('Octal literal'); - } - } - - switch (base) { - case 10: - while (ch >= '0' && ch <= '9' ) { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - break; - case 16: - while (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') { - string += ch; - next(); - } - break; - } - - if(sign === '-') { - number = -string; - } else { - number = +string; - } - - if (!isFinite(number)) { - error("Bad number"); - } else { - return number; - } - }, - - string = function () { - -// Parse a string value. - - var hex, - i, - string = '', - delim, // double quote or single quote - uffff; - -// When parsing for string values, we must look for ' or " and \ characters. - - if (ch === '"' || ch === "'") { - delim = ch; - while (next()) { - if (ch === delim) { - next(); - return string; - } else if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (ch === '\r') { - if (peek() === '\n') { - next(); - } - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else if (ch === '\n') { - // unescaped newlines are invalid; see: - // https://github.com/aseemk/json5/issues/24 - // TODO this feels special-cased; are there other - // invalid unescaped chars? - break; - } else { - string += ch; - } - } - } - error("Bad string"); - }, - - inlineComment = function () { - -// Skip an inline comment, assuming this is one. The current character should -// be the second / character in the // pair that begins this inline comment. -// To finish the inline comment, we look for a newline or the end of the text. - - if (ch !== '/') { - error("Not an inline comment"); - } - - do { - next(); - if (ch === '\n' || ch === '\r') { - next(); - return; - } - } while (ch); - }, - - blockComment = function () { - -// Skip a block comment, assuming this is one. The current character should be -// the * character in the /* pair that begins this block comment. -// To finish the block comment, we look for an ending */ pair of characters, -// but we also watch for the end of text before the comment is terminated. - - if (ch !== '*') { - error("Not a block comment"); - } - - do { - next(); - while (ch === '*') { - next('*'); - if (ch === '/') { - next('/'); - return; - } - } - } while (ch); - - error("Unterminated block comment"); - }, - - comment = function () { - -// Skip a comment, whether inline or block-level, assuming this is one. -// Comments always begin with a / character. - - if (ch !== '/') { - error("Not a comment"); - } - - next('/'); - - if (ch === '/') { - inlineComment(); - } else if (ch === '*') { - blockComment(); - } else { - error("Unrecognized comment"); - } - }, - - white = function () { - -// Skip whitespace and comments. -// Note that we're detecting comments by only a single / character. -// This works since regular expressions are not valid JSON(5), but this will -// break if there are other valid values that begin with a / character! - - while (ch) { - if (ch === '/') { - comment(); - } else if (ws.indexOf(ch) >= 0) { - next(); - } else { - return; - } - } - }, - - word = function () { - -// true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - case 'I': - next('I'); - next('n'); - next('f'); - next('i'); - next('n'); - next('i'); - next('t'); - next('y'); - return Infinity; - case 'N': - next( 'N' ); - next( 'a' ); - next( 'N' ); - return NaN; - } - error("Unexpected " + renderChar(ch)); - }, - - value, // Place holder for the value function. - - array = function () { - -// Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - while (ch) { - if (ch === ']') { - next(']'); - return array; // Potentially empty array - } - // ES5 allows omitting elements in arrays, e.g. [,] and - // [,null]. We don't allow this in JSON5. - if (ch === ',') { - error("Missing array element"); - } else { - array.push(value()); - } - white(); - // If there's no comma after this value, this needs to - // be the end of the array. - if (ch !== ',') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - - object = function () { - -// Parse an object value. - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - while (ch) { - if (ch === '}') { - next('}'); - return object; // Potentially empty object - } - - // Keys can be unquoted. If they are, they need to be - // valid JS identifiers. - if (ch === '"' || ch === "'") { - key = string(); - } else { - key = identifier(); - } - - white(); - next(':'); - object[key] = value(); - white(); - // If there's no comma after this pair, this needs to be - // the end of the object. - if (ch !== ',') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - - value = function () { - -// Parse a JSON value. It could be an object, an array, a string, a number, -// or a word. - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - case "'": - return string(); - case '-': - case '+': - case '.': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } - }; - -// Return the json_parse function. It will have access to all of the above -// functions and variables. - - return function (source, reviver) { - var result; - - text = String(source); - at = 0; - lineNumber = 1; - columnNumber = 1; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - -// If there is a reviver function, we recursively walk the new structure, -// passing each name/value pair to the reviver function for possible -// transformation, starting with a temporary root object that holds the result -// in an empty key. If there is not a reviver function, we simply return the -// result. - - return typeof reviver === 'function' ? (function walk(holder, key) { - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - }({'': result}, '')) : result; - }; -}()); - -// JSON5 stringify will not quote keys where appropriate -JSON5.stringify = function (obj, replacer, space) { - if (replacer && (typeof(replacer) !== "function" && !isArray(replacer))) { - throw new Error('Replacer must be a function or an array'); - } - var getReplacedValueOrUndefined = function(holder, key, isTopLevel) { - var value = holder[key]; - - // Replace the value with its toJSON value first, if possible - if (value && value.toJSON && typeof value.toJSON === "function") { - value = value.toJSON(); - } - - // If the user-supplied replacer if a function, call it. If it's an array, check objects' string keys for - // presence in the array (removing the key/value pair from the resulting JSON if the key is missing). - if (typeof(replacer) === "function") { - return replacer.call(holder, key, value); - } else if(replacer) { - if (isTopLevel || isArray(holder) || replacer.indexOf(key) >= 0) { - return value; - } else { - return undefined; - } - } else { - return value; - } - }; - - function isWordChar(c) { - return (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - c === '_' || c === '$'; - } - - function isWordStart(c) { - return (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - c === '_' || c === '$'; - } - - function isWord(key) { - if (typeof key !== 'string') { - return false; - } - if (!isWordStart(key[0])) { - return false; - } - var i = 1, length = key.length; - while (i < length) { - if (!isWordChar(key[i])) { - return false; - } - i++; - } - return true; - } - - // export for use in tests - JSON5.isWord = isWord; - - // polyfills - function isArray(obj) { - if (Array.isArray) { - return Array.isArray(obj); - } else { - return Object.prototype.toString.call(obj) === '[object Array]'; - } - } - - function isDate(obj) { - return Object.prototype.toString.call(obj) === '[object Date]'; - } - - var objStack = []; - function checkForCircular(obj) { - for (var i = 0; i < objStack.length; i++) { - if (objStack[i] === obj) { - throw new TypeError("Converting circular structure to JSON"); - } - } - } - - function makeIndent(str, num, noNewLine) { - if (!str) { - return ""; - } - // indentation no more than 10 chars - if (str.length > 10) { - str = str.substring(0, 10); - } - - var indent = noNewLine ? "" : "\n"; - for (var i = 0; i < num; i++) { - indent += str; - } - - return indent; - } - - var indentStr; - if (space) { - if (typeof space === "string") { - indentStr = space; - } else if (typeof space === "number" && space >= 0) { - indentStr = makeIndent(" ", space, true); - } else { - // ignore space parameter - } - } - - // Copied from Crokford's implementation of JSON - // See https://github.com/douglascrockford/JSON-js/blob/e39db4b7e6249f04a195e7dd0840e610cc9e941e/json2.js#L195 - // Begin - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }; - function escapeString(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? - c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - // End - - function internalStringify(holder, key, isTopLevel) { - var buffer, res; - - // Replace the value, if necessary - var obj_part = getReplacedValueOrUndefined(holder, key, isTopLevel); - - if (obj_part && !isDate(obj_part)) { - // unbox objects - // don't unbox dates, since will turn it into number - obj_part = obj_part.valueOf(); - } - switch(typeof obj_part) { - case "boolean": - return obj_part.toString(); - - case "number": - if (isNaN(obj_part) || !isFinite(obj_part)) { - return "null"; - } - return obj_part.toString(); - - case "string": - return escapeString(obj_part.toString()); - - case "object": - if (obj_part === null) { - return "null"; - } else if (isArray(obj_part)) { - checkForCircular(obj_part); - buffer = "["; - objStack.push(obj_part); - - for (var i = 0; i < obj_part.length; i++) { - res = internalStringify(obj_part, i, false); - buffer += makeIndent(indentStr, objStack.length); - if (res === null || typeof res === "undefined") { - buffer += "null"; - } else { - buffer += res; - } - if (i < obj_part.length-1) { - buffer += ","; - } else if (indentStr) { - buffer += "\n"; - } - } - objStack.pop(); - if (obj_part.length) { - buffer += makeIndent(indentStr, objStack.length, true) - } - buffer += "]"; - } else { - checkForCircular(obj_part); - buffer = "{"; - var nonEmpty = false; - objStack.push(obj_part); - for (var prop in obj_part) { - if (obj_part.hasOwnProperty(prop)) { - var value = internalStringify(obj_part, prop, false); - isTopLevel = false; - if (typeof value !== "undefined" && value !== null) { - buffer += makeIndent(indentStr, objStack.length); - nonEmpty = true; - key = isWord(prop) ? prop : escapeString(prop); - buffer += key + ":" + (indentStr ? ' ' : '') + value + ","; - } - } - } - objStack.pop(); - if (nonEmpty) { - buffer = buffer.substring(0, buffer.length-1) + makeIndent(indentStr, objStack.length) + "}"; - } else { - buffer = '{}'; - } - } - return buffer; - default: - // functions and undefined should be ignored - return undefined; - } - } - - // special case...when undefined is used inside of - // a compound object/array, return null. - // but when top-level, return undefined - var topLevelHolder = {"":obj}; - if (obj === undefined) { - return getReplacedValueOrUndefined(topLevelHolder, '', true); - } - return internalStringify(topLevelHolder, '', true); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/require.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/require.js deleted file mode 100644 index 73e56fe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/lib/require.js +++ /dev/null @@ -1,18 +0,0 @@ -// require.js -// Node.js only: adds a require() hook for .json5 files, just like the native -// hook for .json files. -// -// Usage: -// require('json5/require'); -// require('./foo'); // will check foo.json5 after foo.js, foo.json, etc. -// require('./bar.json5'); - -var FS = require('fs'); -var JSON5 = require('./json5'); - -// Modeled off of (v0.6.18 link; check latest too): -// https://github.com/joyent/node/blob/v0.6.18/lib/module.js#L468-L472 -require.extensions['.json5'] = function (module, filename) { - var content = FS.readFileSync(filename, 'utf8'); - module.exports = JSON5.parse(content); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/package.json deleted file mode 100644 index ca31ee1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/json5/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "json5@^0.5.1", - "scope": null, - "escapedName": "json5", - "name": "json5", - "rawSpec": "^0.5.1", - "spec": ">=0.5.1 <0.6.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "json5@>=0.5.1 <0.6.0", - "_id": "json5@0.5.1", - "_inCache": true, - "_location": "/json5", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/json5-0.5.1.tgz_1480284434295_0.5308296058792621" - }, - "_npmUser": { - "name": "jordanbtucker", - "email": "jordanbtucker@gmail.com" - }, - "_npmVersion": "3.10.9", - "_phantomChildren": {}, - "_requested": { - "raw": "json5@^0.5.1", - "scope": null, - "escapedName": "json5", - "name": "json5", - "rawSpec": "^0.5.1", - "spec": ">=0.5.1 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core" - ], - "_resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "_shasum": "1eade7acc012034ad84e2396767ead9fa5495821", - "_shrinkwrap": null, - "_spec": "json5@^0.5.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Aseem Kishore", - "email": "aseem.kishore@gmail.com" - }, - "bin": { - "json5": "lib/cli.js" - }, - "bugs": { - "url": "https://github.com/aseemk/json5/issues" - }, - "contributors": [ - { - "name": "Max Nanasy", - "email": "max.nanasy@gmail.com" - }, - { - "name": "Andrew Eisenberg", - "email": "andrew@eisenberg.as" - }, - { - "name": "Jordan Tucker", - "email": "jordanbtucker@gmail.com" - } - ], - "dependencies": {}, - "description": "JSON for the ES5 era.", - "devDependencies": { - "gulp": "^3.9.1", - "gulp-jshint": "^2.0.1", - "jshint": "^2.9.3", - "jshint-stylish": "^2.2.1", - "mocha": "^3.1.0" - }, - "directories": {}, - "dist": { - "shasum": "1eade7acc012034ad84e2396767ead9fa5495821", - "tarball": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz" - }, - "files": [ - "lib/" - ], - "gitHead": "6be6a70e250e6fbbf42db75cd1f6a1aadeeeeb07", - "homepage": "http://json5.org/", - "keywords": [ - "json", - "es5" - ], - "license": "MIT", - "main": "lib/json5.js", - "maintainers": [ - { - "name": "aseemk", - "email": "aseem.kishore@gmail.com" - }, - { - "name": "jordanbtucker", - "email": "jordanbtucker@gmail.com" - } - ], - "name": "json5", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/aseemk/json5.git" - }, - "scripts": { - "build": "node ./lib/cli.js -c package.json5", - "test": "mocha --ui exports --reporter spec" - }, - "version": "0.5.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/LICENSE deleted file mode 100644 index d734237..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/README.md deleted file mode 100644 index 6a9df36..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/README.md +++ /dev/null @@ -1,261 +0,0 @@ -# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) - -> Get the native type of a value. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save kind-of -``` - -## Install - -Install with [bower](https://bower.io/) - -```sh -$ bower install kind-of --save -``` - -## Usage - -> es5, browser and es6 ready - -```js -var kindOf = require('kind-of'); - -kindOf(undefined); -//=> 'undefined' - -kindOf(null); -//=> 'null' - -kindOf(true); -//=> 'boolean' - -kindOf(false); -//=> 'boolean' - -kindOf(new Boolean(true)); -//=> 'boolean' - -kindOf(new Buffer('')); -//=> 'buffer' - -kindOf(42); -//=> 'number' - -kindOf(new Number(42)); -//=> 'number' - -kindOf('str'); -//=> 'string' - -kindOf(new String('str')); -//=> 'string' - -kindOf(arguments); -//=> 'arguments' - -kindOf({}); -//=> 'object' - -kindOf(Object.create(null)); -//=> 'object' - -kindOf(new Test()); -//=> 'object' - -kindOf(new Date()); -//=> 'date' - -kindOf([]); -//=> 'array' - -kindOf([1, 2, 3]); -//=> 'array' - -kindOf(new Array()); -//=> 'array' - -kindOf(/foo/); -//=> 'regexp' - -kindOf(new RegExp('foo')); -//=> 'regexp' - -kindOf(function () {}); -//=> 'function' - -kindOf(function * () {}); -//=> 'function' - -kindOf(new Function()); -//=> 'function' - -kindOf(new Map()); -//=> 'map' - -kindOf(new WeakMap()); -//=> 'weakmap' - -kindOf(new Set()); -//=> 'set' - -kindOf(new WeakSet()); -//=> 'weakset' - -kindOf(Symbol('str')); -//=> 'symbol' - -kindOf(new Int8Array()); -//=> 'int8array' - -kindOf(new Uint8Array()); -//=> 'uint8array' - -kindOf(new Uint8ClampedArray()); -//=> 'uint8clampedarray' - -kindOf(new Int16Array()); -//=> 'int16array' - -kindOf(new Uint16Array()); -//=> 'uint16array' - -kindOf(new Int32Array()); -//=> 'int32array' - -kindOf(new Uint32Array()); -//=> 'uint32array' - -kindOf(new Float32Array()); -//=> 'float32array' - -kindOf(new Float64Array()); -//=> 'float64array' -``` - -## Benchmarks - -Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). -Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. - -```bash -#1: array - current x 23,329,397 ops/sec ±0.82% (94 runs sampled) - lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) - lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) - -#2: boolean - current x 27,197,115 ops/sec ±0.85% (94 runs sampled) - lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) - lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) - -#3: date - current x 20,190,117 ops/sec ±0.86% (92 runs sampled) - lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) - lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) - -#4: function - current x 23,855,460 ops/sec ±0.60% (97 runs sampled) - lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) - lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) - -#5: null - current x 27,061,047 ops/sec ±0.97% (96 runs sampled) - lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) - lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) - -#6: number - current x 25,075,682 ops/sec ±0.53% (99 runs sampled) - lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) - lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) - -#7: object - current x 3,348,980 ops/sec ±0.49% (99 runs sampled) - lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) - lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) - -#8: regex - current x 21,284,827 ops/sec ±0.72% (96 runs sampled) - lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) - lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) - -#9: string - current x 25,379,234 ops/sec ±0.58% (96 runs sampled) - lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) - lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) - -#10: undef - current x 27,459,221 ops/sec ±1.01% (93 runs sampled) - lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) - lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) - -``` - -## Optimizations - -In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: - -1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. -2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. -3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` - -## About - -### Related projects - -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 59 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [miguelmota](https://github.com/miguelmota) | -| 1 | [dtothefp](https://github.com/dtothefp) | -| 1 | [ksheedlo](https://github.com/ksheedlo) | -| 1 | [pdehaan](https://github.com/pdehaan) | -| 1 | [laggingreflex](https://github.com/laggingreflex) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/index.js deleted file mode 100644 index b52c291..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/index.js +++ /dev/null @@ -1,116 +0,0 @@ -var isBuffer = require('is-buffer'); -var toString = Object.prototype.toString; - -/** - * Get the native `typeof` a value. - * - * @param {*} `val` - * @return {*} Native javascript type - */ - -module.exports = function kindOf(val) { - // primitivies - if (typeof val === 'undefined') { - return 'undefined'; - } - if (val === null) { - return 'null'; - } - if (val === true || val === false || val instanceof Boolean) { - return 'boolean'; - } - if (typeof val === 'string' || val instanceof String) { - return 'string'; - } - if (typeof val === 'number' || val instanceof Number) { - return 'number'; - } - - // functions - if (typeof val === 'function' || val instanceof Function) { - return 'function'; - } - - // array - if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { - return 'array'; - } - - // check for instances of RegExp and Date before calling `toString` - if (val instanceof RegExp) { - return 'regexp'; - } - if (val instanceof Date) { - return 'date'; - } - - // other objects - var type = toString.call(val); - - if (type === '[object RegExp]') { - return 'regexp'; - } - if (type === '[object Date]') { - return 'date'; - } - if (type === '[object Arguments]') { - return 'arguments'; - } - if (type === '[object Error]') { - return 'error'; - } - - // buffer - if (isBuffer(val)) { - return 'buffer'; - } - - // es6: Map, WeakMap, Set, WeakSet - if (type === '[object Set]') { - return 'set'; - } - if (type === '[object WeakSet]') { - return 'weakset'; - } - if (type === '[object Map]') { - return 'map'; - } - if (type === '[object WeakMap]') { - return 'weakmap'; - } - if (type === '[object Symbol]') { - return 'symbol'; - } - - // typed arrays - if (type === '[object Int8Array]') { - return 'int8array'; - } - if (type === '[object Uint8Array]') { - return 'uint8array'; - } - if (type === '[object Uint8ClampedArray]') { - return 'uint8clampedarray'; - } - if (type === '[object Int16Array]') { - return 'int16array'; - } - if (type === '[object Uint16Array]') { - return 'uint16array'; - } - if (type === '[object Int32Array]') { - return 'int32array'; - } - if (type === '[object Uint32Array]') { - return 'uint32array'; - } - if (type === '[object Float32Array]') { - return 'float32array'; - } - if (type === '[object Float64Array]') { - return 'float64array'; - } - - // must be a plain object - return 'object'; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/package.json deleted file mode 100644 index c6d6fd2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/kind-of/package.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "kind-of@^3.0.2", - "scope": null, - "escapedName": "kind-of", - "name": "kind-of", - "rawSpec": "^3.0.2", - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch" - ] - ], - "_from": "kind-of@>=3.0.2 <4.0.0", - "_id": "kind-of@3.2.2", - "_inCache": true, - "_location": "/kind-of", - "_nodeVersion": "7.7.3", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/kind-of-3.2.2.tgz_1494958899918_0.23780996026471257" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.5.0", - "_phantomChildren": {}, - "_requested": { - "raw": "kind-of@^3.0.2", - "scope": null, - "escapedName": "kind-of", - "name": "kind-of", - "rawSpec": "^3.0.2", - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-number", - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", - "_shrinkwrap": null, - "_spec": "kind-of@^3.0.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/kind-of/issues" - }, - "contributors": [ - { - "name": "David Fox-Powell", - "url": "https://dtothefp.github.io/me" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Ken Sheedlo", - "url": "kensheedlo.com" - }, - { - "name": "laggingreflex", - "url": "https://github.com/laggingreflex" - }, - { - "name": "Miguel Mota", - "url": "https://miguelmota.com" - }, - { - "name": "Peter deHaan", - "url": "http://about.me/peterdehaan" - } - ], - "dependencies": { - "is-buffer": "^1.1.5" - }, - "description": "Get the native type of a value.", - "devDependencies": { - "ansi-bold": "^0.1.1", - "benchmarked": "^1.0.0", - "browserify": "^14.3.0", - "glob": "^7.1.1", - "gulp-format-md": "^0.1.12", - "mocha": "^3.3.0", - "type-of": "^2.0.1", - "typeof": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", - "tarball": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "0ffe67cf12f5396047c1bacf04232b7deeb24063", - "homepage": "https://github.com/jonschlinkert/kind-of", - "keywords": [ - "arguments", - "array", - "boolean", - "check", - "date", - "function", - "is", - "is-type", - "is-type-of", - "kind", - "kind-of", - "number", - "object", - "of", - "regexp", - "string", - "test", - "type", - "type-of", - "typeof", - "types" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "kind-of", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/kind-of.git" - }, - "scripts": { - "prepublish": "browserify -o browser.js -e index.js -s index --bare", - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "is-glob", - "is-number", - "is-primitive" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb" - ] - }, - "version": "3.2.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jscsrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jscsrc deleted file mode 100644 index af3c78e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jscsrc +++ /dev/null @@ -1,60 +0,0 @@ -{ - "esnext": true, - "disallowMixedSpacesAndTabs": true, - "disallowSpaceAfterObjectKeys": true, - "disallowSpaceBeforeBinaryOperators": [ - "," - ], - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowTrailingWhitespace": true, - "requireCommaBeforeLineBreak": true, - "requireLineFeedAtFileEnd": true, - "requireSpaceAfterBinaryOperators": [ - "=", - ",", - "+", - "-", - "/", - "*", - "==", - "===", - "!=", - "!==", - ":", - "&&", - "||" - ], - "requireSpaceAfterKeywords": [ - "if", - "else", - "for", - "while", - "do", - "switch", - "return", - "try", - "catch" - ], - "requireSpaceBeforeBinaryOperators": [ - "=", - "+", - "-", - "/", - "*", - "==", - "===", - "!=", - "!==", - "&&", - "||" - ], - "requireSpaceBeforeBlockStatements": true, - "requireSpacesInFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "validateQuoteMarks": { - "escape": true, - "mark": "'" - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jshintrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jshintrc deleted file mode 100644 index 6871084..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.jshintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "undef": true, - "unused": true, - "node": true, - "esnext": true, - "expr": true, - "globals": { - "describe": true, - "it": true - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.npmignore deleted file mode 100644 index 9c9c73b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test -artwork diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.travis.yml deleted file mode 100644 index 61ec9ec..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -os: - - linux - - osx -node_js: - - "6" - - "5" - - "4" - - "0.12" - - "0.10" -before_install: - - npm update -g npm -matrix: - fast_finish: true - allow_failures: - - node_js: "0.10" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/CHANGELOG b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/CHANGELOG deleted file mode 100644 index ee5b84d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/CHANGELOG +++ /dev/null @@ -1,127 +0,0 @@ -v2.2.2: - date: 2016-05-20 - changes: - - Update dependencies. -v2.2.1: - date: 2016-03-23 - changes: - - Make sure that v8 flags are passed properly through the `respawn` event -v2.1.0: - date: 2015-05-20 - changes: - - Use rechoir to autoload modules. -v2.0.3: - date: 2015-03-31 - changes: - - Internal bugfix, don't wrap callback error in another error, idiot. -v2.0.2: - date: 2015-02-24 - changes: - - Support process.env.NODE_PATH when resolving module. -v2.0.1: - date: 2015-02-01 - changes: - - Find modulePath correctly when devving against yourself. -v2.0.0: - date: 2015-01-15 - changes: - - Rename `nodeFlags` to `v8Flags` and make it async. -v1.0.4: - date: 2015-01-04 - changes: - - Detect config extension using basename, not full path. -v1.0.0: - date: 2014-12-16 - changes: - - Update dependencies -v0.13.6: - date: 2014-11-07 - changes: - - Don't include artwork on npm. -v0.13.5: - date: 2014-10-10 - changes: - - Only attempt to resolve the real path of configFile if it is actually a symlink. -v0.13.4: - date: 2014-10-07 - changes: - - Set configBase to the directory of the symlink, not the directory of its real location. -v0.13.3: - date: 2014-10-06 - changes: - - Return the real location of symlinked config files. -v0.13.2: - date: 2014-09-12 - changes: - - Include flags in respawn event. I really miss `npm publish --force`. -v0.13.1: - date: 2014-09-12 - changes: - - Slight performance tweak. -v0.13.0: - date: 2014-09-12 - changes: - - Support passing flags to node with `nodeFlags` option. -v0.12.1: - date: 2014-06-27 - changes: - - Support preloading modules for compound extensions like `.coffee.md`. -v0.12.0: - date: 2014-06-27 - changes: - - Respect order of extensions when searching for config. - - Rename `configNameRegex` environment property to `configNameSearch`. -v0.11.3: - date: 2014-06-09 - changes: - - Make cwd match configBase if cwd isn't explictly provided -v0.11.2: - date: 2014-06-04 - changes: - - Regression fix: coerce preloads into array before attempting to push more -v0.11.1: - date: 2014-06-02 - changes: - - Update dependencies. -v0.11.0: - date: 2014-05-27 - changes: - - Refactor and remove options parsing. -v0.10.0: - date: 2014-05-06 - changes: - - Remove `addExtension` in favor of `extension` option. - - Support preloading modules based on extension. -v0.9.7: - date: 2014-04-28 - changes: - - Locate local module in cwd even if config isn't present. -v0.9.6: - date: 2014-04-02 - changes: - - Fix regression where external modules are not properly required. - - Ignore configPathFlag / cwdFlag if the value isn't a string -v0.9.3: - date: 2014-02-28 - changes: - - Fix regression where developing against self doesn't correctly set cwd. -v0.9.0: - date: 2014-02-28 - changes: - - Use liftoff instance as context (`this`) for launch callback. - - Support split --cwd and --configfile locations. - - Rename `configLocationFlag` to `configPathFlag` - - Support node 0.8+ -v0.8.7: - date: 2014-02-24 - changes: - - Pass environment as first argument to `launch`. -v0.8.5: - date: 2014-02-19 - changes: - - Implement `addExtensions` option. - - Default to `index.js` if `modulePackage` has no `main` property. -v0.8.4: - date: 2014-02-05 - changes: - - Initial public release. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/LICENSE deleted file mode 100644 index a55f5b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Tyler Kellen - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/README.md deleted file mode 100644 index 9a5a0ae..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/README.md +++ /dev/null @@ -1,429 +0,0 @@ -

    - - - -

    - -# liftoff [![Build Status](https://secure.travis-ci.org/js-cli/js-liftoff.svg)](http://travis-ci.org/js-cli/js-liftoff) [![Build status](https://ci.appveyor.com/api/projects/status/5a6w8xuq8ed1ilc4/branch/master?svg=true)](https://ci.appveyor.com/project/js-cli/js-liftoff/branch/master) - -> Launch your command line tool with ease. - -[![NPM](https://nodei.co/npm/liftoff.png)](https://nodei.co/npm/liftoff/) - -## What is it? -[See this blog post](http://weblog.bocoup.com/building-command-line-tools-in-node-with-liftoff/), [check out this proof of concept](https://github.com/js-cli/js-hacker), or read on. - -Say you're writing a CLI tool. Let's call it [hacker](https://github.com/js-cli/js-hacker). You want to configure it using a `Hackerfile`. This is node, so you install `hacker` locally for each project you use it in. But, in order to get the `hacker` command in your PATH, you also install it globally. - -Now, when you run `hacker`, you want to configure what it does using the `Hackerfile` in your current directory, and you want it to execute using the local installation of your tool. Also, it'd be nice if the `hacker` command was smart enough to traverse up your folders until it finds a `Hackerfile`—for those times when you're not in the root directory of your project. Heck, you might even want to launch `hacker` from a folder outside of your project by manually specifying a working directory. Liftoff manages this for you. - -So, everything is working great. Now you can find your local `hacker` and `Hackerfile` with ease. Unfortunately, it turns out you've authored your `Hackerfile` in coffee-script, or some other JS variant. In order to support *that*, you have to load the compiler for it, and then register the extension for it with node. Good news, Liftoff can do that, and a whole lot more, too. - -## API - -### constructor(opts) - -Create an instance of Liftoff to invoke your application. - -An example utilizing all options: -```js -const Hacker = new Liftoff({ - name: 'hacker', - processTitle: 'hacker', - moduleName: 'hacker', - configName: 'hackerfile', - extensions: { - '.js': null, - '.json': null, - '.coffee': 'coffee-script/register' - }, - v8flags: ['--harmony'] // or v8flags: require('v8flags') -}); -``` - -#### opts.name - -Sugar for setting `processTitle`, `moduleName`, `configName` automatically. - -Type: `String` -Default: `null` - -These are equivalent: -```js -const Hacker = Liftoff({ - processTitle: 'hacker', - moduleName: 'hacker', - configName: 'hackerfile' -}); -``` -```js -const Hacker = Liftoff({name:'hacker'}); -``` - -#### opts.moduleName - -Sets which module your application expects to find locally when being run. - -Type: `String` -Default: `null` - -#### opts.configName - -Sets the name of the configuration file Liftoff will attempt to find. Case-insensitive. - -Type: `String` -Default: `null` - -#### opts.extensions - -Set extensions to include when searching for a configuration file. If an external module is needed to load a given extension (e.g. `.coffee`), the module name should be specified as the value for the key. - -Type: `Object` -Default: `{".js":null,".json":null}` - -**Examples:** - -In this example Liftoff will look for `myappfile{.js,.json,.coffee}`. If a config with the extension `.coffee` is found, Liftoff will try to require `coffee-script/require` from the current working directory. -```js -const MyApp = new Liftoff({ - name: 'myapp', - extensions: { - '.js': null, - '.json': null, - '.coffee': 'coffee-script/register' - } -}); -``` - -In this example, Liftoff will look for `.myapp{rc}`. -```js -const MyApp = new Liftoff({ - name: 'myapp', - configName: '.myapp', - extensions: { - 'rc': null - } -}); -``` - -In this example, Liftoff will automatically attempt to load the correct module for any javascript variant supported by [node-interpret](https://github.com/tkellen/node-interpret) (as long as it does not require a register method). - -```js -const MyApp = new Liftoff({ - name: 'myapp', - extensions: require('interpret').jsVariants -}); -``` -#### opts.v8flags - -Any flag specified here will be applied to node, not your program. Useful for supporting invocations like `myapp --harmony command`, where `--harmony` should be passed to node, not your program. This functionality is implemented using [flagged-respawn](http://github.com/tkellen/node-flagged-respawn). To support all v8flags, see [node-v8flags](https://github.com/tkellen/node-v8flags). - -Type: `Array|Function` -Default: `null` - -If this method is a function, it should take a node-style callback that yields an array of flags. - -#### opts.processTitle - -Sets what the [process title](http://nodejs.org/api/process.html#process_process_title) will be. - -Type: `String` -Default: `null` - -#### opts.completions(type) - -A method to handle bash/zsh/whatever completions. - -Type: `Function` -Default: `null` - -#### opts.configFiles - -An object of configuration files to find. Each property is keyed by the default basename of the file being found, and the value is an object of [path arguments](#path-arguments) keyed by unique names. - -__Note:__ This option is useful if, for example, you want to support an `.apprc` file in addition to an `appfile.js`. If you only need a single configuration file, you probably don't need this. In addition to letting you find multiple files, this option allows more fine-grained control over how configuration files are located. - -Type: `Object` -Default: `null` - -#### Path arguments - -The [`fined`](https://github.com/js-cli/fined) module accepts a string representing the path to search or an object with the following keys: - -* `path` __(required)__ - - The path to search. Using only a string expands to this property. - - Type: `String` - Default: `null` - -* `name` - - The basename of the file to find. Extensions are appended during lookup. - - Type: `String` - Default: Top-level key in `configFiles` - -* `extensions` - - The extensions to append to `name` during lookup. See also: [`opts.extensions`](#optsextensions). - - Type: `String|Array|Object` - Default: The value of [`opts.extensions`](#optsextensions) - -* `cwd` - - The base directory of `path` (if relative). - - Type: `String` - Default: The value of [`opts.cwd`](#optscwd) - -* `findUp` - - Whether the `path` should be traversed up to find the file. - - Type: `Boolean` - Default: `false` - -**Examples:** - -In this example Liftoff will look for the `.hacker.js` file relative to the `cwd` as declared in `configFiles`. -```js -const MyApp = new Liftoff({ - name: 'hacker', - configFiles: { - '.hacker': { - cwd: '.' - } - } -}); -``` - -In this example, Liftoff will look for `.hackerrc` in the home directory. -```js -const MyApp = new Liftoff({ - name: 'hacker', - configFiles: { - '.hacker': { - home: { - path: '~', - extensions: { - 'rc': null - } - } - } - } -}); -``` - -In this example, Liftoff will look in the `cwd` and then lookup the tree for the `.hacker.js` file. -```js -const MyApp = new Liftoff({ - name: 'hacker', - configFiles: { - '.hacker': { - up: { - path: '.', - findUp: true - } - } - } -}); -``` - -In this example, the `name` is overridden and the key is ignored so Liftoff looks for `.override.js`. -```js -const MyApp = new Liftoff({ - name: 'hacker', - configFiles: { - hacker: { - override: { - path: '.', - name: '.override' - } - } - } -}); -``` - -In this example, Liftoff will use the home directory as the `cwd` and looks for `~/.hacker.js`. -```js -const MyApp = new Liftoff({ - name: 'hacker', - configFiles: { - '.hacker': { - home: { - path: '.', - cwd: '~' - } - } - } -}); -``` - -## launch(opts, callback(env)) -Launches your application with provided options, builds an environment, and invokes your callback, passing the calculated environment as the first argument. - -##### Example Configuration w/ Options Parsing: -```js -const Liftoff = require('liftoff'); -const MyApp = new Liftoff({name:'myapp'}); -const argv = require('minimist')(process.argv.slice(2)); -const invoke = function (env) { - console.log('my environment is:', env); - console.log('my cli options are:', argv); - console.log('my liftoff config is:', this); -}; -MyApp.launch({ - cwd: argv.cwd, - configPath: argv.myappfile, - require: argv.require, - completion: argv.completion -}, invoke); -``` - -#### opts.cwd - -Change the current working directory for this launch. Relative paths are calculated against `process.cwd()`. - -Type: `String` -Default: `process.cwd()` - -**Example Configuration:** -```js -const argv = require('minimist')(process.argv.slice(2)); -MyApp.launch({ - cwd: argv.cwd -}, invoke); -``` - -**Matching CLI Invocation:** -``` -myapp --cwd ../ -``` - -#### opts.configPath - -Don't search for a config, use the one provided. **Note:** Liftoff will assume the current working directory is the directory containing the config file unless an alternate location is explicitly specified using `cwd`. - -Type: `String` -Default: `null` - -**Example Configuration:** -```js -var argv = require('minimist')(process.argv.slice(2)); -MyApp.launch({ - configPath: argv.myappfile -}, invoke); -``` - -**Matching CLI Invocation:** -``` -myapp --myappfile /var/www/project/Myappfile.js -``` - -**Examples using `cwd` and `configPath` together:** - -These are functionally identical: -``` -myapp --myappfile /var/www/project/Myappfile.js -myapp --cwd /var/www/project -``` - -These can run myapp from a shared directory as though it were located in another project: -``` -myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project1 -myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project2 -``` - -#### opts.require - -A string or array of modules to attempt requiring from the local working directory before invoking the launch callback. - -Type: `String|Array` -Default: `null` - -**Example Configuration:** -```js -var argv = require('minimist')(process.argv.slice(2)); -MyApp.launch({ - require: argv.require -}, invoke); -``` - -**Matching CLI Invocation:** -```js -myapp --require coffee-script/register -``` - -#### callback(env) - -A function to start your application. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys: - -- `cwd`: the current working directory -- `require`: an array of modules that liftoff tried to pre-load -- `configNameSearch`: the config files searched for -- `configPath`: the full path to your configuration file (if found) -- `configBase`: the base directory of your configuration file (if found) -- `modulePath`: the full path to the local module your project relies on (if found) -- `modulePackage`: the contents of the local module's package.json (if found) -- `configFiles`: an object of filepaths for each found config file (filepath values will be null if not found) - -### events - -#### require(name, module) - -Emitted when a module is pre-loaded. - -```js -var Hacker = new Liftoff({name:'hacker'}); -Hacker.on('require', function (name, module) { - console.log('Requiring external module: '+name+'...'); - // automatically register coffee-script extensions - if (name === 'coffee-script') { - module.register(); - } -}); -``` - -#### requireFail(name, err) - -Emitted when a requested module cannot be preloaded. - -```js -var Hacker = new Liftoff({name:'hacker'}); -Hacker.on('requireFail', function (name, err) { - console.log('Unable to load:', name, err); -}); -``` - -#### respawn(flags, child) - -Emitted when Liftoff re-spawns your process (when a [`v8flags`](#optsv8flags) is detected). - -```js -var Hacker = new Liftoff({ - name: 'hacker', - v8flags: ['--harmony'] -}); -Hacker.on('respawn', function (flags, child) { - console.log('Detected node flags:', flags); - console.log('Respawned to PID:', child.pid); -}); -``` - -Event will be triggered for this command: -`hacker --harmony commmand` - -## Examples - -Check out how [gulp](https://github.com/gulpjs/gulp/blob/master/bin/gulp.js) uses Liftoff. - -For a bare-bones example, try [the hacker project](https://github.com/js-cli/js-hacker/blob/master/bin/hacker.js). - -To try the example, do the following: - -1. Install the sample project `hacker` with `npm install -g hacker`. -2. Make a `Hackerfile.js` with some arbitrary javascript it. -3. Install hacker next to it with `npm install hacker`. -3. Run `hacker` while in the same parent folder. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/UPGRADING.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/UPGRADING.md deleted file mode 100644 index 7f95e3e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/UPGRADING.md +++ /dev/null @@ -1,28 +0,0 @@ -# 1.0.0 -> 2.0.0 -The option `nodeFlags` was renamed to `v8flags` for accuracy. It can now be a callback taking method that yields an array of flags, **or** an array literal. - -# 0.11 -> 0.12 -For the environment passed into the `launch` callback, `configNameRegex` has been renamed to `configNameSearch`. It now returns an array of valid config names instead of a regular expression. - -# 0.10 -> 0.11 -The method signature for `launch` was changed in this version of Liftoff. - -You must now provide your own options parser and pass your desired params directly into `launch` as the first argument. The second argument is now the invocation callback that starts your application. - -To replicate the default functionality of 0.10, use the following: -```js -const Liftoff = require('liftoff'); -const MyApp = new Liftoff({name:'myapp'}); -const argv = require('minimist')(process.argv.slice(2)); -const invoke = function (env) { - console.log('my environment is:', env); - console.log('my cli options are:', argv); - console.log('my liftoff config is:', this); -}; -MyApp.launch({ - cwd: argv.cwd, - configPath: argv.myappfile, - require: argv.require, - completion: argv.completion -}, invoke); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/appveyor.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/appveyor.yml deleted file mode 100644 index bcb6b74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml -# http://www.appveyor.com/docs/lang/nodejs-iojs - -environment: - matrix: - # node.js - - nodejs_version: "0.10" - - nodejs_version: "0.12" - - nodejs_version: "4" - - nodejs_version: "5" - - nodejs_version: "6" - -install: - - IF %nodejs_version% EQU 0.10 npm -g install npm@2 - - IF %nodejs_version% EQU 0.10 set PATH=%APPDATA%\npm;%PATH% - - ps: Install-Product node $env:nodejs_version - - npm install - -test_script: - - node --version - - npm --version - # power shell - - ps: "npm test" - # standard command line - - cmd: npm test - -build: off - -version: "{build}" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/index.js deleted file mode 100644 index 0c0a8d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/index.js +++ /dev/null @@ -1,210 +0,0 @@ -const fs = require('fs'); -const util = require('util'); -const path = require('path'); -const EE = require('events').EventEmitter; - -const extend = require('extend'); -const resolve = require('resolve'); -const flaggedRespawn = require('flagged-respawn'); -const isPlainObject = require('lodash.isplainobject'); -const mapValues = require('lodash.mapvalues'); -const fined = require('fined'); - -const findCwd = require('./lib/find_cwd'); -const findConfig = require('./lib/find_config'); -const fileSearch = require('./lib/file_search'); -const parseOptions = require('./lib/parse_options'); -const silentRequire = require('./lib/silent_require'); -const buildConfigName = require('./lib/build_config_name'); -const registerLoader = require('./lib/register_loader'); - - -function Liftoff (opts) { - EE.call(this); - extend(this, parseOptions(opts)); -} -util.inherits(Liftoff, EE); - -Liftoff.prototype.requireLocal = function (module, basedir) { - try { - var result = require(resolve.sync(module, {basedir: basedir})); - this.emit('require', module, result); - return result; - } catch (e) { - this.emit('requireFail', module, e); - } -}; - -Liftoff.prototype.buildEnvironment = function (opts) { - opts = opts || {}; - - // get modules we want to preload - var preload = opts.require || []; - - // ensure items to preload is an array - if (!Array.isArray(preload)) { - preload = [preload]; - } - - // make a copy of search paths that can be mutated for this run - var searchPaths = this.searchPaths.slice(); - - // calculate current cwd - var cwd = findCwd(opts); - - // if cwd was provided explicitly, only use it for searching config - if (opts.cwd) { - searchPaths = [cwd]; - } else { - // otherwise just search in cwd first - searchPaths.unshift(cwd); - } - - // calculate the regex to use for finding the config file - var configNameSearch = buildConfigName({ - configName: this.configName, - extensions: Object.keys(this.extensions) - }); - - // calculate configPath - var configPath = findConfig({ - configNameSearch: configNameSearch, - searchPaths: searchPaths, - configPath: opts.configPath - }); - - // if we have a config path, save the directory it resides in. - var configBase; - if (configPath) { - configBase = path.dirname(configPath); - // if cwd wasn't provided explicitly, it should match configBase - if (!opts.cwd) { - cwd = configBase; - } - // resolve symlink if needed - if (fs.lstatSync(configPath).isSymbolicLink()) { - configPath = fs.realpathSync(configPath); - } - } - - // TODO: break this out into lib/ - // locate local module and package next to config or explicitly provided cwd - var modulePath, modulePackage; - try { - var delim = (process.platform === 'win32' ? ';' : ':'), - paths = (process.env.NODE_PATH ? process.env.NODE_PATH.split(delim) : []); - modulePath = resolve.sync(this.moduleName, {basedir: configBase || cwd, paths: paths}); - modulePackage = silentRequire(fileSearch('package.json', [modulePath])); - } catch (e) {} - - // if we have a configuration but we failed to find a local module, maybe - // we are developing against ourselves? - if (!modulePath && configPath) { - // check the package.json sibling to our config to see if its `name` - // matches the module we're looking for - var modulePackagePath = fileSearch('package.json', [configBase]); - modulePackage = silentRequire(modulePackagePath); - if (modulePackage && modulePackage.name === this.moduleName) { - // if it does, our module path is `main` inside package.json - modulePath = path.join(path.dirname(modulePackagePath), modulePackage.main || 'index.js'); - cwd = configBase; - } else { - // clear if we just required a package for some other project - modulePackage = {}; - } - } - - // load any modules which were requested to be required - if (preload.length) { - // unique results first - preload.filter(function (value, index, self) { - return self.indexOf(value) === index; - }).forEach(function (dep) { - this.requireLocal(dep, findCwd(opts)); - }, this); - } - - var exts = this.extensions; - var eventEmitter = this; - registerLoader(eventEmitter, exts, configPath, cwd); - - var configFiles = {}; - if (isPlainObject(this.configFiles)) { - var notfound = { path: null }; - configFiles = mapValues(this.configFiles, function(prop, name) { - var defaultObj = { name: name, cwd: cwd, extensions: exts }; - return mapValues(prop, function(pathObj) { - var found = fined(pathObj, defaultObj) || notfound; - if (isPlainObject(found.extension)) { - registerLoader(eventEmitter, found.extension, found.path, cwd); - } - return found.path; - }); - }); - } - - return { - cwd: cwd, - require: preload, - configNameSearch: configNameSearch, - configPath: configPath, - configBase: configBase, - modulePath: modulePath, - modulePackage: modulePackage || {}, - configFiles: configFiles - }; -}; - -Liftoff.prototype.handleFlags = function (cb) { - if (typeof this.v8flags === 'function') { - this.v8flags(function (err, flags) { - if (err) { - cb(err); - } else { - cb(null, flags); - } - }); - } else { - process.nextTick(function () { - cb(null, this.v8flags); - }.bind(this)); - } -}; - -Liftoff.prototype.launch = function (opts, fn) { - if (typeof fn !== 'function') { - throw new Error('You must provide a callback function.'); - } - process.title = this.processTitle; - - var completion = opts.completion; - if (completion && this.completions) { - return this.completions(completion); - } - - this.handleFlags(function (err, flags) { - if (err) { - throw err; - } else { - if (flags) { - flaggedRespawn(flags, process.argv, function (ready, child) { - if (child !== process) { - this.emit('respawn', process.argv.filter(function (arg) { - var flag = arg.split('=')[0]; - return flags.indexOf(flag) !== -1; - }.bind(this)), child); - } - if (ready) { - fn.call(this, this.buildEnvironment(opts)); - } - }.bind(this)); - } else { - fn.call(this, this.buildEnvironment(opts)); - } - } - }.bind(this)); -}; - - - -module.exports = Liftoff; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/build_config_name.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/build_config_name.js deleted file mode 100644 index b83e185..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/build_config_name.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = function (opts) { - opts = opts || {}; - var configName = opts.configName; - var extensions = opts.extensions; - if (!configName) { - throw new Error('Please specify a configName.'); - } - if (configName instanceof RegExp) { - return [configName]; - } - if (!Array.isArray(extensions)) { - throw new Error('Please provide an array of valid extensions.'); - } - return extensions.map(function (ext) { - return configName + ext; - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/file_search.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/file_search.js deleted file mode 100644 index 76dadd6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/file_search.js +++ /dev/null @@ -1,14 +0,0 @@ -const findup = require('findup-sync'); - -module.exports = function (search, paths) { - var path; - var len = paths.length; - for (var i = 0; i < len; i++) { - if (path) { - break; - } else { - path = findup(search, {cwd: paths[i], nocase: true}); - } - } - return path; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_config.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_config.js deleted file mode 100644 index 71c3f07..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_config.js +++ /dev/null @@ -1,25 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const fileSearch = require('./file_search'); - -module.exports = function (opts) { - opts = opts || {}; - var configNameSearch = opts.configNameSearch; - var configPath = opts.configPath; - var searchPaths = opts.searchPaths; - // only search for a config if a path to one wasn't explicitly provided - if (!configPath) { - if (!Array.isArray(searchPaths)) { - throw new Error('Please provide an array of paths to search for config in.'); - } - if (!configNameSearch) { - throw new Error('Please provide a configNameSearch.'); - } - configPath = fileSearch(configNameSearch, searchPaths); - } - // confirm the configPath exists and return an absolute path to it - if (fs.existsSync(configPath)) { - return path.resolve(configPath); - } - return null; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_cwd.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_cwd.js deleted file mode 100644 index 2a029b9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/find_cwd.js +++ /dev/null @@ -1,18 +0,0 @@ -const path = require('path'); - -module.exports = function (opts) { - if (!opts) { - opts = {}; - } - var cwd = opts.cwd; - var configPath = opts.configPath; - // if a path to the desired config was specified - // but no cwd was provided, use configPath dir - if (typeof configPath === 'string' && !cwd) { - cwd = path.dirname(path.resolve(configPath)); - } - if (typeof cwd === 'string') { - return path.resolve(cwd); - } - return process.cwd(); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/parse_options.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/parse_options.js deleted file mode 100644 index ab416b5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/parse_options.js +++ /dev/null @@ -1,35 +0,0 @@ -const extend = require('extend'); - -module.exports = function (opts) { - var defaults = { - extensions: { - '.js': null, - '.json': null - }, - searchPaths: [] - }; - if (!opts) { - opts = {}; - } - if (opts.name) { - if (!opts.processTitle) { - opts.processTitle = opts.name; - } - if (!opts.configName) { - opts.configName = opts.name + 'file'; - } - if (!opts.moduleName) { - opts.moduleName = opts.name; - } - } - if (!opts.processTitle) { - throw new Error('You must specify a processTitle.'); - } - if (!opts.configName) { - throw new Error('You must specify a configName.'); - } - if (!opts.moduleName) { - throw new Error('You must specify a moduleName.'); - } - return extend(defaults, opts); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/register_loader.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/register_loader.js deleted file mode 100644 index 2b5f4cb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/register_loader.js +++ /dev/null @@ -1,25 +0,0 @@ -const rechoir = require('rechoir'); -const isString = require('lodash.isstring'); - -module.exports = function(eventEmitter, extensions, configPath, cwd) { - extensions = extensions || {}; - - if (!isString(configPath)) { - return; - } - - var autoloads = rechoir.prepare(extensions, configPath, cwd, true); - if (autoloads instanceof Error) { - autoloads = autoloads.failures; - } - - if (Array.isArray(autoloads)) { - autoloads.forEach(function (attempt) { - if (attempt.error) { - eventEmitter.emit('requireFail', attempt.moduleName, attempt.error); - } else { - eventEmitter.emit('require', attempt.moduleName, attempt.module); - } - }); - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/silent_require.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/silent_require.js deleted file mode 100644 index 7b4dfe4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/lib/silent_require.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function (path) { - try { - return require(path); - } catch (e) {} -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/package.json deleted file mode 100644 index 2c6e8bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "liftoff@^2.1.0", - "scope": null, - "escapedName": "liftoff", - "name": "liftoff", - "rawSpec": "^2.1.0", - "spec": ">=2.1.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp" - ] - ], - "_from": "liftoff@>=2.1.0 <3.0.0", - "_id": "liftoff@2.3.0", - "_inCache": true, - "_location": "/liftoff", - "_nodeVersion": "0.10.41", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/liftoff-2.3.0.tgz_1469646196567_0.8871160212438554" - }, - "_npmUser": { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - "_npmVersion": "2.15.2", - "_phantomChildren": {}, - "_requested": { - "raw": "liftoff@^2.1.0", - "scope": null, - "escapedName": "liftoff", - "name": "liftoff", - "rawSpec": "^2.1.0", - "spec": ">=2.1.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp" - ], - "_resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", - "_shasum": "a98f2ff67183d8ba7cfaca10548bd7ff0550b385", - "_shrinkwrap": null, - "_spec": "liftoff@^2.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp", - "author": { - "name": "Tyler Kellen", - "url": "http://goingslowly.com/" - }, - "bugs": { - "url": "https://github.com/js-cli/js-liftoff/issues" - }, - "dependencies": { - "extend": "^3.0.0", - "findup-sync": "^0.4.2", - "fined": "^1.0.1", - "flagged-respawn": "^0.3.2", - "lodash.isplainobject": "^4.0.4", - "lodash.isstring": "^4.0.1", - "lodash.mapvalues": "^4.4.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - }, - "description": "Launch your command line tool with ease.", - "devDependencies": { - "chai": "^3.5.0", - "coffee-script": "^1.10.0", - "istanbul": "^0.4.3", - "jscs": "^2.11.0", - "jshint": "^2.9.2", - "mocha": "^2.4.5", - "sinon": "~1.17.4" - }, - "directories": {}, - "dist": { - "shasum": "a98f2ff67183d8ba7cfaca10548bd7ff0550b385", - "tarball": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz" - }, - "engines": { - "node": ">= 0.8" - }, - "gitHead": "be40ec3a3fa5854b4ab496a97f3d5877bf747b0b", - "homepage": "https://github.com/js-cli/js-liftoff", - "keywords": [ - "command line" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - { - "name": "tkellen", - "email": "tyler@sleekcode.net" - }, - { - "name": "tusbar", - "email": "bertrand.marron@gmail.com" - } - ], - "name": "liftoff", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/js-cli/js-liftoff.git" - }, - "scripts": { - "test": "jshint lib index.js && jscs lib index.js && mocha -t 5000 -b -R spec test/index" - }, - "version": "2.3.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/index.js deleted file mode 100644 index 96d4d9f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/index.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; -var path = require('path'); -var fs = require('graceful-fs'); -var stripBom = require('strip-bom'); -var parseJson = require('parse-json'); -var Promise = require('pinkie-promise'); -var pify = require('pify'); - -function parse(x, fp) { - return parseJson(stripBom(x), path.relative(process.cwd(), fp)); -} - -module.exports = function (fp) { - return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) { - return parse(data, fp); - }); -}; - -module.exports.sync = function (fp) { - return parse(fs.readFileSync(fp, 'utf8'), fp); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/package.json deleted file mode 100644 index e1855f3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "load-json-file@^1.0.0", - "scope": null, - "escapedName": "load-json-file", - "name": "load-json-file", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/read-pkg" - ] - ], - "_from": "load-json-file@>=1.0.0 <2.0.0", - "_id": "load-json-file@1.1.0", - "_inCache": true, - "_location": "/load-json-file", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "raw": "load-json-file@^1.0.0", - "scope": null, - "escapedName": "load-json-file", - "name": "load-json-file", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/read-pkg" - ], - "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "_shasum": "956905708d58b4bab4c2261b04f59f31c99374c0", - "_shrinkwrap": null, - "_spec": "load-json-file@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/read-pkg", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/load-json-file/issues" - }, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "description": "Read and parse a JSON file", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "956905708d58b4bab4c2261b04f59f31c99374c0", - "tarball": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "115157a417380d3160da418d4ff25bb33b0051eb", - "homepage": "https://github.com/sindresorhus/load-json-file", - "keywords": [ - "json", - "read", - "parse", - "file", - "fs", - "graceful", - "load" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "load-json-file", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/load-json-file.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.1.0", - "xo": { - "ignores": [ - "test.js" - ] - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/readme.md deleted file mode 100644 index fa982b5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) - -> Read and parse a JSON file - -[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). - - -## Install - -``` -$ npm install --save load-json-file -``` - - -## Usage - -```js -const loadJsonFile = require('load-json-file'); - -loadJsonFile('foo.json').then(json => { - console.log(json); - //=> {foo: true} -}); -``` - - -## API - -### loadJsonFile(filepath) - -Returns a promise that resolves to the parsed JSON. - -### loadJsonFile.sync(filepath) - -Returns the parsed JSON. - - -## Related - -- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/README.md deleted file mode 100644 index acdfa29..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._basecopy v3.0.1 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCopy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basecopy -``` - -In Node.js/io.js: - -```js -var baseCopy = require('lodash._basecopy'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecopy) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/index.js deleted file mode 100644 index b586d31..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; -} - -module.exports = baseCopy; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/package.json deleted file mode 100644 index a08d338..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basecopy/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._basecopy@^3.0.0", - "scope": null, - "escapedName": "lodash._basecopy", - "name": "lodash._basecopy", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash._basecopy@>=3.0.0 <4.0.0", - "_id": "lodash._basecopy@3.0.1", - "_inCache": true, - "_location": "/lodash._basecopy", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.7.6", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._basecopy@^3.0.0", - "scope": null, - "escapedName": "lodash._basecopy", - "name": "lodash._basecopy", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "_shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", - "_shrinkwrap": null, - "_spec": "lodash._basecopy@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `baseCopy` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", - "tarball": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._basecopy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/README.md deleted file mode 100644 index f81145e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._basetostring v3.0.1 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basetostring -``` - -In Node.js/io.js: - -```js -var baseToString = require('lodash._basetostring'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/index.js deleted file mode 100644 index db8ecc9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - return value == null ? '' : (value + ''); -} - -module.exports = baseToString; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/package.json deleted file mode 100644 index 383b809..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basetostring/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._basetostring@^3.0.0", - "scope": null, - "escapedName": "lodash._basetostring", - "name": "lodash._basetostring", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash._basetostring@>=3.0.0 <4.0.0", - "_id": "lodash._basetostring@3.0.1", - "_inCache": true, - "_location": "/lodash._basetostring", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._basetostring@^3.0.0", - "scope": null, - "escapedName": "lodash._basetostring", - "name": "lodash._basetostring", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "_shrinkwrap": null, - "_spec": "lodash._basetostring@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `baseToString` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", - "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._basetostring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/LICENSE.txt deleted file mode 100644 index 1776432..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/README.md deleted file mode 100644 index 206ba71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._basevalues v3.0.0 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseValues` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._basevalues -``` - -In Node.js/io.js: - -```js -var baseValues = require('lodash._basevalues'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._basevalues) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/index.js deleted file mode 100644 index 28c8215..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * returned by `keysFunc`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = baseValues; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/package.json deleted file mode 100644 index aa5508b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._basevalues/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._basevalues@^3.0.0", - "scope": null, - "escapedName": "lodash._basevalues", - "name": "lodash._basevalues", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash._basevalues@>=3.0.0 <4.0.0", - "_id": "lodash._basevalues@3.0.0", - "_inCache": true, - "_location": "/lodash._basevalues", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._basevalues@^3.0.0", - "scope": null, - "escapedName": "lodash._basevalues", - "name": "lodash._basevalues", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "_shasum": "5b775762802bde3d3297503e26300820fdf661b7", - "_shrinkwrap": null, - "_spec": "lodash._basevalues@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `baseValues` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "5b775762802bde3d3297503e26300820fdf661b7", - "tarball": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - } - ], - "name": "lodash._basevalues", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/README.md deleted file mode 100644 index eef7f9c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapehtmlchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/index.js deleted file mode 100644 index ce4e6d8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var htmlEscapes = require('lodash._htmlescapes'); - -/** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(match) { - return htmlEscapes[match]; -} - -module.exports = escapeHtmlChar; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/package.json deleted file mode 100644 index aa2e420..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._escapehtmlchar@~2.4.1", - "scope": null, - "escapedName": "lodash._escapehtmlchar", - "name": "lodash._escapehtmlchar", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.escape" - ] - ], - "_from": "lodash._escapehtmlchar@>=2.4.1 <2.5.0", - "_id": "lodash._escapehtmlchar@2.4.1", - "_inCache": true, - "_location": "/lodash._escapehtmlchar", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._escapehtmlchar@~2.4.1", - "scope": null, - "escapedName": "lodash._escapehtmlchar", - "name": "lodash._escapehtmlchar", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.escape" - ], - "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz", - "_shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", - "_shrinkwrap": null, - "_spec": "lodash._escapehtmlchar@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.escape", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._htmlescapes": "~2.4.1" - }, - "description": "The internal Lo-Dash function `escapeHtmlChar` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d", - "tarball": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._escapehtmlchar", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/README.md deleted file mode 100644 index 6191a19..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapestringchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/index.js deleted file mode 100644 index f3b8c43..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to escape characters for inclusion in compiled string literals */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(match) { - return '\\' + stringEscapes[match]; -} - -module.exports = escapeStringChar; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/package.json deleted file mode 100644 index be45c84..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapestringchar/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._escapestringchar@~2.4.1", - "scope": null, - "escapedName": "lodash._escapestringchar", - "name": "lodash._escapestringchar", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.template" - ] - ], - "_from": "lodash._escapestringchar@>=2.4.1 <2.5.0", - "_id": "lodash._escapestringchar@2.4.1", - "_inCache": true, - "_location": "/lodash._escapestringchar", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._escapestringchar@~2.4.1", - "scope": null, - "escapedName": "lodash._escapestringchar", - "name": "lodash._escapestringchar", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz", - "_shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", - "_shrinkwrap": null, - "_spec": "lodash._escapestringchar@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal Lo-Dash function `escapeStringChar` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72", - "tarball": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._escapestringchar", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/README.md deleted file mode 100644 index 7835cec..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._getnative v3.9.1 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `getNative` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._getnative -``` - -In Node.js/io.js: - -```js -var getNative = require('lodash._getnative'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.9.1-npm-packages/lodash._getnative) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/index.js deleted file mode 100644 index a32063d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/index.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * lodash 3.9.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); -} - -module.exports = getNative; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/package.json deleted file mode 100644 index a9ba8bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._getnative/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._getnative@^3.0.0", - "scope": null, - "escapedName": "lodash._getnative", - "name": "lodash._getnative", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys" - ] - ], - "_from": "lodash._getnative@>=3.0.0 <4.0.0", - "_id": "lodash._getnative@3.9.1", - "_inCache": true, - "_location": "/lodash._getnative", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._getnative@^3.0.0", - "scope": null, - "escapedName": "lodash._getnative", - "name": "lodash._getnative", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "_shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", - "_shrinkwrap": null, - "_spec": "lodash._getnative@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `getNative` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", - "tarball": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._getnative", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.9.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cef..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 8ac8502..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._htmlescapes@~2.4.1", - "scope": null, - "escapedName": "lodash._htmlescapes", - "name": "lodash._htmlescapes", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar" - ] - ], - "_from": "lodash._htmlescapes@>=2.4.1 <2.5.0", - "_id": "lodash._htmlescapes@2.4.1", - "_inCache": true, - "_location": "/lodash._htmlescapes", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._htmlescapes@~2.4.1", - "scope": null, - "escapedName": "lodash._htmlescapes", - "name": "lodash._htmlescapes", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash._escapehtmlchar", - "/lodash._reunescapedhtml" - ], - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", - "_shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "_shrinkwrap": null, - "_spec": "lodash._htmlescapes@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._escapehtmlchar", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb", - "tarball": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._htmlescapes", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/README.md deleted file mode 100644 index 0c5c701..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._isiterateecall v3.0.9 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._isiterateecall -``` - -In Node.js/io.js: - -```js -var isIterateeCall = require('lodash._isiterateecall'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/index.js deleted file mode 100644 index ea3761b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/index.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * lodash 3.0.9 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isIterateeCall; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/package.json deleted file mode 100644 index e040346..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isiterateecall/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._isiterateecall@^3.0.0", - "scope": null, - "escapedName": "lodash._isiterateecall", - "name": "lodash._isiterateecall", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "_id": "lodash._isiterateecall@3.0.9", - "_inCache": true, - "_location": "/lodash._isiterateecall", - "_nodeVersion": "2.0.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._isiterateecall@^3.0.0", - "scope": null, - "escapedName": "lodash._isiterateecall", - "name": "lodash._isiterateecall", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "_shrinkwrap": null, - "_spec": "lodash._isiterateecall@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", - "tarball": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._isiterateecall", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.9" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._isnative v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a350..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Used to detect if a method is native */ -var reNative = RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. - */ -function isNative(value) { - return typeof value == 'function' && reNative.test(value); -} - -module.exports = isNative; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/package.json deleted file mode 100644 index ed36403..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._isnative@~2.4.1", - "scope": null, - "escapedName": "lodash._isnative", - "name": "lodash._isnative", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys" - ] - ], - "_from": "lodash._isnative@>=2.4.1 <2.5.0", - "_id": "lodash._isnative@2.4.1", - "_inCache": true, - "_location": "/lodash._isnative", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._isnative@~2.4.1", - "scope": null, - "escapedName": "lodash._isnative", - "name": "lodash._isnative", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.keys", - "/lodash._reunescapedhtml/lodash.keys", - "/lodash.values/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz", - "_shasum": "3ea6404b784a7be836c7b57580e1cdf79b14832c", - "_shrinkwrap": null, - "_spec": "lodash._isnative@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal Lo-Dash function `isNative` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3ea6404b784a7be836c7b57580e1cdf79b14832c", - "tarball": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - } - ], - "name": "lodash._isnative", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de730..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index e3d16a5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._objecttypes@~2.4.1", - "scope": null, - "escapedName": "lodash._objecttypes", - "name": "lodash._objecttypes", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.defaults" - ] - ], - "_from": "lodash._objecttypes@>=2.4.1 <2.5.0", - "_id": "lodash._objecttypes@2.4.1", - "_inCache": true, - "_location": "/lodash._objecttypes", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._objecttypes@~2.4.1", - "scope": null, - "escapedName": "lodash._objecttypes", - "name": "lodash._objecttypes", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.defaults", - "/lodash._shimkeys", - "/lodash.isobject" - ], - "_resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", - "_shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11", - "_shrinkwrap": null, - "_spec": "lodash._objecttypes@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.defaults", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11", - "tarball": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._objecttypes", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/LICENSE.txt deleted file mode 100644 index 1776432..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/README.md deleted file mode 100644 index c80ae07..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._reescape v3.0.0 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reEscape` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._reescape -``` - -In Node.js/io.js: - -```js -var reEscape = require('lodash._reescape'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reescape) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/index.js deleted file mode 100644 index 1a3b8cf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to match template delimiters. */ -var reEscape = /<%-([\s\S]+?)%>/g; - -module.exports = reEscape; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/package.json deleted file mode 100644 index c2c2227..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reescape/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._reescape@^3.0.0", - "scope": null, - "escapedName": "lodash._reescape", - "name": "lodash._reescape", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "lodash._reescape@>=3.0.0 <4.0.0", - "_id": "lodash._reescape@3.0.0", - "_inCache": true, - "_location": "/lodash._reescape", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._reescape@^3.0.0", - "scope": null, - "escapedName": "lodash._reescape", - "name": "lodash._reescape", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "_shasum": "2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a", - "_shrinkwrap": null, - "_spec": "lodash._reescape@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `reEscape` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a", - "tarball": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - } - ], - "name": "lodash._reescape", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/LICENSE.txt deleted file mode 100644 index 1776432..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/README.md deleted file mode 100644 index a69b8aa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._reevaluate v3.0.0 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reEvaluate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._reevaluate -``` - -In Node.js/io.js: - -```js -var reEvaluate = require('lodash._reevaluate'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reevaluate) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/index.js deleted file mode 100644 index 16d7609..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to match template delimiters. */ -var reEvaluate = /<%([\s\S]+?)%>/g; - -module.exports = reEvaluate; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/package.json deleted file mode 100644 index e1ee530..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reevaluate/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._reevaluate@^3.0.0", - "scope": null, - "escapedName": "lodash._reevaluate", - "name": "lodash._reevaluate", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "lodash._reevaluate@>=3.0.0 <4.0.0", - "_id": "lodash._reevaluate@3.0.0", - "_inCache": true, - "_location": "/lodash._reevaluate", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._reevaluate@^3.0.0", - "scope": null, - "escapedName": "lodash._reevaluate", - "name": "lodash._reevaluate", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "_shasum": "58bc74c40664953ae0b124d806996daca431e2ed", - "_shrinkwrap": null, - "_spec": "lodash._reevaluate@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `reEvaluate` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "58bc74c40664953ae0b124d806996daca431e2ed", - "tarball": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - } - ], - "name": "lodash._reevaluate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/LICENSE.txt deleted file mode 100644 index 1776432..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/README.md deleted file mode 100644 index 1423e50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash._reinterpolate v3.0.0 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._reinterpolate -``` - -In Node.js/io.js: - -```js -var reInterpolate = require('lodash._reinterpolate'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/index.js deleted file mode 100644 index 5c06abc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to match template delimiters. */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/package.json deleted file mode 100644 index 619c2b8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reinterpolate/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._reinterpolate@^3.0.0", - "scope": null, - "escapedName": "lodash._reinterpolate", - "name": "lodash._reinterpolate", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "lodash._reinterpolate@>=3.0.0 <4.0.0", - "_id": "lodash._reinterpolate@3.0.0", - "_inCache": true, - "_location": "/lodash._reinterpolate", - "_nodeVersion": "0.10.35", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._reinterpolate@^3.0.0", - "scope": null, - "escapedName": "lodash._reinterpolate", - "name": "lodash._reinterpolate", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util", - "/lodash.template", - "/lodash.templatesettings" - ], - "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "_shasum": "0ccf2d89166af03b3663c796538b75ac6e114d9d", - "_shrinkwrap": null, - "_spec": "lodash._reinterpolate@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s internal `reInterpolate` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "0ccf2d89166af03b3663c796538b75ac6e114d9d", - "tarball": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._reinterpolate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/README.md deleted file mode 100644 index c6ca90c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reunescapedhtml v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/index.js deleted file mode 100644 index fa87047..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var htmlEscapes = require('lodash._htmlescapes'), - keys = require('lodash.keys'); - -/** Used to match HTML entities and HTML characters */ -var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); - -module.exports = reUnescapedHtml; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.keys v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - shimKeys = require('lodash._shimkeys'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array composed of the own enumerable property names of an object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - return nativeKeys(object); -}; - -module.exports = keys; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json deleted file mode 100644 index 78e4de2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.keys@~2.4.1", - "scope": null, - "escapedName": "lodash.keys", - "name": "lodash.keys", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml" - ] - ], - "_from": "lodash.keys@>=2.4.1 <2.5.0", - "_id": "lodash.keys@2.4.1", - "_inCache": true, - "_location": "/lodash._reunescapedhtml/lodash.keys", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.keys@~2.4.1", - "scope": null, - "escapedName": "lodash.keys", - "name": "lodash.keys", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash._reunescapedhtml" - ], - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", - "_shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "_shrinkwrap": null, - "_spec": "lodash.keys@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._isnative": "~2.4.1", - "lodash._shimkeys": "~2.4.1", - "lodash.isobject": "~2.4.1" - }, - "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727", - "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.keys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/package.json deleted file mode 100644 index 33ecac3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._reunescapedhtml/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._reunescapedhtml@~2.4.1", - "scope": null, - "escapedName": "lodash._reunescapedhtml", - "name": "lodash._reunescapedhtml", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.escape" - ] - ], - "_from": "lodash._reunescapedhtml@>=2.4.1 <2.5.0", - "_id": "lodash._reunescapedhtml@2.4.1", - "_inCache": true, - "_location": "/lodash._reunescapedhtml", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": { - "lodash._isnative": "2.4.1", - "lodash._shimkeys": "2.4.1", - "lodash.isobject": "2.4.1" - }, - "_requested": { - "raw": "lodash._reunescapedhtml@~2.4.1", - "scope": null, - "escapedName": "lodash._reunescapedhtml", - "name": "lodash._reunescapedhtml", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.escape" - ], - "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz", - "_shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", - "_shrinkwrap": null, - "_spec": "lodash._reunescapedhtml@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.escape", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._htmlescapes": "~2.4.1", - "lodash.keys": "~2.4.1" - }, - "description": "The internal Lo-Dash variable `reUnescapedHtml` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7", - "tarball": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._reunescapedhtml", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/LICENSE deleted file mode 100644 index bcbe13d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/README.md deleted file mode 100644 index 0329abf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash._root v3.0.1 - -The internal [lodash](https://lodash.com/) function `root` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash._root -``` - -In Node.js: -```js -var root = require('lodash._root'); -``` - -See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._root) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/index.js deleted file mode 100644 index 2d8ba0a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/index.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); - -/** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); - -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -module.exports = root; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/package.json deleted file mode 100644 index 9508d54..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._root/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._root@^3.0.0", - "scope": null, - "escapedName": "lodash._root", - "name": "lodash._root", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape" - ] - ], - "_from": "lodash._root@>=3.0.0 <4.0.0", - "_id": "lodash._root@3.0.1", - "_inCache": true, - "_location": "/lodash._root", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/lodash._root-3.0.1.tgz_1455615057559_0.24128212919458747" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._root@^3.0.0", - "scope": null, - "escapedName": "lodash._root", - "name": "lodash._root", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.escape" - ], - "_resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "_shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692", - "_shrinkwrap": null, - "_spec": "lodash._root@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The internal lodash function `root` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692", - "tarball": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - } - ], - "name": "lodash._root", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._shimkeys v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var objectTypes = require('lodash._objecttypes'); - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - */ -var shimKeys = function(object) { - var index, iterable = object, result = []; - if (!iterable) return result; - if (!(objectTypes[typeof object])) return result; - for (index in iterable) { - if (hasOwnProperty.call(iterable, index)) { - result.push(index); - } - } - return result -}; - -module.exports = shimKeys; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index f27e8e9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash._shimkeys@~2.4.1", - "scope": null, - "escapedName": "lodash._shimkeys", - "name": "lodash._shimkeys", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys" - ] - ], - "_from": "lodash._shimkeys@>=2.4.1 <2.5.0", - "_id": "lodash._shimkeys@2.4.1", - "_inCache": true, - "_location": "/lodash._shimkeys", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash._shimkeys@~2.4.1", - "scope": null, - "escapedName": "lodash._shimkeys", - "name": "lodash._shimkeys", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.keys", - "/lodash._reunescapedhtml/lodash.keys", - "/lodash.values/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", - "_shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "_shrinkwrap": null, - "_spec": "lodash._shimkeys@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "description": "The internal Lo-Dash function `shimKeys` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203", - "tarball": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash._shimkeys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -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. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/README.md deleted file mode 100644 index a129849..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.defaults v4.2.0 - -The [lodash](https://lodash.com/) method `_.defaults` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.defaults -``` - -In Node.js: -```js -var defaults = require('lodash.defaults'); -``` - -See the [documentation](https://lodash.com/docs#defaults) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.defaults) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/index.js deleted file mode 100644 index 25eba9c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,668 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * Used by `_.defaults` to customize its `_.assignIn` use. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. - */ -function assignInDefaults(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; -} - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; -} - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - assignValue(object, key, newValue === undefined ? source[key] : newValue); - } - return object; -} - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); -}); - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(args) { - args.push(undefined, assignInDefaults); - return apply(assignInWith, undefined, args); -}); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -module.exports = defaults; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/package.json deleted file mode 100644 index df230e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.defaults@^4.2.0", - "scope": null, - "escapedName": "lodash.defaults", - "name": "lodash.defaults", - "rawSpec": "^4.2.0", - "spec": ">=4.2.0 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-cached" - ] - ], - "_from": "lodash.defaults@>=4.2.0 <5.0.0", - "_id": "lodash.defaults@4.2.0", - "_inCache": true, - "_location": "/lodash.defaults", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/lodash.defaults-4.2.0.tgz_1471109872209_0.6277233152650297" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.15.10", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.defaults@^4.2.0", - "scope": null, - "escapedName": "lodash.defaults", - "name": "lodash.defaults", - "rawSpec": "^4.2.0", - "spec": ">=4.2.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-cached" - ], - "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "_shasum": "d09178716ffea4dde9e5fb7b37f6f0802274580c", - "_shrinkwrap": null, - "_spec": "lodash.defaults@^4.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-cached", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.defaults` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d09178716ffea4dde9e5fb7b37f6f0802274580c", - "tarball": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "defaults" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.defaults", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/README.md deleted file mode 100644 index b012def..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.escape v3.2.0 - -The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.escape -``` - -In Node.js: -```js -var escape = require('lodash.escape'); -``` - -See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.escape) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/index.js deleted file mode 100644 index 0971ae8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/index.js +++ /dev/null @@ -1,180 +0,0 @@ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var root = require('lodash._root'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"'`]/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - -/** Used to map characters to HTML entities. */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -/** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(chr) { - return htmlEscapes[chr]; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. - * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. - * - * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) - * to reduce XSS vectors. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ -function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; -} - -module.exports = escape; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/package.json deleted file mode 100644 index 2661851..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.escape/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.escape@^3.0.0", - "scope": null, - "escapedName": "lodash.escape", - "name": "lodash.escape", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash.escape@>=3.0.0 <4.0.0", - "_id": "lodash.escape@3.2.0", - "_inCache": true, - "_location": "/lodash.escape", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.escape-3.2.0.tgz_1454898355271_0.9197692747693509" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.escape@^3.0.0", - "scope": null, - "escapedName": "lodash.escape", - "name": "lodash.escape", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template", - "/lodash.templatesettings" - ], - "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "_shasum": "995ee0dc18c1b48cc92effae71a10aab5b487698", - "_shrinkwrap": null, - "_spec": "lodash.escape@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._root": "^3.0.0" - }, - "description": "The lodash method `_.escape` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "995ee0dc18c1b48cc92effae71a10aab5b487698", - "tarball": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "escape" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.escape", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -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. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/README.md deleted file mode 100644 index eb95fe1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isarguments v3.1.0 - -The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarguments -``` - -In Node.js: -```js -var isArguments = require('lodash.isarguments'); -``` - -See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isarguments) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/index.js deleted file mode 100644 index 042dac5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/index.js +++ /dev/null @@ -1,229 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isArguments; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/package.json deleted file mode 100644 index 2940779..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarguments/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.isarguments@^3.0.0", - "scope": null, - "escapedName": "lodash.isarguments", - "name": "lodash.isarguments", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys" - ] - ], - "_from": "lodash.isarguments@>=3.0.0 <4.0.0", - "_id": "lodash.isarguments@3.1.0", - "_inCache": true, - "_location": "/lodash.isarguments", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/lodash.isarguments-3.1.0.tgz_1471110006733_0.7392017105594277" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.15.10", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.isarguments@^3.0.0", - "scope": null, - "escapedName": "lodash.isarguments", - "name": "lodash.isarguments", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "_shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a", - "_shrinkwrap": null, - "_spec": "lodash.isarguments@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.isArguments` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a", - "tarball": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "isarguments" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isarguments", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/README.md deleted file mode 100644 index ea274aa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.isarray v3.0.4 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarray -``` - -In Node.js/io.js: - -```js -var isArray = require('lodash.isarray'); -``` - -See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/index.js deleted file mode 100644 index dd24658..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/index.js +++ /dev/null @@ -1,180 +0,0 @@ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]', - funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); -} - -module.exports = isArray; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/package.json deleted file mode 100644 index da68ac2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isarray/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.isarray@^3.0.0", - "scope": null, - "escapedName": "lodash.isarray", - "name": "lodash.isarray", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys" - ] - ], - "_from": "lodash.isarray@>=3.0.0 <4.0.0", - "_id": "lodash.isarray@3.0.4", - "_inCache": true, - "_location": "/lodash.isarray", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.isarray@^3.0.0", - "scope": null, - "escapedName": "lodash.isarray", - "name": "lodash.isarray", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "_shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", - "_shrinkwrap": null, - "_spec": "lodash.isarray@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s `_.isArray` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", - "tarball": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "name": "lodash.isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.0.4" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isobject v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.5.2 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var objectTypes = require('lodash._objecttypes'); - -/** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.io/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return !!(value && objectTypes[typeof value]); -} - -module.exports = isObject; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/package.json deleted file mode 100644 index d8d7e5a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.isobject@~2.4.1", - "scope": null, - "escapedName": "lodash.isobject", - "name": "lodash.isobject", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys" - ] - ], - "_from": "lodash.isobject@>=2.4.1 <2.5.0", - "_id": "lodash.isobject@2.4.1", - "_inCache": true, - "_location": "/lodash.isobject", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "1.3.14", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.isobject@~2.4.1", - "scope": null, - "escapedName": "lodash.isobject", - "name": "lodash.isobject", - "rawSpec": "~2.4.1", - "spec": ">=2.4.1 <2.5.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-file/lodash.keys", - "/lodash._reunescapedhtml/lodash.keys", - "/lodash.values/lodash.keys" - ], - "_resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", - "_shasum": "5a2e47fe69953f1ee631a7eba1fe64d2d06558f5", - "_shrinkwrap": null, - "_spec": "lodash.isobject@~2.4.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-file/node_modules/lodash.keys", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "description": "The Lo-Dash function `_.isObject` as a Node.js module generated by lodash-cli.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "5a2e47fe69953f1ee631a7eba1fe64d2d06558f5", - "tarball": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz" - }, - "homepage": "http://lodash.com/custom-builds", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isobject", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash-cli.git" - }, - "version": "2.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -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. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/README.md deleted file mode 100644 index aeefd74..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isplainobject v4.0.6 - -The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isplainobject -``` - -In Node.js: -```js -var isPlainObject = require('lodash.isplainobject'); -``` - -See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/index.js deleted file mode 100644 index 0f820ee..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/index.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); -} - -module.exports = isPlainObject; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/package.json deleted file mode 100644 index a54c146..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isplainobject/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.isplainobject@^4.0.4", - "scope": null, - "escapedName": "lodash.isplainobject", - "name": "lodash.isplainobject", - "rawSpec": "^4.0.4", - "spec": ">=4.0.4 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "lodash.isplainobject@>=4.0.4 <5.0.0", - "_id": "lodash.isplainobject@4.0.6", - "_inCache": true, - "_location": "/lodash.isplainobject", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.isplainobject-4.0.6.tgz_1471110064885_0.12097060843370855" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.15.10", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.isplainobject@^4.0.4", - "scope": null, - "escapedName": "lodash.isplainobject", - "name": "lodash.isplainobject", - "rawSpec": "^4.0.4", - "spec": ">=4.0.4 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "_shasum": "7c526a52d89b45c45cc690b88163be0497f550cb", - "_shrinkwrap": null, - "_spec": "lodash.isplainobject@^4.0.4", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.isPlainObject` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "7c526a52d89b45c45cc690b88163be0497f550cb", - "tarball": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "isplainobject" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isplainobject", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.6" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/README.md deleted file mode 100644 index f184029..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isstring v4.0.1 - -The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isstring -``` - -In Node.js: -```js -var isString = require('lodash.isstring'); -``` - -See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/index.js deleted file mode 100644 index 408225c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/index.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * lodash 4.0.1 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -module.exports = isString; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/package.json deleted file mode 100644 index ebd0c9b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.isstring/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.isstring@^4.0.1", - "scope": null, - "escapedName": "lodash.isstring", - "name": "lodash.isstring", - "rawSpec": "^4.0.1", - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "lodash.isstring@>=4.0.1 <5.0.0", - "_id": "lodash.isstring@4.0.1", - "_inCache": true, - "_location": "/lodash.isstring", - "_nodeVersion": "5.4.0", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/lodash.isstring-4.0.1.tgz_1454484537621_0.8814679116476327" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.14.15", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.isstring@^4.0.1", - "scope": null, - "escapedName": "lodash.isstring", - "name": "lodash.isstring", - "rawSpec": "^4.0.1", - "spec": ">=4.0.1 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "_shasum": "d527dfb5456eca7cc9bb95d5daeaf88ba54a5451", - "_shrinkwrap": null, - "_spec": "lodash.isstring@^4.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.isString` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "d527dfb5456eca7cc9bb95d5daeaf88ba54a5451", - "tarball": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "isstring" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isstring", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/README.md deleted file mode 100644 index 5f69a18..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.keys v3.1.2 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.keys -``` - -In Node.js/io.js: - -```js -var keys = require('lodash.keys'); -``` - -See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/index.js deleted file mode 100644 index f4c1774..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,236 +0,0 @@ -/** - * lodash 3.1.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var getNative = require('lodash._getnative'), - isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? undefined : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; -}; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = keys; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/package.json deleted file mode 100644 index 213c3c0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.keys@^3.0.0", - "scope": null, - "escapedName": "lodash.keys", - "name": "lodash.keys", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash.keys@>=3.0.0 <4.0.0", - "_id": "lodash.keys@3.1.2", - "_inCache": true, - "_location": "/lodash.keys", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.keys@^3.0.0", - "scope": null, - "escapedName": "lodash.keys", - "name": "lodash.keys", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "_shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", - "_shrinkwrap": null, - "_spec": "lodash.keys@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - }, - "description": "The modern build of lodash’s `_.keys` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", - "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "name": "lodash.keys", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.1.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -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. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/README.md deleted file mode 100644 index 32cb163..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.mapvalues v4.6.0 - -The [lodash](https://lodash.com/) method `_.mapValues` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.mapvalues -``` - -In Node.js: -```js -var mapValues = require('lodash.mapvalues'); -``` - -See the [documentation](https://lodash.com/docs#mapValues) or [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash.mapvalues) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/index.js deleted file mode 100644 index b04812c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/index.js +++ /dev/null @@ -1,2280 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used to compose bitmasks for comparison styles. */ -var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding('util'); - } catch (e) {} -}()); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - this.__data__ = new ListCache(entries); -} - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; -} - -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - return this.__data__['delete'](key); -} - -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); - } - cache.set(key, value); - return this; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/** - * The base implementation of `getTag`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - return objectToString.call(value); -} - -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @param {boolean} [bitmask] The bitmask of comparison flags. - * The bitmask may be composed of the following flags: - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, customizer, bitmask, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); -} - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = getTag(object); - objTag = objTag == argsTag ? objectTag : objTag; - } - if (!othIsArr) { - othTag = getTag(other); - othTag = othTag == argsTag ? objectTag : othTag; - } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), - isSameTag = objTag == othTag; - - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); - } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, equalFunc, customizer, bitmask, stack); -} - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) - : result - )) { - return false; - } - } - } - return true; -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); - }; -} - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; -} - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value) { - return isArray(value) ? value : stringToPath(value); -} - -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!seen.has(othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { - return seen.add(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= UNORDERED_COMPARE_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, - objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = isKey(path, object) ? [path] : castPath(path); - - var result, - index = -1, - length = path.length; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result) { - return result; - } - var length = object ? object.length : 0; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoize(function(string) { - string = toString(string); - - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - result[key] = iteratee(value, key, object); - }); - return result; -} - -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); -} - -module.exports = mapValues; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/package.json deleted file mode 100644 index 1716815..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.mapvalues/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.mapvalues@^4.4.0", - "scope": null, - "escapedName": "lodash.mapvalues", - "name": "lodash.mapvalues", - "rawSpec": "^4.4.0", - "spec": ">=4.4.0 <5.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "lodash.mapvalues@>=4.4.0 <5.0.0", - "_id": "lodash.mapvalues@4.6.0", - "_inCache": true, - "_location": "/lodash.mapvalues", - "_nodeVersion": "4.4.7", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.mapvalues-4.6.0.tgz_1471110117308_0.16050698678009212" - }, - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.15.10", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.mapvalues@^4.4.0", - "scope": null, - "escapedName": "lodash.mapvalues", - "name": "lodash.mapvalues", - "rawSpec": "^4.4.0", - "spec": ">=4.4.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff" - ], - "_resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "_shasum": "1bafa5005de9dd6f4f26668c30ca37230cc9689c", - "_shrinkwrap": null, - "_spec": "lodash.mapvalues@^4.4.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.mapValues` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "1bafa5005de9dd6f4f26668c30ca37230cc9689c", - "tarball": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "mapvalues" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.mapvalues", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.6.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/LICENSE.txt deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/README.md deleted file mode 100644 index 80e47a4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.restparam v3.6.1 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.restParam` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.restparam -``` - -In Node.js/io.js: - -```js -var restParam = require('lodash.restparam'); -``` - -See the [documentation](https://lodash.com/docs#restParam) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.restparam) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/index.js deleted file mode 100644 index 932f47a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/index.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * lodash 3.6.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/package.json deleted file mode 100644 index 1588656..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.restparam/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "lodash.restparam@^3.0.0", - "scope": null, - "escapedName": "lodash.restparam", - "name": "lodash.restparam", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template" - ] - ], - "_from": "lodash.restparam@>=3.0.0 <4.0.0", - "_id": "lodash.restparam@3.6.1", - "_inCache": true, - "_location": "/lodash.restparam", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - "_npmVersion": "2.7.6", - "_phantomChildren": {}, - "_requested": { - "raw": "lodash.restparam@^3.0.0", - "scope": null, - "escapedName": "lodash.restparam", - "name": "lodash.restparam", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/lodash.template" - ], - "_resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "_shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", - "_shrinkwrap": null, - "_spec": "lodash.restparam@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The modern build of lodash’s `_.restParam` as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", - "tarball": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - { - "name": "kitcambridge", - "email": "github@kitcambridge.be" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.restparam", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "3.6.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/LICENSE deleted file mode 100644 index 9cd87e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/README.md deleted file mode 100644 index f542f71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# lodash.template v3.6.2 - -The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. - -## Installation - -Using npm: - -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.template -``` - -In Node.js/io.js: - -```js -var template = require('lodash.template'); -``` - -See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/index.js deleted file mode 100644 index e5a9629..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/lodash.template/index.js +++ /dev/null @@ -1,389 +0,0 @@ -/** - * lodash 3.6.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCopy = require('lodash._basecopy'), - baseToString = require('lodash._basetostring'), - baseValues = require('lodash._basevalues'), - isIterateeCall = require('lodash._isiterateecall'), - reInterpolate = require('lodash._reinterpolate'), - keys = require('lodash.keys'), - restParam = require('lodash.restparam'), - templateSettings = require('lodash.templatesettings'); - -/** `Object#toString` result references. */ -var errorTag = '[object Error]'; - -/** Used to match empty string literals in compiled template source. */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters. */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals. */ -var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - -/** Used to escape characters for inclusion in compiled string literals. */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; -} - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Used by `_.template` to customize its `_.assign` use. - * - * **Note:** This function is like `assignDefaults` except that it ignores - * inherited property values when checking if a property is `undefined`. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @param {string} key The key associated with the object and source values. - * @param {Object} object The destination object. - * @returns {*} Returns the value to assign to the destination object. - */ -function assignOwnDefaults(objectValue, sourceValue, key, object) { - return (objectValue === undefined || !hasOwnProperty.call(object, key)) - ? sourceValue - : objectValue; -} - -/** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - */ -function assignWith(object, source, customizer) { - var index = -1, - props = keys(source), - length = props.length; - - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); - - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; - } - } - return object; -} - -/** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); -} - -/** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true - * - * _.isError(Error); - * // => false - */ -function isError(value) { - return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; -} - -/** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is provided it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as free variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. - * @param {string} [options.variable] The data object variable name. - * @param- {Object} [otherOptions] Enables the legacy `options` param signature. - * @returns {Function} Returns the compiled template function. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // using the HTML "escape" delimiter to escape data property values - * var compiled = _.template('<%- value %>'); - * compiled({ 'value': ' -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), and [RingoJS ≥ v0.8.0](http://ringojs.org/): - -```js -var regenerate = require('regenerate'); -``` - -In [Narwhal](http://narwhaljs.org/) and [RingoJS ≤ v0.7.0](http://ringojs.org/): - -```js -var regenerate = require('regenerate').regenerate; -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('regenerate.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'regenerate': 'path/to/regenerate' - } - }, - ['regenerate'], - function(regenerate) { - console.log(regenerate); - } -); -``` - -## API - -### `regenerate(value1, value2, value3, ...)` - -The main Regenerate function. Calling this function creates a new set that gets a chainable API. - -```js -var set = regenerate() - .addRange(0x60, 0x69) // add U+0060 to U+0069 - .remove(0x62, 0x64) // remove U+0062 and U+0064 - .add(0x1D306); // add U+1D306 -set.valueOf(); -// → [0x60, 0x61, 0x63, 0x65, 0x66, 0x67, 0x68, 0x69, 0x1D306] -set.toString(); -// → '[`ace-i]|\\uD834\\uDF06' -set.toRegExp(); -// → /[`ace-i]|\uD834\uDF06/ -``` - -Any arguments passed to `regenerate()` will be added to the set right away. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted, as well as arrays containing values of these types. - -```js -regenerate(0x1D306, 'A', '©', 0x2603).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' - -var items = [0x1D306, 'A', '©', 0x2603]; -regenerate(items).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' -``` - -### `regenerate.prototype.add(value1, value2, value3, ...)` - -Any arguments passed to `add()` are added to the set. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted, as well as arrays containing values of these types. - -```js -regenerate().add(0x1D306, 'A', '©', 0x2603).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' - -var items = [0x1D306, 'A', '©', 0x2603]; -regenerate().add(items).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' -``` - -It’s also possible to pass in a Regenerate instance. Doing so adds all code points in that instance to the current set. - -```js -var set = regenerate(0x1D306, 'A'); -regenerate().add('©', 0x2603).add(set).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' -``` - -Note that the initial call to `regenerate()` acts like `add()`. This allows you to create a new Regenerate instance and add some code points to it in one go: - -```js -regenerate(0x1D306, 'A', '©', 0x2603).toString(); -// → '[A\\xA9\\u2603]|\\uD834\\uDF06' -``` - -### `regenerate.prototype.remove(value1, value2, value3, ...)` - -Any arguments passed to `remove()` are removed to the set. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted, as well as arrays containing values of these types. - -```js -regenerate(0x1D306, 'A', '©', 0x2603).remove('☃').toString(); -// → '[A\\xA9]|\\uD834\\uDF06' -``` - -It’s also possible to pass in a Regenerate instance. Doing so removes all code points in that instance from the current set. - -```js -var set = regenerate('☃'); -regenerate(0x1D306, 'A', '©', 0x2603).remove(set).toString(); -// → '[A\\xA9]|\\uD834\\uDF06' -``` - -### `regenerate.prototype.addRange(start, end)` - -Adds a range of code points from `start` to `end` (inclusive) to the set. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted. - -```js -regenerate(0x1D306).addRange(0x00, 0xFF).toString(16); -// → '[\\0-\\xFF]|\\uD834\\uDF06' - -regenerate().addRange('A', 'z').toString(); -// → '[A-z]' -``` - -### `regenerate.prototype.removeRange(start, end)` - -Removes a range of code points from `start` to `end` (inclusive) from the set. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted. - -```js -regenerate() - .addRange(0x000000, 0x10FFFF) // add all Unicode code points - .removeRange('A', 'z') // remove all symbols from `A` to `z` - .toString(); -// → '[\\0-@\\{-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]' - -regenerate() - .addRange(0x000000, 0x10FFFF) // add all Unicode code points - .removeRange(0x0041, 0x007A) // remove all code points from U+0041 to U+007A - .toString(); -// → '[\\0-@\\{-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]' -``` - -### `regenerate.prototype.intersection(codePoints)` - -Removes any code points from the set that are not present in both the set and the given `codePoints` array. `codePoints` must be an array of numeric code point values, i.e. numbers. - -```js -regenerate() - .addRange(0x00, 0xFF) // add extended ASCII code points - .intersection([0x61, 0x69]) // remove all code points from the set except for these - .toString(); -// → '[ai]' -``` - -Instead of the `codePoints` array, it’s also possible to pass in a Regenerate instance. - -```js -var whitelist = regenerate(0x61, 0x69); - -regenerate() - .addRange(0x00, 0xFF) // add extended ASCII code points - .intersection(whitelist) // remove all code points from the set except for those in the `whitelist` set - .toString(); -// → '[ai]' -``` - -### `regenerate.prototype.contains(value)` - -Returns `true` if the given value is part of the set, and `false` otherwise. Both code points (numbers) and symbols (strings consisting of a single Unicode symbol) are accepted. - -```js -var set = regenerate().addRange(0x00, 0xFF); -set.contains('A'); -// → true -set.contains(0x1D306); -// → false -``` - -### `regenerate.prototype.clone()` - -Returns a clone of the current code point set. Any actions performed on the clone won’t mutate the original set. - -```js -var setA = regenerate(0x1D306); -var setB = setA.clone().add(0x1F4A9); -setA.toArray(); -// → [0x1D306] -setB.toArray(); -// → [0x1D306, 0x1F4A9] -``` - -### `regenerate.prototype.toString(options)` - -Returns a string representing (part of) a regular expression that matches all the symbols mapped to the code points within the set. - -```js -regenerate(0x1D306, 0x1F4A9).toString(); -// → '\\uD834\\uDF06|\\uD83D\\uDCA9' -``` - -If the `bmpOnly` property of the optional `options` object is set to `true`, the output matches surrogates individually, regardless of whether they’re lone surrogates or just part of a surrogate pair. This simplifies the output, but it can only be used in case you’re certain the strings it will be used on don’t contain any astral symbols. - -```js -var highSurrogates = regenerate().addRange(0xD800, 0xDBFF); -highSurrogates.toString(); -// → '[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])' -highSurrogates.toString({ 'bmpOnly': true }); -// → '[\\uD800-\\uDBFF]' - -var lowSurrogates = regenerate().addRange(0xDC00, 0xDFFF); -lowSurrogates.toString(); -// → '(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]' -lowSurrogates.toString({ 'bmpOnly': true }); -// → '[\\uDC00-\\uDFFF]' -``` - -Note that lone low surrogates cannot be matched accurately using regular expressions in JavaScript. Regenerate’s output makes a best-effort approach but [there can be false negatives in this regard](https://github.com/mathiasbynens/regenerate/issues/28#issuecomment-72224808). - -If the `hasUnicodeFlag` property of the optional `options` object is set to `true`, the output makes use of Unicode code point escapes (`\u{…}`) where applicable. This simplifies the output at the cost of compatibility and portability, since it means the output can only be used as a pattern in a regular expression with [the ES6 `u` flag](https://mathiasbynens.be/notes/es6-unicode-regex) enabled. - -```js -var set = regenerate().addRange(0x0, 0x10FFFF); - -set.toString(); -// → '[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]'' - -set.toString({ 'hasUnicodeFlag': true }); -// → '[\\0-\\u{10FFFF}]' -``` - -### `regenerate.prototype.toRegExp(flags = '')` - -Returns a regular expression that matches all the symbols mapped to the code points within the set. Optionally, you can pass [flags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Parameters) to be added to the regular expression. - -```js -var regex = regenerate(0x1D306, 0x1F4A9).toRegExp(); -// → /\uD834\uDF06|\uD83D\uDCA9/ -regex.test('𝌆'); -// → true -regex.test('A'); -// → false - -// With flags: -var regex = regenerate(0x1D306, 0x1F4A9).toRegExp('g'); -// → /\uD834\uDF06|\uD83D\uDCA9/g -``` - -**Note:** This probably shouldn’t be used. Regenerate is intended as a tool that is used as part of a build process, not at runtime. - -### `regenerate.prototype.valueOf()` or `regenerate.prototype.toArray()` - -Returns a sorted array of unique code points in the set. - -```js -regenerate(0x1D306) - .addRange(0x60, 0x65) - .add(0x59, 0x60) // note: 0x59 is added after 0x65, and 0x60 is a duplicate - .valueOf(); -// → [0x59, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x1D306] -``` - -### `regenerate.version` - -A string representing the semantic version number. - -## Combine Regenerate with other libraries - -Regenerate gets even better when combined with other libraries such as [Punycode.js](https://mths.be/punycode). Here’s an example where [Punycode.js](https://mths.be/punycode) is used to convert a string into an array of code points, that is then passed on to Regenerate: - -```js -var regenerate = require('regenerate'); -var punycode = require('punycode'); - -var string = 'Lorem ipsum dolor sit amet.'; -// Get an array of all code points used in the string: -var codePoints = punycode.ucs2.decode(string); - -// Generate a regular expression that matches any of the symbols used in the string: -regenerate(codePoints).toString(); -// → '[ \\.Ladeilmopr-u]' -``` - -In ES6 you can do something similar with [`Array.from`](https://mths.be/array-from) which uses [the string’s iterator](https://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols) to split the given string into an array of strings that each contain a single symbol. [`regenerate()`](#regenerateprototypeaddvalue1-value2-value3-) accepts both strings and code points, remember? - -```js -var regenerate = require('regenerate'); - -var string = 'Lorem ipsum dolor sit amet.'; -// Get an array of all symbols used in the string: -var symbols = Array.from(string); - -// Generate a regular expression that matches any of the symbols used in the string: -regenerate(symbols).toString(); -// → '[ \\.Ladeilmopr-u]' -``` - -## Support - -Regenerate supports at least Chrome 27+, Firefox 3+, Safari 4+, Opera 10+, IE 6+, Node.js v0.10.0+, io.js v1.0.0+, Narwhal 0.3.2+, RingoJS 0.8+, PhantomJS 1.9.0+, and Rhino 1.7RC4+. - -## Unit tests & code coverage - -After cloning this repository, run `npm install` to install the dependencies needed for Regenerate development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -Regenerate is available under the [MIT](https://mths.be/mit) license. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/package.json deleted file mode 100644 index cc5d085..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regenerate@^1.2.1", - "scope": null, - "escapedName": "regenerate", - "name": "regenerate", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core" - ] - ], - "_from": "regenerate@>=1.2.1 <2.0.0", - "_id": "regenerate@1.3.2", - "_inCache": true, - "_location": "/regenerate", - "_nodeVersion": "6.9.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/regenerate-1.3.2.tgz_1478868344403_0.2891066016163677" - }, - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "regenerate@^1.2.1", - "scope": null, - "escapedName": "regenerate", - "name": "regenerate", - "rawSpec": "^1.2.1", - "spec": ">=1.2.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/regexpu-core" - ], - "_resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", - "_shasum": "d1941c67bad437e1be76433add5b385f95b19260", - "_shrinkwrap": null, - "_spec": "regenerate@^1.2.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/mathiasbynens/regenerate/issues" - }, - "dependencies": {}, - "description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.", - "devDependencies": { - "codecov": "^1.0.1", - "grunt": "^0.4.5", - "grunt-shell": "^1.1.1", - "istanbul": "^0.4.3", - "qunit-extras": "^1.1.0", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.15" - }, - "directories": {}, - "dist": { - "shasum": "d1941c67bad437e1be76433add5b385f95b19260", - "tarball": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz" - }, - "gitHead": "c37fdc9cabf03610c0f6f8bfc4f7da822cfa5a89", - "homepage": "https://mths.be/regenerate", - "keywords": [ - "regex", - "regexp", - "javascript", - "unicode", - "generator", - "tool" - ], - "license": "MIT", - "main": "regenerate.js", - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - } - ], - "name": "regenerate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mathiasbynens/regenerate.git" - }, - "scripts": { - "cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js", - "test": "node tests/tests.js" - }, - "version": "1.3.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/regenerate.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/regenerate.js deleted file mode 100644 index 2393988..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerate/regenerate.js +++ /dev/null @@ -1,1199 +0,0 @@ -/*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js/io.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var ERRORS = { - 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + - 'to the `start` value.', - 'codePointRange': 'Invalid code point value. Code points range from ' + - 'U+000000 to U+10FFFF.' - }; - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs - var HIGH_SURROGATE_MIN = 0xD800; - var HIGH_SURROGATE_MAX = 0xDBFF; - var LOW_SURROGATE_MIN = 0xDC00; - var LOW_SURROGATE_MAX = 0xDFFF; - - // In Regenerate output, `\0` is never preceded by `\` because we sort by - // code point value, so let’s keep this regular expression simple. - var regexNull = /\\x00([^0123456789]|$)/g; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var extend = function(destination, source) { - var key; - for (key in source) { - if (hasOwnProperty.call(source, key)) { - destination[key] = source[key]; - } - } - return destination; - }; - - var forEach = function(array, callback) { - var index = -1; - var length = array.length; - while (++index < length) { - callback(array[index], index); - } - }; - - var toString = object.toString; - var isArray = function(value) { - return toString.call(value) == '[object Array]'; - }; - var isNumber = function(value) { - return typeof value == 'number' || - toString.call(value) == '[object Number]'; - }; - - // This assumes that `number` is a positive integer that `toString()`s nicely - // (which is the case for all code point values). - var zeroes = '0000'; - var pad = function(number, totalCharacters) { - var string = String(number); - return string.length < totalCharacters - ? (zeroes + string).slice(-totalCharacters) - : string; - }; - - var hex = function(number) { - return Number(number).toString(16).toUpperCase(); - }; - - var slice = [].slice; - - /*--------------------------------------------------------------------------*/ - - var dataFromCodePoints = function(codePoints) { - var index = -1; - var length = codePoints.length; - var max = length - 1; - var result = []; - var isStart = true; - var tmp; - var previous = 0; - while (++index < length) { - tmp = codePoints[index]; - if (isStart) { - result.push(tmp); - previous = tmp; - isStart = false; - } else { - if (tmp == previous + 1) { - if (index != max) { - previous = tmp; - continue; - } else { - isStart = true; - result.push(tmp + 1); - } - } else { - // End the previous range and start a new one. - result.push(previous + 1, tmp); - previous = tmp; - } - } - } - if (!isStart) { - result.push(tmp + 1); - } - return result; - }; - - var dataRemove = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - // Modify this pair. - if (codePoint == start) { - if (end == start + 1) { - // Just remove `start` and `end`. - data.splice(index, 2); - return data; - } else { - // Just replace `start` with a new value. - data[index] = codePoint + 1; - return data; - } - } else if (codePoint == end - 1) { - // Just replace `end` with a new value. - data[index + 1] = codePoint; - return data; - } else { - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, codePoint, codePoint + 1, end); - return data; - } - } - index += 2; - } - return data; - }; - - var dataRemoveRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - while (index < data.length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - // Exit as soon as no more matching pairs can be found. - if (start > rangeEnd) { - return data; - } - - // Check if this range pair is equal to, or forms a subset of, the range - // to be removed. - // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. - // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. - if (rangeStart <= start && rangeEnd >= end) { - // Remove this pair. - data.splice(index, 2); - continue; - } - - // Check if both `rangeStart` and `rangeEnd` are within the bounds of - // this pair. - // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. - if (rangeStart >= start && rangeEnd < end) { - if (rangeStart == start) { - // Replace `[start, end]` with `[startB, endB]`. - data[index] = rangeEnd + 1; - data[index + 1] = end + 1; - return data; - } - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); - return data; - } - - // Check if only `rangeStart` is within the bounds of this pair. - // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. - if (rangeStart >= start && rangeStart <= end) { - // Replace `end` with `rangeStart`. - data[index + 1] = rangeStart; - // Note: we cannot `return` just yet, in case any following pairs still - // contain matching code points. - // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 - // → `[0, 4, 21, 31]`. - } - - // Check if only `rangeEnd` is within the bounds of this pair. - // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. - else if (rangeEnd >= start && rangeEnd <= end) { - // Just replace `start`. - data[index] = rangeEnd + 1; - return data; - } - - index += 2; - } - return data; - }; - - var dataAdd = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var lastIndex = null; - var length = data.length; - if (codePoint < 0x0 || codePoint > 0x10FFFF) { - throw RangeError(ERRORS.codePointRange); - } - while (index < length) { - start = data[index]; - end = data[index + 1]; - - // Check if the code point is already in the set. - if (codePoint >= start && codePoint < end) { - return data; - } - - if (codePoint == start - 1) { - // Just replace `start` with a new value. - data[index] = codePoint; - return data; - } - - // At this point, if `start` is `greater` than `codePoint`, insert a new - // `[start, end]` pair before the current pair, or after the current pair - // if there is a known `lastIndex`. - if (start > codePoint) { - data.splice( - lastIndex != null ? lastIndex + 2 : 0, - 0, - codePoint, - codePoint + 1 - ); - return data; - } - - if (codePoint == end) { - // Check if adding this code point causes two separate ranges to become - // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. - if (codePoint + 1 == data[index + 2]) { - data.splice(index, 4, start, data[index + 3]); - return data; - } - // Else, just replace `end` with a new value. - data[index + 1] = codePoint + 1; - return data; - } - lastIndex = index; - index += 2; - } - // The loop has finished; add the new pair to the end of the data set. - data.push(codePoint, codePoint + 1); - return data; - }; - - var dataAddData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataAdd(data, start); - } else { - data = dataAddRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataRemoveData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataRemove(data, start); - } else { - data = dataRemoveRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataAddRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - if ( - rangeStart < 0x0 || rangeStart > 0x10FFFF || - rangeEnd < 0x0 || rangeEnd > 0x10FFFF - ) { - throw RangeError(ERRORS.codePointRange); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var added = false; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - - if (added) { - // The range has already been added to the set; at this point, we just - // need to get rid of the following ranges in case they overlap. - - // Check if this range can be combined with the previous range. - if (start == rangeEnd + 1) { - data.splice(index - 1, 2); - return data; - } - - // Exit as soon as no more possibly overlapping pairs can be found. - if (start > rangeEnd) { - return data; - } - - // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have - // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the - // `0,16` range that was previously added. - if (start >= rangeStart && start <= rangeEnd) { - // `start` lies within the range that was previously added. - - if (end > rangeStart && end - 1 <= rangeEnd) { - // `end` lies within the range that was previously added as well, - // so remove this pair. - data.splice(index, 2); - index -= 2; - // Note: we cannot `return` just yet, as there may still be other - // overlapping pairs. - } else { - // `start` lies within the range that was previously added, but - // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so - // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. - // Remove the previously added `end` and the current `start`. - data.splice(index - 1, 2); - index -= 2; - } - - // Note: we cannot return yet. - } - - } - - else if (start == rangeEnd + 1) { - data[index] = rangeStart; - return data; - } - - // Check if a new pair must be inserted *before* the current one. - else if (start > rangeEnd) { - data.splice(index, 0, rangeStart, rangeEnd + 1); - return data; - } - - else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { - // The new range lies entirely within an existing range pair. No action - // needed. - return data; - } - - else if ( - // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. - (rangeStart >= start && rangeStart < end) || - // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. - end == rangeStart - ) { - // Replace `end` with the new value. - data[index + 1] = rangeEnd + 1; - // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` - // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. - added = true; - // Note: we cannot `return` just yet. - } - - else if (rangeStart <= start && rangeEnd + 1 >= end) { - // The new range is a superset of the old range. - data[index] = rangeStart; - data[index + 1] = rangeEnd + 1; - added = true; - } - - index += 2; - } - // The loop has finished without doing anything; add the new pair to the end - // of the data set. - if (!added) { - data.push(rangeStart, rangeEnd + 1); - } - return data; - }; - - var dataContains = function(data, codePoint) { - var index = 0; - var length = data.length; - // Exit early if `codePoint` is not within `data`’s overall range. - var start = data[index]; - var end = data[length - 1]; - if (length >= 2) { - if (codePoint < start || codePoint > end) { - return false; - } - } - // Iterate over the data per `(start, end)` pair. - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - return true; - } - index += 2; - } - return false; - }; - - var dataIntersection = function(data, codePoints) { - var index = 0; - var length = codePoints.length; - var codePoint; - var result = []; - while (index < length) { - codePoint = codePoints[index]; - if (dataContains(data, codePoint)) { - result.push(codePoint); - } - ++index; - } - return dataFromCodePoints(result); - }; - - var dataIsEmpty = function(data) { - return !data.length; - }; - - var dataIsSingleton = function(data) { - // Check if the set only represents a single code point. - return data.length == 2 && data[0] + 1 == data[1]; - }; - - var dataToArray = function(data) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var result = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - while (start < end) { - result.push(start); - ++start; - } - index += 2; - } - return result; - }; - - /*--------------------------------------------------------------------------*/ - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var floor = Math.floor; - var highSurrogate = function(codePoint) { - return parseInt( - floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, - 10 - ); - }; - - var lowSurrogate = function(codePoint) { - return parseInt( - (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, - 10 - ); - }; - - var stringFromCharCode = String.fromCharCode; - var codePointToString = function(codePoint) { - var string; - // https://mathiasbynens.be/notes/javascript-escapes#single - // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a - // different meaning in regular expressions (word boundary), so it cannot - // be used here. - if (codePoint == 0x09) { - string = '\\t'; - } - // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. - // else if (codePoint == 0x0B) { - // string = '\\v'; - // } - else if (codePoint == 0x0A) { - string = '\\n'; - } - else if (codePoint == 0x0C) { - string = '\\f'; - } - else if (codePoint == 0x0D) { - string = '\\r'; - } - else if (codePoint == 0x5C) { - string = '\\\\'; - } - else if ( - codePoint == 0x24 || - (codePoint >= 0x28 && codePoint <= 0x2B) || - codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || - (codePoint >= 0x5B && codePoint <= 0x5E) || - (codePoint >= 0x7B && codePoint <= 0x7D) - ) { - // The code point maps to an unsafe printable ASCII character; - // backslash-escape it. Here’s the list of those symbols: - // - // $()*+-.?[\]^{|} - // - // See #7 for more info. - string = '\\' + stringFromCharCode(codePoint); - } - else if (codePoint >= 0x20 && codePoint <= 0x7E) { - // The code point maps to one of these printable ASCII symbols - // (including the space character): - // - // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO - // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ - // - // These can safely be used directly. - string = stringFromCharCode(codePoint); - } - else if (codePoint <= 0xFF) { - // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal - string = '\\x' + pad(hex(codePoint), 2); - } - else { // `codePoint <= 0xFFFF` holds true. - // https://mathiasbynens.be/notes/javascript-escapes#unicode - string = '\\u' + pad(hex(codePoint), 4); - } - - // There’s no need to account for astral symbols / surrogate pairs here, - // since `codePointToString` is private and only used for BMP code points. - // But if that’s what you need, just add an `else` block with this code: - // - // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) - // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); - - return string; - }; - - var codePointToStringUnicode = function(codePoint) { - if (codePoint <= 0xFFFF) { - return codePointToString(codePoint); - } - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - }; - - var symbolToCodePoint = function(symbol) { - var length = symbol.length; - var first = symbol.charCodeAt(0); - var second; - if ( - first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && - length > 1 // There is a next code unit. - ) { - // `first` is a high surrogate, and there is a next character. Assume - // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). - second = symbol.charCodeAt(1); - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - HIGH_SURROGATE_MIN) * 0x400 + - second - LOW_SURROGATE_MIN + 0x10000; - } - return first; - }; - - var createBMPCharacterClasses = function(data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToString(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToString(start); - } else if (start + 1 == end) { - result += codePointToString(start) + codePointToString(end); - } else { - result += codePointToString(start) + '-' + codePointToString(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var createUnicodeCharacterClasses = function(data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToStringUnicode(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToStringUnicode(start); - } else if (start + 1 == end) { - result += codePointToStringUnicode(start) + codePointToStringUnicode(end); - } else { - result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var splitAtBMP = function(data) { - // Iterate over the data per `(start, end)` pair. - var loneHighSurrogates = []; - var loneLowSurrogates = []; - var bmp = []; - var astral = []; - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - if (start < HIGH_SURROGATE_MIN) { - - // The range starts and ends before the high surrogate range. - // E.g. (0, 0x10). - if (end < HIGH_SURROGATE_MIN) { - bmp.push(start, end + 1); - } - - // The range starts before the high surrogate range and ends within it. - // E.g. (0, 0xD855). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends in the low - // surrogate range. E.g. (0, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends after the - // low surrogate range. E.g. (0, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { - - // The range starts and ends in the high surrogate range. - // E.g. (0xD855, 0xD866). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - loneHighSurrogates.push(start, end + 1); - } - - // The range starts in the high surrogate range and ends in the low - // surrogate range. E.g. (0xD855, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts in the high surrogate range and ends after the low - // surrogate range. E.g. (0xD855, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { - - // The range starts and ends in the low surrogate range. - // E.g. (0xDCFF, 0xDDFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, end + 1); - } - - // The range starts in the low surrogate range and ends after the low - // surrogate range. E.g. (0xDCFF, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { - - // The range starts and ends after the low surrogate range. - // E.g. (0xFFAA, 0x10FFFF). - if (end <= 0xFFFF) { - bmp.push(start, end + 1); - } else { - bmp.push(start, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - - } else { - - // The range starts and ends in the astral range. - astral.push(start, end + 1); - - } - - index += 2; - } - return { - 'loneHighSurrogates': loneHighSurrogates, - 'loneLowSurrogates': loneLowSurrogates, - 'bmp': bmp, - 'astral': astral - }; - }; - - var optimizeSurrogateMappings = function(surrogateMappings) { - var result = []; - var tmpLow = []; - var addLow = false; - var mapping; - var nextMapping; - var highSurrogates; - var lowSurrogates; - var nextHighSurrogates; - var nextLowSurrogates; - var index = -1; - var length = surrogateMappings.length; - while (++index < length) { - mapping = surrogateMappings[index]; - nextMapping = surrogateMappings[index + 1]; - if (!nextMapping) { - result.push(mapping); - continue; - } - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextHighSurrogates = nextMapping[0]; - nextLowSurrogates = nextMapping[1]; - - // Check for identical high surrogate ranges. - tmpLow = lowSurrogates; - while ( - nextHighSurrogates && - highSurrogates[0] == nextHighSurrogates[0] && - highSurrogates[1] == nextHighSurrogates[1] - ) { - // Merge with the next item. - if (dataIsSingleton(nextLowSurrogates)) { - tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); - } else { - tmpLow = dataAddRange( - tmpLow, - nextLowSurrogates[0], - nextLowSurrogates[1] - 1 - ); - } - ++index; - mapping = surrogateMappings[index]; - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextMapping = surrogateMappings[index + 1]; - nextHighSurrogates = nextMapping && nextMapping[0]; - nextLowSurrogates = nextMapping && nextMapping[1]; - addLow = true; - } - result.push([ - highSurrogates, - addLow ? tmpLow : lowSurrogates - ]); - addLow = false; - } - return optimizeByLowSurrogates(result); - }; - - var optimizeByLowSurrogates = function(surrogateMappings) { - if (surrogateMappings.length == 1) { - return surrogateMappings; - } - var index = -1; - var innerIndex = -1; - while (++index < surrogateMappings.length) { - var mapping = surrogateMappings[index]; - var lowSurrogates = mapping[1]; - var lowSurrogateStart = lowSurrogates[0]; - var lowSurrogateEnd = lowSurrogates[1]; - innerIndex = index; // Note: the loop starts at the next index. - while (++innerIndex < surrogateMappings.length) { - var otherMapping = surrogateMappings[innerIndex]; - var otherLowSurrogates = otherMapping[1]; - var otherLowSurrogateStart = otherLowSurrogates[0]; - var otherLowSurrogateEnd = otherLowSurrogates[1]; - if ( - lowSurrogateStart == otherLowSurrogateStart && - lowSurrogateEnd == otherLowSurrogateEnd - ) { - // Add the code points in the other item to this one. - if (dataIsSingleton(otherMapping[0])) { - mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); - } else { - mapping[0] = dataAddRange( - mapping[0], - otherMapping[0][0], - otherMapping[0][1] - 1 - ); - } - // Remove the other, now redundant, item. - surrogateMappings.splice(innerIndex, 1); - --innerIndex; - } - } - } - return surrogateMappings; - }; - - var surrogateSet = function(data) { - // Exit early if `data` is an empty set. - if (!data.length) { - return []; - } - - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var startHigh; - var startLow; - var endHigh; - var endLow; - var surrogateMappings = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; - - startHigh = highSurrogate(start); - startLow = lowSurrogate(start); - endHigh = highSurrogate(end); - endLow = lowSurrogate(end); - - var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; - var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; - var complete = false; - - // Append the previous high-surrogate-to-low-surrogate mappings. - // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. - if ( - startHigh == endHigh || - startsWithLowestLowSurrogate && endsWithHighestLowSurrogate - ) { - surrogateMappings.push([ - [startHigh, endHigh + 1], - [startLow, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh, startHigh + 1], - [startLow, LOW_SURROGATE_MAX + 1] - ]); - } - - // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to - // `(endHigh - 1, LOW_SURROGATE_MAX)`. - if (!complete && startHigh + 1 < endHigh) { - if (endsWithHighestLowSurrogate) { - // Combine step 2 and step 3. - surrogateMappings.push([ - [startHigh + 1, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh + 1, endHigh], - [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] - ]); - } - } - - // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. - if (!complete) { - surrogateMappings.push([ - [endHigh, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - } - - index += 2; - } - - // The format of `surrogateMappings` is as follows: - // - // [ surrogateMapping1, surrogateMapping2 ] - // - // i.e.: - // - // [ - // [ highSurrogates1, lowSurrogates1 ], - // [ highSurrogates2, lowSurrogates2 ] - // ] - return optimizeSurrogateMappings(surrogateMappings); - }; - - var createSurrogateCharacterClasses = function(surrogateMappings) { - var result = []; - forEach(surrogateMappings, function(surrogateMapping) { - var highSurrogates = surrogateMapping[0]; - var lowSurrogates = surrogateMapping[1]; - result.push( - createBMPCharacterClasses(highSurrogates) + - createBMPCharacterClasses(lowSurrogates) - ); - }); - return result.join('|'); - }; - - var createCharacterClassesFromData = function(data, bmpOnly, hasUnicodeFlag) { - if (hasUnicodeFlag) { - return createUnicodeCharacterClasses(data); - } - var result = []; - - var parts = splitAtBMP(data); - var loneHighSurrogates = parts.loneHighSurrogates; - var loneLowSurrogates = parts.loneLowSurrogates; - var bmp = parts.bmp; - var astral = parts.astral; - var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); - var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); - - var surrogateMappings = surrogateSet(astral); - - if (bmpOnly) { - bmp = dataAddData(bmp, loneHighSurrogates); - hasLoneHighSurrogates = false; - bmp = dataAddData(bmp, loneLowSurrogates); - hasLoneLowSurrogates = false; - } - - if (!dataIsEmpty(bmp)) { - // The data set contains BMP code points that are not high surrogates - // needed for astral code points in the set. - result.push(createBMPCharacterClasses(bmp)); - } - if (surrogateMappings.length) { - // The data set contains astral code points; append character classes - // based on their surrogate pairs. - result.push(createSurrogateCharacterClasses(surrogateMappings)); - } - // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 - if (hasLoneHighSurrogates) { - result.push( - createBMPCharacterClasses(loneHighSurrogates) + - // Make sure the high surrogates aren’t part of a surrogate pair. - '(?![\\uDC00-\\uDFFF])' - ); - } - if (hasLoneLowSurrogates) { - result.push( - // It is not possible to accurately assert the low surrogates aren’t - // part of a surrogate pair, since JavaScript regular expressions do - // not support lookbehind. - '(?:[^\\uD800-\\uDBFF]|^)' + - createBMPCharacterClasses(loneLowSurrogates) - ); - } - return result.join('|'); - }; - - /*--------------------------------------------------------------------------*/ - - // `regenerate` can be used as a constructor (and new methods can be added to - // its prototype) but also as a regular function, the latter of which is the - // documented and most common usage. For that reason, it’s not capitalized. - var regenerate = function(value) { - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (this instanceof regenerate) { - this.data = []; - return value ? this.add(value) : this; - } - return (new regenerate).add(value); - }; - - regenerate.version = '1.3.2'; - - var proto = regenerate.prototype; - extend(proto, { - 'add': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataAddData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.add(item); - }); - return $this; - } - $this.data = dataAdd( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'remove': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataRemoveData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.remove(item); - }); - return $this; - } - $this.data = dataRemove( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'addRange': function(start, end) { - var $this = this; - $this.data = dataAddRange($this.data, - isNumber(start) ? start : symbolToCodePoint(start), - isNumber(end) ? end : symbolToCodePoint(end) - ); - return $this; - }, - 'removeRange': function(start, end) { - var $this = this; - var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); - var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); - $this.data = dataRemoveRange( - $this.data, - startCodePoint, - endCodePoint - ); - return $this; - }, - 'intersection': function(argument) { - var $this = this; - // Allow passing other Regenerate instances. - // TODO: Optimize this by writing and using `dataIntersectionData()`. - var array = argument instanceof regenerate ? - dataToArray(argument.data) : - argument; - $this.data = dataIntersection($this.data, array); - return $this; - }, - 'contains': function(codePoint) { - return dataContains( - this.data, - isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) - ); - }, - 'clone': function() { - var set = new regenerate; - set.data = this.data.slice(0); - return set; - }, - 'toString': function(options) { - var result = createCharacterClassesFromData( - this.data, - options ? options.bmpOnly : false, - options ? options.hasUnicodeFlag : false - ); - if (!result) { - // For an empty set, return something that can be inserted `/here/` to - // form a valid regular expression. Avoid `(?:)` since that matches the - // empty string. - return '[]'; - } - // Use `\0` instead of `\x00` where possible. - return result.replace(regexNull, '\\0$1'); - }, - 'toRegExp': function(flags) { - var pattern = this.toString( - flags && flags.indexOf('u') != -1 ? - { 'hasUnicodeFlag': true } : - null - ); - return RegExp(pattern, flags || ''); - }, - 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. - return dataToArray(this.data); - } - }); - - proto.toArray = proto.valueOf; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return regenerate; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = regenerate; - } else { // in Narwhal or RingoJS v0.7.0- - freeExports.regenerate = regenerate; - } - } else { // in Rhino or a web browser - root.regenerate = regenerate; - } - -}(this)); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/.npmignore deleted file mode 100644 index e216ae5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/README.md deleted file mode 100644 index d93386a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# regenerator-runtime - -Standalone runtime for -[Regenerator](https://github.com/facebook/regenerator)-compiled generator -and `async` functions. - -To import the runtime as a module (recommended), either of the following -import styles will work: -```js -// CommonJS -const regeneratorRuntime = require("regenerator-runtime"); - -// ECMAScript 2015 -import regeneratorRuntime from "regenerator-runtime"; -``` - -To ensure that `regeneratorRuntime` is defined globally, either of the -following styles will work: -```js -// CommonJS -require("regenerator-runtime/runtime"); - -// ECMAScript 2015 -import "regenerator-runtime/runtime"; -``` - -To get the absolute file system path of `runtime.js`, evaluate the -following expression: -```js -require("regenerator-runtime/path").path -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/package.json deleted file mode 100644 index ffbcb58..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regenerator-runtime@^0.11.0", - "scope": null, - "escapedName": "regenerator-runtime", - "name": "regenerator-runtime", - "rawSpec": "^0.11.0", - "spec": ">=0.11.0 <0.12.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime" - ] - ], - "_from": "regenerator-runtime@>=0.11.0 <0.12.0", - "_id": "regenerator-runtime@0.11.0", - "_inCache": true, - "_location": "/regenerator-runtime", - "_nodeVersion": "8.2.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/regenerator-runtime-0.11.0.tgz_1502824917902_0.7827742118388414" - }, - "_npmUser": { - "name": "benjamn", - "email": "ben@benjamn.com" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "regenerator-runtime@^0.11.0", - "scope": null, - "escapedName": "regenerator-runtime", - "name": "regenerator-runtime", - "rawSpec": "^0.11.0", - "spec": ">=0.11.0 <0.12.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-runtime" - ], - "_resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "_shasum": "7e54fe5b5ccd5d6624ea6255c3473be090b802e1", - "_shrinkwrap": null, - "_spec": "regenerator-runtime@^0.11.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-runtime", - "author": { - "name": "Ben Newman", - "email": "bn@cs.stanford.edu" - }, - "dependencies": {}, - "description": "Runtime for Regenerator-compiled generator and async functions.", - "devDependencies": {}, - "directories": {}, - "dist": { - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", - "shasum": "7e54fe5b5ccd5d6624ea6255c3473be090b802e1", - "tarball": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz" - }, - "keywords": [ - "regenerator", - "runtime", - "generator", - "async" - ], - "license": "MIT", - "main": "runtime-module.js", - "maintainers": [ - { - "name": "benjamn", - "email": "bn@cs.stanford.edu" - } - ], - "name": "regenerator-runtime", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime" - }, - "version": "0.11.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/path.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/path.js deleted file mode 100644 index a450a75..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/path.js +++ /dev/null @@ -1,4 +0,0 @@ -exports.path = require("path").join( - __dirname, - "runtime.js" -); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime-module.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime-module.js deleted file mode 100644 index 57b6557..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime-module.js +++ /dev/null @@ -1,28 +0,0 @@ -// This method of obtaining a reference to the global object needs to be -// kept identical to the way it is obtained in runtime.js -var g = (function() { return this })() || Function("return this")(); - -// Use `getOwnPropertyNames` because not all browsers support calling -// `hasOwnProperty` on the global `self` object in a worker. See #183. -var hadRuntime = g.regeneratorRuntime && - Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; - -// Save the old regeneratorRuntime in case it needs to be restored later. -var oldRuntime = hadRuntime && g.regeneratorRuntime; - -// Force reevalutation of runtime.js. -g.regeneratorRuntime = undefined; - -module.exports = require("./runtime"); - -if (hadRuntime) { - // Restore the original runtime. - g.regeneratorRuntime = oldRuntime; -} else { - // Remove the global property added by runtime.js. - try { - delete g.regeneratorRuntime; - } catch(e) { - g.regeneratorRuntime = undefined; - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime.js deleted file mode 100644 index fb2ab55..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-runtime/runtime.js +++ /dev/null @@ -1,730 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -!(function(global) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - runtime.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[toStringTagSymbol] = "Generator"; - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; -})( - // In sloppy mode, unbound `this` refers to the global object, fallback to - // Function constructor if we're in global strict mode. That is sadly a form - // of indirect eval which violates Content Security Policy. - (function() { return this })() || Function("return this")() -); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/.npmignore deleted file mode 100644 index 07e6e47..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/README.md deleted file mode 100644 index 1b09792..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# regenerator-transform - -Transform async/generator functions with [regenerator](https://github.com/facebook/regenerator) - -## Installation - -```sh -$ npm install regenerator-transform -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["regenerator-transform"] -} -// with options -{ - "plugins": [ - ["regenerator-transform", { - asyncGenerators: false, // true by default - generators: false, // true by default - async: false // true by default - }] - ] -} -``` - -### Via CLI - -```sh -$ babel --plugins regenerator-transform script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["regenerator-transform"] -}); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/emit.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/emit.js deleted file mode 100644 index 6d3c4ec..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/emit.js +++ /dev/null @@ -1,996 +0,0 @@ -"use strict"; - -var _stringify = require("babel-runtime/core-js/json/stringify"); - -var _stringify2 = _interopRequireDefault(_stringify); - -var _assert = require("assert"); - -var _assert2 = _interopRequireDefault(_assert); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _leap = require("./leap"); - -var leap = _interopRequireWildcard(_leap); - -var _meta = require("./meta"); - -var meta = _interopRequireWildcard(_meta); - -var _util = require("./util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hasOwn = Object.prototype.hasOwnProperty; /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -function Emitter(contextId) { - _assert2.default.ok(this instanceof Emitter); - t.assertIdentifier(contextId); - - // Used to generate unique temporary names. - this.nextTempId = 0; - - // In order to make sure the context object does not collide with - // anything in the local scope, we might have to rename it, so we - // refer to it symbolically instead of just assuming that it will be - // called "context". - this.contextId = contextId; - - // An append-only list of Statements that grows each time this.emit is - // called. - this.listing = []; - - // A sparse array whose keys correspond to locations in this.listing - // that have been marked as branch/jump targets. - this.marked = [true]; - - // The last location will be marked when this.getDispatchLoop is - // called. - this.finalLoc = loc(); - - // A list of all leap.TryEntry statements emitted. - this.tryEntries = []; - - // Each time we evaluate the body of a loop, we tell this.leapManager - // to enter a nested loop context that determines the meaning of break - // and continue statements therein. - this.leapManager = new leap.LeapManager(this); -} - -var Ep = Emitter.prototype; -exports.Emitter = Emitter; - -// Offsets into this.listing that could be used as targets for branches or -// jumps are represented as numeric Literal nodes. This representation has -// the amazingly convenient benefit of allowing the exact value of the -// location to be determined at any time, even after generating code that -// refers to the location. -function loc() { - return t.numericLiteral(-1); -} - -// Sets the exact value of the given location to the offset of the next -// Statement emitted. -Ep.mark = function (loc) { - t.assertLiteral(loc); - var index = this.listing.length; - if (loc.value === -1) { - loc.value = index; - } else { - // Locations can be marked redundantly, but their values cannot change - // once set the first time. - _assert2.default.strictEqual(loc.value, index); - } - this.marked[index] = true; - return loc; -}; - -Ep.emit = function (node) { - if (t.isExpression(node)) { - node = t.expressionStatement(node); - } - - t.assertStatement(node); - this.listing.push(node); -}; - -// Shorthand for emitting assignment statements. This will come in handy -// for assignments to temporary variables. -Ep.emitAssign = function (lhs, rhs) { - this.emit(this.assign(lhs, rhs)); - return lhs; -}; - -// Shorthand for an assignment statement. -Ep.assign = function (lhs, rhs) { - return t.expressionStatement(t.assignmentExpression("=", lhs, rhs)); -}; - -// Convenience function for generating expressions like context.next, -// context.sent, and context.rval. -Ep.contextProperty = function (name, computed) { - return t.memberExpression(this.contextId, computed ? t.stringLiteral(name) : t.identifier(name), !!computed); -}; - -// Shorthand for setting context.rval and jumping to `context.stop()`. -Ep.stop = function (rval) { - if (rval) { - this.setReturnValue(rval); - } - - this.jump(this.finalLoc); -}; - -Ep.setReturnValue = function (valuePath) { - t.assertExpression(valuePath.value); - - this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath)); -}; - -Ep.clearPendingException = function (tryLoc, assignee) { - t.assertLiteral(tryLoc); - - var catchCall = t.callExpression(this.contextProperty("catch", true), [tryLoc]); - - if (assignee) { - this.emitAssign(assignee, catchCall); - } else { - this.emit(catchCall); - } -}; - -// Emits code for an unconditional jump to the given location, even if the -// exact value of the location is not yet known. -Ep.jump = function (toLoc) { - this.emitAssign(this.contextProperty("next"), toLoc); - this.emit(t.breakStatement()); -}; - -// Conditional jump. -Ep.jumpIf = function (test, toLoc) { - t.assertExpression(test); - t.assertLiteral(toLoc); - - this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()]))); -}; - -// Conditional jump, with the condition negated. -Ep.jumpIfNot = function (test, toLoc) { - t.assertExpression(test); - t.assertLiteral(toLoc); - - var negatedTest = void 0; - if (t.isUnaryExpression(test) && test.operator === "!") { - // Avoid double negation. - negatedTest = test.argument; - } else { - negatedTest = t.unaryExpression("!", test); - } - - this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()]))); -}; - -// Returns a unique MemberExpression that can be used to store and -// retrieve temporary values. Since the object of the member expression is -// the context object, which is presumed to coexist peacefully with all -// other local variables, and since we just increment `nextTempId` -// monotonically, uniqueness is assured. -Ep.makeTempVar = function () { - return this.contextProperty("t" + this.nextTempId++); -}; - -Ep.getContextFunction = function (id) { - return t.functionExpression(id || null /*Anonymous*/ - , [this.contextId], t.blockStatement([this.getDispatchLoop()]), false, // Not a generator anymore! - false // Nor an expression. - ); -}; - -// Turns this.listing into a loop of the form -// -// while (1) switch (context.next) { -// case 0: -// ... -// case n: -// return context.stop(); -// } -// -// Each marked location in this.listing will correspond to one generated -// case statement. -Ep.getDispatchLoop = function () { - var self = this; - var cases = []; - var current = void 0; - - // If we encounter a break, continue, or return statement in a switch - // case, we can skip the rest of the statements until the next case. - var alreadyEnded = false; - - self.listing.forEach(function (stmt, i) { - if (self.marked.hasOwnProperty(i)) { - cases.push(t.switchCase(t.numericLiteral(i), current = [])); - alreadyEnded = false; - } - - if (!alreadyEnded) { - current.push(stmt); - if (t.isCompletionStatement(stmt)) alreadyEnded = true; - } - }); - - // Now that we know how many statements there will be in this.listing, - // we can finally resolve this.finalLoc.value. - this.finalLoc.value = this.listing.length; - - cases.push(t.switchCase(this.finalLoc, [ - // Intentionally fall through to the "end" case... - ]), - - // So that the runtime can jump to the final location without having - // to know its offset, we provide the "end" case as a synonym. - t.switchCase(t.stringLiteral("end"), [ - // This will check/clear both context.thrown and context.rval. - t.returnStatement(t.callExpression(this.contextProperty("stop"), []))])); - - return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases)); -}; - -Ep.getTryLocsList = function () { - if (this.tryEntries.length === 0) { - // To avoid adding a needless [] to the majority of runtime.wrap - // argument lists, force the caller to handle this case specially. - return null; - } - - var lastLocValue = 0; - - return t.arrayExpression(this.tryEntries.map(function (tryEntry) { - var thisLocValue = tryEntry.firstLoc.value; - _assert2.default.ok(thisLocValue >= lastLocValue, "try entries out of order"); - lastLocValue = thisLocValue; - - var ce = tryEntry.catchEntry; - var fe = tryEntry.finallyEntry; - - var locs = [tryEntry.firstLoc, - // The null here makes a hole in the array. - ce ? ce.firstLoc : null]; - - if (fe) { - locs[2] = fe.firstLoc; - locs[3] = fe.afterLoc; - } - - return t.arrayExpression(locs); - })); -}; - -// All side effects must be realized in order. - -// If any subexpression harbors a leap, all subexpressions must be -// neutered of side effects. - -// No destructive modification of AST nodes. - -Ep.explode = function (path, ignoreResult) { - var node = path.node; - var self = this; - - t.assertNode(node); - - if (t.isDeclaration(node)) throw getDeclError(node); - - if (t.isStatement(node)) return self.explodeStatement(path); - - if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult); - - switch (node.type) { - case "Program": - return path.get("body").map(self.explodeStatement, self); - - case "VariableDeclarator": - throw getDeclError(node); - - // These node types should be handled by their parent nodes - // (ObjectExpression, SwitchStatement, and TryStatement, respectively). - case "Property": - case "SwitchCase": - case "CatchClause": - throw new Error(node.type + " nodes should be handled by their parents"); - - default: - throw new Error("unknown Node of type " + (0, _stringify2.default)(node.type)); - } -}; - -function getDeclError(node) { - return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + (0, _stringify2.default)(node)); -} - -Ep.explodeStatement = function (path, labelId) { - var stmt = path.node; - var self = this; - var before = void 0, - after = void 0, - head = void 0; - - t.assertStatement(stmt); - - if (labelId) { - t.assertIdentifier(labelId); - } else { - labelId = null; - } - - // Explode BlockStatement nodes even if they do not contain a yield, - // because we don't want or need the curly braces. - if (t.isBlockStatement(stmt)) { - path.get("body").forEach(function (path) { - self.explodeStatement(path); - }); - return; - } - - if (!meta.containsLeap(stmt)) { - // Technically we should be able to avoid emitting the statement - // altogether if !meta.hasSideEffects(stmt), but that leads to - // confusing generated code (for instance, `while (true) {}` just - // disappears) and is probably a more appropriate job for a dedicated - // dead code elimination pass. - self.emit(stmt); - return; - } - - switch (stmt.type) { - case "ExpressionStatement": - self.explodeExpression(path.get("expression"), true); - break; - - case "LabeledStatement": - after = loc(); - - // Did you know you can break from any labeled block statement or - // control structure? Well, you can! Note: when a labeled loop is - // encountered, the leap.LabeledEntry created here will immediately - // enclose a leap.LoopEntry on the leap manager's stack, and both - // entries will have the same label. Though this works just fine, it - // may seem a bit redundant. In theory, we could check here to - // determine if stmt knows how to handle its own label; for example, - // stmt happens to be a WhileStatement and so we know it's going to - // establish its own LoopEntry when we explode it (below). Then this - // LabeledEntry would be unnecessary. Alternatively, we might be - // tempted not to pass stmt.label down into self.explodeStatement, - // because we've handled the label here, but that's a mistake because - // labeled loops may contain labeled continue statements, which is not - // something we can handle in this generic case. All in all, I think a - // little redundancy greatly simplifies the logic of this case, since - // it's clear that we handle all possible LabeledStatements correctly - // here, regardless of whether they interact with the leap manager - // themselves. Also remember that labels and break/continue-to-label - // statements are rare, and all of this logic happens at transform - // time, so it has no additional runtime cost. - self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () { - self.explodeStatement(path.get("body"), stmt.label); - }); - - self.mark(after); - - break; - - case "WhileStatement": - before = loc(); - after = loc(); - - self.mark(before); - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () { - self.explodeStatement(path.get("body")); - }); - self.jump(before); - self.mark(after); - - break; - - case "DoWhileStatement": - var first = loc(); - var test = loc(); - after = loc(); - - self.mark(first); - self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () { - self.explode(path.get("body")); - }); - self.mark(test); - self.jumpIf(self.explodeExpression(path.get("test")), first); - self.mark(after); - - break; - - case "ForStatement": - head = loc(); - var update = loc(); - after = loc(); - - if (stmt.init) { - // We pass true here to indicate that if stmt.init is an expression - // then we do not care about its result. - self.explode(path.get("init"), true); - } - - self.mark(head); - - if (stmt.test) { - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - } else { - // No test means continue unconditionally. - } - - self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () { - self.explodeStatement(path.get("body")); - }); - - self.mark(update); - - if (stmt.update) { - // We pass true here to indicate that if stmt.update is an - // expression then we do not care about its result. - self.explode(path.get("update"), true); - } - - self.jump(head); - - self.mark(after); - - break; - - case "TypeCastExpression": - return self.explodeExpression(path.get("expression")); - - case "ForInStatement": - head = loc(); - after = loc(); - - var keyIterNextFn = self.makeTempVar(); - self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))])); - - self.mark(head); - - var keyInfoTmpVar = self.makeTempVar(); - self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(keyIterNextFn, [])), t.identifier("done"), false), after); - - self.emitAssign(stmt.left, t.memberExpression(keyInfoTmpVar, t.identifier("value"), false)); - - self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () { - self.explodeStatement(path.get("body")); - }); - - self.jump(head); - - self.mark(after); - - break; - - case "BreakStatement": - self.emitAbruptCompletion({ - type: "break", - target: self.leapManager.getBreakLoc(stmt.label) - }); - - break; - - case "ContinueStatement": - self.emitAbruptCompletion({ - type: "continue", - target: self.leapManager.getContinueLoc(stmt.label) - }); - - break; - - case "SwitchStatement": - // Always save the discriminant into a temporary variable in case the - // test expressions overwrite values like context.sent. - var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant"))); - - after = loc(); - var defaultLoc = loc(); - var condition = defaultLoc; - var caseLocs = []; - - // If there are no cases, .cases might be undefined. - var cases = stmt.cases || []; - - for (var i = cases.length - 1; i >= 0; --i) { - var c = cases[i]; - t.assertSwitchCase(c); - - if (c.test) { - condition = t.conditionalExpression(t.binaryExpression("===", disc, c.test), caseLocs[i] = loc(), condition); - } else { - caseLocs[i] = defaultLoc; - } - } - - var discriminant = path.get("discriminant"); - util.replaceWithOrRemove(discriminant, condition); - self.jump(self.explodeExpression(discriminant)); - - self.leapManager.withEntry(new leap.SwitchEntry(after), function () { - path.get("cases").forEach(function (casePath) { - var i = casePath.key; - self.mark(caseLocs[i]); - - casePath.get("consequent").forEach(function (path) { - self.explodeStatement(path); - }); - }); - }); - - self.mark(after); - if (defaultLoc.value === -1) { - self.mark(defaultLoc); - _assert2.default.strictEqual(after.value, defaultLoc.value); - } - - break; - - case "IfStatement": - var elseLoc = stmt.alternate && loc(); - after = loc(); - - self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after); - - self.explodeStatement(path.get("consequent")); - - if (elseLoc) { - self.jump(after); - self.mark(elseLoc); - self.explodeStatement(path.get("alternate")); - } - - self.mark(after); - - break; - - case "ReturnStatement": - self.emitAbruptCompletion({ - type: "return", - value: self.explodeExpression(path.get("argument")) - }); - - break; - - case "WithStatement": - throw new Error("WithStatement not supported in generator functions."); - - case "TryStatement": - after = loc(); - - var handler = stmt.handler; - - var catchLoc = handler && loc(); - var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param); - - var finallyLoc = stmt.finalizer && loc(); - var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after); - - var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry); - - self.tryEntries.push(tryEntry); - self.updateContextPrevLoc(tryEntry.firstLoc); - - self.leapManager.withEntry(tryEntry, function () { - self.explodeStatement(path.get("block")); - - if (catchLoc) { - if (finallyLoc) { - // If we have both a catch block and a finally block, then - // because we emit the catch block first, we need to jump over - // it to the finally block. - self.jump(finallyLoc); - } else { - // If there is no finally block, then we need to jump over the - // catch block to the fall-through location. - self.jump(after); - } - - self.updateContextPrevLoc(self.mark(catchLoc)); - - var bodyPath = path.get("handler.body"); - var safeParam = self.makeTempVar(); - self.clearPendingException(tryEntry.firstLoc, safeParam); - - bodyPath.traverse(catchParamVisitor, { - safeParam: safeParam, - catchParamName: handler.param.name - }); - - self.leapManager.withEntry(catchEntry, function () { - self.explodeStatement(bodyPath); - }); - } - - if (finallyLoc) { - self.updateContextPrevLoc(self.mark(finallyLoc)); - - self.leapManager.withEntry(finallyEntry, function () { - self.explodeStatement(path.get("finalizer")); - }); - - self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc]))); - } - }); - - self.mark(after); - - break; - - case "ThrowStatement": - self.emit(t.throwStatement(self.explodeExpression(path.get("argument")))); - - break; - - default: - throw new Error("unknown Statement of type " + (0, _stringify2.default)(stmt.type)); - } -}; - -var catchParamVisitor = { - Identifier: function Identifier(path, state) { - if (path.node.name === state.catchParamName && util.isReference(path)) { - util.replaceWithOrRemove(path, state.safeParam); - } - }, - - Scope: function Scope(path, state) { - if (path.scope.hasOwnBinding(state.catchParamName)) { - // Don't descend into nested scopes that shadow the catch - // parameter with their own declarations. - path.skip(); - } - } -}; - -Ep.emitAbruptCompletion = function (record) { - if (!isValidCompletion(record)) { - _assert2.default.ok(false, "invalid completion record: " + (0, _stringify2.default)(record)); - } - - _assert2.default.notStrictEqual(record.type, "normal", "normal completions are not abrupt"); - - var abruptArgs = [t.stringLiteral(record.type)]; - - if (record.type === "break" || record.type === "continue") { - t.assertLiteral(record.target); - abruptArgs[1] = record.target; - } else if (record.type === "return" || record.type === "throw") { - if (record.value) { - t.assertExpression(record.value); - abruptArgs[1] = record.value; - } - } - - this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs))); -}; - -function isValidCompletion(record) { - var type = record.type; - - if (type === "normal") { - return !hasOwn.call(record, "target"); - } - - if (type === "break" || type === "continue") { - return !hasOwn.call(record, "value") && t.isLiteral(record.target); - } - - if (type === "return" || type === "throw") { - return hasOwn.call(record, "value") && !hasOwn.call(record, "target"); - } - - return false; -} - -// Not all offsets into emitter.listing are potential jump targets. For -// example, execution typically falls into the beginning of a try block -// without jumping directly there. This method returns the current offset -// without marking it, so that a switch case will not necessarily be -// generated for this offset (I say "not necessarily" because the same -// location might end up being marked in the process of emitting other -// statements). There's no logical harm in marking such locations as jump -// targets, but minimizing the number of switch cases keeps the generated -// code shorter. -Ep.getUnmarkedCurrentLoc = function () { - return t.numericLiteral(this.listing.length); -}; - -// The context.prev property takes the value of context.next whenever we -// evaluate the switch statement discriminant, which is generally good -// enough for tracking the last location we jumped to, but sometimes -// context.prev needs to be more precise, such as when we fall -// successfully out of a try block and into a finally block without -// jumping. This method exists to update context.prev to the freshest -// available location. If we were implementing a full interpreter, we -// would know the location of the current instruction with complete -// precision at all times, but we don't have that luxury here, as it would -// be costly and verbose to set context.prev before every statement. -Ep.updateContextPrevLoc = function (loc) { - if (loc) { - t.assertLiteral(loc); - - if (loc.value === -1) { - // If an uninitialized location literal was passed in, set its value - // to the current this.listing.length. - loc.value = this.listing.length; - } else { - // Otherwise assert that the location matches the current offset. - _assert2.default.strictEqual(loc.value, this.listing.length); - } - } else { - loc = this.getUnmarkedCurrentLoc(); - } - - // Make sure context.prev is up to date in case we fell into this try - // statement without jumping to it. TODO Consider avoiding this - // assignment when we know control must have jumped here. - this.emitAssign(this.contextProperty("prev"), loc); -}; - -Ep.explodeExpression = function (path, ignoreResult) { - var expr = path.node; - if (expr) { - t.assertExpression(expr); - } else { - return expr; - } - - var self = this; - var result = void 0; // Used optionally by several cases below. - var after = void 0; - - function finish(expr) { - t.assertExpression(expr); - if (ignoreResult) { - self.emit(expr); - } else { - return expr; - } - } - - // If the expression does not contain a leap, then we either emit the - // expression as a standalone statement or return it whole. - if (!meta.containsLeap(expr)) { - return finish(expr); - } - - // If any child contains a leap (such as a yield or labeled continue or - // break statement), then any sibling subexpressions will almost - // certainly have to be exploded in order to maintain the order of their - // side effects relative to the leaping child(ren). - var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); - - // In order to save the rest of explodeExpression from a combinatorial - // trainwreck of special cases, explodeViaTempVar is responsible for - // deciding when a subexpression needs to be "exploded," which is my - // very technical term for emitting the subexpression as an assignment - // to a temporary variable and the substituting the temporary variable - // for the original subexpression. Think of exploded view diagrams, not - // Michael Bay movies. The point of exploding subexpressions is to - // control the precise order in which the generated code realizes the - // side effects of those subexpressions. - function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { - _assert2.default.ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?"); - - var result = self.explodeExpression(childPath, ignoreChildResult); - - if (ignoreChildResult) { - // Side effects already emitted above. - - } else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) { - // If tempVar was provided, then the result will always be assigned - // to it, even if the result does not otherwise need to be assigned - // to a temporary variable. When no tempVar is provided, we have - // the flexibility to decide whether a temporary variable is really - // necessary. Unfortunately, in general, a temporary variable is - // required whenever any child contains a yield expression, since it - // is difficult to prove (at all, let alone efficiently) whether - // this result would evaluate to the same value before and after the - // yield (see #206). One narrow case where we can prove it doesn't - // matter (and thus we do not need a temporary variable) is when the - // result in question is a Literal value. - result = self.emitAssign(tempVar || self.makeTempVar(), result); - } - return result; - } - - // If ignoreResult is true, then we must take full responsibility for - // emitting the expression with all its side effects, and we should not - // return a result. - - switch (expr.type) { - case "MemberExpression": - return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed)); - - case "CallExpression": - var calleePath = path.get("callee"); - var argsPath = path.get("arguments"); - - var newCallee = void 0; - var newArgs = []; - - var hasLeapingArgs = false; - argsPath.forEach(function (argPath) { - hasLeapingArgs = hasLeapingArgs || meta.containsLeap(argPath.node); - }); - - if (t.isMemberExpression(calleePath.node)) { - if (hasLeapingArgs) { - // If the arguments of the CallExpression contained any yield - // expressions, then we need to be sure to evaluate the callee - // before evaluating the arguments, but if the callee was a member - // expression, then we must be careful that the object of the - // member expression still gets bound to `this` for the call. - - var newObject = explodeViaTempVar( - // Assign the exploded callee.object expression to a temporary - // variable so that we can use it twice without reevaluating it. - self.makeTempVar(), calleePath.get("object")); - - var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property; - - newArgs.unshift(newObject); - - newCallee = t.memberExpression(t.memberExpression(newObject, newProperty, calleePath.node.computed), t.identifier("call"), false); - } else { - newCallee = self.explodeExpression(calleePath); - } - } else { - newCallee = explodeViaTempVar(null, calleePath); - - if (t.isMemberExpression(newCallee)) { - // If the callee was not previously a MemberExpression, then the - // CallExpression was "unqualified," meaning its `this` object - // should be the global object. If the exploded expression has - // become a MemberExpression (e.g. a context property, probably a - // temporary variable), then we need to force it to be unqualified - // by using the (0, object.property)(...) trick; otherwise, it - // will receive the object of the MemberExpression as its `this` - // object. - newCallee = t.sequenceExpression([t.numericLiteral(0), newCallee]); - } - } - - argsPath.forEach(function (argPath) { - newArgs.push(explodeViaTempVar(null, argPath)); - }); - - return finish(t.callExpression(newCallee, newArgs)); - - case "NewExpression": - return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) { - return explodeViaTempVar(null, argPath); - }))); - - case "ObjectExpression": - return finish(t.objectExpression(path.get("properties").map(function (propPath) { - if (propPath.isObjectProperty()) { - return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed); - } else { - return propPath.node; - } - }))); - - case "ArrayExpression": - return finish(t.arrayExpression(path.get("elements").map(function (elemPath) { - return explodeViaTempVar(null, elemPath); - }))); - - case "SequenceExpression": - var lastIndex = expr.expressions.length - 1; - - path.get("expressions").forEach(function (exprPath) { - if (exprPath.key === lastIndex) { - result = self.explodeExpression(exprPath, ignoreResult); - } else { - self.explodeExpression(exprPath, true); - } - }); - - return result; - - case "LogicalExpression": - after = loc(); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - var left = explodeViaTempVar(result, path.get("left")); - - if (expr.operator === "&&") { - self.jumpIfNot(left, after); - } else { - _assert2.default.strictEqual(expr.operator, "||"); - self.jumpIf(left, after); - } - - explodeViaTempVar(result, path.get("right"), ignoreResult); - - self.mark(after); - - return result; - - case "ConditionalExpression": - var elseLoc = loc(); - after = loc(); - var test = self.explodeExpression(path.get("test")); - - self.jumpIfNot(test, elseLoc); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - explodeViaTempVar(result, path.get("consequent"), ignoreResult); - self.jump(after); - - self.mark(elseLoc); - explodeViaTempVar(result, path.get("alternate"), ignoreResult); - - self.mark(after); - - return result; - - case "UnaryExpression": - return finish(t.unaryExpression(expr.operator, - // Can't (and don't need to) break up the syntax of the argument. - // Think about delete a[b]. - self.explodeExpression(path.get("argument")), !!expr.prefix)); - - case "BinaryExpression": - return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right")))); - - case "AssignmentExpression": - return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right")))); - - case "UpdateExpression": - return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix)); - - case "YieldExpression": - after = loc(); - var arg = expr.argument && self.explodeExpression(path.get("argument")); - - if (arg && expr.delegate) { - var _result = self.makeTempVar(); - - self.emit(t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after]))); - - self.mark(after); - - return _result; - } - - self.emitAssign(self.contextProperty("next"), after); - self.emit(t.returnStatement(arg || null)); - self.mark(after); - - return self.contextProperty("sent"); - - default: - throw new Error("unknown Expression of type " + (0, _stringify2.default)(expr.type)); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/hoist.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/hoist.js deleted file mode 100644 index 8aff3f4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/hoist.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; - -var _keys = require("babel-runtime/core-js/object/keys"); - -var _keys2 = _interopRequireDefault(_keys); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _util = require("./util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -var hasOwn = Object.prototype.hasOwnProperty; - -// The hoist function takes a FunctionExpression or FunctionDeclaration -// and replaces any Declaration nodes in its body with assignments, then -// returns a VariableDeclaration containing just the names of the removed -// declarations. -exports.hoist = function (funPath) { - t.assertFunction(funPath.node); - - var vars = {}; - - function varDeclToExpr(vdec, includeIdentifiers) { - t.assertVariableDeclaration(vdec); - // TODO assert.equal(vdec.kind, "var"); - var exprs = []; - - vdec.declarations.forEach(function (dec) { - // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't - // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly. - vars[dec.id.name] = t.identifier(dec.id.name); - - if (dec.init) { - exprs.push(t.assignmentExpression("=", dec.id, dec.init)); - } else if (includeIdentifiers) { - exprs.push(dec.id); - } - }); - - if (exprs.length === 0) return null; - - if (exprs.length === 1) return exprs[0]; - - return t.sequenceExpression(exprs); - } - - funPath.get("body").traverse({ - VariableDeclaration: { - exit: function exit(path) { - var expr = varDeclToExpr(path.node, false); - if (expr === null) { - path.remove(); - } else { - // We don't need to traverse this expression any further because - // there can't be any new declarations inside an expression. - util.replaceWithOrRemove(path, t.expressionStatement(expr)); - } - - // Since the original node has been either removed or replaced, - // avoid traversing it any further. - path.skip(); - } - }, - - ForStatement: function ForStatement(path) { - var init = path.node.init; - if (t.isVariableDeclaration(init)) { - util.replaceWithOrRemove(path.get("init"), varDeclToExpr(init, false)); - } - }, - - ForXStatement: function ForXStatement(path) { - var left = path.get("left"); - if (left.isVariableDeclaration()) { - util.replaceWithOrRemove(left, varDeclToExpr(left.node, true)); - } - }, - - FunctionDeclaration: function FunctionDeclaration(path) { - var node = path.node; - vars[node.id.name] = node.id; - - var assignment = t.expressionStatement(t.assignmentExpression("=", node.id, t.functionExpression(node.id, node.params, node.body, node.generator, node.expression))); - - if (path.parentPath.isBlockStatement()) { - // Insert the assignment form before the first statement in the - // enclosing block. - path.parentPath.unshiftContainer("body", assignment); - - // Remove the function declaration now that we've inserted the - // equivalent assignment form at the beginning of the block. - path.remove(); - } else { - // If the parent node is not a block statement, then we can just - // replace the declaration with the equivalent assignment form - // without worrying about hoisting it. - util.replaceWithOrRemove(path, assignment); - } - - // Don't hoist variables out of inner functions. - path.skip(); - }, - - FunctionExpression: function FunctionExpression(path) { - // Don't descend into nested function expressions. - path.skip(); - } - }); - - var paramNames = {}; - funPath.get("params").forEach(function (paramPath) { - var param = paramPath.node; - if (t.isIdentifier(param)) { - paramNames[param.name] = param; - } else { - // Variables declared by destructuring parameter patterns will be - // harmlessly re-declared. - } - }); - - var declarations = []; - - (0, _keys2.default)(vars).forEach(function (name) { - if (!hasOwn.call(paramNames, name)) { - declarations.push(t.variableDeclarator(vars[name], null)); - } - }); - - if (declarations.length === 0) { - return null; // Be sure to handle this case! - } - - return t.variableDeclaration("var", declarations); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/index.js deleted file mode 100644 index 713417a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (context) { - var plugin = { - visitor: require("./visit").visitor - }; - - // Some presets manually call child presets, but fail to pass along the - // context object. Out of an abundance of caution, we verify that it - // exists first to avoid causing unnecessary breaking changes. - var version = context && context.version; - - // The "name" property is not allowed in older versions of Babel (6.x) - // and will cause the plugin validator to throw an exception. - if (version && parseInt(version, 10) >= 7) { - plugin.name = "regenerator-transform"; - } - - return plugin; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/leap.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/leap.js deleted file mode 100644 index 3f295c2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/leap.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -var _assert = require("assert"); - -var _assert2 = _interopRequireDefault(_assert); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _util = require("util"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function Entry() { - _assert2.default.ok(this instanceof Entry); -} /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -function FunctionEntry(returnLoc) { - Entry.call(this); - t.assertLiteral(returnLoc); - this.returnLoc = returnLoc; -} - -(0, _util.inherits)(FunctionEntry, Entry); -exports.FunctionEntry = FunctionEntry; - -function LoopEntry(breakLoc, continueLoc, label) { - Entry.call(this); - - t.assertLiteral(breakLoc); - t.assertLiteral(continueLoc); - - if (label) { - t.assertIdentifier(label); - } else { - label = null; - } - - this.breakLoc = breakLoc; - this.continueLoc = continueLoc; - this.label = label; -} - -(0, _util.inherits)(LoopEntry, Entry); -exports.LoopEntry = LoopEntry; - -function SwitchEntry(breakLoc) { - Entry.call(this); - t.assertLiteral(breakLoc); - this.breakLoc = breakLoc; -} - -(0, _util.inherits)(SwitchEntry, Entry); -exports.SwitchEntry = SwitchEntry; - -function TryEntry(firstLoc, catchEntry, finallyEntry) { - Entry.call(this); - - t.assertLiteral(firstLoc); - - if (catchEntry) { - _assert2.default.ok(catchEntry instanceof CatchEntry); - } else { - catchEntry = null; - } - - if (finallyEntry) { - _assert2.default.ok(finallyEntry instanceof FinallyEntry); - } else { - finallyEntry = null; - } - - // Have to have one or the other (or both). - _assert2.default.ok(catchEntry || finallyEntry); - - this.firstLoc = firstLoc; - this.catchEntry = catchEntry; - this.finallyEntry = finallyEntry; -} - -(0, _util.inherits)(TryEntry, Entry); -exports.TryEntry = TryEntry; - -function CatchEntry(firstLoc, paramId) { - Entry.call(this); - - t.assertLiteral(firstLoc); - t.assertIdentifier(paramId); - - this.firstLoc = firstLoc; - this.paramId = paramId; -} - -(0, _util.inherits)(CatchEntry, Entry); -exports.CatchEntry = CatchEntry; - -function FinallyEntry(firstLoc, afterLoc) { - Entry.call(this); - t.assertLiteral(firstLoc); - t.assertLiteral(afterLoc); - this.firstLoc = firstLoc; - this.afterLoc = afterLoc; -} - -(0, _util.inherits)(FinallyEntry, Entry); -exports.FinallyEntry = FinallyEntry; - -function LabeledEntry(breakLoc, label) { - Entry.call(this); - - t.assertLiteral(breakLoc); - t.assertIdentifier(label); - - this.breakLoc = breakLoc; - this.label = label; -} - -(0, _util.inherits)(LabeledEntry, Entry); -exports.LabeledEntry = LabeledEntry; - -function LeapManager(emitter) { - _assert2.default.ok(this instanceof LeapManager); - - var Emitter = require("./emit").Emitter; - _assert2.default.ok(emitter instanceof Emitter); - - this.emitter = emitter; - this.entryStack = [new FunctionEntry(emitter.finalLoc)]; -} - -var LMp = LeapManager.prototype; -exports.LeapManager = LeapManager; - -LMp.withEntry = function (entry, callback) { - _assert2.default.ok(entry instanceof Entry); - this.entryStack.push(entry); - try { - callback.call(this.emitter); - } finally { - var popped = this.entryStack.pop(); - _assert2.default.strictEqual(popped, entry); - } -}; - -LMp._findLeapLocation = function (property, label) { - for (var i = this.entryStack.length - 1; i >= 0; --i) { - var entry = this.entryStack[i]; - var loc = entry[property]; - if (loc) { - if (label) { - if (entry.label && entry.label.name === label.name) { - return loc; - } - } else if (entry instanceof LabeledEntry) { - // Ignore LabeledEntry entries unless we are actually breaking to - // a label. - } else { - return loc; - } - } - } - - return null; -}; - -LMp.getBreakLoc = function (label) { - return this._findLeapLocation("breakLoc", label); -}; - -LMp.getContinueLoc = function (label) { - return this._findLeapLocation("continueLoc", label); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/meta.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/meta.js deleted file mode 100644 index 20049f6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/meta.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; - -var _assert = require("assert"); - -var _assert2 = _interopRequireDefault(_assert); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var m = require("private").makeAccessor(); /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -var hasOwn = Object.prototype.hasOwnProperty; - -function makePredicate(propertyName, knownTypes) { - function onlyChildren(node) { - t.assertNode(node); - - // Assume no side effects until we find out otherwise. - var result = false; - - function check(child) { - if (result) { - // Do nothing. - } else if (Array.isArray(child)) { - child.some(check); - } else if (t.isNode(child)) { - _assert2.default.strictEqual(result, false); - result = predicate(child); - } - return result; - } - - var keys = t.VISITOR_KEYS[node.type]; - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var child = node[key]; - check(child); - } - } - - return result; - } - - function predicate(node) { - t.assertNode(node); - - var meta = m(node); - if (hasOwn.call(meta, propertyName)) return meta[propertyName]; - - // Certain types are "opaque," which means they have no side - // effects or leaps and we don't care about their subexpressions. - if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false; - - if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true; - - return meta[propertyName] = onlyChildren(node); - } - - predicate.onlyChildren = onlyChildren; - - return predicate; -} - -var opaqueTypes = { - FunctionExpression: true, - ArrowFunctionExpression: true -}; - -// These types potentially have side effects regardless of what side -// effects their subexpressions have. -var sideEffectTypes = { - CallExpression: true, // Anything could happen! - ForInStatement: true, // Modifies the key variable. - UnaryExpression: true, // Think delete. - BinaryExpression: true, // Might invoke .toString() or .valueOf(). - AssignmentExpression: true, // Side-effecting by definition. - UpdateExpression: true, // Updates are essentially assignments. - NewExpression: true // Similar to CallExpression. -}; - -// These types are the direct cause of all leaps in control flow. -var leapTypes = { - YieldExpression: true, - BreakStatement: true, - ContinueStatement: true, - ReturnStatement: true, - ThrowStatement: true -}; - -// All leap types are also side effect types. -for (var type in leapTypes) { - if (hasOwn.call(leapTypes, type)) { - sideEffectTypes[type] = leapTypes[type]; - } -} - -exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); -exports.containsLeap = makePredicate("containsLeap", leapTypes); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/replaceShorthandObjectMethod.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/replaceShorthandObjectMethod.js deleted file mode 100644 index 82d905e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/replaceShorthandObjectMethod.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = replaceShorthandObjectMethod; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _util = require("./util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -// this function converts a shorthand object generator method into a normal -// (non-shorthand) object property which is a generator function expression. for -// example, this: -// -// var foo = { -// *bar(baz) { return 5; } -// } -// -// should be replaced with: -// -// var foo = { -// bar: function*(baz) { return 5; } -// } -// -// to do this, it clones the parameter array and the body of the object generator -// method into a new FunctionExpression. -// -// this method can be passed any Function AST node path, and it will return -// either: -// a) the path that was passed in (iff the path did not need to be replaced) or -// b) the path of the new FunctionExpression that was created as a replacement -// (iff the path did need to be replaced) -// -// In either case, though, the caller can count on the fact that the return value -// is a Function AST node path. -// -// If this function is called with an AST node path that is not a Function (or with an -// argument that isn't an AST node path), it will throw an error. -function replaceShorthandObjectMethod(path) { - if (!path.node || !t.isFunction(path.node)) { - throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths."); - } - - // this function only replaces shorthand object methods (called ObjectMethod - // in Babel-speak). - if (!t.isObjectMethod(path.node)) { - return path; - } - - // this function only replaces generators. - if (!path.node.generator) { - return path; - } - - var parameters = path.node.params.map(function (param) { - return t.cloneDeep(param); - }); - - var functionExpression = t.functionExpression(null, // id - parameters, // params - t.cloneDeep(path.node.body), // body - path.node.generator, path.node.async); - - util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key), // key - functionExpression, //value - path.node.computed, // computed - false // shorthand - )); - - // path now refers to the ObjectProperty AST node path, but we want to return a - // Function AST node path for the function expression we created. we know that - // the FunctionExpression we just created is the value of the ObjectProperty, - // so return the "value" path off of this path. - return path.get("value"); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/util.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/util.js deleted file mode 100644 index bc42ed1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/util.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.runtimeProperty = runtimeProperty; -exports.isReference = isReference; -exports.replaceWithOrRemove = replaceWithOrRemove; - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function runtimeProperty(name) { - return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false); -} /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -function isReference(path) { - return path.isReferenced() || path.parentPath.isAssignmentExpression({ left: path.node }); -} - -function replaceWithOrRemove(path, replacement) { - if (replacement) { - path.replaceWith(replacement); - } else { - path.remove(); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/visit.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/visit.js deleted file mode 100644 index df0c332..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/lib/visit.js +++ /dev/null @@ -1,290 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -"use strict"; - -var _assert = require("assert"); - -var _assert2 = _interopRequireDefault(_assert); - -var _babelTypes = require("babel-types"); - -var t = _interopRequireWildcard(_babelTypes); - -var _hoist = require("./hoist"); - -var _emit = require("./emit"); - -var _replaceShorthandObjectMethod = require("./replaceShorthandObjectMethod"); - -var _replaceShorthandObjectMethod2 = _interopRequireDefault(_replaceShorthandObjectMethod); - -var _util = require("./util"); - -var util = _interopRequireWildcard(_util); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.visitor = { - Function: { - exit: function exit(path, state) { - var node = path.node; - - if (node.generator) { - if (node.async) { - // Async generator - if (state.opts.asyncGenerators === false) return; - } else { - // Plain generator - if (state.opts.generators === false) return; - } - } else if (node.async) { - // Async function - if (state.opts.async === false) return; - } else { - // Not a generator or async function. - return; - } - - // if this is an ObjectMethod, we need to convert it to an ObjectProperty - path = (0, _replaceShorthandObjectMethod2.default)(path); - node = path.node; - - var contextId = path.scope.generateUidIdentifier("context"); - var argsId = path.scope.generateUidIdentifier("args"); - - path.ensureBlock(); - var bodyBlockPath = path.get("body"); - - if (node.async) { - bodyBlockPath.traverse(awaitVisitor); - } - - bodyBlockPath.traverse(functionSentVisitor, { - context: contextId - }); - - var outerBody = []; - var innerBody = []; - - bodyBlockPath.get("body").forEach(function (childPath) { - var node = childPath.node; - if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) { - // Babylon represents directives like "use strict" as elements - // of a bodyBlockPath.node.directives array, but they could just - // as easily be represented (by other parsers) as traditional - // string-literal-valued expression statements, so we need to - // handle that here. (#248) - outerBody.push(node); - } else if (node && node._blockHoist != null) { - outerBody.push(node); - } else { - innerBody.push(node); - } - }); - - if (outerBody.length > 0) { - // Only replace the inner body if we actually hoisted any statements - // to the outer body. - bodyBlockPath.node.body = innerBody; - } - - var outerFnExpr = getOuterFnExpr(path); - // Note that getOuterFnExpr has the side-effect of ensuring that the - // function has a name (so node.id will always be an Identifier), even - // if a temporary name has to be synthesized. - t.assertIdentifier(node.id); - var innerFnId = t.identifier(node.id.name + "$"); - - // Turn all declarations into vars, and replace the original - // declarations with equivalent assignment expressions. - var vars = (0, _hoist.hoist)(path); - - var didRenameArguments = renameArguments(path, argsId); - if (didRenameArguments) { - vars = vars || t.variableDeclaration("var", []); - var argumentIdentifier = t.identifier("arguments"); - // we need to do this as otherwise arguments in arrow functions gets hoisted - argumentIdentifier._shadowedFunctionLiteral = path; - vars.declarations.push(t.variableDeclarator(argsId, argumentIdentifier)); - } - - var emitter = new _emit.Emitter(contextId); - emitter.explode(path.get("body")); - - if (vars && vars.declarations.length > 0) { - outerBody.push(vars); - } - - var wrapArgs = [emitter.getContextFunction(innerFnId), - // Async functions that are not generators don't care about the - // outer function because they don't need it to be marked and don't - // inherit from its .prototype. - node.generator ? outerFnExpr : t.nullLiteral(), t.thisExpression()]; - - var tryLocsList = emitter.getTryLocsList(); - if (tryLocsList) { - wrapArgs.push(tryLocsList); - } - - var wrapCall = t.callExpression(util.runtimeProperty(node.async ? "async" : "wrap"), wrapArgs); - - outerBody.push(t.returnStatement(wrapCall)); - node.body = t.blockStatement(outerBody); - - var oldDirectives = bodyBlockPath.node.directives; - if (oldDirectives) { - // Babylon represents directives like "use strict" as elements of - // a bodyBlockPath.node.directives array. (#248) - node.body.directives = oldDirectives; - } - - var wasGeneratorFunction = node.generator; - if (wasGeneratorFunction) { - node.generator = false; - } - - if (node.async) { - node.async = false; - } - - if (wasGeneratorFunction && t.isExpression(node)) { - util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty("mark"), [node])); - path.addComment("leading", "#__PURE__"); - } - - // Generators are processed in 'exit' handlers so that regenerator only has to run on - // an ES5 AST, but that means traversal will not pick up newly inserted references - // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue. - path.requeue(); - } - } -}; - -// Given a NodePath for a Function, return an Expression node that can be -// used to refer reliably to the function object from inside the function. -// This expression is essentially a replacement for arguments.callee, with -// the key advantage that it works in strict mode. -function getOuterFnExpr(funPath) { - var node = funPath.node; - t.assertFunction(node); - - if (!node.id) { - // Default-exported function declarations, and function expressions may not - // have a name to reference, so we explicitly add one. - node.id = funPath.scope.parent.generateUidIdentifier("callee"); - } - - if (node.generator && // Non-generator functions don't need to be marked. - t.isFunctionDeclaration(node)) { - // Return the identifier returned by runtime.mark(). - return getMarkedFunctionId(funPath); - } - - return node.id; -} - -var getMarkInfo = require("private").makeAccessor(); - -function getMarkedFunctionId(funPath) { - var node = funPath.node; - t.assertIdentifier(node.id); - - var blockPath = funPath.findParent(function (path) { - return path.isProgram() || path.isBlockStatement(); - }); - - if (!blockPath) { - return node.id; - } - - var block = blockPath.node; - _assert2.default.ok(Array.isArray(block.body)); - - var info = getMarkInfo(block); - if (!info.decl) { - info.decl = t.variableDeclaration("var", []); - blockPath.unshiftContainer("body", info.decl); - info.declPath = blockPath.get("body.0"); - } - - _assert2.default.strictEqual(info.declPath.node, info.decl); - - // Get a new unique identifier for our marked variable. - var markedId = blockPath.scope.generateUidIdentifier("marked"); - var markCallExp = t.callExpression(util.runtimeProperty("mark"), [node.id]); - - var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1; - - var markCallExpPath = info.declPath.get("declarations." + index + ".init"); - - _assert2.default.strictEqual(markCallExpPath.node, markCallExp); - - markCallExpPath.addComment("leading", "#__PURE__"); - - return markedId; -} - -function renameArguments(funcPath, argsId) { - var state = { - didRenameArguments: false, - argsId: argsId - }; - - funcPath.traverse(argumentsVisitor, state); - - // If the traversal replaced any arguments references, then we need to - // alias the outer function's arguments binding (be it the implicit - // arguments object or some other parameter or variable) to the variable - // named by argsId. - return state.didRenameArguments; -} - -var argumentsVisitor = { - "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) { - path.skip(); - }, - - Identifier: function Identifier(path, state) { - if (path.node.name === "arguments" && util.isReference(path)) { - util.replaceWithOrRemove(path, state.argsId); - state.didRenameArguments = true; - } - } -}; - -var functionSentVisitor = { - MetaProperty: function MetaProperty(path) { - var node = path.node; - - - if (node.meta.name === "function" && node.property.name === "sent") { - util.replaceWithOrRemove(path, t.memberExpression(this.context, t.identifier("_sent"))); - } - } -}; - -var awaitVisitor = { - Function: function Function(path) { - path.skip(); // Don't descend into nested function scopes. - }, - - AwaitExpression: function AwaitExpression(path) { - // Convert await expressions to yield expressions. - var argument = path.node.argument; - - // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` - // causes the argument to be wrapped in such a way that the runtime - // can distinguish between awaited and merely yielded values. - util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"), [argument]), false)); - } -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/package.json deleted file mode 100644 index 20afa77..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regenerator-transform@^0.10.0", - "scope": null, - "escapedName": "regenerator-transform", - "name": "regenerator-transform", - "rawSpec": "^0.10.0", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator" - ] - ], - "_from": "regenerator-transform@>=0.10.0 <0.11.0", - "_id": "regenerator-transform@0.10.1", - "_inCache": true, - "_location": "/regenerator-transform", - "_nodeVersion": "8.2.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/regenerator-transform-0.10.1.tgz_1503001769990_0.17979373037815094" - }, - "_npmUser": { - "name": "benjamn", - "email": "ben@benjamn.com" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "regenerator-transform@^0.10.0", - "scope": null, - "escapedName": "regenerator-transform", - "name": "regenerator-transform", - "rawSpec": "^0.10.0", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-regenerator" - ], - "_resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "_shasum": "1e4996837231da8b7f3cf4114d71b5691a0680dd", - "_shrinkwrap": null, - "_spec": "regenerator-transform@^0.10.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-regenerator", - "author": { - "name": "Ben Newman", - "email": "bn@cs.stanford.edu" - }, - "babel": { - "presets": [ - [ - "env", - { - "loose": true - } - ] - ], - "plugins": [ - "transform-runtime" - ] - }, - "dependencies": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - }, - "description": "Explode async and generator functions into a state machine.", - "devDependencies": { - "babel-cli": "^6.9.0", - "babel-plugin-transform-runtime": "^6.9.0", - "babel-preset-env": "^1.2.2" - }, - "directories": {}, - "dist": { - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "shasum": "1e4996837231da8b7f3cf4114d71b5691a0680dd", - "tarball": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz" - }, - "keywords": [ - "regenerator", - "runtime", - "generator", - "async" - ], - "license": "BSD", - "main": "lib/index.js", - "maintainers": [ - { - "name": "benjamn", - "email": "bn@cs.stanford.edu" - } - ], - "name": "regenerator-transform", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-transform" - }, - "scripts": { - "prepublish": "babel src/ --out-dir lib/" - }, - "version": "0.10.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/emit.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/emit.js deleted file mode 100644 index 9a3aa73..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/emit.js +++ /dev/null @@ -1,1184 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -import assert from "assert"; -import * as t from "babel-types"; -import * as leap from "./leap"; -import * as meta from "./meta"; -import * as util from "./util"; - -let hasOwn = Object.prototype.hasOwnProperty; - -function Emitter(contextId) { - assert.ok(this instanceof Emitter); - t.assertIdentifier(contextId); - - // Used to generate unique temporary names. - this.nextTempId = 0; - - // In order to make sure the context object does not collide with - // anything in the local scope, we might have to rename it, so we - // refer to it symbolically instead of just assuming that it will be - // called "context". - this.contextId = contextId; - - // An append-only list of Statements that grows each time this.emit is - // called. - this.listing = []; - - // A sparse array whose keys correspond to locations in this.listing - // that have been marked as branch/jump targets. - this.marked = [true]; - - // The last location will be marked when this.getDispatchLoop is - // called. - this.finalLoc = loc(); - - // A list of all leap.TryEntry statements emitted. - this.tryEntries = []; - - // Each time we evaluate the body of a loop, we tell this.leapManager - // to enter a nested loop context that determines the meaning of break - // and continue statements therein. - this.leapManager = new leap.LeapManager(this); -} - -let Ep = Emitter.prototype; -exports.Emitter = Emitter; - -// Offsets into this.listing that could be used as targets for branches or -// jumps are represented as numeric Literal nodes. This representation has -// the amazingly convenient benefit of allowing the exact value of the -// location to be determined at any time, even after generating code that -// refers to the location. -function loc() { - return t.numericLiteral(-1); -} - -// Sets the exact value of the given location to the offset of the next -// Statement emitted. -Ep.mark = function(loc) { - t.assertLiteral(loc); - let index = this.listing.length; - if (loc.value === -1) { - loc.value = index; - } else { - // Locations can be marked redundantly, but their values cannot change - // once set the first time. - assert.strictEqual(loc.value, index); - } - this.marked[index] = true; - return loc; -}; - -Ep.emit = function(node) { - if (t.isExpression(node)) { - node = t.expressionStatement(node); - } - - t.assertStatement(node); - this.listing.push(node); -}; - -// Shorthand for emitting assignment statements. This will come in handy -// for assignments to temporary variables. -Ep.emitAssign = function(lhs, rhs) { - this.emit(this.assign(lhs, rhs)); - return lhs; -}; - -// Shorthand for an assignment statement. -Ep.assign = function(lhs, rhs) { - return t.expressionStatement( - t.assignmentExpression("=", lhs, rhs)); -}; - -// Convenience function for generating expressions like context.next, -// context.sent, and context.rval. -Ep.contextProperty = function(name, computed) { - return t.memberExpression( - this.contextId, - computed ? t.stringLiteral(name) : t.identifier(name), - !!computed - ); -}; - -// Shorthand for setting context.rval and jumping to `context.stop()`. -Ep.stop = function(rval) { - if (rval) { - this.setReturnValue(rval); - } - - this.jump(this.finalLoc); -}; - -Ep.setReturnValue = function(valuePath) { - t.assertExpression(valuePath.value); - - this.emitAssign( - this.contextProperty("rval"), - this.explodeExpression(valuePath) - ); -}; - -Ep.clearPendingException = function(tryLoc, assignee) { - t.assertLiteral(tryLoc); - - let catchCall = t.callExpression( - this.contextProperty("catch", true), - [tryLoc] - ); - - if (assignee) { - this.emitAssign(assignee, catchCall); - } else { - this.emit(catchCall); - } -}; - -// Emits code for an unconditional jump to the given location, even if the -// exact value of the location is not yet known. -Ep.jump = function(toLoc) { - this.emitAssign(this.contextProperty("next"), toLoc); - this.emit(t.breakStatement()); -}; - -// Conditional jump. -Ep.jumpIf = function(test, toLoc) { - t.assertExpression(test); - t.assertLiteral(toLoc); - - this.emit(t.ifStatement( - test, - t.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - t.breakStatement() - ]) - )); -}; - -// Conditional jump, with the condition negated. -Ep.jumpIfNot = function(test, toLoc) { - t.assertExpression(test); - t.assertLiteral(toLoc); - - let negatedTest; - if (t.isUnaryExpression(test) && - test.operator === "!") { - // Avoid double negation. - negatedTest = test.argument; - } else { - negatedTest = t.unaryExpression("!", test); - } - - this.emit(t.ifStatement( - negatedTest, - t.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - t.breakStatement() - ]) - )); -}; - -// Returns a unique MemberExpression that can be used to store and -// retrieve temporary values. Since the object of the member expression is -// the context object, which is presumed to coexist peacefully with all -// other local variables, and since we just increment `nextTempId` -// monotonically, uniqueness is assured. -Ep.makeTempVar = function() { - return this.contextProperty("t" + this.nextTempId++); -}; - -Ep.getContextFunction = function(id) { - return t.functionExpression( - id || null/*Anonymous*/, - [this.contextId], - t.blockStatement([this.getDispatchLoop()]), - false, // Not a generator anymore! - false // Nor an expression. - ); -}; - -// Turns this.listing into a loop of the form -// -// while (1) switch (context.next) { -// case 0: -// ... -// case n: -// return context.stop(); -// } -// -// Each marked location in this.listing will correspond to one generated -// case statement. -Ep.getDispatchLoop = function() { - let self = this; - let cases = []; - let current; - - // If we encounter a break, continue, or return statement in a switch - // case, we can skip the rest of the statements until the next case. - let alreadyEnded = false; - - self.listing.forEach(function(stmt, i) { - if (self.marked.hasOwnProperty(i)) { - cases.push(t.switchCase( - t.numericLiteral(i), - current = [])); - alreadyEnded = false; - } - - if (!alreadyEnded) { - current.push(stmt); - if (t.isCompletionStatement(stmt)) - alreadyEnded = true; - } - }); - - // Now that we know how many statements there will be in this.listing, - // we can finally resolve this.finalLoc.value. - this.finalLoc.value = this.listing.length; - - cases.push( - t.switchCase(this.finalLoc, [ - // Intentionally fall through to the "end" case... - ]), - - // So that the runtime can jump to the final location without having - // to know its offset, we provide the "end" case as a synonym. - t.switchCase(t.stringLiteral("end"), [ - // This will check/clear both context.thrown and context.rval. - t.returnStatement( - t.callExpression(this.contextProperty("stop"), []) - ) - ]) - ); - - return t.whileStatement( - t.numericLiteral(1), - t.switchStatement( - t.assignmentExpression( - "=", - this.contextProperty("prev"), - this.contextProperty("next") - ), - cases - ) - ); -}; - -Ep.getTryLocsList = function() { - if (this.tryEntries.length === 0) { - // To avoid adding a needless [] to the majority of runtime.wrap - // argument lists, force the caller to handle this case specially. - return null; - } - - let lastLocValue = 0; - - return t.arrayExpression( - this.tryEntries.map(function(tryEntry) { - let thisLocValue = tryEntry.firstLoc.value; - assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); - lastLocValue = thisLocValue; - - let ce = tryEntry.catchEntry; - let fe = tryEntry.finallyEntry; - - let locs = [ - tryEntry.firstLoc, - // The null here makes a hole in the array. - ce ? ce.firstLoc : null - ]; - - if (fe) { - locs[2] = fe.firstLoc; - locs[3] = fe.afterLoc; - } - - return t.arrayExpression(locs); - }) - ); -}; - -// All side effects must be realized in order. - -// If any subexpression harbors a leap, all subexpressions must be -// neutered of side effects. - -// No destructive modification of AST nodes. - -Ep.explode = function(path, ignoreResult) { - let node = path.node; - let self = this; - - t.assertNode(node); - - if (t.isDeclaration(node)) - throw getDeclError(node); - - if (t.isStatement(node)) - return self.explodeStatement(path); - - if (t.isExpression(node)) - return self.explodeExpression(path, ignoreResult); - - switch (node.type) { - case "Program": - return path.get("body").map( - self.explodeStatement, - self - ); - - case "VariableDeclarator": - throw getDeclError(node); - - // These node types should be handled by their parent nodes - // (ObjectExpression, SwitchStatement, and TryStatement, respectively). - case "Property": - case "SwitchCase": - case "CatchClause": - throw new Error( - node.type + " nodes should be handled by their parents"); - - default: - throw new Error( - "unknown Node of type " + - JSON.stringify(node.type)); - } -}; - -function getDeclError(node) { - return new Error( - "all declarations should have been transformed into " + - "assignments before the Exploder began its work: " + - JSON.stringify(node)); -} - -Ep.explodeStatement = function(path, labelId) { - let stmt = path.node; - let self = this; - let before, after, head; - - t.assertStatement(stmt); - - if (labelId) { - t.assertIdentifier(labelId); - } else { - labelId = null; - } - - // Explode BlockStatement nodes even if they do not contain a yield, - // because we don't want or need the curly braces. - if (t.isBlockStatement(stmt)) { - path.get("body").forEach(function (path) { - self.explodeStatement(path); - }); - return; - } - - if (!meta.containsLeap(stmt)) { - // Technically we should be able to avoid emitting the statement - // altogether if !meta.hasSideEffects(stmt), but that leads to - // confusing generated code (for instance, `while (true) {}` just - // disappears) and is probably a more appropriate job for a dedicated - // dead code elimination pass. - self.emit(stmt); - return; - } - - switch (stmt.type) { - case "ExpressionStatement": - self.explodeExpression(path.get("expression"), true); - break; - - case "LabeledStatement": - after = loc(); - - // Did you know you can break from any labeled block statement or - // control structure? Well, you can! Note: when a labeled loop is - // encountered, the leap.LabeledEntry created here will immediately - // enclose a leap.LoopEntry on the leap manager's stack, and both - // entries will have the same label. Though this works just fine, it - // may seem a bit redundant. In theory, we could check here to - // determine if stmt knows how to handle its own label; for example, - // stmt happens to be a WhileStatement and so we know it's going to - // establish its own LoopEntry when we explode it (below). Then this - // LabeledEntry would be unnecessary. Alternatively, we might be - // tempted not to pass stmt.label down into self.explodeStatement, - // because we've handled the label here, but that's a mistake because - // labeled loops may contain labeled continue statements, which is not - // something we can handle in this generic case. All in all, I think a - // little redundancy greatly simplifies the logic of this case, since - // it's clear that we handle all possible LabeledStatements correctly - // here, regardless of whether they interact with the leap manager - // themselves. Also remember that labels and break/continue-to-label - // statements are rare, and all of this logic happens at transform - // time, so it has no additional runtime cost. - self.leapManager.withEntry( - new leap.LabeledEntry(after, stmt.label), - function() { - self.explodeStatement(path.get("body"), stmt.label); - } - ); - - self.mark(after); - - break; - - case "WhileStatement": - before = loc(); - after = loc(); - - self.mark(before); - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - self.leapManager.withEntry( - new leap.LoopEntry(after, before, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - self.jump(before); - self.mark(after); - - break; - - case "DoWhileStatement": - let first = loc(); - let test = loc(); - after = loc(); - - self.mark(first); - self.leapManager.withEntry( - new leap.LoopEntry(after, test, labelId), - function() { self.explode(path.get("body")); } - ); - self.mark(test); - self.jumpIf(self.explodeExpression(path.get("test")), first); - self.mark(after); - - break; - - case "ForStatement": - head = loc(); - let update = loc(); - after = loc(); - - if (stmt.init) { - // We pass true here to indicate that if stmt.init is an expression - // then we do not care about its result. - self.explode(path.get("init"), true); - } - - self.mark(head); - - if (stmt.test) { - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - } else { - // No test means continue unconditionally. - } - - self.leapManager.withEntry( - new leap.LoopEntry(after, update, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - - self.mark(update); - - if (stmt.update) { - // We pass true here to indicate that if stmt.update is an - // expression then we do not care about its result. - self.explode(path.get("update"), true); - } - - self.jump(head); - - self.mark(after); - - break; - - case "TypeCastExpression": - return self.explodeExpression(path.get("expression")); - - case "ForInStatement": - head = loc(); - after = loc(); - - let keyIterNextFn = self.makeTempVar(); - self.emitAssign( - keyIterNextFn, - t.callExpression( - util.runtimeProperty("keys"), - [self.explodeExpression(path.get("right"))] - ) - ); - - self.mark(head); - - let keyInfoTmpVar = self.makeTempVar(); - self.jumpIf( - t.memberExpression( - t.assignmentExpression( - "=", - keyInfoTmpVar, - t.callExpression(keyIterNextFn, []) - ), - t.identifier("done"), - false - ), - after - ); - - self.emitAssign( - stmt.left, - t.memberExpression( - keyInfoTmpVar, - t.identifier("value"), - false - ) - ); - - self.leapManager.withEntry( - new leap.LoopEntry(after, head, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - - self.jump(head); - - self.mark(after); - - break; - - case "BreakStatement": - self.emitAbruptCompletion({ - type: "break", - target: self.leapManager.getBreakLoc(stmt.label) - }); - - break; - - case "ContinueStatement": - self.emitAbruptCompletion({ - type: "continue", - target: self.leapManager.getContinueLoc(stmt.label) - }); - - break; - - case "SwitchStatement": - // Always save the discriminant into a temporary variable in case the - // test expressions overwrite values like context.sent. - let disc = self.emitAssign( - self.makeTempVar(), - self.explodeExpression(path.get("discriminant")) - ); - - after = loc(); - let defaultLoc = loc(); - let condition = defaultLoc; - let caseLocs = []; - - // If there are no cases, .cases might be undefined. - let cases = stmt.cases || []; - - for (let i = cases.length - 1; i >= 0; --i) { - let c = cases[i]; - t.assertSwitchCase(c); - - if (c.test) { - condition = t.conditionalExpression( - t.binaryExpression("===", disc, c.test), - caseLocs[i] = loc(), - condition - ); - } else { - caseLocs[i] = defaultLoc; - } - } - - let discriminant = path.get("discriminant"); - util.replaceWithOrRemove(discriminant, condition); - self.jump(self.explodeExpression(discriminant)); - - self.leapManager.withEntry( - new leap.SwitchEntry(after), - function() { - path.get("cases").forEach(function(casePath) { - let i = casePath.key; - self.mark(caseLocs[i]); - - casePath.get("consequent").forEach(function (path) { - self.explodeStatement(path); - }); - }); - } - ); - - self.mark(after); - if (defaultLoc.value === -1) { - self.mark(defaultLoc); - assert.strictEqual(after.value, defaultLoc.value); - } - - break; - - case "IfStatement": - let elseLoc = stmt.alternate && loc(); - after = loc(); - - self.jumpIfNot( - self.explodeExpression(path.get("test")), - elseLoc || after - ); - - self.explodeStatement(path.get("consequent")); - - if (elseLoc) { - self.jump(after); - self.mark(elseLoc); - self.explodeStatement(path.get("alternate")); - } - - self.mark(after); - - break; - - case "ReturnStatement": - self.emitAbruptCompletion({ - type: "return", - value: self.explodeExpression(path.get("argument")) - }); - - break; - - case "WithStatement": - throw new Error("WithStatement not supported in generator functions."); - - case "TryStatement": - after = loc(); - - let handler = stmt.handler; - - let catchLoc = handler && loc(); - let catchEntry = catchLoc && new leap.CatchEntry( - catchLoc, - handler.param - ); - - let finallyLoc = stmt.finalizer && loc(); - let finallyEntry = finallyLoc && - new leap.FinallyEntry(finallyLoc, after); - - let tryEntry = new leap.TryEntry( - self.getUnmarkedCurrentLoc(), - catchEntry, - finallyEntry - ); - - self.tryEntries.push(tryEntry); - self.updateContextPrevLoc(tryEntry.firstLoc); - - self.leapManager.withEntry(tryEntry, function() { - self.explodeStatement(path.get("block")); - - if (catchLoc) { - if (finallyLoc) { - // If we have both a catch block and a finally block, then - // because we emit the catch block first, we need to jump over - // it to the finally block. - self.jump(finallyLoc); - - } else { - // If there is no finally block, then we need to jump over the - // catch block to the fall-through location. - self.jump(after); - } - - self.updateContextPrevLoc(self.mark(catchLoc)); - - let bodyPath = path.get("handler.body"); - let safeParam = self.makeTempVar(); - self.clearPendingException(tryEntry.firstLoc, safeParam); - - bodyPath.traverse(catchParamVisitor, { - safeParam: safeParam, - catchParamName: handler.param.name - }); - - self.leapManager.withEntry(catchEntry, function() { - self.explodeStatement(bodyPath); - }); - } - - if (finallyLoc) { - self.updateContextPrevLoc(self.mark(finallyLoc)); - - self.leapManager.withEntry(finallyEntry, function() { - self.explodeStatement(path.get("finalizer")); - }); - - self.emit(t.returnStatement(t.callExpression( - self.contextProperty("finish"), - [finallyEntry.firstLoc] - ))); - } - }); - - self.mark(after); - - break; - - case "ThrowStatement": - self.emit(t.throwStatement( - self.explodeExpression(path.get("argument")) - )); - - break; - - default: - throw new Error( - "unknown Statement of type " + - JSON.stringify(stmt.type)); - } -}; - -let catchParamVisitor = { - Identifier: function(path, state) { - if (path.node.name === state.catchParamName && util.isReference(path)) { - util.replaceWithOrRemove(path, state.safeParam); - } - }, - - Scope: function(path, state) { - if (path.scope.hasOwnBinding(state.catchParamName)) { - // Don't descend into nested scopes that shadow the catch - // parameter with their own declarations. - path.skip(); - } - } -}; - -Ep.emitAbruptCompletion = function(record) { - if (!isValidCompletion(record)) { - assert.ok( - false, - "invalid completion record: " + - JSON.stringify(record) - ); - } - - assert.notStrictEqual( - record.type, "normal", - "normal completions are not abrupt" - ); - - let abruptArgs = [t.stringLiteral(record.type)]; - - if (record.type === "break" || - record.type === "continue") { - t.assertLiteral(record.target); - abruptArgs[1] = record.target; - } else if (record.type === "return" || - record.type === "throw") { - if (record.value) { - t.assertExpression(record.value); - abruptArgs[1] = record.value; - } - } - - this.emit( - t.returnStatement( - t.callExpression( - this.contextProperty("abrupt"), - abruptArgs - ) - ) - ); -}; - -function isValidCompletion(record) { - let type = record.type; - - if (type === "normal") { - return !hasOwn.call(record, "target"); - } - - if (type === "break" || - type === "continue") { - return !hasOwn.call(record, "value") - && t.isLiteral(record.target); - } - - if (type === "return" || - type === "throw") { - return hasOwn.call(record, "value") - && !hasOwn.call(record, "target"); - } - - return false; -} - - -// Not all offsets into emitter.listing are potential jump targets. For -// example, execution typically falls into the beginning of a try block -// without jumping directly there. This method returns the current offset -// without marking it, so that a switch case will not necessarily be -// generated for this offset (I say "not necessarily" because the same -// location might end up being marked in the process of emitting other -// statements). There's no logical harm in marking such locations as jump -// targets, but minimizing the number of switch cases keeps the generated -// code shorter. -Ep.getUnmarkedCurrentLoc = function() { - return t.numericLiteral(this.listing.length); -}; - -// The context.prev property takes the value of context.next whenever we -// evaluate the switch statement discriminant, which is generally good -// enough for tracking the last location we jumped to, but sometimes -// context.prev needs to be more precise, such as when we fall -// successfully out of a try block and into a finally block without -// jumping. This method exists to update context.prev to the freshest -// available location. If we were implementing a full interpreter, we -// would know the location of the current instruction with complete -// precision at all times, but we don't have that luxury here, as it would -// be costly and verbose to set context.prev before every statement. -Ep.updateContextPrevLoc = function(loc) { - if (loc) { - t.assertLiteral(loc); - - if (loc.value === -1) { - // If an uninitialized location literal was passed in, set its value - // to the current this.listing.length. - loc.value = this.listing.length; - } else { - // Otherwise assert that the location matches the current offset. - assert.strictEqual(loc.value, this.listing.length); - } - - } else { - loc = this.getUnmarkedCurrentLoc(); - } - - // Make sure context.prev is up to date in case we fell into this try - // statement without jumping to it. TODO Consider avoiding this - // assignment when we know control must have jumped here. - this.emitAssign(this.contextProperty("prev"), loc); -}; - -Ep.explodeExpression = function(path, ignoreResult) { - let expr = path.node; - if (expr) { - t.assertExpression(expr); - } else { - return expr; - } - - let self = this; - let result; // Used optionally by several cases below. - let after; - - function finish(expr) { - t.assertExpression(expr); - if (ignoreResult) { - self.emit(expr); - } else { - return expr; - } - } - - // If the expression does not contain a leap, then we either emit the - // expression as a standalone statement or return it whole. - if (!meta.containsLeap(expr)) { - return finish(expr); - } - - // If any child contains a leap (such as a yield or labeled continue or - // break statement), then any sibling subexpressions will almost - // certainly have to be exploded in order to maintain the order of their - // side effects relative to the leaping child(ren). - let hasLeapingChildren = meta.containsLeap.onlyChildren(expr); - - // In order to save the rest of explodeExpression from a combinatorial - // trainwreck of special cases, explodeViaTempVar is responsible for - // deciding when a subexpression needs to be "exploded," which is my - // very technical term for emitting the subexpression as an assignment - // to a temporary variable and the substituting the temporary variable - // for the original subexpression. Think of exploded view diagrams, not - // Michael Bay movies. The point of exploding subexpressions is to - // control the precise order in which the generated code realizes the - // side effects of those subexpressions. - function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { - assert.ok( - !ignoreChildResult || !tempVar, - "Ignoring the result of a child expression but forcing it to " + - "be assigned to a temporary variable?" - ); - - let result = self.explodeExpression(childPath, ignoreChildResult); - - if (ignoreChildResult) { - // Side effects already emitted above. - - } else if (tempVar || (hasLeapingChildren && - !t.isLiteral(result))) { - // If tempVar was provided, then the result will always be assigned - // to it, even if the result does not otherwise need to be assigned - // to a temporary variable. When no tempVar is provided, we have - // the flexibility to decide whether a temporary variable is really - // necessary. Unfortunately, in general, a temporary variable is - // required whenever any child contains a yield expression, since it - // is difficult to prove (at all, let alone efficiently) whether - // this result would evaluate to the same value before and after the - // yield (see #206). One narrow case where we can prove it doesn't - // matter (and thus we do not need a temporary variable) is when the - // result in question is a Literal value. - result = self.emitAssign( - tempVar || self.makeTempVar(), - result - ); - } - return result; - } - - // If ignoreResult is true, then we must take full responsibility for - // emitting the expression with all its side effects, and we should not - // return a result. - - switch (expr.type) { - case "MemberExpression": - return finish(t.memberExpression( - self.explodeExpression(path.get("object")), - expr.computed - ? explodeViaTempVar(null, path.get("property")) - : expr.property, - expr.computed - )); - - case "CallExpression": - let calleePath = path.get("callee"); - let argsPath = path.get("arguments"); - - let newCallee; - let newArgs = []; - - let hasLeapingArgs = false; - argsPath.forEach(function(argPath) { - hasLeapingArgs = hasLeapingArgs || - meta.containsLeap(argPath.node); - }); - - if (t.isMemberExpression(calleePath.node)) { - if (hasLeapingArgs) { - // If the arguments of the CallExpression contained any yield - // expressions, then we need to be sure to evaluate the callee - // before evaluating the arguments, but if the callee was a member - // expression, then we must be careful that the object of the - // member expression still gets bound to `this` for the call. - - let newObject = explodeViaTempVar( - // Assign the exploded callee.object expression to a temporary - // variable so that we can use it twice without reevaluating it. - self.makeTempVar(), - calleePath.get("object") - ); - - let newProperty = calleePath.node.computed - ? explodeViaTempVar(null, calleePath.get("property")) - : calleePath.node.property; - - newArgs.unshift(newObject); - - newCallee = t.memberExpression( - t.memberExpression( - newObject, - newProperty, - calleePath.node.computed - ), - t.identifier("call"), - false - ); - - } else { - newCallee = self.explodeExpression(calleePath); - } - - } else { - newCallee = explodeViaTempVar(null, calleePath); - - if (t.isMemberExpression(newCallee)) { - // If the callee was not previously a MemberExpression, then the - // CallExpression was "unqualified," meaning its `this` object - // should be the global object. If the exploded expression has - // become a MemberExpression (e.g. a context property, probably a - // temporary variable), then we need to force it to be unqualified - // by using the (0, object.property)(...) trick; otherwise, it - // will receive the object of the MemberExpression as its `this` - // object. - newCallee = t.sequenceExpression([ - t.numericLiteral(0), - newCallee - ]); - } - } - - argsPath.forEach(function(argPath) { - newArgs.push(explodeViaTempVar(null, argPath)); - }); - - return finish(t.callExpression( - newCallee, - newArgs - )); - - case "NewExpression": - return finish(t.newExpression( - explodeViaTempVar(null, path.get("callee")), - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); - - case "ObjectExpression": - return finish(t.objectExpression( - path.get("properties").map(function(propPath) { - if (propPath.isObjectProperty()) { - return t.objectProperty( - propPath.node.key, - explodeViaTempVar(null, propPath.get("value")), - propPath.node.computed - ); - } else { - return propPath.node; - } - }) - )); - - case "ArrayExpression": - return finish(t.arrayExpression( - path.get("elements").map(function(elemPath) { - return explodeViaTempVar(null, elemPath); - }) - )); - - case "SequenceExpression": - let lastIndex = expr.expressions.length - 1; - - path.get("expressions").forEach(function(exprPath) { - if (exprPath.key === lastIndex) { - result = self.explodeExpression(exprPath, ignoreResult); - } else { - self.explodeExpression(exprPath, true); - } - }); - - return result; - - case "LogicalExpression": - after = loc(); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - let left = explodeViaTempVar(result, path.get("left")); - - if (expr.operator === "&&") { - self.jumpIfNot(left, after); - } else { - assert.strictEqual(expr.operator, "||"); - self.jumpIf(left, after); - } - - explodeViaTempVar(result, path.get("right"), ignoreResult); - - self.mark(after); - - return result; - - case "ConditionalExpression": - let elseLoc = loc(); - after = loc(); - let test = self.explodeExpression(path.get("test")); - - self.jumpIfNot(test, elseLoc); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - explodeViaTempVar(result, path.get("consequent"), ignoreResult); - self.jump(after); - - self.mark(elseLoc); - explodeViaTempVar(result, path.get("alternate"), ignoreResult); - - self.mark(after); - - return result; - - case "UnaryExpression": - return finish(t.unaryExpression( - expr.operator, - // Can't (and don't need to) break up the syntax of the argument. - // Think about delete a[b]. - self.explodeExpression(path.get("argument")), - !!expr.prefix - )); - - case "BinaryExpression": - return finish(t.binaryExpression( - expr.operator, - explodeViaTempVar(null, path.get("left")), - explodeViaTempVar(null, path.get("right")) - )); - - case "AssignmentExpression": - return finish(t.assignmentExpression( - expr.operator, - self.explodeExpression(path.get("left")), - self.explodeExpression(path.get("right")) - )); - - case "UpdateExpression": - return finish(t.updateExpression( - expr.operator, - self.explodeExpression(path.get("argument")), - expr.prefix - )); - - case "YieldExpression": - after = loc(); - let arg = expr.argument && self.explodeExpression(path.get("argument")); - - if (arg && expr.delegate) { - let result = self.makeTempVar(); - - self.emit(t.returnStatement(t.callExpression( - self.contextProperty("delegateYield"), [ - arg, - t.stringLiteral(result.property.name), - after - ] - ))); - - self.mark(after); - - return result; - } - - self.emitAssign(self.contextProperty("next"), after); - self.emit(t.returnStatement(arg || null)); - self.mark(after); - - return self.contextProperty("sent"); - - default: - throw new Error( - "unknown Expression of type " + - JSON.stringify(expr.type)); - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/hoist.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/hoist.js deleted file mode 100644 index 9181bdf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/hoist.js +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -import * as t from "babel-types"; -import * as util from "./util"; -let hasOwn = Object.prototype.hasOwnProperty; - -// The hoist function takes a FunctionExpression or FunctionDeclaration -// and replaces any Declaration nodes in its body with assignments, then -// returns a VariableDeclaration containing just the names of the removed -// declarations. -exports.hoist = function(funPath) { - t.assertFunction(funPath.node); - - let vars = {}; - - function varDeclToExpr(vdec, includeIdentifiers) { - t.assertVariableDeclaration(vdec); - // TODO assert.equal(vdec.kind, "var"); - let exprs = []; - - vdec.declarations.forEach(function(dec) { - // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't - // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly. - vars[dec.id.name] = t.identifier(dec.id.name); - - if (dec.init) { - exprs.push(t.assignmentExpression( - "=", dec.id, dec.init - )); - } else if (includeIdentifiers) { - exprs.push(dec.id); - } - }); - - if (exprs.length === 0) - return null; - - if (exprs.length === 1) - return exprs[0]; - - return t.sequenceExpression(exprs); - } - - funPath.get("body").traverse({ - VariableDeclaration: { - exit: function(path) { - let expr = varDeclToExpr(path.node, false); - if (expr === null) { - path.remove(); - } else { - // We don't need to traverse this expression any further because - // there can't be any new declarations inside an expression. - util.replaceWithOrRemove(path, t.expressionStatement(expr)); - } - - // Since the original node has been either removed or replaced, - // avoid traversing it any further. - path.skip(); - } - }, - - ForStatement: function(path) { - let init = path.node.init; - if (t.isVariableDeclaration(init)) { - util.replaceWithOrRemove(path.get("init"), varDeclToExpr(init, false)); - } - }, - - ForXStatement: function(path) { - let left = path.get("left"); - if (left.isVariableDeclaration()) { - util.replaceWithOrRemove(left, varDeclToExpr(left.node, true)); - } - }, - - FunctionDeclaration: function(path) { - let node = path.node; - vars[node.id.name] = node.id; - - let assignment = t.expressionStatement( - t.assignmentExpression( - "=", - node.id, - t.functionExpression( - node.id, - node.params, - node.body, - node.generator, - node.expression - ) - ) - ); - - if (path.parentPath.isBlockStatement()) { - // Insert the assignment form before the first statement in the - // enclosing block. - path.parentPath.unshiftContainer("body", assignment); - - // Remove the function declaration now that we've inserted the - // equivalent assignment form at the beginning of the block. - path.remove(); - } else { - // If the parent node is not a block statement, then we can just - // replace the declaration with the equivalent assignment form - // without worrying about hoisting it. - util.replaceWithOrRemove(path, assignment); - } - - // Don't hoist variables out of inner functions. - path.skip(); - }, - - FunctionExpression: function(path) { - // Don't descend into nested function expressions. - path.skip(); - } - }); - - let paramNames = {}; - funPath.get("params").forEach(function(paramPath) { - let param = paramPath.node; - if (t.isIdentifier(param)) { - paramNames[param.name] = param; - } else { - // Variables declared by destructuring parameter patterns will be - // harmlessly re-declared. - } - }); - - let declarations = []; - - Object.keys(vars).forEach(function(name) { - if (!hasOwn.call(paramNames, name)) { - declarations.push(t.variableDeclarator(vars[name], null)); - } - }); - - if (declarations.length === 0) { - return null; // Be sure to handle this case! - } - - return t.variableDeclaration("var", declarations); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/index.js deleted file mode 100644 index 356f334..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -export default function (context) { - const plugin = { - visitor: require("./visit").visitor, - }; - - // Some presets manually call child presets, but fail to pass along the - // context object. Out of an abundance of caution, we verify that it - // exists first to avoid causing unnecessary breaking changes. - const version = context && context.version; - - // The "name" property is not allowed in older versions of Babel (6.x) - // and will cause the plugin validator to throw an exception. - if (version && parseInt(version, 10) >= 7) { - plugin.name = "regenerator-transform"; - } - - return plugin; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/leap.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/leap.js deleted file mode 100644 index 047a2bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/leap.js +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -import assert from "assert"; -import * as t from "babel-types"; -import { inherits } from "util"; - -function Entry() { - assert.ok(this instanceof Entry); -} - -function FunctionEntry(returnLoc) { - Entry.call(this); - t.assertLiteral(returnLoc); - this.returnLoc = returnLoc; -} - -inherits(FunctionEntry, Entry); -exports.FunctionEntry = FunctionEntry; - -function LoopEntry(breakLoc, continueLoc, label) { - Entry.call(this); - - t.assertLiteral(breakLoc); - t.assertLiteral(continueLoc); - - if (label) { - t.assertIdentifier(label); - } else { - label = null; - } - - this.breakLoc = breakLoc; - this.continueLoc = continueLoc; - this.label = label; -} - -inherits(LoopEntry, Entry); -exports.LoopEntry = LoopEntry; - -function SwitchEntry(breakLoc) { - Entry.call(this); - t.assertLiteral(breakLoc); - this.breakLoc = breakLoc; -} - -inherits(SwitchEntry, Entry); -exports.SwitchEntry = SwitchEntry; - -function TryEntry(firstLoc, catchEntry, finallyEntry) { - Entry.call(this); - - t.assertLiteral(firstLoc); - - if (catchEntry) { - assert.ok(catchEntry instanceof CatchEntry); - } else { - catchEntry = null; - } - - if (finallyEntry) { - assert.ok(finallyEntry instanceof FinallyEntry); - } else { - finallyEntry = null; - } - - // Have to have one or the other (or both). - assert.ok(catchEntry || finallyEntry); - - this.firstLoc = firstLoc; - this.catchEntry = catchEntry; - this.finallyEntry = finallyEntry; -} - -inherits(TryEntry, Entry); -exports.TryEntry = TryEntry; - -function CatchEntry(firstLoc, paramId) { - Entry.call(this); - - t.assertLiteral(firstLoc); - t.assertIdentifier(paramId); - - this.firstLoc = firstLoc; - this.paramId = paramId; -} - -inherits(CatchEntry, Entry); -exports.CatchEntry = CatchEntry; - -function FinallyEntry(firstLoc, afterLoc) { - Entry.call(this); - t.assertLiteral(firstLoc); - t.assertLiteral(afterLoc); - this.firstLoc = firstLoc; - this.afterLoc = afterLoc; -} - -inherits(FinallyEntry, Entry); -exports.FinallyEntry = FinallyEntry; - -function LabeledEntry(breakLoc, label) { - Entry.call(this); - - t.assertLiteral(breakLoc); - t.assertIdentifier(label); - - this.breakLoc = breakLoc; - this.label = label; -} - -inherits(LabeledEntry, Entry); -exports.LabeledEntry = LabeledEntry; - -function LeapManager(emitter) { - assert.ok(this instanceof LeapManager); - - let Emitter = require("./emit").Emitter; - assert.ok(emitter instanceof Emitter); - - this.emitter = emitter; - this.entryStack = [new FunctionEntry(emitter.finalLoc)]; -} - -let LMp = LeapManager.prototype; -exports.LeapManager = LeapManager; - -LMp.withEntry = function(entry, callback) { - assert.ok(entry instanceof Entry); - this.entryStack.push(entry); - try { - callback.call(this.emitter); - } finally { - let popped = this.entryStack.pop(); - assert.strictEqual(popped, entry); - } -}; - -LMp._findLeapLocation = function(property, label) { - for (let i = this.entryStack.length - 1; i >= 0; --i) { - let entry = this.entryStack[i]; - let loc = entry[property]; - if (loc) { - if (label) { - if (entry.label && - entry.label.name === label.name) { - return loc; - } - } else if (entry instanceof LabeledEntry) { - // Ignore LabeledEntry entries unless we are actually breaking to - // a label. - } else { - return loc; - } - } - } - - return null; -}; - -LMp.getBreakLoc = function(label) { - return this._findLeapLocation("breakLoc", label); -}; - -LMp.getContinueLoc = function(label) { - return this._findLeapLocation("continueLoc", label); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/meta.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/meta.js deleted file mode 100644 index 59568ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/meta.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -import assert from "assert"; -let m = require("private").makeAccessor(); -import * as t from "babel-types"; -let hasOwn = Object.prototype.hasOwnProperty; - -function makePredicate(propertyName, knownTypes) { - function onlyChildren(node) { - t.assertNode(node); - - // Assume no side effects until we find out otherwise. - let result = false; - - function check(child) { - if (result) { - // Do nothing. - } else if (Array.isArray(child)) { - child.some(check); - } else if (t.isNode(child)) { - assert.strictEqual(result, false); - result = predicate(child); - } - return result; - } - - let keys = t.VISITOR_KEYS[node.type]; - if (keys) { - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - let child = node[key]; - check(child); - } - } - - return result; - } - - function predicate(node) { - t.assertNode(node); - - let meta = m(node); - if (hasOwn.call(meta, propertyName)) - return meta[propertyName]; - - // Certain types are "opaque," which means they have no side - // effects or leaps and we don't care about their subexpressions. - if (hasOwn.call(opaqueTypes, node.type)) - return meta[propertyName] = false; - - if (hasOwn.call(knownTypes, node.type)) - return meta[propertyName] = true; - - return meta[propertyName] = onlyChildren(node); - } - - predicate.onlyChildren = onlyChildren; - - return predicate; -} - -let opaqueTypes = { - FunctionExpression: true, - ArrowFunctionExpression: true -}; - -// These types potentially have side effects regardless of what side -// effects their subexpressions have. -let sideEffectTypes = { - CallExpression: true, // Anything could happen! - ForInStatement: true, // Modifies the key variable. - UnaryExpression: true, // Think delete. - BinaryExpression: true, // Might invoke .toString() or .valueOf(). - AssignmentExpression: true, // Side-effecting by definition. - UpdateExpression: true, // Updates are essentially assignments. - NewExpression: true // Similar to CallExpression. -}; - -// These types are the direct cause of all leaps in control flow. -let leapTypes = { - YieldExpression: true, - BreakStatement: true, - ContinueStatement: true, - ReturnStatement: true, - ThrowStatement: true -}; - -// All leap types are also side effect types. -for (let type in leapTypes) { - if (hasOwn.call(leapTypes, type)) { - sideEffectTypes[type] = leapTypes[type]; - } -} - -exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); -exports.containsLeap = makePredicate("containsLeap", leapTypes); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/replaceShorthandObjectMethod.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/replaceShorthandObjectMethod.js deleted file mode 100644 index 72aaf8f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/replaceShorthandObjectMethod.js +++ /dev/null @@ -1,74 +0,0 @@ -import * as t from "babel-types"; -import * as util from "./util"; - -// this function converts a shorthand object generator method into a normal -// (non-shorthand) object property which is a generator function expression. for -// example, this: -// -// var foo = { -// *bar(baz) { return 5; } -// } -// -// should be replaced with: -// -// var foo = { -// bar: function*(baz) { return 5; } -// } -// -// to do this, it clones the parameter array and the body of the object generator -// method into a new FunctionExpression. -// -// this method can be passed any Function AST node path, and it will return -// either: -// a) the path that was passed in (iff the path did not need to be replaced) or -// b) the path of the new FunctionExpression that was created as a replacement -// (iff the path did need to be replaced) -// -// In either case, though, the caller can count on the fact that the return value -// is a Function AST node path. -// -// If this function is called with an AST node path that is not a Function (or with an -// argument that isn't an AST node path), it will throw an error. -export default function replaceShorthandObjectMethod(path) { - if (!path.node || !t.isFunction(path.node)) { - throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths."); - } - - // this function only replaces shorthand object methods (called ObjectMethod - // in Babel-speak). - if (!t.isObjectMethod(path.node)) { - return path; - } - - // this function only replaces generators. - if (!path.node.generator) { - return path; - } - - const parameters = path.node.params.map(function (param) { - return t.cloneDeep(param); - }) - - const functionExpression = t.functionExpression( - null, // id - parameters, // params - t.cloneDeep(path.node.body), // body - path.node.generator, - path.node.async - ); - - util.replaceWithOrRemove(path, - t.objectProperty( - t.cloneDeep(path.node.key), // key - functionExpression, //value - path.node.computed, // computed - false // shorthand - ) - ); - - // path now refers to the ObjectProperty AST node path, but we want to return a - // Function AST node path for the function expression we created. we know that - // the FunctionExpression we just created is the value of the ObjectProperty, - // so return the "value" path off of this path. - return path.get("value"); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/util.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/util.js deleted file mode 100644 index 420f955..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/util.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -import * as t from "babel-types"; - -export function runtimeProperty(name) { - return t.memberExpression( - t.identifier("regeneratorRuntime"), - t.identifier(name), - false - ); -} - -export function isReference(path) { - return path.isReferenced() || path.parentPath.isAssignmentExpression({ left: path.node }); -} - -export function replaceWithOrRemove(path, replacement) { - if (replacement) { - path.replaceWith(replacement) - } else { - path.remove(); - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/visit.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/visit.js deleted file mode 100644 index f8089a6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regenerator-transform/src/visit.js +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -"use strict"; - -import assert from "assert"; -import * as t from "babel-types"; -import { hoist } from "./hoist"; -import { Emitter } from "./emit"; -import replaceShorthandObjectMethod from "./replaceShorthandObjectMethod"; -import * as util from "./util"; - -exports.visitor = { - Function: { - exit: function(path, state) { - let node = path.node; - - if (node.generator) { - if (node.async) { - // Async generator - if (state.opts.asyncGenerators === false) return; - } else { - // Plain generator - if (state.opts.generators === false) return; - } - } else if (node.async) { - // Async function - if (state.opts.async === false) return; - } else { - // Not a generator or async function. - return; - } - - // if this is an ObjectMethod, we need to convert it to an ObjectProperty - path = replaceShorthandObjectMethod(path); - node = path.node; - - let contextId = path.scope.generateUidIdentifier("context"); - let argsId = path.scope.generateUidIdentifier("args"); - - path.ensureBlock(); - let bodyBlockPath = path.get("body"); - - if (node.async) { - bodyBlockPath.traverse(awaitVisitor); - } - - bodyBlockPath.traverse(functionSentVisitor, { - context: contextId - }); - - let outerBody = []; - let innerBody = []; - - bodyBlockPath.get("body").forEach(function(childPath) { - let node = childPath.node; - if (t.isExpressionStatement(node) && - t.isStringLiteral(node.expression)) { - // Babylon represents directives like "use strict" as elements - // of a bodyBlockPath.node.directives array, but they could just - // as easily be represented (by other parsers) as traditional - // string-literal-valued expression statements, so we need to - // handle that here. (#248) - outerBody.push(node); - } else if (node && node._blockHoist != null) { - outerBody.push(node); - } else { - innerBody.push(node); - } - }); - - if (outerBody.length > 0) { - // Only replace the inner body if we actually hoisted any statements - // to the outer body. - bodyBlockPath.node.body = innerBody; - } - - let outerFnExpr = getOuterFnExpr(path); - // Note that getOuterFnExpr has the side-effect of ensuring that the - // function has a name (so node.id will always be an Identifier), even - // if a temporary name has to be synthesized. - t.assertIdentifier(node.id); - let innerFnId = t.identifier(node.id.name + "$"); - - // Turn all declarations into vars, and replace the original - // declarations with equivalent assignment expressions. - let vars = hoist(path); - - let didRenameArguments = renameArguments(path, argsId); - if (didRenameArguments) { - vars = vars || t.variableDeclaration("var", []); - const argumentIdentifier = t.identifier("arguments"); - // we need to do this as otherwise arguments in arrow functions gets hoisted - argumentIdentifier._shadowedFunctionLiteral = path; - vars.declarations.push(t.variableDeclarator( - argsId, argumentIdentifier - )); - } - - let emitter = new Emitter(contextId); - emitter.explode(path.get("body")); - - if (vars && vars.declarations.length > 0) { - outerBody.push(vars); - } - - let wrapArgs = [ - emitter.getContextFunction(innerFnId), - // Async functions that are not generators don't care about the - // outer function because they don't need it to be marked and don't - // inherit from its .prototype. - node.generator ? outerFnExpr : t.nullLiteral(), - t.thisExpression() - ]; - - let tryLocsList = emitter.getTryLocsList(); - if (tryLocsList) { - wrapArgs.push(tryLocsList); - } - - let wrapCall = t.callExpression( - util.runtimeProperty(node.async ? "async" : "wrap"), - wrapArgs - ); - - outerBody.push(t.returnStatement(wrapCall)); - node.body = t.blockStatement(outerBody); - - const oldDirectives = bodyBlockPath.node.directives; - if (oldDirectives) { - // Babylon represents directives like "use strict" as elements of - // a bodyBlockPath.node.directives array. (#248) - node.body.directives = oldDirectives; - } - - let wasGeneratorFunction = node.generator; - if (wasGeneratorFunction) { - node.generator = false; - } - - if (node.async) { - node.async = false; - } - - if (wasGeneratorFunction && t.isExpression(node)) { - util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty("mark"), [node])) - path.addComment("leading", "#__PURE__"); - } - - // Generators are processed in 'exit' handlers so that regenerator only has to run on - // an ES5 AST, but that means traversal will not pick up newly inserted references - // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue. - path.requeue(); - } - } -}; - -// Given a NodePath for a Function, return an Expression node that can be -// used to refer reliably to the function object from inside the function. -// This expression is essentially a replacement for arguments.callee, with -// the key advantage that it works in strict mode. -function getOuterFnExpr(funPath) { - let node = funPath.node; - t.assertFunction(node); - - if (!node.id) { - // Default-exported function declarations, and function expressions may not - // have a name to reference, so we explicitly add one. - node.id = funPath.scope.parent.generateUidIdentifier("callee"); - } - - if (node.generator && // Non-generator functions don't need to be marked. - t.isFunctionDeclaration(node)) { - // Return the identifier returned by runtime.mark(). - return getMarkedFunctionId(funPath); - } - - return node.id; -} - -const getMarkInfo = require("private").makeAccessor(); - -function getMarkedFunctionId(funPath) { - const node = funPath.node; - t.assertIdentifier(node.id); - - const blockPath = funPath.findParent(function (path) { - return path.isProgram() || path.isBlockStatement(); - }); - - if (!blockPath) { - return node.id; - } - - const block = blockPath.node; - assert.ok(Array.isArray(block.body)); - - const info = getMarkInfo(block); - if (!info.decl) { - info.decl = t.variableDeclaration("var", []); - blockPath.unshiftContainer("body", info.decl); - info.declPath = blockPath.get("body.0"); - } - - assert.strictEqual(info.declPath.node, info.decl); - - // Get a new unique identifier for our marked variable. - const markedId = blockPath.scope.generateUidIdentifier("marked"); - const markCallExp = t.callExpression( - util.runtimeProperty("mark"), - [node.id] - ); - - const index = info.decl.declarations.push( - t.variableDeclarator(markedId, markCallExp) - ) - 1; - - const markCallExpPath = - info.declPath.get("declarations." + index + ".init"); - - assert.strictEqual(markCallExpPath.node, markCallExp); - - markCallExpPath.addComment("leading", "#__PURE__"); - - return markedId; -} - -function renameArguments(funcPath, argsId) { - let state = { - didRenameArguments: false, - argsId: argsId - }; - - funcPath.traverse(argumentsVisitor, state); - - // If the traversal replaced any arguments references, then we need to - // alias the outer function's arguments binding (be it the implicit - // arguments object or some other parameter or variable) to the variable - // named by argsId. - return state.didRenameArguments; -} - -let argumentsVisitor = { - "FunctionExpression|FunctionDeclaration": function(path) { - path.skip(); - }, - - Identifier: function(path, state) { - if (path.node.name === "arguments" && util.isReference(path)) { - util.replaceWithOrRemove(path, state.argsId); - state.didRenameArguments = true; - } - } -}; - -let functionSentVisitor = { - MetaProperty(path) { - let { node } = path; - - if (node.meta.name === "function" && node.property.name === "sent") { - util.replaceWithOrRemove(path, t.memberExpression(this.context, t.identifier("_sent"))); - } - } -}; - -let awaitVisitor = { - Function: function(path) { - path.skip(); // Don't descend into nested function scopes. - }, - - AwaitExpression: function(path) { - // Convert await expressions to yield expressions. - let argument = path.node.argument; - - // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` - // causes the argument to be wrapped in such a way that the runtime - // can distinguish between awaited and merely yielded values. - util.replaceWithOrRemove(path, t.yieldExpression( - t.callExpression( - util.runtimeProperty("awrap"), - [argument] - ), - false - )); - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/LICENSE deleted file mode 100644 index c0d7f13..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/README.md deleted file mode 100644 index 8c66014..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![NPM total downloads](https://img.shields.io/npm/dt/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-cache) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/regex-cache.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/regex-cache) - -> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save regex-cache -``` - -* Read [what this does](#what-this-does). -* See [the benchmarks](#benchmarks) - -## Usage - -Wrap a function like this: - -```js -var cache = require('regex-cache'); -var someRegex = cache(require('some-regex-lib')); -``` - -**Caching a regex** - -If you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first: - -```js -var cache = require('regex-cache'); - -function yourRegex(str, opts) { - // do stuff to str and opts - return new RegExp(str, opts.flags); -} - -var regex = cache(yourRegex); -``` - -## Recommendations - -### Use this when... - -* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not. -* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed. - -### Do not use this when... - -* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex. - -### Example benchmarks - -Performance results, with and without regex-cache: - -```bash -# no args passed (defaults) - with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled) - without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled) - -# string and six options passed - with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled) - without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled) - -# string only - with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled) - without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled) - -# one option passed - with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled) - without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled) - -# two options passed - with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled) - without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled) - -# six options passed - with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled) - without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled) - -# -# diminishing returns happen about here -# - -# ten options passed - with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled) - without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled) - -# twelve options passed - with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled) - without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled) - -# twenty options passed - with-cache x 661,125 ops/sec ±0.80% (93 runs sampled) - without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled) - -# -# when non-primitive values are compared -# - -# single value on the options is an object - with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled) - without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled) -``` - -## Run benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm run benchmarks -``` - -## What this does - -If you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors. - -When your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation. - -Using the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**. - -## About - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 31 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [MartinKolarik](https://github.com/MartinKolarik) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 01, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/index.js deleted file mode 100644 index df8c423..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/*! - * regex-cache - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var equal = require('is-equal-shallow'); -var basic = {}; -var cache = {}; - -/** - * Expose `regexCache` - */ - -module.exports = regexCache; - -/** - * Memoize the results of a call to the new RegExp constructor. - * - * @param {Function} fn [description] - * @param {String} str [description] - * @param {Options} options [description] - * @param {Boolean} nocompare [description] - * @return {RegExp} - */ - -function regexCache(fn, str, opts) { - var key = '_default_', regex, cached; - - if (!str && !opts) { - if (typeof fn !== 'function') { - return fn; - } - return basic[key] || (basic[key] = fn(str)); - } - - var isString = typeof str === 'string'; - if (isString) { - if (!opts) { - return basic[str] || (basic[str] = fn(str)); - } - key = str; - } else { - opts = str; - } - - cached = cache[key]; - if (cached && equal(cached.opts, opts)) { - return cached.regex; - } - - memo(key, opts, (regex = fn(str, opts))); - return regex; -} - -function memo(key, opts, regex) { - cache[key] = {regex: regex, opts: opts}; -} - -/** - * Expose `cache` - */ - -module.exports.cache = cache; -module.exports.basic = basic; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/package.json deleted file mode 100644 index 24aeb85..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regex-cache/package.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regex-cache@^0.4.2", - "scope": null, - "escapedName": "regex-cache", - "name": "regex-cache", - "rawSpec": "^0.4.2", - "spec": ">=0.4.2 <0.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch" - ] - ], - "_from": "regex-cache@>=0.4.2 <0.5.0", - "_id": "regex-cache@0.4.4", - "_inCache": true, - "_location": "/regex-cache", - "_nodeVersion": "8.4.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/regex-cache-0.4.4.tgz_1504279132002_0.2753396413754672" - }, - "_npmUser": { - "name": "doowb", - "email": "brian.woodward@gmail.com" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "regex-cache@^0.4.2", - "scope": null, - "escapedName": "regex-cache", - "name": "regex-cache", - "rawSpec": "^0.4.2", - "spec": ">=0.4.2 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "_shasum": "75bdc58a2a1496cec48a12835bc54c8d562336dd", - "_shrinkwrap": null, - "_spec": "regex-cache@^0.4.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/regex-cache/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Martin Kolárik", - "url": "https://kolarik.sk" - } - ], - "dependencies": { - "is-equal-shallow": "^0.1.3" - }, - "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.", - "devDependencies": { - "ansi-bold": "^0.1.1", - "benchmarked": "^0.1.5", - "gulp-format-md": "^0.1.7", - "micromatch": "^2.3.7", - "should": "^8.3.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "shasum": "75bdc58a2a1496cec48a12835bc54c8d562336dd", - "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "e5ced08e45d2cc2d286a9e7b5a574963f6577712", - "homepage": "https://github.com/jonschlinkert/regex-cache", - "keywords": [ - "cache", - "expression", - "regex", - "regexp", - "regular", - "regular expression", - "store", - "to-regex" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "regex-cache", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/regex-cache.git" - }, - "scripts": { - "benchmarks": "node benchmark", - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.4.4" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/LICENSE-MIT.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/README.md deleted file mode 100644 index 1f80cd8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# regexpu-core [![Build status](https://travis-ci.org/mathiasbynens/regexpu-core.svg?branch=master)](https://travis-ci.org/mathiasbynens/regexpu-core) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/regexpu-core/master.svg)](https://coveralls.io/r/mathiasbynens/regexpu-core) [![Dependency status](https://gemnasium.com/mathiasbynens/regexpu-core.svg)](https://gemnasium.com/mathiasbynens/regexpu-core) - -_regexpu_ is a source code transpiler that enables the use of ES6 Unicode regular expressions in JavaScript-of-today (ES5). - -_regexpu-core_ contains _regexpu_’s core functionality, i.e. `rewritePattern(pattern, flag)`, which enables rewriting regular expressions that make use of [the ES6 `u` flag](https://mathiasbynens.be/notes/es6-unicode-regex) into equivalent ES5-compatible regular expression patterns. - -## Installation - -To use _regexpu-core_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/): - -```bash -npm install regexpu-core --save-dev -``` - -Then, `require` it: - -```js -const rewritePattern = require('regexpu-core'); -``` - -## API - -This module exports a single function named `rewritePattern`. - -### `rewritePattern(pattern, flags)` - -This function takes a string that represents a regular expression pattern as well as a string representing its flags, and returns an ES5-compatible version of the pattern. - -```js -rewritePattern('foo.bar', 'u'); -// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar' - -rewritePattern('[\\u{1D306}-\\u{1D308}a-z]', 'u'); -// → '(?:[a-z]|\\uD834[\\uDF06-\\uDF08])' - -rewritePattern('[\\u{1D306}-\\u{1D308}a-z]', 'ui'); -// → '(?:[a-z\\u017F\\u212A]|\\uD834[\\uDF06-\\uDF08])' -``` - -_regexpu-core_ can rewrite non-ES6 regular expressions too, which is useful to demonstrate how their behavior changes once the `u` and `i` flags are added: - -```js -// In ES5, the dot operator only matches BMP symbols: -rewritePattern('foo.bar'); -// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uFFFF])bar' - -// But with the ES6 `u` flag, it matches astral symbols too: -rewritePattern('foo.bar', 'u'); -// → 'foo(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF])bar' -``` - -`rewritePattern` uses [regjsgen](https://github.com/d10/regjsgen), [regjsparser](https://github.com/jviereck/regjsparser), and [regenerate](https://github.com/mathiasbynens/regenerate) as internal dependencies. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_regexpu-core_ is available under the [MIT](https://mths.be/mit) license. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/character-class-escape-sets.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/character-class-escape-sets.js deleted file mode 100644 index fcc482e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/character-class-escape-sets.js +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. -var regenerate = require('regenerate'); - -exports.REGULAR = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0xFFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0xFFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0xFFFF) -}; - -exports.UNICODE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) -}; - -exports.UNICODE_IGNORE_CASE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F, 0x17F, 0x212A) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x4B, 0x53, 0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/iu-mappings.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/iu-mappings.json deleted file mode 100644 index dbf36a2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/data/iu-mappings.json +++ /dev/null @@ -1,296 +0,0 @@ -{ - "75": 8490, - "83": 383, - "107": 8490, - "115": 383, - "181": 924, - "197": 8491, - "383": 83, - "452": 453, - "453": 452, - "455": 456, - "456": 455, - "458": 459, - "459": 458, - "497": 498, - "498": 497, - "837": 8126, - "914": 976, - "917": 1013, - "920": 1012, - "921": 8126, - "922": 1008, - "924": 181, - "928": 982, - "929": 1009, - "931": 962, - "934": 981, - "937": 8486, - "962": 931, - "976": 914, - "977": 1012, - "981": 934, - "982": 928, - "1008": 922, - "1009": 929, - "1012": [ - 920, - 977 - ], - "1013": 917, - "7776": 7835, - "7835": 7776, - "8126": [ - 837, - 921 - ], - "8486": 937, - "8490": 75, - "8491": 197, - "66560": 66600, - "66561": 66601, - "66562": 66602, - "66563": 66603, - "66564": 66604, - "66565": 66605, - "66566": 66606, - "66567": 66607, - "66568": 66608, - "66569": 66609, - "66570": 66610, - "66571": 66611, - "66572": 66612, - "66573": 66613, - "66574": 66614, - "66575": 66615, - "66576": 66616, - "66577": 66617, - "66578": 66618, - "66579": 66619, - "66580": 66620, - "66581": 66621, - "66582": 66622, - "66583": 66623, - "66584": 66624, - "66585": 66625, - "66586": 66626, - "66587": 66627, - "66588": 66628, - "66589": 66629, - "66590": 66630, - "66591": 66631, - "66592": 66632, - "66593": 66633, - "66594": 66634, - "66595": 66635, - "66596": 66636, - "66597": 66637, - "66598": 66638, - "66599": 66639, - "66600": 66560, - "66601": 66561, - "66602": 66562, - "66603": 66563, - "66604": 66564, - "66605": 66565, - "66606": 66566, - "66607": 66567, - "66608": 66568, - "66609": 66569, - "66610": 66570, - "66611": 66571, - "66612": 66572, - "66613": 66573, - "66614": 66574, - "66615": 66575, - "66616": 66576, - "66617": 66577, - "66618": 66578, - "66619": 66579, - "66620": 66580, - "66621": 66581, - "66622": 66582, - "66623": 66583, - "66624": 66584, - "66625": 66585, - "66626": 66586, - "66627": 66587, - "66628": 66588, - "66629": 66589, - "66630": 66590, - "66631": 66591, - "66632": 66592, - "66633": 66593, - "66634": 66594, - "66635": 66595, - "66636": 66596, - "66637": 66597, - "66638": 66598, - "66639": 66599, - "68736": 68800, - "68737": 68801, - "68738": 68802, - "68739": 68803, - "68740": 68804, - "68741": 68805, - "68742": 68806, - "68743": 68807, - "68744": 68808, - "68745": 68809, - "68746": 68810, - "68747": 68811, - "68748": 68812, - "68749": 68813, - "68750": 68814, - "68751": 68815, - "68752": 68816, - "68753": 68817, - "68754": 68818, - "68755": 68819, - "68756": 68820, - "68757": 68821, - "68758": 68822, - "68759": 68823, - "68760": 68824, - "68761": 68825, - "68762": 68826, - "68763": 68827, - "68764": 68828, - "68765": 68829, - "68766": 68830, - "68767": 68831, - "68768": 68832, - "68769": 68833, - "68770": 68834, - "68771": 68835, - "68772": 68836, - "68773": 68837, - "68774": 68838, - "68775": 68839, - "68776": 68840, - "68777": 68841, - "68778": 68842, - "68779": 68843, - "68780": 68844, - "68781": 68845, - "68782": 68846, - "68783": 68847, - "68784": 68848, - "68785": 68849, - "68786": 68850, - "68800": 68736, - "68801": 68737, - "68802": 68738, - "68803": 68739, - "68804": 68740, - "68805": 68741, - "68806": 68742, - "68807": 68743, - "68808": 68744, - "68809": 68745, - "68810": 68746, - "68811": 68747, - "68812": 68748, - "68813": 68749, - "68814": 68750, - "68815": 68751, - "68816": 68752, - "68817": 68753, - "68818": 68754, - "68819": 68755, - "68820": 68756, - "68821": 68757, - "68822": 68758, - "68823": 68759, - "68824": 68760, - "68825": 68761, - "68826": 68762, - "68827": 68763, - "68828": 68764, - "68829": 68765, - "68830": 68766, - "68831": 68767, - "68832": 68768, - "68833": 68769, - "68834": 68770, - "68835": 68771, - "68836": 68772, - "68837": 68773, - "68838": 68774, - "68839": 68775, - "68840": 68776, - "68841": 68777, - "68842": 68778, - "68843": 68779, - "68844": 68780, - "68845": 68781, - "68846": 68782, - "68847": 68783, - "68848": 68784, - "68849": 68785, - "68850": 68786, - "71840": 71872, - "71841": 71873, - "71842": 71874, - "71843": 71875, - "71844": 71876, - "71845": 71877, - "71846": 71878, - "71847": 71879, - "71848": 71880, - "71849": 71881, - "71850": 71882, - "71851": 71883, - "71852": 71884, - "71853": 71885, - "71854": 71886, - "71855": 71887, - "71856": 71888, - "71857": 71889, - "71858": 71890, - "71859": 71891, - "71860": 71892, - "71861": 71893, - "71862": 71894, - "71863": 71895, - "71864": 71896, - "71865": 71897, - "71866": 71898, - "71867": 71899, - "71868": 71900, - "71869": 71901, - "71870": 71902, - "71871": 71903, - "71872": 71840, - "71873": 71841, - "71874": 71842, - "71875": 71843, - "71876": 71844, - "71877": 71845, - "71878": 71846, - "71879": 71847, - "71880": 71848, - "71881": 71849, - "71882": 71850, - "71883": 71851, - "71884": 71852, - "71885": 71853, - "71886": 71854, - "71887": 71855, - "71888": 71856, - "71889": 71857, - "71890": 71858, - "71891": 71859, - "71892": 71860, - "71893": 71861, - "71894": 71862, - "71895": 71863, - "71896": 71864, - "71897": 71865, - "71898": 71866, - "71899": 71867, - "71900": 71868, - "71901": 71869, - "71902": 71870, - "71903": 71871 -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/package.json deleted file mode 100644 index 09ab5d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regexpu-core@^2.0.0", - "scope": null, - "escapedName": "regexpu-core", - "name": "regexpu-core", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex" - ] - ], - "_from": "regexpu-core@>=2.0.0 <3.0.0", - "_id": "regexpu-core@2.0.0", - "_inCache": true, - "_location": "/regexpu-core", - "_nodeVersion": "5.2.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/regexpu-core-2.0.0.tgz_1454960202073_0.38952653063461185" - }, - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "raw": "regexpu-core@^2.0.0", - "scope": null, - "escapedName": "regexpu-core", - "name": "regexpu-core", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-plugin-transform-es2015-unicode-regex" - ], - "_resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "_shasum": "49d038837b8dcf8bfa5b9a42139938e6ea2ae240", - "_shrinkwrap": null, - "_spec": "regexpu-core@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-plugin-transform-es2015-unicode-regex", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/mathiasbynens/regexpu-core/issues" - }, - "dependencies": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - }, - "description": "regexpu’s core functionality (i.e. `rewritePattern(pattern, flag)`), capable of translating ES6 Unicode regular expressions to ES5.", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.4.0", - "jsesc": "^0.5.0", - "lodash": "^3.6.0", - "mocha": "^2.2.1", - "regexpu-fixtures": "^2.0.0", - "unicode-8.0.0": "^0.1.5" - }, - "directories": {}, - "dist": { - "shasum": "49d038837b8dcf8bfa5b9a42139938e6ea2ae240", - "tarball": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz" - }, - "files": [ - "LICENSE-MIT.txt", - "rewrite-pattern.js", - "data/character-class-escape-sets.js", - "data/iu-mappings.json" - ], - "gitHead": "ae4efe52b72ba73e9a2c0f35e11c2ff1d0e12dcd", - "homepage": "https://mths.be/regexpu", - "keywords": [ - "codegen", - "desugaring", - "ecmascript", - "es5", - "es6", - "harmony", - "javascript", - "refactoring", - "regex", - "regexp", - "regular expressions", - "rewriting", - "syntax", - "transformation", - "transpile", - "transpiler", - "unicode" - ], - "license": "MIT", - "main": "rewrite-pattern.js", - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - } - ], - "name": "regexpu-core", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mathiasbynens/regexpu-core.git" - }, - "scripts": { - "build": "node scripts/iu-mappings.js && node scripts/character-class-escape-sets.js", - "coverage": "istanbul cover --report html node_modules/.bin/_mocha tests/tests.js -- -u exports -R spec", - "test": "mocha tests" - }, - "version": "2.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/rewrite-pattern.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/rewrite-pattern.js deleted file mode 100644 index 47a7854..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core/rewrite-pattern.js +++ /dev/null @@ -1,193 +0,0 @@ -var generate = require('regjsgen').generate; -var parse = require('regjsparser').parse; -var regenerate = require('regenerate'); -var iuMappings = require('./data/iu-mappings.json'); -var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); - -function getCharacterClassEscapeSet(character) { - if (unicode) { - if (ignoreCase) { - return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; - } - return ESCAPE_SETS.UNICODE[character]; - } - return ESCAPE_SETS.REGULAR[character]; -} - -var object = {}; -var hasOwnProperty = object.hasOwnProperty; -function has(object, property) { - return hasOwnProperty.call(object, property); -} - -// Prepare a Regenerate set containing all code points, used for negative -// character classes (if any). -var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); -// Without the `u` flag, the range stops at 0xFFFF. -// https://mths.be/es6#sec-pattern-semantics -var BMP_SET = regenerate().addRange(0x0, 0xFFFF); - -// Prepare a Regenerate set containing all code points that are supposed to be -// matched by `/./u`. https://mths.be/es6#sec-atom -var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points - .remove( - // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): - 0x000A, // Line Feed - 0x000D, // Carriage Return - 0x2028, // Line Separator - 0x2029 // Paragraph Separator - ); -// Prepare a Regenerate set containing all code points that are supposed to be -// matched by `/./` (only BMP code points). -var DOT_SET = DOT_SET_UNICODE.clone() - .intersection(BMP_SET); - -// Add a range of code points + any case-folded code points in that range to a -// set. -regenerate.prototype.iuAddRange = function(min, max) { - var $this = this; - do { - var folded = caseFold(min); - if (folded) { - $this.add(folded); - } - } while (++min <= max); - return $this; -}; - -function assign(target, source) { - for (var key in source) { - // Note: `hasOwnProperty` is not needed here. - target[key] = source[key]; - } -} - -function update(item, pattern) { - // TODO: Test if memoizing `pattern` here is worth the effort. - if (!pattern) { - return; - } - var tree = parse(pattern, ''); - switch (tree.type) { - case 'characterClass': - case 'group': - case 'value': - // No wrapping needed. - break; - default: - // Wrap the pattern in a non-capturing group. - tree = wrap(tree, pattern); - } - assign(item, tree); -} - -function wrap(tree, pattern) { - // Wrap the pattern in a non-capturing group. - return { - 'type': 'group', - 'behavior': 'ignore', - 'body': [tree], - 'raw': '(?:' + pattern + ')' - }; -} - -function caseFold(codePoint) { - return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; -} - -var ignoreCase = false; -var unicode = false; -function processCharacterClass(characterClassItem) { - var set = regenerate(); - var body = characterClassItem.body.forEach(function(item) { - switch (item.type) { - case 'value': - set.add(item.codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(item.codePoint); - if (folded) { - set.add(folded); - } - } - break; - case 'characterClassRange': - var min = item.min.codePoint; - var max = item.max.codePoint; - set.addRange(min, max); - if (ignoreCase && unicode) { - set.iuAddRange(min, max); - } - break; - case 'characterClassEscape': - set.add(getCharacterClassEscapeSet(item.value)); - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - }); - if (characterClassItem.negative) { - set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); - } - update(characterClassItem, set.toString()); - return characterClassItem; -} - -function processTerm(item) { - switch (item.type) { - case 'dot': - update( - item, - (unicode ? DOT_SET_UNICODE : DOT_SET).toString() - ); - break; - case 'characterClass': - item = processCharacterClass(item); - break; - case 'characterClassEscape': - update( - item, - getCharacterClassEscapeSet(item.value).toString() - ); - break; - case 'alternative': - case 'disjunction': - case 'group': - case 'quantifier': - item.body = item.body.map(processTerm); - break; - case 'value': - var codePoint = item.codePoint; - var set = regenerate(codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(codePoint); - if (folded) { - set.add(folded); - } - } - update(item, set.toString()); - break; - case 'anchor': - case 'empty': - case 'group': - case 'reference': - // Nothing to do here. - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - return item; -}; - -module.exports = function(pattern, flags) { - var tree = parse(pattern, flags); - ignoreCase = flags ? flags.indexOf('i') > -1 : false; - unicode = flags ? flags.indexOf('u') > -1 : false; - assign(tree, processTerm(tree)); - return generate(tree); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/LICENSE.txt deleted file mode 100644 index 2aab83e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2014 Benjamin Tan (https://d10.github.io/) - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/README.md deleted file mode 100644 index 0a4dcd0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# RegJSGen - -Generate `RegExp`s from [RegJSParser](https://github.com/jviereck/regjsparser)’s AST. - -## Installation - -```bash -npm install --save regjsgen -``` - -## Usage - -```js -var regjsgen = require('regjsgen'); -// With `regjsparser` -var regjsparser = require('regjsparser'); -var regex = '^a$'; -var ast = regjsparser.parse(regex); -// Modify AST -// ... -// Regenerate `RegExp` -regex = regjsgen.generate(ast); -``` - -## See Also - - * [RegJSParser](https://github.com/jviereck/regjsparser) - * [RegExp.js](https://github.com/jviereck/regexp.js) - -## Testing - -Run the command - -```bash -npm test -``` - -To create a new reference file, execute - -```bash -node test/update-fixture.js -``` - -from the repo top directory. - -## Support - -Tested in Node.js 0.8.26~0.10.30. - -## Author - -| [![twitter/demoneaux](http://gravatar.com/avatar/029b19dba521584d83398ada3ecf6131?s=70)](https://twitter.com/demoneaux "Follow @demoneaux on Twitter") | -|---| -| [Benjamin Tan](http://d10.github.io/) | - -## Contributors - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/package.json deleted file mode 100644 index 78731b4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regjsgen@^0.2.0", - "scope": null, - "escapedName": "regjsgen", - "name": "regjsgen", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core" - ] - ], - "_from": "regjsgen@>=0.2.0 <0.3.0", - "_id": "regjsgen@0.2.0", - "_inCache": true, - "_location": "/regjsgen", - "_npmUser": { - "name": "d10", - "email": "demoneaux@gmail.com" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "raw": "regjsgen@^0.2.0", - "scope": null, - "escapedName": "regjsgen", - "name": "regjsgen", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/regexpu-core" - ], - "_resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "_shasum": "6c016adeac554f75823fe37ac05b92d5a4edb1f7", - "_shrinkwrap": null, - "_spec": "regjsgen@^0.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core", - "author": { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - "bugs": { - "url": "https://github.com/d10/regjsgen/issues" - }, - "contributors": [ - { - "name": "Benjamin Tan", - "email": "demoneaux@gmail.com", - "url": "https://d10.github.io/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "Generate `RegExp`s from RegJSParser’s AST", - "devDependencies": { - "got": "~1.2.0", - "jsesc": "~0.5.0" - }, - "directories": {}, - "dist": { - "shasum": "6c016adeac554f75823fe37ac05b92d5a4edb1f7", - "tarball": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz" - }, - "files": [ - "LICENSE.txt", - "regjsgen.js", - "README.md" - ], - "homepage": "https://github.com/d10/regjsgen", - "keywords": [ - "ast", - "generate", - "regex", - "regexp", - "regular expressions" - ], - "license": "MIT", - "main": "regjsgen.js", - "maintainers": [ - { - "name": "d10", - "email": "demoneaux@gmail.com" - } - ], - "name": "regjsgen", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/d10/regjsgen.git" - }, - "scripts": { - "test": "node test/test.js" - }, - "version": "0.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/regjsgen.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/regjsgen.js deleted file mode 100644 index 58ff151..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsgen/regjsgen.js +++ /dev/null @@ -1,408 +0,0 @@ -/*! - * RegJSGen - * Copyright 2014 Benjamin Tan - * Available under MIT license - */ -;(function() { - 'use strict'; - - /** Used to determine if values are of the language type `Object` */ - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used as a reference to the global object */ - var root = (objectTypes[typeof window] && window) || this; - - /** Backup possible global object */ - var oldRoot = root; - - /** Detect free variable `exports` */ - var freeExports = objectTypes[typeof exports] && exports; - - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ - - var stringFromCharCode = String.fromCharCode; - var floor = Math.floor; - function fromCodePoint() { - var MAX_SIZE = 0x4000; - var codeUnits = []; - var highSurrogate; - var lowSurrogate; - var index = -1; - var length = arguments.length; - if (!length) { - return ''; - } - var result = ''; - while (++index < length) { - var codePoint = Number(arguments[index]); - if ( - !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` - codePoint < 0 || // not a valid Unicode code point - codePoint > 0x10FFFF || // not a valid Unicode code point - floor(codePoint) != codePoint // not an integer - ) { - throw RangeError('Invalid code point: ' + codePoint); - } - if (codePoint <= 0xFFFF) { - // BMP code point - codeUnits.push(codePoint); - } else { - // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xD800; - lowSurrogate = (codePoint % 0x400) + 0xDC00; - codeUnits.push(highSurrogate, lowSurrogate); - } - if (index + 1 == length || codeUnits.length > MAX_SIZE) { - result += stringFromCharCode.apply(null, codeUnits); - codeUnits.length = 0; - } - } - return result; - } - - function assertType(type, expected) { - if (expected.indexOf('|') == -1) { - if (type == expected) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - expected = assertType.hasOwnProperty(expected) - ? assertType[expected] - : (assertType[expected] = RegExp('^(?:' + expected + ')$')); - - if (expected.test(type)) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generate(node) { - var type = node.type; - - if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { - return generate[type](node); - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generateAlternative(node) { - assertType(node.type, 'alternative'); - - var terms = node.body, - length = terms ? terms.length : 0; - - if (length == 1) { - return generateTerm(terms[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - result += generateTerm(terms[i]); - } - - return result; - } - } - - function generateAnchor(node) { - assertType(node.type, 'anchor'); - - switch (node.kind) { - case 'start': - return '^'; - case 'end': - return '$'; - case 'boundary': - return '\\b'; - case 'not-boundary': - return '\\B'; - default: - throw Error('Invalid assertion'); - } - } - - function generateAtom(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); - - return generate(node); - } - - function generateCharacterClass(node) { - assertType(node.type, 'characterClass'); - - var classRanges = node.body, - length = classRanges ? classRanges.length : 0; - - var i = -1, - result = '['; - - if (node.negative) { - result += '^'; - } - - while (++i < length) { - result += generateClassAtom(classRanges[i]); - } - - result += ']'; - - return result; - } - - function generateCharacterClassEscape(node) { - assertType(node.type, 'characterClassEscape'); - - return '\\' + node.value; - } - - function generateCharacterClassRange(node) { - assertType(node.type, 'characterClassRange'); - - var min = node.min, - max = node.max; - - if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { - throw Error('Invalid character class range'); - } - - return generateClassAtom(min) + '-' + generateClassAtom(max); - } - - function generateClassAtom(node) { - assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); - - return generate(node); - } - - function generateDisjunction(node) { - assertType(node.type, 'disjunction'); - - var body = node.body, - length = body ? body.length : 0; - - if (length == 0) { - throw Error('No body'); - } else if (length == 1) { - return generate(body[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - if (i != 0) { - result += '|'; - } - result += generate(body[i]); - } - - return result; - } - } - - function generateDot(node) { - assertType(node.type, 'dot'); - - return '.'; - } - - function generateGroup(node) { - assertType(node.type, 'group'); - - var result = '('; - - switch (node.behavior) { - case 'normal': - break; - case 'ignore': - result += '?:'; - break; - case 'lookahead': - result += '?='; - break; - case 'negativeLookahead': - result += '?!'; - break; - default: - throw Error('Invalid behaviour: ' + node.behaviour); - } - - var body = node.body, - length = body ? body.length : 0; - - if (length == 1) { - result += generate(body[0]); - } else { - var i = -1; - - while (++i < length) { - result += generate(body[i]); - } - } - - result += ')'; - - return result; - } - - function generateQuantifier(node) { - assertType(node.type, 'quantifier'); - - var quantifier = '', - min = node.min, - max = node.max; - - switch (max) { - case undefined: - case null: - switch (min) { - case 0: - quantifier = '*' - break; - case 1: - quantifier = '+'; - break; - default: - quantifier = '{' + min + ',}'; - break; - } - break; - default: - if (min == max) { - quantifier = '{' + min + '}'; - } - else if (min == 0 && max == 1) { - quantifier = '?'; - } else { - quantifier = '{' + min + ',' + max + '}'; - } - break; - } - - if (!node.greedy) { - quantifier += '?'; - } - - return generateAtom(node.body[0]) + quantifier; - } - - function generateReference(node) { - assertType(node.type, 'reference'); - - return '\\' + node.matchIndex; - } - - function generateTerm(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); - - return generate(node); - } - - function generateValue(node) { - assertType(node.type, 'value'); - - var kind = node.kind, - codePoint = node.codePoint; - - switch (kind) { - case 'controlLetter': - return '\\c' + fromCodePoint(codePoint + 64); - case 'hexadecimalEscape': - return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); - case 'identifier': - return '\\' + fromCodePoint(codePoint); - case 'null': - return '\\' + codePoint; - case 'octal': - return '\\' + codePoint.toString(8); - case 'singleEscape': - switch (codePoint) { - case 0x0008: - return '\\b'; - case 0x009: - return '\\t'; - case 0x00A: - return '\\n'; - case 0x00B: - return '\\v'; - case 0x00C: - return '\\f'; - case 0x00D: - return '\\r'; - default: - throw Error('Invalid codepoint: ' + codePoint); - } - case 'symbol': - return fromCodePoint(codePoint); - case 'unicodeEscape': - return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); - case 'unicodeCodePointEscape': - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - default: - throw Error('Unsupported node kind: ' + kind); - } - } - - /*--------------------------------------------------------------------------*/ - - generate.alternative = generateAlternative; - generate.anchor = generateAnchor; - generate.characterClass = generateCharacterClass; - generate.characterClassEscape = generateCharacterClassEscape; - generate.characterClassRange = generateCharacterClassRange; - generate.disjunction = generateDisjunction; - generate.dot = generateDot; - generate.group = generateGroup; - generate.quantifier = generateQuantifier; - generate.reference = generateReference; - generate.value = generateValue; - - /*--------------------------------------------------------------------------*/ - - // export regjsgen - // some AMD build optimizers, like r.js, check for condition patterns like the following: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // define as an anonymous module so, through path mapping, it can be aliased - define(function() { - return { - 'generate': generate - }; - }); - } - // check for `exports` after `define` in case a build optimizer adds an `exports` object - else if (freeExports && freeModule) { - // in Narwhal, Node.js, Rhino -require, or RingoJS - freeExports.generate = generate; - } - // in a browser or Rhino - else { - root.regjsgen = { - 'generate': generate - }; - } -}.call(this)); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/CHANGELOG b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/CHANGELOG deleted file mode 100644 index d2fe483..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/CHANGELOG +++ /dev/null @@ -1,12 +0,0 @@ -2014-08-31: Version 0.1.2 - * Change the field ref to matchIndex on the type=refernce node (issue #67) - -2014-08-30: Version 0.1.1 - * Only handled unicode code point escapes if 'u' flag is set (issue #56) - * Removed `matchIdx` from the AST - * References like /\1/ were broken (issue #57) - * Renamed type `ref` to `reference` in the AST - * Update regex to match identifier and include script to generate regex - -2014-06-29: Version 0.1.0 - * first tagged release diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/LICENSE.BSD b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/LICENSE.BSD deleted file mode 100644 index 3e580c3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/LICENSE.BSD +++ /dev/null @@ -1,19 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/README.md deleted file mode 100644 index 83f67e9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# RegJSParser - -Parsing the JavaScript's RegExp in JavaScript. - -## Installation - -```bash -npm install regjsparser -``` - -## Usage - -```js -var parse = require('regjsparser').parse; - -var parseTree = parse('^a'); // /^a/ -console.log(parseTree); -``` - -## Testing - -To run the tests, run the following command: - -```bash -npm test -``` - -To create a new reference file, execute… - -```bash -node test/update-fixtures.js -``` - -…from the repo top directory. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/bin/parser b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/bin/parser deleted file mode 100755 index 09a6036..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/bin/parser +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node -(function() { - - var fs = require('fs'); - var parse = require('../parser').parse; - var jsesc = require('jsesc'); - var regexes = process.argv.splice(2); - var first = regexes[0]; - var data; - var log = console.log; - var main = function() { - if (/^(?:-h|--help|undefined)$/.test(first)) { - log([ - '\nUsage:\n', - '\tregjsparser [regex ...]', - '\tregjsparser [-h | --help]', - '\nExamples:\n', - '\tregjsparser \'^foo.bar$\'', - '\tregjsparser \'[a-zA-Z0-9]\'' - ].join('\n')); - return process.exit(1); - } - - regexes.forEach(function(snippet) { - var result; - try { - result = parse(snippet); - log(jsesc(result, { - 'json': true, - 'compact': false, - 'indent': '\t' - })); - } catch(error) { - log(error.message + '\n'); - log('Error: failed to parse. Make sure the regular expression is valid.'); - log('If you think this is a bug in regjsparser, please report it:'); - log('\thttps://github.com/jviereck/regjsparser/issues/new'); - log('\nStack trace:\n'); - log(error.stack); - return process.exit(1); - } - }); - // Return with exit status 0 outside of the `forEach` loop, in case - // multiple regular expressions were passed in. - return process.exit(0); - }; - - main(); - -}()); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/.bin/jsesc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/.bin/jsesc deleted file mode 120000 index 7237604..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/.bin/jsesc +++ /dev/null @@ -1 +0,0 @@ -../jsesc/bin/jsesc \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/LICENSE-MIT.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/LICENSE-MIT.txt deleted file mode 100644 index 97067e5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/README.md deleted file mode 100644 index 7a083c7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/README.md +++ /dev/null @@ -1,375 +0,0 @@ -# jsesc [![Build status](https://travis-ci.org/mathiasbynens/jsesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/jsesc) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/jsesc/master.svg)](https://coveralls.io/r/mathiasbynens/jsesc) [![Dependency status](https://gemnasium.com/mathiasbynens/jsesc.svg)](https://gemnasium.com/mathiasbynens/jsesc) - -This is a JavaScript library for [escaping JavaScript strings](http://mathiasbynens.be/notes/javascript-escapes) while generating the shortest possible valid ASCII-only output. [Here’s an online demo.](http://mothereff.in/js-escapes) - -This can be used to avoid [mojibake](http://en.wikipedia.org/wiki/Mojibake) and other encoding issues, or even to [avoid errors](https://twitter.com/annevk/status/380000829643571200) when passing JSON-formatted data (which may contain U+2028 LINE SEPARATOR, U+2029 PARAGRAPH SEPARATOR, or [lone surrogates](http://esdiscuss.org/topic/code-points-vs-unicode-scalar-values#content-14)) to a JavaScript parser or an UTF-8 encoder, respectively. - -Feel free to fork if you see possible improvements! - -## Installation - -Via [Bower](http://bower.io/): - -```bash -bower install jsesc -``` - -Via [Component](https://github.com/component/component): - -```bash -component install mathiasbynens/jsesc -``` - -Via [npm](http://npmjs.org/): - -```bash -npm install jsesc -``` - -In a browser: - -```html - -``` - -In [Node.js](http://nodejs.org/) and [RingoJS](http://ringojs.org/): - -```js -var jsesc = require('jsesc'); -``` - -In [Narwhal](http://narwhaljs.org/): - -```js -var jsesc = require('jsesc').jsesc; -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('jsesc.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'jsesc': 'path/to/jsesc' - } - }, - ['jsesc'], - function(jsesc) { - console.log(jsesc); - } -); -``` - -## API - -### `jsesc(value, options)` - -This function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in JavaScript strings](http://mathiasbynens.be/notes/javascript-escapes). The first supported value type is strings: - -```js -jsesc('Ich ♥ Bücher'); -// → 'Ich \\u2665 B\\xFCcher' - -jsesc('foo 𝌆 bar'); -// → 'foo \\uD834\\uDF06 bar' -``` - -Instead of a string, the `value` can also be an array, or an object. In such cases, `jsesc` will return a stringified version of the value where any characters that are not printable ASCII symbols are escaped in the same way. - -```js -// Escaping an array -jsesc([ - 'Ich ♥ Bücher', 'foo 𝌆 bar' -]); -// → '[\'Ich \\u2665 B\\xFCcher\',\'foo \\uD834\\uDF06 bar\']' - -// Escaping an object -jsesc({ - 'Ich ♥ Bücher': 'foo 𝌆 bar' -}); -// → '{\'Ich \\u2665 B\\xFCcher\':\'foo \\uD834\\uDF06 bar\'}' -``` - -The optional `options` argument accepts an object with the following options: - -#### `quotes` - -The default value for the `quotes` option is `'single'`. This means that any occurences of `'` in the input string will be escaped as `\'`, so that the output can be used in a string literal wrapped in single quotes. - -```js -jsesc('Lorem ipsum "dolor" sit \'amet\' etc.'); -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' - -jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'single' -}); -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' -// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc." -``` - -If you want to use the output as part of a string literal wrapped in double quotes, set the `quotes` option to `'double'`. - -```js -jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'double' -}); -// → 'Lorem ipsum \\"dolor\\" sit \'amet\' etc.' -// → "Lorem ipsum \\\"dolor\\\" sit 'amet' etc." -``` - -This setting also affects the output for arrays and objects: - -```js -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'quotes': 'double' -}); -// → '{"Ich \\u2665 B\\xFCcher":"foo \\uD834\\uDF06 bar"}' - -jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], { - 'quotes': 'double' -}); -// → '["Ich \\u2665 B\\xFCcher","foo \\uD834\\uDF06 bar"]' -``` - -#### `wrap` - -The `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output will be a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting. - -```js -jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'single', - 'wrap': true -}); -// → '\'Lorem ipsum "dolor" sit \\\'amet\\\' etc.\'' -// → "\'Lorem ipsum \"dolor\" sit \\\'amet\\\' etc.\'" - -jsesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'double', - 'wrap': true -}); -// → '"Lorem ipsum \\"dolor\\" sit \'amet\' etc."' -// → "\"Lorem ipsum \\\"dolor\\\" sit \'amet\' etc.\"" -``` - -#### `es6` - -The `es6` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, any astral Unicode symbols in the input will be escaped using [ECMAScript 6 Unicode code point escape sequences](http://mathiasbynens.be/notes/javascript-escapes#unicode-code-point) instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5 environments is a concern, don’t enable this setting. If the `json` setting is enabled, the value for the `es6` setting is ignored (as if it was `false`). - -```js -// By default, the `es6` option is disabled: -jsesc('foo 𝌆 bar 💩 baz'); -// → 'foo \\uD834\\uDF06 bar \\uD83D\\uDCA9 baz' - -// To explicitly disable it: -jsesc('foo 𝌆 bar 💩 baz', { - 'es6': false -}); -// → 'foo \\uD834\\uDF06 bar \\uD83D\\uDCA9 baz' - -// To enable it: -jsesc('foo 𝌆 bar 💩 baz', { - 'es6': true -}); -// → 'foo \\u{1D306} bar \\u{1F4A9} baz' -``` - -#### `escapeEverything` - -The `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output will be escaped, even printable ASCII symbols. - -```js -jsesc('lolwat"foo\'bar', { - 'escapeEverything': true -}); -// → '\\x6C\\x6F\\x6C\\x77\\x61\\x74\\"\\x66\\x6F\\x6F\\\'\\x62\\x61\\x72' -// → "\\x6C\\x6F\\x6C\\x77\\x61\\x74\\\"\\x66\\x6F\\x6F\\'\\x62\\x61\\x72" -``` - -This setting also affects the output for arrays and objects: - -```js -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'escapeEverything': true -}); -// → '{\'\x49\x63\x68\x20\u2665\x20\x42\xFC\x63\x68\x65\x72\':\'\x66\x6F\x6F\x20\uD834\uDF06\x20\x62\x61\x72\'}' -// → "{'\x49\x63\x68\x20\u2665\x20\x42\xFC\x63\x68\x65\x72':'\x66\x6F\x6F\x20\uD834\uDF06\x20\x62\x61\x72'}" - -jsesc([ 'Ich ♥ Bücher': 'foo 𝌆 bar' ], { - 'escapeEverything': true -}); -// → '[\'\x49\x63\x68\x20\u2665\x20\x42\xFC\x63\x68\x65\x72\',\'\x66\x6F\x6F\x20\uD834\uDF06\x20\x62\x61\x72\']' -``` - -#### `compact` - -The `compact` option takes a boolean value (`true` or `false`), and defaults to `true` (enabled). When enabled, the output for arrays and objects will be as compact as possible; it won’t be formatted nicely. - -```js -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'compact': true // this is the default -}); -// → '{\'Ich \u2665 B\xFCcher\':\'foo \uD834\uDF06 bar\'}' - -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'compact': false -}); -// → '{\n\t\'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}' - -jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], { - 'compact': false -}); -// → '[\n\t\'Ich \u2665 B\xFCcher\',\n\t\'foo \uD834\uDF06 bar\'\n]' -``` - -This setting has no effect on the output for strings. - -#### `indent` - -The `indent` option takes a string value, and defaults to `'\t'`. When the `compact` setting is enabled (`true`), the value of the `indent` option is used to format the output for arrays and objects. - -```js -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'compact': false, - 'indent': '\t' // this is the default -}); -// → '{\n\t\'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}' - -jsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, { - 'compact': false, - 'indent': ' ' -}); -// → '{\n \'Ich \u2665 B\xFCcher\': \'foo \uD834\uDF06 bar\'\n}' - -jsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], { - 'compact': false, - 'indent': ' ' -}); -// → '[\n \'Ich \u2665 B\xFCcher\',\n\ t\'foo \uD834\uDF06 bar\'\n]' -``` - -This setting has no effect on the output for strings. - -#### `json` - -The `json` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output is valid JSON. [Hexadecimal character escape sequences](http://mathiasbynens.be/notes/javascript-escapes#hexadecimal) and [the `\v` or `\0` escape sequences](http://mathiasbynens.be/notes/javascript-escapes#single) will not be used. Setting `json: true` implies `quotes: 'double', wrap: true, es6: false`, although these values can still be overridden if needed — but in such cases, the output won’t be valid JSON anymore. - -```js -jsesc('foo\x00bar\xFF\uFFFDbaz', { - 'json': true -}); -// → '"foo\\u0000bar\\u00FF\\uFFFDbaz"' - -jsesc({ 'foo\x00bar\xFF\uFFFDbaz': 'foo\x00bar\xFF\uFFFDbaz' }, { - 'json': true -}); -// → '{"foo\\u0000bar\\u00FF\\uFFFDbaz":"foo\\u0000bar\\u00FF\\uFFFDbaz"}' - -jsesc([ 'foo\x00bar\xFF\uFFFDbaz', 'foo\x00bar\xFF\uFFFDbaz' ], { - 'json': true -}); -// → '["foo\\u0000bar\\u00FF\\uFFFDbaz","foo\\u0000bar\\u00FF\\uFFFDbaz"]' - -// Values that are acceptable in JSON but aren’t strings, arrays, or object -// literals can’t be escaped, so they’ll just be preserved: -jsesc([ 'foo\x00bar', [1, '©', { 'foo': true, 'qux': null }], 42 ], { - 'json': true -}); -// → '["foo\\u0000bar",[1,"\\u00A9",{"foo":true,"qux":null}],42]' -// Values that aren’t allowed in JSON are run through `JSON.stringify()`: -jsesc([ undefined, -Infinity ], { - 'json': true -}); -// → '[null,null]' -``` - -**Note:** Using this option on objects or arrays that contain non-string values relies on `JSON.stringify()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](http://bestiejs.github.io/json3/). - -### `jsesc.version` - -A string representing the semantic version number. - -### Using the `jsesc` binary - -To use the `jsesc` binary in your shell, simply install jsesc globally using npm: - -```bash -npm install -g jsesc -``` - -After that you will be able to escape strings from the command line: - -```bash -$ jsesc 'föo ♥ bår 𝌆 baz' -f\xF6o \u2665 b\xE5r \uD834\uDF06 baz -``` - -To escape arrays or objects containing string values, use the `-o`/`--object` option: - -```bash -$ jsesc --object '{ "föo": "♥", "bår": "𝌆 baz" }' -{'f\xF6o':'\u2665','b\xE5r':'\uD834\uDF06 baz'} -``` - -To prettify the output in such cases, use the `-p`/`--pretty` option: - -```bash -$ jsesc --pretty '{ "föo": "♥", "bår": "𝌆 baz" }' -{ - 'f\xF6o': '\u2665', - 'b\xE5r': '\uD834\uDF06 baz' -} -``` - -For valid JSON output, use the `-j`/`--json` option: - -```bash -$ jsesc --json --pretty '{ "föo": "♥", "bår": "𝌆 baz" }' -{ - "f\u00F6o": "\u2665", - "b\u00E5r": "\uD834\uDF06 baz" -} -``` - -Read a local JSON file, escape any non-ASCII symbols, and save the result to a new file: - -```bash -$ jsesc --json --object < data-raw.json > data-escaped.json -``` - -Or do the same with an online JSON file: - -```bash -$ curl -sL "http://git.io/aorKgQ" | jsesc --json --object > data-escaped.json -``` - -See `jsesc --help` for the full list of options. - -## Support - -This library has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, and Rhino 1.7RC4. - -**Note:** Using the `json` option on objects or arrays that contain non-string values relies on `JSON.parse()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](http://bestiejs.github.io/json3/). - -## Unit tests & code coverage - -After cloning this repository, run `npm install` to install the dependencies needed for development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | - -## License - -This library is available under the [MIT](http://mths.be/mit) license. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/bin/jsesc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/bin/jsesc deleted file mode 100755 index 5900dd4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/bin/jsesc +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env node -(function() { - - var fs = require('fs'); - var stringEscape = require('../jsesc.js'); - var strings = process.argv.splice(2); - var stdin = process.stdin; - var data; - var timeout; - var isObject = false; - var options = {}; - var log = console.log; - - var main = function() { - var option = strings[0]; - - if (/^(?:-h|--help|undefined)$/.test(option)) { - log( - 'jsesc v%s - http://mths.be/jsesc', - stringEscape.version - ); - log([ - '\nUsage:\n', - '\tjsesc [string]', - '\tjsesc [-s | --single-quotes] [string]', - '\tjsesc [-d | --double-quotes] [string]', - '\tjsesc [-w | --wrap] [string]', - '\tjsesc [-e | --escape-everything] [string]', - '\tjsesc [-6 | --es6] [string]', - '\tjsesc [-j | --json] [string]', - '\tjsesc [-o | --object] [stringified_object]', // `JSON.parse()` the argument - '\tjsesc [-p | --pretty] [string]', // `compact: false` - '\tjsesc [-v | --version]', - '\tjsesc [-h | --help]', - '\nExamples:\n', - '\tjsesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tjsesc --json \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tjsesc --json --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tjsesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | jsesc' - ].join('\n')); - return process.exit(1); - } - - if (/^(?:-v|--version)$/.test(option)) { - log('v%s', stringEscape.version); - return process.exit(1); - } - - strings.forEach(function(string) { - // Process options - if (/^(?:-s|--single-quotes)$/.test(string)) { - options.quotes = 'single'; - return; - } - if (/^(?:-d|--double-quotes)$/.test(string)) { - options.quotes = 'double'; - return; - } - if (/^(?:-w|--wrap)$/.test(string)) { - options.wrap = true; - return; - } - if (/^(?:-6|--es6)$/.test(string)) { - options.es6 = true; - return; - } - if (/^(?:-e|--escape-everything)$/.test(string)) { - options.escapeEverything = true; - return; - } - if (/^(?:-j|--json)$/.test(string)) { - options.json = true; - return; - } - if (/^(?:-o|--object)$/.test(string)) { - isObject = true; - return; - } - if (/^(?:-p|--pretty)$/.test(string)) { - isObject = true; - options.compact = false; - return; - } - - // Process string(s) - var result; - try { - if (isObject) { - string = JSON.parse(string); - } - result = stringEscape(string, options); - log(result); - } catch(error) { - log(error.message + '\n'); - log('Error: failed to escape.'); - log('If you think this is a bug in jsesc, please report it:'); - log('https://github.com/mathiasbynens/jsesc/issues/new'); - log( - '\nStack trace using jsesc@%s:\n', - stringEscape.version - ); - log(error.stack); - return process.exit(1); - } - }); - // Return with exit status 0 outside of the `forEach` loop, in case - // multiple strings were passed in. - return process.exit(0); - - }; - - if (stdin.isTTY) { - // handle shell arguments - main(); - } else { - // Either the script is called from within a non-TTY context, - // or `stdin` content is being piped in. - if (!process.stdout.isTTY) { // called from a non-TTY context - timeout = setTimeout(function() { - // if no piped data arrived after a while, handle shell arguments - main(); - }, 250); - } - - data = ''; - stdin.on('data', function(chunk) { - clearTimeout(timeout); - data += chunk; - }); - stdin.on('end', function() { - strings.push(data.trim()); - main(); - }); - stdin.resume(); - } - -}()); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/jsesc.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/jsesc.js deleted file mode 100644 index 03bbd68..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/jsesc.js +++ /dev/null @@ -1,265 +0,0 @@ -/*! http://mths.be/jsesc v0.5.0 by @mathias */ -;(function(root) { - - // Detect free variables `exports` - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module` - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root` - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var forOwn = function(object, callback) { - var key; - for (key in object) { - if (hasOwnProperty.call(object, key)) { - callback(key, object[key]); - } - } - }; - - var extend = function(destination, source) { - if (!source) { - return destination; - } - forOwn(source, function(key, value) { - destination[key] = value; - }); - return destination; - }; - - var forEach = function(array, callback) { - var length = array.length; - var index = -1; - while (++index < length) { - callback(array[index]); - } - }; - - var toString = object.toString; - var isArray = function(value) { - return toString.call(value) == '[object Array]'; - }; - var isObject = function(value) { - // This is a very simple check, but it’s good enough for what we need. - return toString.call(value) == '[object Object]'; - }; - var isString = function(value) { - return typeof value == 'string' || - toString.call(value) == '[object String]'; - }; - var isFunction = function(value) { - // In a perfect world, the `typeof` check would be sufficient. However, - // in Chrome 1–12, `typeof /x/ == 'object'`, and in IE 6–8 - // `typeof alert == 'object'` and similar for other host objects. - return typeof value == 'function' || - toString.call(value) == '[object Function]'; - }; - - /*--------------------------------------------------------------------------*/ - - // http://mathiasbynens.be/notes/javascript-escapes#single - var singleEscapes = { - '"': '\\"', - '\'': '\\\'', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t' - // `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'. - // '\v': '\\x0B' - }; - var regexSingleEscape = /["'\\\b\f\n\r\t]/; - - var regexDigit = /[0-9]/; - var regexWhitelist = /[ !#-&\(-\[\]-~]/; - - var jsesc = function(argument, options) { - // Handle options - var defaults = { - 'escapeEverything': false, - 'quotes': 'single', - 'wrap': false, - 'es6': false, - 'json': false, - 'compact': true, - 'indent': '\t', - '__indent__': '' - }; - var json = options && options.json; - if (json) { - defaults.quotes = 'double'; - defaults.wrap = true; - } - options = extend(defaults, options); - if (options.quotes != 'single' && options.quotes != 'double') { - options.quotes = 'single'; - } - var quote = options.quotes == 'double' ? '"' : '\''; - var compact = options.compact; - var indent = options.indent; - var oldIndent; - var newLine = compact ? '' : '\n'; - var result; - var isEmpty = true; - - if (json && argument && isFunction(argument.toJSON)) { - argument = argument.toJSON(); - } - - if (!isString(argument)) { - if (isArray(argument)) { - result = []; - options.wrap = true; - oldIndent = options.__indent__; - indent += oldIndent; - options.__indent__ = indent; - forEach(argument, function(value) { - isEmpty = false; - result.push( - (compact ? '' : indent) + - jsesc(value, options) - ); - }); - if (isEmpty) { - return '[]'; - } - return '[' + newLine + result.join(',' + newLine) + newLine + - (compact ? '' : oldIndent) + ']'; - } else if (!isObject(argument)) { - if (json) { - // For some values (e.g. `undefined`, `function` objects), - // `JSON.stringify(value)` returns `undefined` (which isn’t valid - // JSON) instead of `'null'`. - return JSON.stringify(argument) || 'null'; - } - return String(argument); - } else { // it’s an object - result = []; - options.wrap = true; - oldIndent = options.__indent__; - indent += oldIndent; - options.__indent__ = indent; - forOwn(argument, function(key, value) { - isEmpty = false; - result.push( - (compact ? '' : indent) + - jsesc(key, options) + ':' + - (compact ? '' : ' ') + - jsesc(value, options) - ); - }); - if (isEmpty) { - return '{}'; - } - return '{' + newLine + result.join(',' + newLine) + newLine + - (compact ? '' : oldIndent) + '}'; - } - } - - var string = argument; - // Loop over each code unit in the string and escape it - var index = -1; - var length = string.length; - var first; - var second; - var codePoint; - result = ''; - while (++index < length) { - var character = string.charAt(index); - if (options.es6) { - first = string.charCodeAt(index); - if ( // check if it’s the start of a surrogate pair - first >= 0xD800 && first <= 0xDBFF && // high surrogate - length > index + 1 // there is a next code unit - ) { - second = string.charCodeAt(index + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - result += '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - index++; - continue; - } - } - } - if (!options.escapeEverything) { - if (regexWhitelist.test(character)) { - // It’s a printable ASCII character that is not `"`, `'` or `\`, - // so don’t escape it. - result += character; - continue; - } - if (character == '"') { - result += quote == character ? '\\"' : character; - continue; - } - if (character == '\'') { - result += quote == character ? '\\\'' : character; - continue; - } - } - if ( - character == '\0' && - !json && - !regexDigit.test(string.charAt(index + 1)) - ) { - result += '\\0'; - continue; - } - if (regexSingleEscape.test(character)) { - // no need for a `hasOwnProperty` check here - result += singleEscapes[character]; - continue; - } - var charCode = character.charCodeAt(0); - var hexadecimal = charCode.toString(16).toUpperCase(); - var longhand = hexadecimal.length > 2 || json; - var escaped = '\\' + (longhand ? 'u' : 'x') + - ('0000' + hexadecimal).slice(longhand ? -4 : -2); - result += escaped; - continue; - } - if (options.wrap) { - result = quote + result + quote; - } - return result; - }; - - jsesc.version = '0.5.0'; - - /*--------------------------------------------------------------------------*/ - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return jsesc; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = jsesc; - } else { // in Narwhal or RingoJS v0.7.0- - freeExports.jsesc = jsesc; - } - } else { // in Rhino or a web browser - root.jsesc = jsesc; - } - -}(this)); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/man/jsesc.1 b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/man/jsesc.1 deleted file mode 100644 index 5257768..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/man/jsesc.1 +++ /dev/null @@ -1,90 +0,0 @@ -.Dd October 25, 2013 -.Dt jsesc 1 -.Sh NAME -.Nm jsesc -.Nd escape strings for use in JavaScript string literals -.Sh SYNOPSIS -.Nm -.Op Fl s | -single-quotes Ar string -.br -.Op Fl d | -double-quotes Ar string -.br -.Op Fl w | -wrap Ar string -.br -.Op Fl 6 | -es6 Ar string -.br -.Op Fl e | -escape-everything Ar string -.br -.Op Fl j | -json Ar string -.br -.Op Fl p | -object Ar string -.br -.Op Fl p | -pretty Ar string -.br -.Op Fl v | -version -.br -.Op Fl h | -help -.Sh DESCRIPTION -.Nm -escapes strings for use in JavaScript string literals while generating the shortest possible valid ASCII-only output. -.Sh OPTIONS -.Bl -ohang -offset -.It Sy "-s, --single-quotes" -Escape any occurences of ' in the input string as \\', so that the output can be used in a JavaScript string literal wrapped in single quotes. -.It Sy "-d, --double-quotes" -Escape any occurences of " in the input string as \\", so that the output can be used in a JavaScript string literal wrapped in double quotes. -.It Sy "-w, --wrap" -Make sure the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified using the -.Ar -s | --single-quotes -or -.Ar -d | --double-quotes -settings. -.It Sy "-6, --es6" -Escape any astral Unicode symbols using ECMAScript 6 Unicode code point escape sequences. -.It Sy "-e, --escape-everything" -Escape all the symbols in the output, even printable ASCII symbols. -.It Sy "-j, --json" -Make sure the output is valid JSON. Hexadecimal character escape sequences and the \\v or \\0 escape sequences will not be used. Setting this flag enables the -.Ar -d | --double-quotes -and -.Ar -w | --wrap -settings. -.It Sy "-o, --object" -Treat the input as a JavaScript object rather than a string. Accepted values are flat arrays containing only string values, and flat objects containing only string values. -.It Sy "-p, --pretty" -Pretty-print the output for objects, using whitespace to make it more readable. Setting this flag enables the -.Ar -o | --object -setting. -.It Sy "-v, --version" -Print jsesc's version. -.It Sy "-h, --help" -Show the help screen. -.El -.Sh EXIT STATUS -The -.Nm jsesc -utility exits with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It Li 0 -.Nm -successfully escaped the given string and printed the result. -.It Li 1 -.Nm -wasn't instructed to escape anything (for example, the -.Ar --help -flag was set); or, an error occurred. -.El -.Sh EXAMPLES -.Bl -ohang -offset -.It Sy "jsesc 'foo bar baz'" -Print an escaped version of the given string. -.It Sy echo\ 'foo bar baz'\ |\ jsesc -Print an escaped version of the string that gets piped in. -.El -.Sh BUGS -jsesc's bug tracker is located at . -.Sh AUTHOR -Mathias Bynens -.Sh WWW - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/package.json deleted file mode 100644 index ac58a1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/node_modules/jsesc/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "jsesc@~0.5.0", - "scope": null, - "escapedName": "jsesc", - "name": "jsesc", - "rawSpec": "~0.5.0", - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser" - ] - ], - "_from": "jsesc@>=0.5.0 <0.6.0", - "_id": "jsesc@0.5.0", - "_inCache": true, - "_location": "/regjsparser/jsesc", - "_npmUser": { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - "_npmVersion": "1.4.9", - "_phantomChildren": {}, - "_requested": { - "raw": "jsesc@~0.5.0", - "scope": null, - "escapedName": "jsesc", - "name": "jsesc", - "rawSpec": "~0.5.0", - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/regjsparser" - ], - "_resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "_shasum": "e7dee66e35d6fc16f710fe91d5cf69f70f08911d", - "_shrinkwrap": null, - "_spec": "jsesc@~0.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser", - "author": { - "name": "Mathias Bynens", - "url": "http://mathiasbynens.be/" - }, - "bin": { - "jsesc": "bin/jsesc" - }, - "bugs": { - "url": "https://github.com/mathiasbynens/jsesc/issues" - }, - "dependencies": {}, - "description": "A JavaScript library for escaping JavaScript strings while generating the shortest possible valid output.", - "devDependencies": { - "coveralls": "^2.10.0", - "grunt": "^0.4.5", - "grunt-shell": "^0.7.0", - "grunt-template": "^0.2.3", - "istanbul": "^0.3.0", - "qunit-extras": "^1.2.0", - "qunitjs": "~1.11.0", - "regenerate": "^0.6.2", - "requirejs": "^2.1.14" - }, - "directories": { - "test": "tests" - }, - "dist": { - "shasum": "e7dee66e35d6fc16f710fe91d5cf69f70f08911d", - "tarball": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" - }, - "files": [ - "LICENSE-MIT.txt", - "jsesc.js", - "bin/", - "man/" - ], - "homepage": "http://mths.be/jsesc", - "keywords": [ - "string", - "escape", - "javascript", - "tool" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://mths.be/mit" - } - ], - "main": "jsesc.js", - "maintainers": [ - { - "name": "mathias", - "email": "mathias@qiwi.be" - } - ], - "man": [ - "man/jsesc.1" - ], - "name": "jsesc", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mathiasbynens/jsesc.git" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "version": "0.5.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/package.json deleted file mode 100644 index 0eada18..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "regjsparser@^0.1.4", - "scope": null, - "escapedName": "regjsparser", - "name": "regjsparser", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core" - ] - ], - "_from": "regjsparser@>=0.1.4 <0.2.0", - "_id": "regjsparser@0.1.5", - "_inCache": true, - "_location": "/regjsparser", - "_nodeVersion": "0.12.6", - "_npmUser": { - "name": "jviereck", - "email": "julian.viereck@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "regjsparser@^0.1.4", - "scope": null, - "escapedName": "regjsparser", - "name": "regjsparser", - "rawSpec": "^0.1.4", - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/regexpu-core" - ], - "_resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "_shasum": "7ee8f84dc6fa792d3fd0ae228d24bd949ead205c", - "_shrinkwrap": null, - "_spec": "regjsparser@^0.1.4", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/regexpu-core", - "author": { - "name": "'Julian Viereck'", - "email": "julian.viereck@gmail.com" - }, - "bin": { - "regjsparser": "bin/parser" - }, - "bugs": { - "url": "https://github.com/jviereck/regjsparser/issues" - }, - "dependencies": { - "jsesc": "~0.5.0" - }, - "description": "Parsing the JavaScript's RegExp in JavaScript.", - "devDependencies": { - "regenerate": "~1.0.1", - "unicode-7.0.0": "~0.1.5" - }, - "directories": {}, - "dist": { - "shasum": "7ee8f84dc6fa792d3fd0ae228d24bd949ead205c", - "tarball": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz" - }, - "files": [ - "bin/", - "LICENSE.BSD", - "parser.js", - "README.md" - ], - "gitHead": "0540a6a12bfe13659a29b217bf82455ce1ced0eb", - "homepage": "https://github.com/jviereck/regjsparser", - "license": "BSD", - "main": "./parser", - "maintainers": [ - { - "name": "jviereck", - "email": "julian.viereck@gmail.com" - } - ], - "name": "regjsparser", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/jviereck/regjsparser.git" - }, - "scripts": { - "test": "node test/index.js" - }, - "version": "0.1.5" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/parser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/parser.js deleted file mode 100644 index ae414a3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/regjsparser/parser.js +++ /dev/null @@ -1,962 +0,0 @@ -// regjsparser -// -// ================================================================== -// -// See ECMA-262 Standard: 15.10.1 -// -// NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the -// term "Anchor" is used. -// -// Pattern :: -// Disjunction -// -// Disjunction :: -// Alternative -// Alternative | Disjunction -// -// Alternative :: -// [empty] -// Alternative Term -// -// Term :: -// Anchor -// Atom -// Atom Quantifier -// -// Anchor :: -// ^ -// $ -// \ b -// \ B -// ( ? = Disjunction ) -// ( ? ! Disjunction ) -// -// Quantifier :: -// QuantifierPrefix -// QuantifierPrefix ? -// -// QuantifierPrefix :: -// * -// + -// ? -// { DecimalDigits } -// { DecimalDigits , } -// { DecimalDigits , DecimalDigits } -// -// Atom :: -// PatternCharacter -// . -// \ AtomEscape -// CharacterClass -// ( Disjunction ) -// ( ? : Disjunction ) -// -// PatternCharacter :: -// SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } | -// -// AtomEscape :: -// DecimalEscape -// CharacterEscape -// CharacterClassEscape -// -// CharacterEscape[U] :: -// ControlEscape -// c ControlLetter -// HexEscapeSequence -// RegExpUnicodeEscapeSequence[?U] (ES6) -// IdentityEscape[?U] -// -// ControlEscape :: -// one of f n r t v -// ControlLetter :: -// one of -// a b c d e f g h i j k l m n o p q r s t u v w x y z -// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z -// -// IdentityEscape :: -// SourceCharacter but not IdentifierPart -// -// -// -// DecimalEscape :: -// DecimalIntegerLiteral [lookahead ∉ DecimalDigit] -// -// CharacterClassEscape :: -// one of d D s S w W -// -// CharacterClass :: -// [ [lookahead ∉ {^}] ClassRanges ] -// [ ^ ClassRanges ] -// -// ClassRanges :: -// [empty] -// NonemptyClassRanges -// -// NonemptyClassRanges :: -// ClassAtom -// ClassAtom NonemptyClassRangesNoDash -// ClassAtom - ClassAtom ClassRanges -// -// NonemptyClassRangesNoDash :: -// ClassAtom -// ClassAtomNoDash NonemptyClassRangesNoDash -// ClassAtomNoDash - ClassAtom ClassRanges -// -// ClassAtom :: -// - -// ClassAtomNoDash -// -// ClassAtomNoDash :: -// SourceCharacter but not one of \ or ] or - -// \ ClassEscape -// -// ClassEscape :: -// DecimalEscape -// b -// CharacterEscape -// CharacterClassEscape - -(function() { - - function parse(str, flags) { - function addRaw(node) { - node.raw = str.substring(node.range[0], node.range[1]); - return node; - } - - function updateRawStart(node, start) { - node.range[0] = start; - return addRaw(node); - } - - function createAnchor(kind, rawLength) { - return addRaw({ - type: 'anchor', - kind: kind, - range: [ - pos - rawLength, - pos - ] - }); - } - - function createValue(kind, codePoint, from, to) { - return addRaw({ - type: 'value', - kind: kind, - codePoint: codePoint, - range: [from, to] - }); - } - - function createEscaped(kind, codePoint, value, fromOffset) { - fromOffset = fromOffset || 0; - return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); - } - - function createCharacter(matches) { - var _char = matches[0]; - var first = _char.charCodeAt(0); - if (hasUnicodeFlag) { - var second; - if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { - second = lookahead().charCodeAt(0); - if (second >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - pos++; - return createValue( - 'symbol', - (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, - pos - 2, pos); - } - } - } - return createValue('symbol', first, pos - 1, pos); - } - - function createDisjunction(alternatives, from, to) { - return addRaw({ - type: 'disjunction', - body: alternatives, - range: [ - from, - to - ] - }); - } - - function createDot() { - return addRaw({ - type: 'dot', - range: [ - pos - 1, - pos - ] - }); - } - - function createCharacterClassEscape(value) { - return addRaw({ - type: 'characterClassEscape', - value: value, - range: [ - pos - 2, - pos - ] - }); - } - - function createReference(matchIndex) { - return addRaw({ - type: 'reference', - matchIndex: parseInt(matchIndex, 10), - range: [ - pos - 1 - matchIndex.length, - pos - ] - }); - } - - function createGroup(behavior, disjunction, from, to) { - return addRaw({ - type: 'group', - behavior: behavior, - body: disjunction, - range: [ - from, - to - ] - }); - } - - function createQuantifier(min, max, from, to) { - if (to == null) { - from = pos - 1; - to = pos; - } - - return addRaw({ - type: 'quantifier', - min: min, - max: max, - greedy: true, - body: null, // set later on - range: [ - from, - to - ] - }); - } - - function createAlternative(terms, from, to) { - return addRaw({ - type: 'alternative', - body: terms, - range: [ - from, - to - ] - }); - } - - function createCharacterClass(classRanges, negative, from, to) { - return addRaw({ - type: 'characterClass', - body: classRanges, - negative: negative, - range: [ - from, - to - ] - }); - } - - function createClassRange(min, max, from, to) { - // See 15.10.2.15: - if (min.codePoint > max.codePoint) { - bail('invalid range in character class', min.raw + '-' + max.raw, from, to); - } - - return addRaw({ - type: 'characterClassRange', - min: min, - max: max, - range: [ - from, - to - ] - }); - } - - function flattenBody(body) { - if (body.type === 'alternative') { - return body.body; - } else { - return [body]; - } - } - - function isEmpty(obj) { - return obj.type === 'empty'; - } - - function incr(amount) { - amount = (amount || 1); - var res = str.substring(pos, pos + amount); - pos += (amount || 1); - return res; - } - - function skip(value) { - if (!match(value)) { - bail('character', value); - } - } - - function match(value) { - if (str.indexOf(value, pos) === pos) { - return incr(value.length); - } - } - - function lookahead() { - return str[pos]; - } - - function current(value) { - return str.indexOf(value, pos) === pos; - } - - function next(value) { - return str[pos + 1] === value; - } - - function matchReg(regExp) { - var subStr = str.substring(pos); - var res = subStr.match(regExp); - if (res) { - res.range = []; - res.range[0] = pos; - incr(res[0].length); - res.range[1] = pos; - } - return res; - } - - function parseDisjunction() { - // Disjunction :: - // Alternative - // Alternative | Disjunction - var res = [], from = pos; - res.push(parseAlternative()); - - while (match('|')) { - res.push(parseAlternative()); - } - - if (res.length === 1) { - return res[0]; - } - - return createDisjunction(res, from, pos); - } - - function parseAlternative() { - var res = [], from = pos; - var term; - - // Alternative :: - // [empty] - // Alternative Term - while (term = parseTerm()) { - res.push(term); - } - - if (res.length === 1) { - return res[0]; - } - - return createAlternative(res, from, pos); - } - - function parseTerm() { - // Term :: - // Anchor - // Atom - // Atom Quantifier - - if (pos >= str.length || current('|') || current(')')) { - return null; /* Means: The term is empty */ - } - - var anchor = parseAnchor(); - - if (anchor) { - return anchor; - } - - var atom = parseAtom(); - if (!atom) { - bail('Expected atom'); - } - var quantifier = parseQuantifier() || false; - if (quantifier) { - quantifier.body = flattenBody(atom); - // The quantifier contains the atom. Therefore, the beginning of the - // quantifier range is given by the beginning of the atom. - updateRawStart(quantifier, atom.range[0]); - return quantifier; - } - return atom; - } - - function parseGroup(matchA, typeA, matchB, typeB) { - var type = null, from = pos; - - if (match(matchA)) { - type = typeA; - } else if (match(matchB)) { - type = typeB; - } else { - return false; - } - - var body = parseDisjunction(); - if (!body) { - bail('Expected disjunction'); - } - skip(')'); - var group = createGroup(type, flattenBody(body), from, pos); - - if (type == 'normal') { - // Keep track of the number of closed groups. This is required for - // parseDecimalEscape(). In case the string is parsed a second time the - // value already holds the total count and no incrementation is required. - if (firstIteration) { - closedCaptureCounter++; - } - } - return group; - } - - function parseAnchor() { - // Anchor :: - // ^ - // $ - // \ b - // \ B - // ( ? = Disjunction ) - // ( ? ! Disjunction ) - var res, from = pos; - - if (match('^')) { - return createAnchor('start', 1 /* rawLength */); - } else if (match('$')) { - return createAnchor('end', 1 /* rawLength */); - } else if (match('\\b')) { - return createAnchor('boundary', 2 /* rawLength */); - } else if (match('\\B')) { - return createAnchor('not-boundary', 2 /* rawLength */); - } else { - return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); - } - } - - function parseQuantifier() { - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits , } - // { DecimalDigits , DecimalDigits } - - var res, from = pos; - var quantifier; - var min, max; - - if (match('*')) { - quantifier = createQuantifier(0); - } - else if (match('+')) { - quantifier = createQuantifier(1); - } - else if (match('?')) { - quantifier = createQuantifier(0, 1); - } - else if (res = matchReg(/^\{([0-9]+)\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, min, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { - min = parseInt(res[1], 10); - max = parseInt(res[2], 10); - if (min > max) { - bail('numbers out of order in {} quantifier', '', from, pos); - } - quantifier = createQuantifier(min, max, res.range[0], res.range[1]); - } - - if (quantifier) { - if (match('?')) { - quantifier.greedy = false; - quantifier.range[1] += 1; - } - } - - return quantifier; - } - - function parseAtom() { - // Atom :: - // PatternCharacter - // . - // \ AtomEscape - // CharacterClass - // ( Disjunction ) - // ( ? : Disjunction ) - - var res; - - // jviereck: allow ']', '}' here as well to be compatible with browser's - // implementations: ']'.match(/]/); - // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { - if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { - // PatternCharacter - return createCharacter(res); - } - else if (match('.')) { - // . - return createDot(); - } - else if (match('\\')) { - // \ AtomEscape - res = parseAtomEscape(); - if (!res) { - bail('atomEscape'); - } - return res; - } - else if (res = parseCharacterClass()) { - return res; - } - else { - // ( Disjunction ) - // ( ? : Disjunction ) - return parseGroup('(?:', 'ignore', '(', 'normal'); - } - } - - function parseUnicodeSurrogatePairEscape(firstEscape) { - if (hasUnicodeFlag) { - var first, second; - if (firstEscape.kind == 'unicodeEscape' && - (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && - current('\\') && next('u') ) { - var prevPos = pos; - pos++; - var secondEscape = parseClassEscape(); - if (secondEscape.kind == 'unicodeEscape' && - (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - firstEscape.range[1] = secondEscape.range[1]; - firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - firstEscape.type = 'value'; - firstEscape.kind = 'unicodeCodePointEscape'; - addRaw(firstEscape); - } - else { - pos = prevPos; - } - } - } - return firstEscape; - } - - function parseClassEscape() { - return parseAtomEscape(true); - } - - function parseAtomEscape(insideCharacterClass) { - // AtomEscape :: - // DecimalEscape - // CharacterEscape - // CharacterClassEscape - - var res, from = pos; - - res = parseDecimalEscape(); - if (res) { - return res; - } - - // For ClassEscape - if (insideCharacterClass) { - if (match('b')) { - // 15.10.2.19 - // The production ClassEscape :: b evaluates by returning the - // CharSet containing the one character (Unicode value 0008). - return createEscaped('singleEscape', 0x0008, '\\b'); - } else if (match('B')) { - bail('\\B not possible inside of CharacterClass', '', from); - } - } - - res = parseCharacterEscape(); - - return res; - } - - - function parseDecimalEscape() { - // DecimalEscape :: - // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] - // CharacterClassEscape :: one of d D s S w W - - var res, match; - - if (res = matchReg(/^(?!0)\d+/)) { - match = res[0]; - var refIdx = parseInt(res[0], 10); - if (refIdx <= closedCaptureCounter) { - // If the number is smaller than the normal-groups found so - // far, then it is a reference... - return createReference(res[0]); - } else { - // ... otherwise it needs to be interpreted as a octal (if the - // number is in an octal format). If it is NOT octal format, - // then the slash is ignored and the number is matched later - // as normal characters. - - // Recall the negative decision to decide if the input must be parsed - // a second time with the total normal-groups. - backrefDenied.push(refIdx); - - // Reset the position again, as maybe only parts of the previous - // matched numbers are actual octal numbers. E.g. in '019' only - // the '01' should be matched. - incr(-res[0].length); - if (res = matchReg(/^[0-7]{1,3}/)) { - return createEscaped('octal', parseInt(res[0], 8), res[0], 1); - } else { - // If we end up here, we have a case like /\91/. Then the - // first slash is to be ignored and the 9 & 1 to be treated - // like ordinary characters. Create a character for the - // first number only here - other number-characters - // (if available) will be matched later. - res = createCharacter(matchReg(/^[89]/)); - return updateRawStart(res, res.range[0] - 1); - } - } - } - // Only allow octal numbers in the following. All matched numbers start - // with a zero (if the do not, the previous if-branch is executed). - // If the number is not octal format and starts with zero (e.g. `091`) - // then only the zeros `0` is treated here and the `91` are ordinary - // characters. - // Example: - // /\091/.exec('\091')[0].length === 3 - else if (res = matchReg(/^[0-7]{1,3}/)) { - match = res[0]; - if (/^0{1,3}$/.test(match)) { - // If they are all zeros, then only take the first one. - return createEscaped('null', 0x0000, '0', match.length + 1); - } else { - return createEscaped('octal', parseInt(match, 8), match, 1); - } - } else if (res = matchReg(/^[dDsSwW]/)) { - return createCharacterClassEscape(res[0]); - } - return false; - } - - function parseCharacterEscape() { - // CharacterEscape :: - // ControlEscape - // c ControlLetter - // HexEscapeSequence - // UnicodeEscapeSequence - // IdentityEscape - - var res; - if (res = matchReg(/^[fnrtv]/)) { - // ControlEscape - var codePoint = 0; - switch (res[0]) { - case 't': codePoint = 0x009; break; - case 'n': codePoint = 0x00A; break; - case 'v': codePoint = 0x00B; break; - case 'f': codePoint = 0x00C; break; - case 'r': codePoint = 0x00D; break; - } - return createEscaped('singleEscape', codePoint, '\\' + res[0]); - } else if (res = matchReg(/^c([a-zA-Z])/)) { - // c ControlLetter - return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); - } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { - // HexEscapeSequence - return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); - } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { - // UnicodeEscapeSequence - return parseUnicodeSurrogatePairEscape( - createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) - ); - } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { - // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) - return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); - } else { - // IdentityEscape - return parseIdentityEscape(); - } - } - - // Taken from the Esprima parser. - function isIdentifierPart(ch) { - // Generated by `tools/generate-identifier-regex.js`. - var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); - - return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) - (ch >= 65 && ch <= 90) || // A..Z - (ch >= 97 && ch <= 122) || // a..z - (ch >= 48 && ch <= 57) || // 0..9 - (ch === 92) || // \ (backslash) - ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); - } - - function parseIdentityEscape() { - // IdentityEscape :: - // SourceCharacter but not IdentifierPart - // - // - - var ZWJ = '\u200C'; - var ZWNJ = '\u200D'; - - var tmp; - - if (!isIdentifierPart(lookahead())) { - tmp = incr(); - return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); - } - - if (match(ZWJ)) { - // - return createEscaped('identifier', 0x200C, ZWJ); - } else if (match(ZWNJ)) { - // - return createEscaped('identifier', 0x200D, ZWNJ); - } - - return null; - } - - function parseCharacterClass() { - // CharacterClass :: - // [ [lookahead ∉ {^}] ClassRanges ] - // [ ^ ClassRanges ] - - var res, from = pos; - if (res = matchReg(/^\[\^/)) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, true, from, pos); - } else if (match('[')) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, false, from, pos); - } - - return null; - } - - function parseClassRanges() { - // ClassRanges :: - // [empty] - // NonemptyClassRanges - - var res; - if (current(']')) { - // Empty array means nothing insinde of the ClassRange. - return []; - } else { - res = parseNonemptyClassRanges(); - if (!res) { - bail('nonEmptyClassRanges'); - } - return res; - } - } - - function parseHelperClassRanges(atom) { - var from, to, res; - if (current('-') && !next(']')) { - // ClassAtom - ClassAtom ClassRanges - skip('-'); - - res = parseClassAtom(); - if (!res) { - bail('classAtom'); - } - to = pos; - var classRanges = parseClassRanges(); - if (!classRanges) { - bail('classRanges'); - } - from = atom.range[0]; - if (classRanges.type === 'empty') { - return [createClassRange(atom, res, from, to)]; - } - return [createClassRange(atom, res, from, to)].concat(classRanges); - } - - res = parseNonemptyClassRangesNoDash(); - if (!res) { - bail('nonEmptyClassRangesNoDash'); - } - - return [atom].concat(res); - } - - function parseNonemptyClassRanges() { - // NonemptyClassRanges :: - // ClassAtom - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - - var atom = parseClassAtom(); - if (!atom) { - bail('classAtom'); - } - - if (current(']')) { - // ClassAtom - return [atom]; - } - - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - return parseHelperClassRanges(atom); - } - - function parseNonemptyClassRangesNoDash() { - // NonemptyClassRangesNoDash :: - // ClassAtom - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - - var res = parseClassAtom(); - if (!res) { - bail('classAtom'); - } - if (current(']')) { - // ClassAtom - return res; - } - - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - return parseHelperClassRanges(res); - } - - function parseClassAtom() { - // ClassAtom :: - // - - // ClassAtomNoDash - if (match('-')) { - return createCharacter('-'); - } else { - return parseClassAtomNoDash(); - } - } - - function parseClassAtomNoDash() { - // ClassAtomNoDash :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape - - var res; - if (res = matchReg(/^[^\\\]-]/)) { - return createCharacter(res[0]); - } else if (match('\\')) { - res = parseClassEscape(); - if (!res) { - bail('classEscape'); - } - - return parseUnicodeSurrogatePairEscape(res); - } - } - - function bail(message, details, from, to) { - from = from == null ? pos : from; - to = to == null ? from : to; - - var contextStart = Math.max(0, from - 10); - var contextEnd = Math.min(to + 10, str.length); - - // Output a bit of context and a line pointing to where our error is. - // - // We are assuming that there are no actual newlines in the content as this is a regular expression. - var context = ' ' + str.substring(contextStart, contextEnd); - var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^'; - - throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer); - } - - var backrefDenied = []; - var closedCaptureCounter = 0; - var firstIteration = true; - var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; - var pos = 0; - - // Convert the input to a string and treat the empty string special. - str = String(str); - if (str === '') { - str = '(?:)'; - } - - var result = parseDisjunction(); - - if (result.range[1] !== str.length) { - bail('Could not parse entire input - got stuck', '', result.range[1]); - } - - // The spec requires to interpret the `\2` in `/\2()()/` as backreference. - // As the parser collects the number of capture groups as the string is - // parsed it is impossible to make these decisions at the point when the - // `\2` is handled. In case the local decision turns out to be wrong after - // the parsing has finished, the input string is parsed a second time with - // the total number of capture groups set. - // - // SEE: https://github.com/jviereck/regjsparser/issues/70 - for (var i = 0; i < backrefDenied.length; i++) { - if (backrefDenied[i] <= closedCaptureCounter) { - // Parse the input a second time. - pos = 0; - firstIteration = false; - return parseDisjunction(); - } - } - - return result; - } - - var regjsparser = { - parse: parse - }; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = regjsparser; - } else { - window.regjsparser = regjsparser; - } - -}()); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/history.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/history.md deleted file mode 100644 index e15e8a4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/history.md +++ /dev/null @@ -1,17 +0,0 @@ -## History - -### 1.1.0 - 16th Aug 2017 - -- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing - -### 1.0.2 - 07th Jun 2017 - -- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility - -### 1.0.1 - 25th Sep 2016 - -- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems - -### 1.0.0 - 24th Sep 2016 - -Initial release. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/index.js deleted file mode 100644 index 512306b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/index.js +++ /dev/null @@ -1,17 +0,0 @@ -var isWin = process.platform === 'win32'; - -module.exports = function (str) { - var i = str.length - 1; - if (i < 2) { - return str; - } - while (isSeparator(str, i)) { - i--; - } - return str.substr(0, i + 1); -}; - -function isSeparator(str, i) { - var char = str[i]; - return i > 0 && (char === '/' || (isWin && char === '\\')); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/license deleted file mode 100644 index a169aff..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/license +++ /dev/null @@ -1,3 +0,0 @@ -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/package.json deleted file mode 100644 index 5385fc9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "remove-trailing-separator@^1.0.1", - "scope": null, - "escapedName": "remove-trailing-separator", - "name": "remove-trailing-separator", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-concat/node_modules/vinyl" - ] - ], - "_from": "remove-trailing-separator@>=1.0.1 <2.0.0", - "_id": "remove-trailing-separator@1.1.0", - "_inCache": true, - "_location": "/remove-trailing-separator", - "_nodeVersion": "7.6.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/remove-trailing-separator-1.1.0.tgz_1502872321750_0.834721862571314" - }, - "_npmUser": { - "name": "darsain", - "email": "darsain@gmail.com" - }, - "_npmVersion": "4.2.0", - "_phantomChildren": {}, - "_requested": { - "raw": "remove-trailing-separator@^1.0.1", - "scope": null, - "escapedName": "remove-trailing-separator", - "name": "remove-trailing-separator", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-concat/vinyl", - "/normalize-path" - ], - "_resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "_shasum": "c24bce2a283adad5bc3f58e0d48249b92379d8ef", - "_shrinkwrap": null, - "_spec": "remove-trailing-separator@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-concat/node_modules/vinyl", - "author": { - "name": "darsain" - }, - "bugs": { - "url": "https://github.com/darsain/remove-trailing-separator/issues" - }, - "dependencies": {}, - "description": "Removes separators from the end of the string.", - "devDependencies": { - "ava": "^0.16.0", - "coveralls": "^2.11.14", - "nyc": "^8.3.0", - "xo": "^0.16.0" - }, - "directories": {}, - "dist": { - "shasum": "c24bce2a283adad5bc3f58e0d48249b92379d8ef", - "tarball": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "f4e8acca09106efeef5a5164f1ad2192fe97fd69", - "homepage": "https://github.com/darsain/remove-trailing-separator#readme", - "keywords": [ - "remove", - "strip", - "trailing", - "separator" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "darsain", - "email": "darsain@gmail.com" - } - ], - "name": "remove-trailing-separator", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/darsain/remove-trailing-separator.git" - }, - "scripts": { - "lint": "xo", - "pretest": "npm run lint", - "report": "nyc report --reporter=html", - "test": "nyc ava" - }, - "version": "1.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/readme.md deleted file mode 100644 index 747086a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/remove-trailing-separator/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# remove-trailing-separator - -[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] - -Removes all separators from the end of a string. - -## Install - -``` -npm install remove-trailing-separator -``` - -## Examples - -```js -const removeTrailingSeparator = require('remove-trailing-separator'); - -removeTrailingSeparator('/foo/bar/') // '/foo/bar' -removeTrailingSeparator('/foo/bar///') // '/foo/bar' - -// leaves only/last separator -removeTrailingSeparator('/') // '/' -removeTrailingSeparator('///') // '/' - -// returns empty string -removeTrailingSeparator('') // '' -``` - -## Notable backslash, or win32 separator behavior - -`\` is considered a separator only on WIN32 systems. All POSIX compliant systems -see backslash as a valid file name character, so it would break POSIX compliance -to remove it there. - -In practice, this means that this code will return different things depending on -what system it runs on: - -```js -removeTrailingSeparator('\\foo\\') -// UNIX => '\\foo\\' -// WIN32 => '\\foo' -``` - -[npm-url]: https://npmjs.org/package/remove-trailing-separator -[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg -[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator -[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master -[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master -[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true -[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master -[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/LICENSE deleted file mode 100644 index 33754da..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/README.md deleted file mode 100644 index 008e20e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# repeat-element [![NPM version](https://badge.fury.io/js/repeat-element.svg)](http://badge.fury.io/js/repeat-element) - -> Create an array by repeating the given value n times. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```bash -npm i repeat-element --save -``` - -## Usage - -```js -var repeat = require('repeat-element'); - -repeat('a', 5); -//=> ['a', 'a', 'a', 'a', 'a'] - -repeat('a', 1); -//=> ['a'] - -repeat('a', 0); -//=> [] - -repeat(null, 5) -//» [ null, null, null, null, null ] - -repeat({some: 'object'}, 5) -//» [ { some: 'object' }, -// { some: 'object' }, -// { some: 'object' }, -// { some: 'object' }, -// { some: 'object' } ] - -repeat(5, 5) -//» [ 5, 5, 5, 5, 5 ] -``` - -## Related projects - -[repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. - -## Running tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-element/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/index.js deleted file mode 100644 index 0ad45ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * repeat-element - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -module.exports = function repeat(ele, num) { - var arr = new Array(num); - - for (var i = 0; i < num; i++) { - arr[i] = ele; - } - - return arr; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/package.json deleted file mode 100644 index 7beb274..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-element/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "repeat-element@^1.1.2", - "scope": null, - "escapedName": "repeat-element", - "name": "repeat-element", - "rawSpec": "^1.1.2", - "spec": ">=1.1.2 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/braces" - ] - ], - "_from": "repeat-element@>=1.1.2 <2.0.0", - "_id": "repeat-element@1.1.2", - "_inCache": true, - "_location": "/repeat-element", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "raw": "repeat-element@^1.1.2", - "scope": null, - "escapedName": "repeat-element", - "name": "repeat-element", - "rawSpec": "^1.1.2", - "spec": ">=1.1.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/braces", - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "_shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "_shrinkwrap": null, - "_spec": "repeat-element@^1.1.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/braces", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/repeat-element/issues" - }, - "dependencies": {}, - "description": "Create an array by repeating the given value n times.", - "devDependencies": { - "benchmarked": "^0.1.4", - "chalk": "^1.0.0", - "glob": "^5.0.5", - "minimist": "^1.1.1", - "mocha": "^2.2.4" - }, - "directories": {}, - "dist": { - "shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "tarball": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "7a6b21d58eafcc44fc8de133c70a8398ee9fdd8d", - "homepage": "https://github.com/jonschlinkert/repeat-element", - "keywords": [ - "array", - "element", - "repeat", - "string" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "repeat-element", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/repeat-element.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.1.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/LICENSE deleted file mode 100644 index 39245ac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/README.md deleted file mode 100644 index aaa5e91..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) - -> Repeat the given string n times. Fastest implementation for repeating a string. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save repeat-string -``` - -## Usage - -### [repeat](index.js#L41) - -Repeat the given `string` the specified `number` of times. - -**Example:** - -**Example** - -```js -var repeat = require('repeat-string'); -repeat('A', 5); -//=> AAAAA -``` - -**Params** - -* `string` **{String}**: The string to repeat -* `number` **{Number}**: The number of times to repeat the string -* `returns` **{String}**: Repeated string - -## Benchmarks - -Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): - -```sh -# 2x -repeat-string █████████████████████████ (26,953,977 ops/sec) -repeating █████████ (9,855,695 ops/sec) -native ██████████████████ (19,453,895 ops/sec) - -# 3x -repeat-string █████████████████████████ (19,445,252 ops/sec) -repeating ███████████ (8,661,565 ops/sec) -native ████████████████████ (16,020,598 ops/sec) - -# 10x -repeat-string █████████████████████████ (23,792,521 ops/sec) -repeating █████████ (8,571,332 ops/sec) -native ███████████████ (14,582,955 ops/sec) - -# 50x -repeat-string █████████████████████████ (23,640,179 ops/sec) -repeating █████ (5,505,509 ops/sec) -native ██████████ (10,085,557 ops/sec) - -# 250x -repeat-string █████████████████████████ (23,489,618 ops/sec) -repeating ████ (3,962,937 ops/sec) -native ████████ (7,724,892 ops/sec) - -# 2000x -repeat-string █████████████████████████ (20,315,172 ops/sec) -repeating ████ (3,297,079 ops/sec) -native ███████ (6,203,331 ops/sec) - -# 20000x -repeat-string █████████████████████████ (23,382,915 ops/sec) -repeating ███ (2,980,058 ops/sec) -native █████ (5,578,808 ops/sec) -``` - -**Run the benchmarks** - -Install dev dependencies: - -```sh -npm i -d && node benchmark -``` - -## About - -### Related projects - -[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor**
    | -| --- | --- | -| 51 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [LinusU](https://github.com/LinusU) | -| 2 | [tbusser](https://github.com/tbusser) | -| 1 | [doowb](https://github.com/doowb) | -| 1 | [wooorm](https://github.com/wooorm) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/index.js deleted file mode 100644 index 4459afd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -/** - * Results cache - */ - -var res = ''; -var cache; - -/** - * Expose `repeat` - */ - -module.exports = repeat; - -/** - * Repeat the given `string` the specified `number` - * of times. - * - * **Example:** - * - * ```js - * var repeat = require('repeat-string'); - * repeat('A', 5); - * //=> AAAAA - * ``` - * - * @param {String} `string` The string to repeat - * @param {Number} `number` The number of times to repeat the string - * @return {String} Repeated string - * @api public - */ - -function repeat(str, num) { - if (typeof str !== 'string') { - throw new TypeError('expected a string'); - } - - // cover common, quick use cases - if (num === 1) return str; - if (num === 2) return str + str; - - var max = str.length * num; - if (cache !== str || typeof cache === 'undefined') { - cache = str; - res = ''; - } else if (res.length >= max) { - return res.substr(0, max); - } - - while (max > res.length && num > 1) { - if (num & 1) { - res += str; - } - - num >>= 1; - str += str; - } - - res += str; - res = res.substr(0, max); - return res; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/package.json deleted file mode 100644 index 8b9435d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeat-string/package.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "repeat-string@^1.5.2", - "scope": null, - "escapedName": "repeat-string", - "name": "repeat-string", - "rawSpec": "^1.5.2", - "spec": ">=1.5.2 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range" - ] - ], - "_from": "repeat-string@>=1.5.2 <2.0.0", - "_id": "repeat-string@1.6.1", - "_inCache": true, - "_location": "/repeat-string", - "_nodeVersion": "6.7.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/repeat-string-1.6.1.tgz_1477241638674_0.3764322670176625" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "repeat-string@^1.5.2", - "scope": null, - "escapedName": "repeat-string", - "name": "repeat-string", - "rawSpec": "^1.5.2", - "spec": ">=1.5.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "_shasum": "8dcae470e1c88abc2d600fff4a776286da75e637", - "_shrinkwrap": null, - "_spec": "repeat-string@^1.5.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "http://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/repeat-string/issues" - }, - "contributors": [ - { - "name": "Brian Woodward", - "email": "brian.woodward@gmail.com", - "url": "https://github.com/doowb" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Linus Unnebäck", - "email": "linus@folkdatorn.se", - "url": "http://linus.unnebäck.se" - }, - { - "name": "Thijs Busser", - "email": "tbusser@gmail.com", - "url": "http://tbusser.net" - }, - { - "name": "Titus", - "email": "tituswormer@gmail.com", - "url": "wooorm.com" - } - ], - "dependencies": {}, - "description": "Repeat the given string n times. Fastest implementation for repeating a string.", - "devDependencies": { - "ansi-cyan": "^0.1.1", - "benchmarked": "^0.2.5", - "gulp-format-md": "^0.1.11", - "isobject": "^2.1.0", - "mocha": "^3.1.2", - "repeating": "^3.0.0", - "text-table": "^0.2.0", - "yargs-parser": "^4.0.2" - }, - "directories": {}, - "dist": { - "shasum": "8dcae470e1c88abc2d600fff4a776286da75e637", - "tarball": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - }, - "engines": { - "node": ">=0.10" - }, - "files": [ - "index.js" - ], - "gitHead": "1a95c5d99a02999ccd2cf4663959a18bd2def7b8", - "homepage": "https://github.com/jonschlinkert/repeat-string", - "keywords": [ - "fast", - "fastest", - "fill", - "left", - "left-pad", - "multiple", - "pad", - "padding", - "repeat", - "repeating", - "repetition", - "right", - "right-pad", - "string", - "times" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "repeat-string", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/repeat-string.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "repeat-element" - ] - }, - "helpers": [ - "./benchmark/helper.js" - ], - "reflinks": [ - "verb" - ] - }, - "version": "1.6.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/index.js deleted file mode 100644 index ccae0d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -var isFinite = require('is-finite'); - -module.exports = function (str, n) { - if (typeof str !== 'string') { - throw new TypeError('Expected `input` to be a string'); - } - - if (n < 0 || !isFinite(n)) { - throw new TypeError('Expected `count` to be a positive finite number'); - } - - var ret = ''; - - do { - if (n & 1) { - ret += str; - } - - str += str; - } while ((n >>= 1)); - - return ret; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/package.json deleted file mode 100644 index 04e773d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "repeating@^2.0.0", - "scope": null, - "escapedName": "repeating", - "name": "repeating", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/detect-indent" - ] - ], - "_from": "repeating@>=2.0.0 <3.0.0", - "_id": "repeating@2.0.1", - "_inCache": true, - "_location": "/repeating", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/repeating-2.0.1.tgz_1460395966602_0.9193919147364795" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "raw": "repeating@^2.0.0", - "scope": null, - "escapedName": "repeating", - "name": "repeating", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/detect-indent", - "/indent-string" - ], - "_resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "_shasum": "5214c53a926d3552707527fbab415dbc08d06dda", - "_shrinkwrap": null, - "_spec": "repeating@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/detect-indent", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/repeating/issues" - }, - "dependencies": { - "is-finite": "^1.0.0" - }, - "description": "Repeat a string - fast", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "5214c53a926d3552707527fbab415dbc08d06dda", - "tarball": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "be02bcaf9a674b3c155477b3bf282136bcf44770", - "homepage": "https://github.com/sindresorhus/repeating#readme", - "keywords": [ - "repeat", - "string", - "repeating", - "str", - "text", - "fill", - "pad" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "repeating", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/repeating.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/readme.md deleted file mode 100644 index 06f0b69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/repeating/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# repeating [![Build Status](https://travis-ci.org/sindresorhus/repeating.svg?branch=master)](https://travis-ci.org/sindresorhus/repeating) - -> Repeat a string - fast - - -## Install - -``` -$ npm install --save repeating -``` - - -## Usage - -```js -const repeating = require('repeating'); - -repeating('unicorn ', 100); -//=> 'unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn ' -``` - - -## Related - -- [repeating-cli](https://github.com/sindresorhus/repeating-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.npmignore deleted file mode 100644 index b5ef13a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.travis.yml deleted file mode 100644 index 8101b9f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.7" - - "0.8" - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/LICENSE deleted file mode 100755 index 7cbe012..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/README.md deleted file mode 100644 index 05b5d21..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] - - -## Information - - - - - - - - - - - - - -
    Packagereplace-ext
    DescriptionReplaces a file extension with another one
    Node Version>= 0.4
    - -## Usage - -```javascript -var replaceExt = require('replace-ext'); - -var path = '/some/dir/file.js'; -var npath = replaceExt(path, '.coffee'); - -console.log(npath); // /some/dir/file.coffee -``` - -[npm-url]: https://npmjs.org/package/replace-ext -[npm-image]: https://badge.fury.io/js/replace-ext.png - -[travis-url]: https://travis-ci.org/wearefractal/replace-ext -[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master - -[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext -[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png - -[depstat-url]: https://david-dm.org/wearefractal/replace-ext -[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png - -[david-url]: https://david-dm.org/wearefractal/replace-ext -[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/index.js deleted file mode 100644 index 3f76938..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/index.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/package.json deleted file mode 100644 index 4366429..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "replace-ext@0.0.1", - "scope": null, - "escapedName": "replace-ext", - "name": "replace-ext", - "rawSpec": "0.0.1", - "spec": "0.0.1", - "type": "version" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel" - ] - ], - "_from": "replace-ext@0.0.1", - "_id": "replace-ext@0.0.1", - "_inCache": true, - "_location": "/replace-ext", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "1.4.4", - "_phantomChildren": {}, - "_requested": { - "raw": "replace-ext@0.0.1", - "scope": null, - "escapedName": "replace-ext", - "name": "replace-ext", - "rawSpec": "0.0.1", - "spec": "0.0.1", - "type": "version" - }, - "_requiredBy": [ - "/gulp-babel", - "/gulp-util", - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "_shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", - "_shrinkwrap": null, - "_spec": "replace-ext@0.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/replace-ext/issues" - }, - "dependencies": {}, - "description": "Replaces a file extension with another one", - "devDependencies": { - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "jshint": "~2.4.1", - "mocha": "~1.17.0", - "mocha-lcov-reporter": "~0.0.1", - "rimraf": "~2.2.5", - "should": "~3.1.0" - }, - "directories": {}, - "dist": { - "shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", - "tarball": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "http://github.com/wearefractal/replace-ext", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/replace-ext/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } - ], - "name": "replace-ext", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/replace-ext.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "test": "mocha --reporter spec && jshint" - }, - "version": "0.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/test/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/test/main.js deleted file mode 100644 index 5137702..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/replace-ext/test/main.js +++ /dev/null @@ -1,51 +0,0 @@ -var replaceExt = require('../'); -var path = require('path'); -var should = require('should'); -require('mocha'); - -describe('replace-ext', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid removed extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test'); - var nu = replaceExt(fname, ''); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid added extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/LICENSE deleted file mode 100644 index 6525171..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/README.md deleted file mode 100644 index 220178d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# resolve-dir [![NPM version](https://img.shields.io/npm/v/resolve-dir.svg?style=flat)](https://www.npmjs.com/package/resolve-dir) [![NPM downloads](https://img.shields.io/npm/dm/resolve-dir.svg?style=flat)](https://npmjs.org/package/resolve-dir) [![Build Status](https://img.shields.io/travis/jonschlinkert/resolve-dir.svg?style=flat)](https://travis-ci.org/jonschlinkert/resolve-dir) - -Resolve a directory that is either local, global or in the user's home directory. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save resolve-dir -``` - -## Usage - -```js -var resolve = require('resolve-dir'); -``` - -Returns a local directory path unchanged - -```js -resolve('a') -//=> 'a' -``` - -Resolves the path to user home - -```js -resolve('~') -//=> '/Users/jonschlinkert' -resolve('~/foo') -//=> '/Users/jonschlinkert/foo' -``` - -Resolves the path to global npm modules - -```js -resolve('@') -//=> '/usr/local/lib/node_modules' -resolve('@/foo') -//=> '/usr/local/lib/node_modules/foo' -``` - -## About - -### Related projects - -* [expand-tilde](https://www.npmjs.com/package/expand-tilde): Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the… [more](https://github.com/jonschlinkert/expand-tilde) | [homepage](https://github.com/jonschlinkert/expand-tilde "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.") -* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/cowboy/node-findup-sync) | [homepage](https://github.com/cowboy/node-findup-sync "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.") -* [resolve-modules](https://www.npmjs.com/package/resolve-modules): Resolves local and global npm modules that match specified patterns, and returns a configuration object… [more](https://github.com/jonschlinkert/resolve-modules) | [homepage](https://github.com/jonschlinkert/resolve-modules "Resolves local and global npm modules that match specified patterns, and returns a configuration object for each resolved module.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/resolve-dir/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/index.js deleted file mode 100644 index 3fe5366..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * resolve-dir - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var path = require('path'); -var expand = require('expand-tilde'); -var gm = require('global-modules'); - -module.exports = function resolveDir(dir) { - if (dir.charAt(0) === '~') { - dir = expand(dir); - } - if (dir.charAt(0) === '@') { - dir = path.join(gm, dir.slice(1)); - } - return dir; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/package.json deleted file mode 100644 index f1f938d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve-dir/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "resolve-dir@^0.1.0", - "scope": null, - "escapedName": "resolve-dir", - "name": "resolve-dir", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync" - ] - ], - "_from": "resolve-dir@>=0.1.0 <0.2.0", - "_id": "resolve-dir@0.1.1", - "_inCache": true, - "_location": "/resolve-dir", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/resolve-dir-0.1.1.tgz_1469811619883_0.7320640422403812" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "resolve-dir@^0.1.0", - "scope": null, - "escapedName": "resolve-dir", - "name": "resolve-dir", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/findup-sync" - ], - "_resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "_shasum": "b219259a5602fac5c5c496ad894a6e8cc430261e", - "_shrinkwrap": null, - "_spec": "resolve-dir@^0.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/findup-sync", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/resolve-dir/issues" - }, - "dependencies": { - "expand-tilde": "^1.2.2", - "global-modules": "^0.2.3" - }, - "description": "Resolve a directory that is either local, global or in the user's home directory.", - "devDependencies": { - "gulp-format-md": "^0.1.9", - "mocha": "^2.5.3" - }, - "directories": {}, - "dist": { - "shasum": "b219259a5602fac5c5c496ad894a6e8cc430261e", - "tarball": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "LICENSE", - "README.md" - ], - "gitHead": "a9ba6b37227d5b708c3606bc97ff62b1a679ef56", - "homepage": "https://github.com/jonschlinkert/resolve-dir", - "keywords": [ - "dir", - "directory", - "expansion", - "file", - "filepath", - "fp", - "global", - "home", - "modules", - "npm", - "path", - "resolve", - "tilde", - "user", - "user-home", - "userhome" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "resolve-dir", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/resolve-dir.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "findup-sync", - "expand-tilde", - "resolve-modules" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.editorconfig b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.editorconfig deleted file mode 100644 index ac29ade..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintignore deleted file mode 100644 index 3c3629e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintrc deleted file mode 100644 index 9db19a4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.eslintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": "@ljharb", - "root": true, - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "indent": [2, 4], - "strict": 0, - "complexity": 0, - "consistent-return": 0, - "curly": 0, - "dot-notation": [2, { "allowKeywords": true }], - "func-name-matching": 0, - "func-style": 0, - "global-require": 0, - "id-length": [2, { "min": 1, "max": 30 }], - "max-nested-callbacks": 0, - "max-params": 0, - "max-statements-per-line": [2, { "max": 2 }], - "max-statements": 0, - "no-magic-numbers": 0, - "no-console": 0, - "no-shadow": 0, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-use-before-define": 0, - "object-curly-newline": 0, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.npmignore deleted file mode 100644 index f833451..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -# gitignore -node_modules - -# Only apps should have lockfiles -npm-shrinkwrap.json -package-lock.json -yarn.lock diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.travis.yml deleted file mode 100644 index 25709b3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,185 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "8.2" - - "7.10" - - "6.11" - - "5.12" - - "4.8" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" - - "0.6" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then (nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install); else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - ##- node_js: "7" - #env: TEST=true - #os: osx - #- node_js: "6" - #env: TEST=true - #os: osx - #- node_js: "5" - #env: TEST=true - #os: osx - #- node_js: "4" - #env: TEST=true - #os: osx - #- node_js: "iojs" - #env: TEST=true - #os: osx - #- node_js: "0.12" - #env: TEST=true - #os: osx - #- node_js: "0.10" - #env: TEST=true - #os: osx - #- node_js: "0.8" - #env: TEST=true - #os: osx - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/appveyor.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/appveyor.yml deleted file mode 100644 index f54a1b6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: 1.0.{build} -skip_branch_with_pr: true -build: off - -environment: - matrix: - - nodejs_version: "7" - - nodejs_version: "6" - - nodejs_version: "5" - - nodejs_version: "4" - - nodejs_version: "3" - - nodejs_version: "2" - - nodejs_version: "1" - - nodejs_version: "0.12" - - nodejs_version: "0.10" - - nodejs_version: "0.8" - - nodejs_version: "0.6" -matrix: - # fast_finish: true - allow_failures: - - nodejs_version: "0.6" - -platform: - - x86 - - x64 - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version $env:platform - - IF %nodejs_version% EQU 0.6 npm -g install npm@1.3 - - IF %nodejs_version% EQU 0.8 npm -g install npm@2 - - set PATH=%APPDATA%\npm;%PATH% - #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm run tests-only diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/async.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/async.js deleted file mode 100644 index 20e65dc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err); - else console.log(res); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/index.js deleted file mode 100644 index eb6ba89..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var core = require('./lib/core'); -var async = require('./lib/async'); -async.core = core; -async.isCore = function isCore(x) { return core[x]; }; -async.sync = require('./lib/sync'); - -exports = async; -module.exports = async; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/async.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/async.js deleted file mode 100644 index ef1bde7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,203 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); - -module.exports = function resolve(x, options, callback) { - var cb = callback; - var opts = options || {}; - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - if (typeof x !== 'string') { - var err = new TypeError('Path must be a string.'); - return process.nextTick(function () { - cb(err); - }); - } - - var isFile = opts.isFile || function (file, cb) { - fs.stat(file, function (err, stat) { - if (!err) { - return cb(null, stat.isFile() || stat.isFIFO()); - } - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); - return cb(err); - }); - }; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || ['.js']; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - if (/\/$/.test(x) && res === y) { - loadAsDirectory(res, opts.package, onfile); - } else loadAsFile(res, opts.package, onfile); - } else loadNodeModules(x, y, function (err, n, pkg) { - if (err) cb(err); - else if (n) cb(null, n, pkg); - else if (core[x]) return cb(null, x); - else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - - function onfile(err, m, pkg) { - if (err) cb(err); - else if (m) cb(null, m, pkg); - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err); - else if (d) cb(null, d, pkg); - else { - var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); - moduleError.code = 'MODULE_NOT_FOUND'; - cb(moduleError); - } - }); - } - - function loadAsFile(x, thePackage, callback) { - var loadAsFilePackage = thePackage; - var cb = callback; - if (typeof loadAsFilePackage === 'function') { - cb = loadAsFilePackage; - loadAsFilePackage = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, loadAsFilePackage); - - function load(exts, x, loadPackage) { - if (exts.length === 0) return cb(null, undefined, loadPackage); - var file = x + exts[0]; - - var pkg = loadPackage; - if (pkg) onpkg(null, pkg); - else loadpkg(path.dirname(file), onpkg); - - function onpkg(err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err); - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex(err, ex) { - if (err) return cb(err); - if (ex) return cb(null, file, pkg); - load(exts.slice(1), x, pkg); - } - } - } - - function loadpkg(dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { - return cb(null); - } - if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg(path.dirname(dir), cb); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body); } catch (jsonErr) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory(x, loadAsDirectoryPackage, callback) { - var cb = callback; - var fpkg = loadAsDirectoryPackage; - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, 'package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } catch (jsonErr) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, 'index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function processDirs(cb, dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - var file = path.join(dir, x); - loadAsFile(file, undefined, onfile); - - function onfile(err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, x), undefined, ondir); - } - - function ondir(err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - processDirs(cb, dirs.slice(1)); - } - } - function loadNodeModules(x, start, cb) { - processDirs(cb, nodeModulesPaths(start, opts)); - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/caller.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/caller.js deleted file mode 100644 index b14a280..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.js deleted file mode 100644 index ad9efd1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,22 +0,0 @@ -var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; - -function versionIncluded(version) { - if (version === '*') return true; - var versionParts = version.split('.'); - for (var i = 0; i < 3; ++i) { - if ((current[i] || 0) >= (versionParts[i] || 0)) return true; - } - return false; -} - -var data = require('./core.json'); - -var core = {}; -for (var version in data) { // eslint-disable-line no-restricted-syntax - if (Object.prototype.hasOwnProperty.call(data, version) && versionIncluded(version)) { - for (var i = 0; i < data[version].length; ++i) { - core[data[version][i]] = true; - } - } -} -module.exports = core; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.json deleted file mode 100644 index 843844e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "*": [ - "assert", - "buffer_ieee754", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "_debugger", - "dgram", - "dns", - "domain", - "events", - "freelist", - "fs", - "http", - "https", - "_linklist", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "string_decoder", - "sys", - "timers", - "tls", - "tty", - "url", - "util", - "vm", - "zlib" - ], - "0.11": [ - "_http_server" - ], - "1.0": [ - "process", - "v8" - ] -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/node-modules-paths.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index a4bde6a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,45 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var parse = path.parse || require('path-parse'); - -module.exports = function nodeModulesPaths(start, opts) { - var modules = opts && opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules']; - - // ensure that `start` is an absolute path at this point, - // resolving against the process' current working directory - var absoluteStart = path.resolve(start); - - if (opts && opts.preserveSymlinks === false) { - try { - absoluteStart = fs.realpathSync(absoluteStart); - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - } - } - - var prefix = '/'; - if (/^([A-Za-z]:)/.test(absoluteStart)) { - prefix = ''; - } else if (/^\\\\/.test(absoluteStart)) { - prefix = '\\\\'; - } - - var paths = [absoluteStart]; - var parsed = parse(absoluteStart); - while (parsed.dir !== paths[paths.length - 1]) { - paths.push(parsed.dir); - parsed = parse(parsed.dir); - } - - var dirs = paths.reduce(function (dirs, aPath) { - return dirs.concat(modules.map(function (moduleDir) { - return path.join(prefix, aPath, moduleDir); - })); - }, []); - - return opts && opts.paths ? dirs.concat(opts.paths) : dirs; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/sync.js deleted file mode 100644 index bc9e287..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,93 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); - -module.exports = function (x, options) { - if (typeof x !== 'string') { - throw new TypeError('Path must be a string.'); - } - var opts = options || {}; - var isFile = opts.isFile || function (file) { - try { - var stat = fs.statSync(file); - } catch (e) { - if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; - throw e; - } - return stat.isFile() || stat.isFIFO(); - }; - var readFileSync = opts.readFileSync || fs.readFileSync; - - var extensions = opts.extensions || ['.js']; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..' || x.slice(-1) === '/') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; - } else { - var n = loadNodeModulesSync(x, y); - if (n) return n; - } - - if (core[x]) return x; - - var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - - function loadAsFileSync(x) { - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadAsDirectorySync(x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - try { - var body = readFileSync(pkgfile, 'UTF8'); - var pkg = JSON.parse(body); - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - if (pkg.main === '.' || pkg.main === './') { - pkg.main = 'index'; - } - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } - } catch (e) {} - } - - return loadAsFileSync(path.join(x, '/index')); - } - - function loadNodeModulesSync(x, start) { - var dirs = nodeModulesPaths(start, opts); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(path.join(dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join(dir, '/', x)); - if (n) return n; - } - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/package.json deleted file mode 100644 index 61c886c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "resolve@^1.1.7", - "scope": null, - "escapedName": "resolve", - "name": "resolve", - "rawSpec": "^1.1.7", - "spec": ">=1.1.7 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff" - ] - ], - "_from": "resolve@>=1.1.7 <2.0.0", - "_id": "resolve@1.4.0", - "_inCache": true, - "_location": "/resolve", - "_nodeVersion": "8.2.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/resolve-1.4.0.tgz_1501111654686_0.44756864523515105" - }, - "_npmUser": { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "resolve@^1.1.7", - "scope": null, - "escapedName": "resolve", - "name": "resolve", - "rawSpec": "^1.1.7", - "spec": ">=1.1.7 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/liftoff", - "/rechoir" - ], - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", - "_shasum": "a75be01c53da25d934a98ebd0e4c4a7312f92a86", - "_shrinkwrap": null, - "_spec": "resolve@^1.1.7", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/liftoff", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-resolve/issues" - }, - "dependencies": { - "path-parse": "^1.0.5" - }, - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.0", - "eslint": "^4.3.0", - "object-keys": "^1.0.11", - "safe-publish-latest": "^1.1.1", - "tap": "0.4.13", - "tape": "^4.7.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", - "shasum": "a75be01c53da25d934a98ebd0e4c4a7312f92a86", - "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz" - }, - "gitHead": "744f8162464a104aca60777e5f615418dab3b774", - "homepage": "https://github.com/substack/node-resolve#readme", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "ljharb", - "email": "ljharb@gmail.com" - }, - { - "name": "substack", - "email": "substack@gmail.com" - } - ], - "name": "resolve", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-resolve.git" - }, - "scripts": { - "lint": "eslint .", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run --silent tests-only", - "tests-only": "tape test/*.js" - }, - "version": "1.4.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/readme.markdown b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/readme.markdown deleted file mode 100644 index 1bb67d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,160 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) - -# example - -asynchronously resolve: - -``` js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -``` js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -``` js -var resolve = require('resolve') -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.packageFilter - transform the parsed package.json contents before looking -at the "main" field - -* opts.pathFilter(pkg, path, relativePath) - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFile: fs.readFile, - isFile: function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile()) - }); - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json -* contents before looking at the "main" field - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving. -This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag. -**Note:** this property is currently `true` by default but it will be changed to -`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*. - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFileSync: fs.readFileSync, - isFile: function (file) { - try { return fs.statSync(file).isFile() } - catch (e) { return false } - }, - moduleDirectory: 'node_modules', - preserveSymlinks: true -} -```` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resolve -``` - -# license - -MIT diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/core.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/core.js deleted file mode 100644 index 1182e0c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/core.js +++ /dev/null @@ -1,29 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(resolve.isCore('fs')); - st.ok(resolve.isCore('net')); - st.ok(resolve.isCore('http')); - - st.ok(!resolve.isCore('seq')); - st.ok(!resolve.isCore('../')); - st.end(); - }); - - t.test('core list', function (st) { - st.plan(resolve.core.length); - - for (var i = 0; i < resolve.core.length; ++i) { - st.doesNotThrow( - function () { require(resolve.core[i]); }, // eslint-disable-line no-loop-func - 'requiring ' + resolve.core[i] + ' does not throw' - ); - } - - st.end(); - }); - - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot.js deleted file mode 100644 index 3080665..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = path.join(__dirname, '/dotdot/abc'); - - resolve('..', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'dotdot/index.js')); - }); - - resolve('.', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = path.join(__dirname, '/dotdot/abc'); - - var a = resolve.sync('..', { basedir: dir }); - t.equal(a, path.join(__dirname, 'dotdot/index.js')); - - var b = resolve.sync('.', { basedir: dir }); - t.equal(b, path.join(dir, 'index.js')); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/abc/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index 643f9fc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/faulty_basedir.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index e20d937..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { - t.equal(true, !!err); - }); - -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter.js deleted file mode 100644 index 51a753f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver'); - resolve('./baz', { - basedir: dir, - packageFilter: function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/doom.js')); - t.equal(pkg.main, 'doom'); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter_sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index fd4e97c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,16 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = path.join(__dirname, 'resolver'); - var res = resolve.sync('./baz', { - basedir: dir, - packageFilter: function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }); - t.equal(res, path.join(dir, 'baz/doom.js')); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock.js deleted file mode 100644 index a88059d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,143 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock from package', function (t) { - t.plan(8); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, file)); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[file]); - } - }; - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/bar/baz.js')); - t.equal(pkg && pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file, cb) { - cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); - }, - 'package': { main: 'bar' }, - readFile: function (file, cb) { - cb(null, files[path.resolve(file)]); - } - }; - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) return t.fail(err); - t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); - t.equal(pkg && pkg.main, './baz.js'); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock_sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index 43af102..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,67 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = {}; - files[path.resolve('/foo/bar/baz.js')] = 'beep'; - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, file); - }, - readFileSync: function (file) { - return files[file]; - } - }; - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - path.resolve('/foo/bar/baz.js') - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = {}; - files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; - files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ - main: './baz.js' - }); - - function opts(basedir) { - return { - basedir: path.resolve(basedir), - isFile: function (file) { - return Object.prototype.hasOwnProperty.call(files, file); - }, - readFileSync: function (file) { - return files[file]; - } - }; - } - - t.equal( - resolve.sync('bar', opts('/foo')), - path.resolve('/foo/node_modules/bar/baz.js') - ); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir.js deleted file mode 100644 index b50e5bb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'module_dir'); - var xopts = { - basedir: dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var yopts = { - basedir: dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'module_dir'); - var aopts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); - }); - - var bopts = { - basedir: dir, - moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); - }); - - var copts = { - basedir: dir, - moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index dd7cf7b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100; }; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index ef2d4d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100; }; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index e8ba629..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111; }; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node-modules-paths.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node-modules-paths.js deleted file mode 100644 index a917f06..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node-modules-paths.js +++ /dev/null @@ -1,93 +0,0 @@ -var test = require('tape'); -var path = require('path'); -var parse = path.parse || require('path-parse'); -var keys = require('object-keys'); - -var nodeModulesPaths = require('../lib/node-modules-paths'); - -var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { - var moduleDirs = [].concat(moduleDirectories || 'node_modules'); - - var foundModuleDirs = {}; - var uniqueDirs = {}; - var parsedDirs = {}; - for (var i = 0; i < dirs.length; ++i) { - var parsed = parse(dirs[i]); - if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } - foundModuleDirs[parsed.base] += 1; - parsedDirs[parsed.dir] = true; - uniqueDirs[dirs[i]] = true; - } - t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); - var foundModuleDirNames = keys(foundModuleDirs); - t.deepEqual(foundModuleDirNames, moduleDirs.concat(paths || []), 'all desired module dirs were found'); - t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); - - var counts = {}; - for (var j = 0; j < foundModuleDirNames.length; ++j) { - counts[foundModuleDirs[j]] = true; - } - t.equal(keys(counts).length, 1, 'all found module directories had the same count'); -}; - -test('node-modules-paths', function (t) { - t.test('no options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('empty options', function (t) { - var start = path.join(__dirname, 'resolver'); - var dirs = nodeModulesPaths(start, {}); - - verifyDirs(t, start, dirs); - - t.end(); - }); - - t.test('with paths option', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var dirs = nodeModulesPaths(start, { paths: paths }); - - verifyDirs(t, start, dirs, null, paths); - - t.end(); - }); - - t.test('with moduleDirectory option', function (t) { - var start = path.join(__dirname, 'resolver'); - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory); - - t.end(); - }); - - t.test('with 1 moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectory = 'not node modules'; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); - - verifyDirs(t, start, dirs, moduleDirectory, paths); - - t.end(); - }); - - t.test('with 1+ moduleDirectory and paths options', function (t) { - var start = path.join(__dirname, 'resolver'); - var paths = ['a', 'b']; - var moduleDirectories = ['not node modules', 'other modules']; - var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); - - verifyDirs(t, start, dirs, moduleDirectories, paths); - - t.end(); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path.js deleted file mode 100644 index 38a7d7e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,49 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(4); - - resolve('aaa', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname - }, function (err, res) { - t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js')); - }); - - resolve('bbb', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname - }, function (err, res) { - t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js')); - }); - - resolve('ccc', { - paths: [ - path.join(__dirname, '/node_path/x'), - path.join(__dirname, '/node_path/y') - ], - basedir: __dirname - }, function (err, res) { - t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js')); - }); - - // ensure that relative paths still resolve against the - // regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path' - ], - basedir: 'node_path/x' - }, function (err, res) { - var root = require('tap/package.json').main; - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root)); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/aaa/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index ad70d0b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/ccc/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index a64132e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/bbb/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index 4d0f32e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/ccc/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index 793315e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/nonstring.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/pathfilter.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 733045a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,42 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('#62: deep module references and the pathFilter', function (t) { - t.plan(9); - - var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); - var pathFilter = function (pkg, x, remainder) { - t.equal(pkg.version, '1.2.3'); - t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); - t.equal(remainder, 'ref'); - return 'alt'; - }; - - resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(pkg.version, '1.2.3'); - t.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); - }); - - resolve( - 'deep/deeper/ref', - { basedir: resolverDir }, - function (err, res, pkg) { - if (err) t.fail(err); - t.notEqual(pkg, undefined); - t.equal(pkg.version, '1.2.3'); - t.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); - } - ); - - resolve( - 'deep/ref', - { basedir: resolverDir, pathFilter: pathFilter }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); - } - ); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/pathfilter/deep_ref/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence.js deleted file mode 100644 index 2febb59..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir: dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index b83a3e7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index e0f8f6a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index 93542a9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index 2298f47..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '>_<'; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver.js deleted file mode 100644 index 56641df..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,349 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(10); - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg && pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo.js')); - t.equal(pkg.main, 'resolver'); - }); - - resolve('foo', { basedir: dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = path.join(__dirname, 'resolver'); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); - t.equal(pkg, undefined); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - - resolve('./baz', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'baz/quux.js')); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - - resolve('./grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'tiv/index.js')); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'grux/index.js')); - t.equal(pkg, undefined); - }); - - resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'garply/lib/index.js')); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/quux'); - - resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'foo/index.js')); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - - resolve('../grux', { basedir: dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(4); - var dir = path.join(__dirname, 'resolver'); - - resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup.coffee', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'cup.coffee')); - }); - - resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'resolver'); - - resolve('./mug', { basedir: dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'mug.js')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(dir, '/mug.coffee')); - }); - - resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { - t.equal(res, path.join(dir, '/mug.js')); - }); -}); - -test('other path', function (t) { - t.plan(6); - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/root.js')); - }); - - resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); - }); - - resolve('root', { basedir: dir }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); - - resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - t.equal(err.code, 'MODULE_NOT_FOUND'); - }); -}); - -test('incorrect main', function (t) { - t.plan(1); - - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'index.js')); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = path.join(__dirname, 'resolver/without_basedir'); - var tester = require(path.join(dir, 'main.js')); - - tester(t, function (err, res, pkg) { - if (err) { - t.fail(err); - } else { - t.equal(res, path.join(dir, 'node_modules/mymodule.js')); - } - }); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - t.plan(1); - - var resolverDir = path.join(__dirname, 'resolver/punycode'); - - resolve('punycode', { basedir: resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(resolverDir, 'node_modules/punycode/index.js')); - }); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - t.plan(2); - - var dir = path.join(__dirname, 'resolver'); - - resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo.js')); - }); - - resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(dir, 'same_names/foo/index.js')); - }); -}); - -test('async: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.plan(1); - resolve('./' + testFile, function (err, res, pkg) { - if (err) t.fail(err); - st.equal(res, __filename, 'sanity check'); - }); - }); - - t.test('with a fake directory', function (st) { - st.plan(4); - - resolve('./' + testFile + '/blah', function (err, res, pkg) { - st.ok(err, 'there is an error'); - st.notOk(res, 'no result'); - - st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - err && err.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - st.end(); - }); - }); - - t.end(); -}); - -test('async dot main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); - -test('async dot slash main', function (t) { - var start = new Date(); - t.plan(3); - resolve('./resolver/dot_slash_main', function (err, ret) { - t.notOk(err); - t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/doom.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index c41e4db..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "quux.js" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/quux.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/cup.coffee b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b13789..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/package.json deleted file mode 100644 index d7f4fc8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "." -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/index.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/package.json deleted file mode 100644 index f51287b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "./" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/foo.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index b718804..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "wrong.js" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/mug.coffee b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/mug.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/other_path/root.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/quux/foo/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo.js deleted file mode 100644 index 888cae3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 42; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/same_names/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/.npmignore deleted file mode 100644 index f23f892..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/.npmignore +++ /dev/null @@ -1 +0,0 @@ -symlink diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/.npmignore deleted file mode 100644 index cf4bab9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/.npmignore +++ /dev/null @@ -1 +0,0 @@ -!node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/without_basedir/main.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5b31975..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../../../'); - -module.exports = function (t, cb) { - resolve('mymodule', null, cb); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver_sync.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index 8e33dca..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,267 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.equal( - resolve.sync('./foo.js', { basedir: dir }), - path.join(dir, 'foo.js') - ); - - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }); - - t.end(); -}); - -test('bar', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('foo', { basedir: path.join(dir, 'bar') }), - path.join(dir, 'bar/node_modules/foo/index.js') - ); - t.end(); -}); - -test('baz', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./baz', { basedir: dir }), - path.join(dir, 'baz/quux.js') - ); - t.end(); -}); - -test('biz', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - t.equal( - resolve.sync('./grux', { basedir: dir }), - path.join(dir, 'grux/index.js') - ); - - t.equal( - resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), - path.join(dir, 'tiv/index.js') - ); - - t.equal( - resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), - path.join(dir, 'grux/index.js') - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - t.equal( - resolve.sync('../grux', { basedir: dir }), - path.join(dir, 'index.js') - ); - t.end(); -}); - -test('cup', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'cup.coffee') - ); - - t.equal( - resolve.sync('./cup.coffee', { basedir: dir }), - path.join(dir, 'cup.coffee') - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js'] - }); - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = path.join(__dirname, 'resolver'); - t.equal( - resolve.sync('./mug', { basedir: dir }), - path.join(dir, 'mug.js') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.coffee', '.js'] - }), - path.join(dir, 'mug.coffee') - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'mug.js') - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - t.equal( - resolve.sync('root', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/root.js') - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/lib/other-lib.js') - ); - - t.throws(function () { - resolve.sync('root', { basedir: dir }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir: dir, - paths: [otherDir] - }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - t.equal( - resolve.sync('./incorrect_main', { basedir: resolverDir }), - path.join(dir, 'index.js') - ); - - t.end(); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - var resolverDir = path.join(__dirname, 'resolver/punycode'); - - t.equal( - resolve.sync('punycode', { basedir: resolverDir }), - path.join(resolverDir, 'node_modules/punycode/index.js') - ); - - t.end(); -}); - -var stubStatSync = function stubStatSync(fn) { - var fs = require('fs'); - var statSync = fs.statSync; - try { - fs.statSync = function () { - throw new EvalError('Unknown Error'); - }; - return fn(); - } finally { - fs.statSync = statSync; - } -}; - -test('#79 - re-throw non ENOENT errors from stat', function (t) { - var dir = path.join(__dirname, 'resolver'); - - stubStatSync(function () { - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }, /Unknown Error/); - }); - - t.end(); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo.js') - ); - t.equal( - resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), - path.join(dir, 'same_names/foo/index.js') - ); - t.end(); -}); - -test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.equal( - resolve.sync('./' + testFile), - __filename, - 'sanity check' - ); - st.end(); - }); - - t.test('with a fake directory', function (st) { - function run() { return resolve.sync('./' + testFile + '/blah'); } - - st.throws(run, 'throws an error'); - - try { - run(); - } catch (e) { - st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - e.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - } - - st.end(); - }); - - t.end(); -}); - -test('sync dot main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync dot slash main', function (t) { - var start = new Date(); - t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/subdirs.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/subdirs.js deleted file mode 100644 index b7b8450..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/symlinks.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/symlinks.js deleted file mode 100644 index 544a023..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/resolve/test/symlinks.js +++ /dev/null @@ -1,54 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var test = require('tape'); -var resolve = require('../'); - -var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); -try { - fs.unlinkSync(symlinkDir); -} catch (err) {} -try { - fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); -} - -test('symlink', function (t) { - t.plan(1); - - resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.plan(4); - - resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { - t.ok(err, 'there is an error'); - t.notOk(res, 'no result'); - - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - t.equal( - err && err.message, - 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', - 'can not find nonexistent module' - ); - }); -}); - -test('sync symlink', function (t) { - var start = new Date(); - t.equal(resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.throws(function () { - resolve.sync('foo', { basedir: symlinkDir }); - }, /Cannot find module 'foo'/); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/.travis.yml deleted file mode 100644 index 7b20f28..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - 'node' - - '5' - - '4' - - '0.12' - - '0.10' diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438da..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/package.json deleted file mode 100644 index 2cd6f91..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "safe-buffer@~5.1.1", - "scope": null, - "escapedName": "safe-buffer", - "name": "safe-buffer", - "rawSpec": "~5.1.1", - "spec": ">=5.1.1 <5.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "safe-buffer@>=5.1.1 <5.2.0", - "_id": "safe-buffer@5.1.1", - "_inCache": true, - "_location": "/safe-buffer", - "_nodeVersion": "8.1.2", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/safe-buffer-5.1.1.tgz_1498076368476_0.22441886644810438" - }, - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "_npmVersion": "5.0.3", - "_phantomChildren": {}, - "_requested": { - "raw": "safe-buffer@~5.1.1", - "scope": null, - "escapedName": "safe-buffer", - "name": "safe-buffer", - "rawSpec": "~5.1.1", - "spec": ">=5.1.1 <5.2.0", - "type": "range" - }, - "_requiredBy": [ - "/through2/readable-stream", - "/through2/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "_shasum": "893312af69b2123def71f57889001671eeb2c853", - "_shrinkwrap": null, - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "dependencies": {}, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "shasum": "893312af69b2123def71f57889001671eeb2c853", - "tarball": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" - }, - "gitHead": "5261e0c19dd820c31dd21cb4116902b0ed0f9e57", - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - }, - { - "name": "mafintosh", - "email": "mathiasbuus@gmail.com" - } - ], - "name": "safe-buffer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "version": "5.1.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/test.js deleted file mode 100644 index 4925059..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/safe-buffer/test.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -var test = require('tape') -var SafeBuffer = require('./').Buffer - -test('new SafeBuffer(value) works just like Buffer', function (t) { - t.deepEqual(new SafeBuffer('hey'), new Buffer('hey')) - t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.equal(typeof SafeBuffer.isBuffer, 'function') - t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true) - t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true) - t.notOk(SafeBuffer.isBuffer({})) - - t.end() -}) - -test('SafeBuffer.from(value) converts to a Buffer', function (t) { - t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey')) - t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.end() -}) - -test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) { - for (var i = 0; i < 10; i++) { - var expected1 = new Buffer(1000) - expected1.fill(0) - t.deepEqual(SafeBuffer.alloc(1000), expected1) - - var expected2 = new Buffer(1000 * 1000) - expected2.fill(0) - t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2) - } - t.end() -}) - -test('SafeBuffer.allocUnsafe(number)', function (t) { - var buf = SafeBuffer.allocUnsafe(100) // unitialized memory - t.equal(buf.length, 100) - t.equal(SafeBuffer.isBuffer(buf), true) - t.equal(Buffer.isBuffer(buf), true) - t.end() -}) - -test('SafeBuffer.from() throws with number types', function (t) { - t.plan(5) - t.throws(function () { - SafeBuffer.from(0) - }) - t.throws(function () { - SafeBuffer.from(-1) - }) - t.throws(function () { - SafeBuffer.from(NaN) - }) - t.throws(function () { - SafeBuffer.from(Infinity) - }) - t.throws(function () { - SafeBuffer.from(99) - }) -}) - -test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.allocUnsafe('hey') - }) - t.throws(function () { - SafeBuffer.allocUnsafe('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.allocUnsafe([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.allocUnsafe({}) - }) -}) - -test('SafeBuffer.alloc() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.alloc('hey') - }) - t.throws(function () { - SafeBuffer.alloc('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.alloc([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.alloc({}) - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/README.md deleted file mode 100644 index fd5151a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/README.md +++ /dev/null @@ -1,366 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -``` - -As a command-line utility: - -``` -$ semver -h - -SemVer 5.3.0 - -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. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `loose` boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/bin/semver b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/bin/semver deleted file mode 100755 index c5f2e85..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/bin/semver +++ /dev/null @@ -1,133 +0,0 @@ -#!/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/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/package.json deleted file mode 100644 index 1faad29..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "semver@2 || 3 || 4 || 5", - "scope": null, - "escapedName": "semver", - "name": "semver", - "rawSpec": "2 || 3 || 4 || 5", - "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/normalize-package-data" - ] - ], - "_from": "semver@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0", - "_id": "semver@5.4.1", - "_inCache": true, - "_location": "/semver", - "_nodeVersion": "8.2.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/semver-5.4.1.tgz_1500922107643_0.5125251261051744" - }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "semver@2 || 3 || 4 || 5", - "scope": null, - "escapedName": "semver", - "name": "semver", - "rawSpec": "2 || 3 || 4 || 5", - "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0", - "type": "range" - }, - "_requiredBy": [ - "/normalize-package-data" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "_shasum": "e059c09d8571f0540823733433505d3a2f00b18e", - "_shrinkwrap": null, - "_spec": "semver@2 || 3 || 4 || 5", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/normalize-package-data", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "dependencies": {}, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^10.7.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "shasum": "e059c09d8571f0540823733433505d3a2f00b18e", - "tarball": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "gitHead": "0877c942a6af00edcda5c16fdd934684e1b20a1c", - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "name": "semver", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "test": "tap test/*.js --cov -J" - }, - "version": "5.4.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/range.bnf b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/range.bnf deleted file mode 100644 index 25ebd5c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/semver.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/semver.js deleted file mode 100644 index 389cb44..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/semver/semver.js +++ /dev/null @@ -1,1296 +0,0 @@ -exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -var MAX_LENGTH = 256; -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - if (version.length > MAX_LENGTH) - return null; - - var r = loose ? re[LOOSE] : re[FULL]; - if (!r.test(version)) - return null; - - try { - return new SemVer(version, loose); - } catch (er) { - return null; - } -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version.trim().replace(/^[=v]+/, ''), loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (version.length > MAX_LENGTH) - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) - throw new TypeError('Invalid major version') - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) - throw new TypeError('Invalid minor version') - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) - throw new TypeError('Invalid patch version') - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) - return num; - } - return id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier); - break; - case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0; - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) - this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) - this.prerelease = [identifier, 0]; - } else - this.prerelease = [identifier, 0]; - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - this.raw = this.version; - return this; -}; - -exports.inc = inc; -function inc(version, release, loose, identifier) { - if (typeof(loose) === 'string') { - identifier = loose; - loose = undefined; - } - - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } -} - -exports.diff = diff; -function diff(version1, version2) { - if (eq(version1, version2)) { - return null; - } else { - var v1 = parse(version1); - var v2 = parse(version2); - if (v1.prerelease.length || v2.prerelease.length) { - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return 'pre'+key; - } - } - } - return 'prerelease'; - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return key; - } - } - } - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.major = major; -function major(a, loose) { - return new SemVer(a, loose).major; -} - -exports.minor = minor; -function minor(a, loose) { - return new SemVer(a, loose).minor; -} - -exports.patch = patch; -function patch(a, loose) { - return new SemVer(a, loose).patch; -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a === b; - break; - case '!==': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a !== b; - break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; - - debug('comp', this); -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else - this.semver = new SemVer(m[2], this.loose); -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - - if (this.semver === ANY) - return true; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - return cmp(version, this.operator, this.semver, this.loose); -}; - -Comparator.prototype.intersects = function(comp, loose) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required'); - } - - var rangeTmp; - - if (this.operator === '') { - rangeTmp = new Range(comp.value, loose); - return satisfies(this.value, rangeTmp, loose); - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, loose); - return satisfies(comp.semver, rangeTmp, loose); - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>'); - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<'); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<='); - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, loose) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')); - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, loose) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')); - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; -}; - - -exports.Range = Range; -function Range(range, loose) { - if (range instanceof Range) { - if (range.loose === loose) { - return range; - } else { - return new Range(range.raw, loose); - } - } - - if (range instanceof Comparator) { - return new Range(range.value, loose); - } - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -Range.prototype.intersects = function(range, loose) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required'); - } - - return this.set.some(function(thisComparators) { - return thisComparators.every(function(thisComparator) { - return range.set.some(function(rangeComparators) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, loose); - }); - }); - }); - }); -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - - debug('tilde return', ret); - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - debug('caret', comp, loose); - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0'; - } else { - debug('no pr'); - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0'; - } - - debug('caret return', ret); - return ret; - }); -} - -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0'; - } else { - // nothing is forbidden - ret = '*'; - } - } else if (gtlt && anyX) { - // replace X with 0 - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>='; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<'; - if (xm) - M = +M + 1; - else - m = +m + 1; - } - - ret = gtlt + M + '.' + m + '.' + p; - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - } - - debug('xRange return', ret); - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - - if (version.prerelease.length) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (var i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === ANY) - continue; - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver; - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) - return true; - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false; - } - - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) - max = v; - maxSV = new SemVer(max, loose); - } - } - }) - return max; -} - -exports.minSatisfying = minSatisfying; -function minSatisfying(versions, range, loose) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!min || minSV.compare(v) === 1) { // compare(min, v, true) - min = v; - minSV = new SemVer(min, loose); - } - } - }) - return min; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -exports.prerelease = prerelease; -function prerelease(version, loose) { - var parsed = parse(version, loose); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; -} - -exports.intersects = intersects; -function intersects(r1, r2, loose) { - r1 = new Range(r1, loose) - r2 = new Range(r2, loose) - return r1.intersects(r2) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.npmignore deleted file mode 100644 index 5d8ea47..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components -*.orig -.idea -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.travis.yml deleted file mode 100644 index 273b812..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - 0.7 - - 0.8 - - 0.9 - - 0.10 \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/LICENSE deleted file mode 100644 index b7346ab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.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/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/README.md deleted file mode 100644 index 6b86fc2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/README.md +++ /dev/null @@ -1,68 +0,0 @@ -![status](https://secure.travis-ci.org/robrich/sequencify.png?branch=master) - -Sequencify -========== - -A module for sequencing tasks and dependencies - -Usage ------ - -```javascript -var sequencify = require('sequencify'); - -var items = { - a: { - name: 'a', - dep: [] - // other properties as needed - }, - b: { - name: 'b', - dep: ['a'] - }, - c: { - name: 'c', - dep: ['a'] - }, - d: { - name: 'd', - dep: ['c'] - }, -}; - -var names = ['d', 'b', 'c', 'a']; // The names of the items you want arranged, need not be all - -var results = []; - -sequencify(items, names, results); - -console.log(results); -// ['a','b','c','d']; -``` - -LICENSE -------- - -(MIT License) - -Copyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.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/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/index.js deleted file mode 100644 index b05f8bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/index.js +++ /dev/null @@ -1,46 +0,0 @@ -/*jshint node:true */ - -"use strict"; - -var sequence = function (tasks, names, results, nest) { - var i, name, node, e, j; - nest = nest || []; - for (i = 0; i < names.length; i++) { - name = names[i]; - // de-dup results - if (results.indexOf(name) === -1) { - node = tasks[name]; - if (!node) { - e = new Error('task "'+name+'" is not defined'); - e.missingTask = name; - e.taskList = []; - for (j in tasks) { - if (tasks.hasOwnProperty(j)) { - e.taskList.push(tasks[j].name); - } - } - throw e; - } - if (nest.indexOf(name) > -1) { - nest.push(name); - e = new Error('Recursive dependencies detected: '+nest.join(' -> ')); - e.recursiveTasks = nest; - e.taskList = []; - for (j in tasks) { - if (tasks.hasOwnProperty(j)) { - e.taskList.push(tasks[j].name); - } - } - throw e; - } - if (node.dep.length) { - nest.push(name); - sequence(tasks, node.dep, results, nest); // recurse - nest.pop(name); - } - results.push(name); - } - } -}; - -module.exports = sequence; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/package.json deleted file mode 100644 index 4ed610c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sequencify/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "sequencify@~0.0.7", - "scope": null, - "escapedName": "sequencify", - "name": "sequencify", - "rawSpec": "~0.0.7", - "spec": ">=0.0.7 <0.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/orchestrator" - ] - ], - "_from": "sequencify@>=0.0.7 <0.1.0", - "_id": "sequencify@0.0.7", - "_inCache": true, - "_location": "/sequencify", - "_npmUser": { - "name": "robrich", - "email": "robrich@robrich.org" - }, - "_npmVersion": "1.3.15", - "_phantomChildren": {}, - "_requested": { - "raw": "sequencify@~0.0.7", - "scope": null, - "escapedName": "sequencify", - "name": "sequencify", - "rawSpec": "~0.0.7", - "spec": ">=0.0.7 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/orchestrator" - ], - "_resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", - "_shasum": "90cff19d02e07027fd767f5ead3e7b95d1e7380c", - "_shrinkwrap": null, - "_spec": "sequencify@~0.0.7", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/orchestrator", - "author": { - "name": "Rob Richardson", - "url": "http://robrich.org/" - }, - "bugs": { - "url": "https://github.com/robrich/sequencify/issues" - }, - "dependencies": {}, - "description": "A module for sequencing tasks and dependencies", - "devDependencies": { - "mocha": "~1.16.1", - "should": "~2.1.1" - }, - "directories": {}, - "dist": { - "shasum": "90cff19d02e07027fd767f5ead3e7b95d1e7380c", - "tarball": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/robrich/sequencify", - "keywords": [ - "task", - "sequence", - "sequencer", - "compose" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/robrich/sequencify/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "robrich", - "email": "robrich@robrich.org" - } - ], - "name": "sequencify", - "optionalDependencies": {}, - "readme": "![status](https://secure.travis-ci.org/robrich/sequencify.png?branch=master)\r\n\r\nSequencify\r\n==========\r\n\r\nA module for sequencing tasks and dependencies\r\n\r\nUsage\r\n-----\r\n\r\n```javascript\r\nvar sequencify = require('sequencify');\r\n\r\nvar items = {\r\n a: {\r\n name: 'a',\r\n dep: []\r\n // other properties as needed\r\n },\r\n b: {\r\n name: 'b',\r\n dep: ['a']\r\n },\r\n c: {\r\n name: 'c',\r\n dep: ['a']\r\n },\r\n d: {\r\n name: 'd',\r\n dep: ['c']\r\n },\r\n};\r\n\r\nvar names = ['d', 'b', 'c', 'a']; // The names of the items you want arranged, need not be all\r\n\r\nvar results = [];\r\n\r\nsequencify(items, names, results);\r\n\r\nconsole.log(results);\r\n// ['a','b','c','d'];\r\n```\r\n\r\nLICENSE\r\n-------\r\n\r\n(MIT License)\r\n\r\nCopyright (c) 2013 [Richardson & Sons, LLC](http://richardsonandsons.com/)\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n", - "readmeFilename": "README.md", - "repository": { - "type": "git", - "url": "git://github.com/robrich/sequencify.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.0.7" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/README.md deleted file mode 100644 index 25a38a5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocaine-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `util.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/bench.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/package.json deleted file mode 100644 index 6626355..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "sigmund@~1.0.0", - "scope": null, - "escapedName": "sigmund", - "name": "sigmund", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-order/node_modules/minimatch" - ] - ], - "_from": "sigmund@>=1.0.0 <1.1.0", - "_id": "sigmund@1.0.1", - "_inCache": true, - "_location": "/sigmund", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - "_npmVersion": "2.10.0", - "_phantomChildren": {}, - "_requested": { - "raw": "sigmund@~1.0.0", - "scope": null, - "escapedName": "sigmund", - "name": "sigmund", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/globule/minimatch", - "/gulp-order/minimatch" - ], - "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "_shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "_shrinkwrap": null, - "_spec": "sigmund@~1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-order/node_modules/minimatch", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "dependencies": {}, - "description": "Quick and dirty signatures for Objects.", - "devDependencies": { - "tap": "~0.3.0" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "3ff21f198cad2175f9f3b781853fd94d0d19b590", - "tarball": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" - }, - "gitHead": "527f97aa5bb253d927348698c0cd3bb267d098c6", - "homepage": "https://github.com/isaacs/sigmund#readme", - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "license": "ISC", - "main": "sigmund.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "sigmund", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund.git" - }, - "scripts": { - "bench": "node bench.js", - "test": "tap test/*.js" - }, - "version": "1.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/sigmund.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/test/basic.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/CHANGELOG.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/CHANGELOG.md deleted file mode 100644 index e2f70d2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) - - -### Bug Fixes - -* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) - - - - -# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) - - -### Bug Fixes - -* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) -* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) - - -### BREAKING CHANGES - -* signal-exit no longer wires into SIGPROF diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/LICENSE.txt b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/LICENSE.txt deleted file mode 100644 index eead04a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/LICENSE.txt +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/README.md deleted file mode 100644 index 8ebccab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# signal-exit - -[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) -[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) -[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -When you want to fire an event no matter how a process exits: - -* reaching the end of execution. -* explicitly having `process.exit(code)` called. -* having `process.kill(pid, sig)` called. -* receiving a fatal signal from outside the process - -Use `signal-exit`. - -```js -var onExit = require('signal-exit') - -onExit(function (code, signal) { - console.log('process exited!') -}) -``` - -## API - -`var remove = onExit(function (code, signal) {}, options)` - -The return value of the function is a function that will remove the -handler. - -Note that the function *only* fires for signals if the signal would -cause the proces to exit. That is, there are no other listeners, and -it is a fatal signal. - -## Options - -* `alwaysLast`: Run this handler after any other signal or exit - handlers. This causes `process.emit` to be monkeypatched. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/index.js deleted file mode 100644 index 337f691..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/index.js +++ /dev/null @@ -1,157 +0,0 @@ -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -var assert = require('assert') -var signals = require('./signals.js') - -var EE = require('events') -/* istanbul ignore if */ -if (typeof EE !== 'function') { - EE = EE.EventEmitter -} - -var emitter -if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ -} else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} -} - -// Because this emitter is a global, we have to check to see if a -// previous version of this library failed to enable infinite listeners. -// I know what you're about to say. But literally everything about -// signal-exit is a compromise with evil. Get used to it. -if (!emitter.infinite) { - emitter.setMaxListeners(Infinity) - emitter.infinite = true -} - -module.exports = function (cb, opts) { - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove -} - -module.exports.unload = unload -function unload () { - if (!loaded) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 -} - -function emit (event, code, signal) { - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) -} - -// { : , ... } -var sigListeners = {} -signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } -}) - -module.exports.signals = function () { - return signals -} - -module.exports.load = load - -var loaded = false - -function load () { - if (loaded) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit -} - -var originalProcessReallyExit = process.reallyExit -function processReallyExit (code) { - process.exitCode = code || 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) -} - -var originalProcessEmit = process.emit -function processEmit (ev, arg) { - if (ev === 'exit') { - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/package.json deleted file mode 100644 index 5a9aa23..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/loud-rejection" - ] - ], - "_from": "signal-exit@>=3.0.0 <4.0.0", - "_id": "signal-exit@3.0.2", - "_inCache": true, - "_location": "/signal-exit", - "_nodeVersion": "6.5.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/signal-exit-3.0.2.tgz_1480821660838_0.6809983775019646" - }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "3.10.9", - "_phantomChildren": {}, - "_requested": { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/loud-rejection" - ], - "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", - "_shrinkwrap": null, - "_spec": "signal-exit@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/loud-rejection", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/tapjs/signal-exit/issues" - }, - "dependencies": {}, - "description": "when you want to fire an event no matter how a process exits.", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.10", - "nyc": "^8.1.0", - "standard": "^7.1.2", - "standard-version": "^2.3.0", - "tap": "^8.0.1" - }, - "directories": {}, - "dist": { - "shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", - "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" - }, - "files": [ - "index.js", - "signals.js" - ], - "gitHead": "9c5ad9809fe6135ef22e2623989deaffe2a4fa8a", - "homepage": "https://github.com/tapjs/signal-exit", - "keywords": [ - "signal", - "exit" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "name": "signal-exit", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/signal-exit.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "tap --timeout=240 ./test/*.js --cov" - }, - "version": "3.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/signals.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/signals.js deleted file mode 100644 index 3bd67a8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/signal-exit/signals.js +++ /dev/null @@ -1,53 +0,0 @@ -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/index.js deleted file mode 100644 index b946a08..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = function (str) { - var isExtendedLengthPath = /^\\\\\?\\/.test(str); - var hasNonAscii = /[^\x00-\x80]+/.test(str); - - if (isExtendedLengthPath || hasNonAscii) { - return str; - } - - return str.replace(/\\/g, '/'); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/package.json deleted file mode 100644 index 6c86d40..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "slash@^1.0.0", - "scope": null, - "escapedName": "slash", - "name": "slash", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "slash@>=1.0.0 <2.0.0", - "_id": "slash@1.0.0", - "_inCache": true, - "_location": "/slash", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.14", - "_phantomChildren": {}, - "_requested": { - "raw": "slash@^1.0.0", - "scope": null, - "escapedName": "slash", - "name": "slash", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "_shasum": "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55", - "_shrinkwrap": null, - "_spec": "slash@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "dependencies": {}, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55", - "tarball": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "c801dd4568ad9380b534067eabe88942394f82ff", - "homepage": "https://github.com/sindresorhus/slash", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "slash", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/readme.md deleted file mode 100644 index 15672f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -```sh -$ npm install --save slash -``` - - -## Usage - -```js -var path = require('path'); -var slash = require('slash'); - -var str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/LICENSE.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/LICENSE.md deleted file mode 100644 index 6247ca9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Evan Wallace - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/README.md deleted file mode 100644 index 0f51b5c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/README.md +++ /dev/null @@ -1,251 +0,0 @@ -# Source Map Support -[![Build Status](https://travis-ci.org/evanw/node-source-map-support.svg?branch=master)](https://travis-ci.org/evanw/node-source-map-support) - -This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. - -## Installation and Usage - -#### Node support - -``` -$ npm install source-map-support -``` - -Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, insert the following line at the top of your compiled code: - -```js -require('source-map-support').install(); -``` - -And place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): - -``` -//# sourceMappingURL=path/to/source.map -``` - -If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be -respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). -The path should either be absolute or relative to the compiled file. - -It is also possible to to install the source map support directly by -requiring the `register` module which can be handy with ES6: - -```js -import 'source-map-support/register' - -// Instead of: -import sourceMapSupport from 'source-map-support' -sourceMapSupport.install() -``` -Note: if you're using babel-register, it includes source-map-support already. - -It is also very useful with Mocha: - -``` -$ mocha --require source-map-support/register tests/ -``` - -#### Browser support - -This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. - -This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. - -```html - - -``` - -This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: - -```html - -``` - -## Options - -This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: - -```js -require('source-map-support').install({ - handleUncaughtExceptions: false -}); -``` - -This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. - -```js -require('source-map-support').install({ - retrieveSourceMap: function(source) { - if (source === 'compiled.js') { - return { - url: 'original.js', - map: fs.readFileSync('compiled.js.map', 'utf8') - }; - } - return null; - } -}); -``` - -The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. -In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. - -```js -require('source-map-support').install({ - environment: 'node' -}); -``` - -To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. - - -```js -require('source-map-support').install({ - hookRequire: true -}); -``` - -This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. - -## Demos - -#### Basic Demo - -original.js: - -```js -throw new Error('test'); // This is the original code -``` - -compiled.js: - -```js -require('source-map-support').install(); - -throw new Error('test'); // This is the compiled code -// The next line defines the sourceMapping. -//# sourceMappingURL=compiled.js.map -``` - -compiled.js.map: - -```json -{ - "version": 3, - "file": "compiled.js", - "sources": ["original.js"], - "names": [], - "mappings": ";;AAAA,MAAM,IAAI" -} -``` - -Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): - -``` -$ node compiled.js - -original.js:1 -throw new Error('test'); // This is the original code - ^ -Error: test - at Object. (original.js:1:7) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### TypeScript Demo - -demo.ts: - -```typescript -declare function require(name: string); -require('source-map-support').install(); -class Foo { - constructor() { this.bar(); } - bar() { throw new Error('this is a demo'); } -} -new Foo(); -``` - -Compile and run the file using the TypeScript compiler from the terminal: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### CoffeeScript Demo - -demo.coffee: - -```coffee -require('source-map-support').install() -foo = -> - bar = -> throw new Error 'this is a demo' - bar() -foo() -``` - -Compile and run the file using the CoffeeScript compiler from the terminal: - -```sh -$ npm install source-map-support coffee-script -$ node_modules/coffee-script/bin/coffee --map --compile demo.coffee -$ node demo.js - -demo.coffee:3 - bar = -> throw new Error 'this is a demo' - ^ -Error: this is a demo - at bar (demo.coffee:3:22) - at foo (demo.coffee:4:3) - at Object. (demo.coffee:5:1) - at Object. (demo.coffee:1:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) -``` - -## Tests - -This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: - -* Build the tests using `build.js` -* Launch the HTTP server (`npm run serve-tests`) and visit - * http://127.0.0.1:1336/amd-test - * http://127.0.0.1:1336/browser-test - * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). -* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ - -## License - -This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/browser-source-map-support.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/browser-source-map-support.js deleted file mode 100644 index e7a3990..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/browser-source-map-support.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Support for source maps in V8 stack traces - * https://github.com/evanw/node-source-map-support - */ -/* - The buffer module from node.js, for the browser. - - @author Feross Aboukhadijeh - license MIT -*/ -(this.define||function(N,O){this.sourceMapSupport=O()})("browser-source-map-support",function(N){(function n(v,m,c){function d(e,a){if(!m[e]){if(!v[e]){var h="function"==typeof require&&require;if(!a&&h)return h(e,!0);if(k)return k(e,!0);throw Error("Cannot find module '"+e+"'");}h=m[e]={exports:{}};v[e][0].call(h.exports,function(a){var c=v[e][1][a];return d(c?c:a)},h,h.exports,n,v,m,c)}return m[e].exports}for(var k="function"==typeof require&&require,q=0;qc)return-1;if(58>c)return c-48+52;if(91>c)return c-65;if(123>c)return c-97+26}var k="undefined"!==typeof Uint8Array?Uint8Array:Array;c.toByteArray=function(c){function e(a){u[b++]=a}if(0>16);e((f&65280)>>8);e(f&255)}2===h?(f=d(c.charAt(a))<<2|d(c.charAt(a+1))>>4,e(f&255)):1===h&&(f=d(c.charAt(a))<<10|d(c.charAt(a+1))<<4|d(c.charAt(a+2))>>2,e(f>>8&255),e(f&255));return u};c.fromByteArray=function(c){var e=c.length%3,a="",h;var d=0;for(h=c.length-e;d>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);a+=r}switch(e){case 1:r=c[c.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<< -4&63);a+="==";break;case 2:r=(c[c.length-2]<<8)+c[c.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,v,m){},{}],4:[function(n,v,m){function c(g,l,b){if(!(this instanceof c))return new c(g,l,b);var x=typeof g; -if("base64"===l&&"string"===x)for(g=g.trim?g.trim():g.replace(/^\s+|\s+$/g,"");0!==g.length%4;)g+="=";if("number"===x)var a=B(g);else if("string"===x)a=c.byteLength(g,l);else if("object"===x)a=B(g.length);else throw Error("First argument needs to be a number, array or string.");if(c._useTypedArrays)var f=c._augment(new Uint8Array(a));else f=this,f.length=a,f._isBuffer=!0;if(c._useTypedArrays&&"number"===typeof g.byteLength)f._set(g);else{var e=g;if(L(e)||c.isBuffer(e)||e&&"object"===typeof e&&"number"=== -typeof e.length)for(l=0;l=a))return b?(b=g[l],l+ -1=a)){var x;b?(l+2>>0)):(l+1>>0);return x}}function e(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"), -p(void 0!==l&&null!==l,"missing offset"),p(l+1=g.length))return g=k(g,l,b,!0),g&32768?-1*(65535-g+1):g}function a(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==l&&null!==l,"missing offset"),p(l+3=g.length))return g=q(g,l,b,!0),g&2147483648?-1*(4294967295-g+1):g}function h(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(l+3=x))for(c=0,x=Math.min(x-b,2);c>>8* -(a?c:1-c)}function b(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+3=x))for(c=0,x=Math.min(x-b,4);c>>8*(a?c:3-c)&255}function f(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+1=g.length||(0<=l?r(g,l,b,a,c):r(g,65535+l+1,b,a,c))}function G(g,l,a,c,f){f||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||(0<=l?b(g,l,a,c,f):b(g,4294967295+l+1,a,c,f))}function t(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c, -"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||J.write(g,b,a,c,23,4)}function M(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+7=g.length||J.write(g, -b,a,c,52,8)}function I(g,b,a){if("number"!==typeof g)return a;g=~~g;if(g>=b)return b;if(0<=g)return g;g+=b;return 0<=g?g:0}function B(g){g=~~Math.ceil(+g);return 0>g?0:g}function L(g){return(Array.isArray||function(g){return"[object Array]"===Object.prototype.toString.call(g)})(g)}function C(g){return 16>g?"0"+g.toString(16):g.toString(16)}function y(g){for(var b=[],a=0;a=c)b.push(g.charCodeAt(a));else{var f=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(g.slice(f, -a+1)).substr(1).split("%");for(f=0;f=b.length||l>=g.length);l++)b[l+a]=g[l];return l}function F(g){try{return decodeURIComponent(g)}catch(l){return String.fromCharCode(65533)}}function H(g,b){p("number"===typeof g,"cannot write a non-number as a number");p(0<=g,"specified a negative value for writing an unsigned value");p(g<= -b,"value is larger than maximum value for type");p(Math.floor(g)===g,"value has a fractional component")}function z(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value");p(Math.floor(g)===g,"value has a fractional component")}function E(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value")} -function p(g,b){if(!g)throw Error(b||"Failed assertion");}var D=n("base64-js"),J=n("ieee754");m.Buffer=c;m.SlowBuffer=c;m.INSPECT_MAX_BYTES=50;c.poolSize=8192;c._useTypedArrays=function(){try{var g=new ArrayBuffer(0),b=new Uint8Array(g);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray}catch(x){return!1}}();c.isEncoding=function(g){switch(String(g).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0; -default:return!1}};c.isBuffer=function(g){return!(null===g||void 0===g||!g._isBuffer)};c.byteLength=function(g,b){g+="";switch(b||"utf8"){case "hex":var a=g.length/2;break;case "utf8":case "utf-8":a=y(g).length;break;case "ascii":case "binary":case "raw":a=g.length;break;case "base64":a=D.toByteArray(g).length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=2*g.length;break;default:throw Error("Unknown encoding");}return a};c.concat=function(g,b){p(L(g),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."); -if(0===g.length)return new c(0);if(1===g.length)return g[0];var a;if("number"!==typeof b)for(a=b=0;al&&(a=l)):a=l;f=String(f||"utf8").toLowerCase();switch(f){case "hex":b=Number(b)||0;f=this.length-b;a?(a=Number(a),a>f&&(a=f)):a=f;f= -g.length;p(0===f%2,"Invalid hex string");a>f/2&&(a=f/2);for(f=0;f>8;h%=256;l.push(h);l.push(f)}g=c._charsWritten=A(l,this,b,a);break;default:throw Error("Unknown encoding");}return g};c.prototype.toString=function(g,b,a){g=String(g||"utf8").toLowerCase();b=Number(b)||0;a=void 0!==a?Number(a):a=this.length;if(a===b)return"";switch(g){case "hex":g=this.length;if(!b||0>b)b=0;if(!a||0>a||a>g)a=g;for(g="";b=this[b]?(g+=F(c)+String.fromCharCode(this[b]), -c=""):c+="%"+this[b].toString(16);a=g+F(c);break;case "ascii":a=d(this,b,a);break;case "binary":a=d(this,b,a);break;case "base64":a=0===b&&a===this.length?D.fromByteArray(this):D.fromByteArray(this.slice(b,a));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=this.slice(b,a);b="";for(g=0;g=a,"sourceEnd < sourceStart"),p(0<=b&&bthis.length&&(f=this.length),g.length-bf||!c._useTypedArrays)for(var l=0;l=this.length))return this[b]};c.prototype.readUInt16LE=function(b,a){return k(this,b,!0,a)};c.prototype.readUInt16BE=function(b,a){return k(this,b,!1,a)};c.prototype.readUInt32LE=function(b,a){return q(this,b,!0,a)};c.prototype.readUInt32BE=function(b,a){return q(this,b,!1,a)};c.prototype.readInt8=function(b,a){a||(p(void 0!==b&&null!==b,"missing offset"),p(b= -this.length))return this[b]&128?-1*(255-this[b]+1):this[b]};c.prototype.readInt16LE=function(b,a){return e(this,b,!0,a)};c.prototype.readInt16BE=function(b,a){return e(this,b,!1,a)};c.prototype.readInt32LE=function(b,f){return a(this,b,!0,f)};c.prototype.readInt32BE=function(b,f){return a(this,b,!1,f)};c.prototype.readFloatLE=function(b,a){return h(this,b,!0,a)};c.prototype.readFloatBE=function(b,a){return h(this,b,!1,a)};c.prototype.readDoubleLE=function(b,a){return u(this,b,!0,a)};c.prototype.readDoubleBE= -function(b,a){return u(this,b,!1,a)};c.prototype.writeUInt8=function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(this[a]=b)};c.prototype.writeUInt16LE=function(b,a,f){r(this,b,a,!0,f)};c.prototype.writeUInt16BE=function(b,a,f){r(this,b,a,!1,f)};c.prototype.writeUInt32LE=function(a,f,c){b(this,a,f,!0,c)};c.prototype.writeUInt32BE=function(a,f,c){b(this,a,f,!1,c)};c.prototype.writeInt8= -function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(0<=b?this.writeUInt8(b,a,f):this.writeUInt8(255+b+1,a,f))};c.prototype.writeInt16LE=function(b,a,c){f(this,b,a,!0,c)};c.prototype.writeInt16BE=function(b,a,c){f(this,b,a,!1,c)};c.prototype.writeInt32LE=function(b,a,f){G(this,b,a,!0,f)};c.prototype.writeInt32BE=function(b,a,f){G(this,b,a,!1,f)};c.prototype.writeFloatLE= -function(b,a,f){t(this,b,a,!0,f)};c.prototype.writeFloatBE=function(b,a,f){t(this,b,a,!1,f)};c.prototype.writeDoubleLE=function(b,a,f){M(this,b,a,!0,f)};c.prototype.writeDoubleBE=function(b,a,f){M(this,b,a,!1,f)};c.prototype.fill=function(b,a,f){b||(b=0);a||(a=0);f||(f=this.length);"string"===typeof b&&(b=b.charCodeAt(0));p("number"===typeof b&&!isNaN(b),"value is not a number");p(f>=a,"end < start");if(f!==a&&0!==this.length)for(p(0<=a&&a"};c.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(c._useTypedArrays)return(new c(this)).buffer;for(var b=new Uint8Array(this.length),a=0,f=b.length;a>1,r=-7;e=k?e-1:0;var b=k?-1:1,f=c[d+e];e+=b;k=f&(1<<-r)-1;f>>=-r;for(r+=a;0>=-r;for(r+=q;0>1,f=23===e?Math.pow(2,-24)-Math.pow(2,-77):0;a=q?0:a-1;var G=q?1:-1,t=0>d||0===d&&0>1/d?1:0;d=Math.abs(d);isNaN(d)||Infinity===d?(d=isNaN(d)?1:0,q=r):(q=Math.floor(Math.log(d)/Math.LN2),1>d*(h=Math.pow(2,-q))&&(q--,h*=2),d=1<=q+b?d+f/h:d+f*Math.pow(2,1-b),2<=d*h&&(q++,h/=2),q+b>=r?(d=0,q=r):1<=q+b?(d=(d*h-1)*Math.pow(2,e),q+=b):(d=d*Math.pow(2,b-1)*Math.pow(2,e),q=0));for(;8<=e;c[k+a]=d&255,a+=G,d/=256,e-=8);q=q<f?[]:b.slice(a,f-a+1)}a=m.resolve(a).substr(1);c=m.resolve(c).substr(1);for(var h=e(a.split("/")),b=e(c.split("/")),f=Math.min(h.length,b.length),G=f,t=0;tc&&(c=a.length+c);return a.substr(c,e)}}).call(this,n("node_modules/process/browser.js"))}, -{"node_modules/process/browser.js":7}],7:[function(n,v,m){function c(){}n=v.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(c){return window.setImmediate(c)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var c=[];window.addEventListener("message",function(d){var k=d.source;k!==window&&null!==k||"process-tick"!==d.data||(d.stopPropagation(),0d?(-d<<1)+1:(d<<1)+0;do d=q&31,q>>>=5,0=e)throw Error("Expected more digits in base 64 VLQ value.");var u=c.decode(d.charCodeAt(k++));if(-1===u)throw Error("Invalid base64 digit: "+d.charAt(k-1)); -var r=!!(u&32);u&=31;a+=u<>1;q.value=1===(a&1)?-d:d;q.rest=k}},{"./base64":10}],10:[function(n,v,m){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(d){if(0<=d&&d=c?c-65:97<=c&&122>=c?c-97+26:48<=c&&57>=c?c-48+52:43==c?62:47==c?63:-1}},{}],11:[function(n,v,m){function c(d,k,q,e,a,h){var u=Math.floor((k-d)/2)+d,r= -a(q,e[u],!0);return 0===r?u:0d?-1:d}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(d,k,q,e){if(0===k.length)return-1;d=c(-1,k.length,d,k,q,e||m.GREATEST_LOWER_BOUND);if(0>d)return-1;for(;0<=d-1&&0===q(k[d],k[d-1],!0);)--d;return d}},{}],12:[function(n,v,m){function c(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var d=n("./util");c.prototype.unsortedForEach= -function(c,d){this._array.forEach(c,d)};c.prototype.add=function(c){var k=this._last,e=k.generatedLine,a=c.generatedLine,h=k.generatedColumn,u=c.generatedColumn;a>e||a==e&&u>=h||0>=d.compareByGeneratedPositionsInflated(k,c)?this._last=c:this._sorted=!1;this._array.push(c)};c.prototype.toArray=function(){this._sorted||(this._array.sort(d.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=c},{"./util":17}],13:[function(n,v,m){function c(c,d,e){var a=c[d];c[d]=c[e]; -c[e]=a}function d(k,m,e,a){if(e=m(k[r],u)&&(h+=1,c(k,h,r));c(k,h+1,r);h+=1;d(k,m,e,h-1);d(k,m,h+1,a)}}m.quickSort=function(c,m){d(c,m,0,c.length-1)}},{}],14:[function(n,v,m){function c(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));return null!=a.sections?new q(a):new d(a)}function d(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");var c=e.getArg(a, -"sources"),t=e.getArg(a,"names",[]),d=e.getArg(a,"sourceRoot",null),r=e.getArg(a,"sourcesContent",null),k=e.getArg(a,"mappings");a=e.getArg(a,"file",null);if(b!=this._version)throw Error("Unsupported version: "+b);c=c.map(String).map(e.normalize).map(function(b){return d&&e.isAbsolute(d)&&e.isAbsolute(b)?e.relative(d,b):b});this._names=h.fromArray(t.map(String),!0);this._sources=h.fromArray(c,!0);this.sourceRoot=d;this.sourcesContent=r;this._mappings=k;this.file=a}function k(){this.generatedColumn= -this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source=null}function q(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");a=e.getArg(a,"sections");if(b!=this._version)throw Error("Unsupported version: "+b);this._sources=new h;this._names=new h;var d={line:-1,column:0};this._sections=a.map(function(b){if(b.url)throw Error("Support for url field in sections not implemented.");var a=e.getArg(b,"offset"),f=e.getArg(a,"line"),t=e.getArg(a, -"column");if(f=b[e])throw new TypeError("Line must be greater than or equal to 1, got "+b[e]);if(0>b[d])throw new TypeError("Column must be greater than or equal to 0, got "+b[d]);return a.search(b,c,h,r)};d.prototype.computeColumnSpans=function(){for(var b=0;b=this._sources.size()&&!this.sourcesContent.some(function(b){return null==b}):!1};d.prototype.sourceContentFor=function(b,a){if(!this.sourcesContent)return null;null!=this.sourceRoot&&(b=e.relative(this.sourceRoot, -b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var c;if(null!=this.sourceRoot&&(c=e.urlParse(this.sourceRoot))){var f=b.replace(/^file:\/\//,"");if("file"==c.scheme&&this._sources.has(f))return this.sourcesContent[this._sources.indexOf(f)];if((!c.path||"/"==c.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}if(a)return null;throw Error('"'+b+'" is not in the SourceMap.');};d.prototype.generatedPositionFor=function(b){var a= -e.getArg(b,"source");null!=this.sourceRoot&&(a=e.relative(this.sourceRoot,a));if(!this._sources.has(a))return{line:null,column:null,lastColumn:null};a=this._sources.indexOf(a);a={source:a,originalLine:e.getArg(b,"line"),originalColumn:e.getArg(b,"column")};b=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(b,"bias",c.GREATEST_LOWER_BOUND));return 0<=b&&(b=this._originalMappings[b],b.source===a.source)?{line:e.getArg(b,"generatedLine", -null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}:{line:null,column:null,lastColumn:null}};m.BasicSourceMapConsumer=d;q.prototype=Object.create(c.prototype);q.prototype.constructor=c;q.prototype._version=3;Object.defineProperty(q.prototype,"sources",{get:function(){for(var a=[],c=0;cb||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b- -9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}m.getArg=function(a,c,d){if(c in a)return a[c];if(3===arguments.length)return d;throw Error('"'+c+'" is a required argument.');};var u=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;m.urlParse=c;m.urlGenerate=d;m.normalize=k;m.join=function(a,e){""===a&&(a=".");""===e&&(e=".");var b=c(e),f=c(a);f&&(a=f.path||"/");if(b&&!b.scheme)return f&&(b.scheme=f.scheme),d(b);if(b||e.match(r))return e; -if(f&&!f.host&&!f.path)return f.host=e,d(f);b="/"===e.charAt(0)?e:k(a.replace(/\/+$/,"")+"/"+e);return f?(f.path=b,d(f)):b};m.isAbsolute=function(a){return"/"===a.charAt(0)||!!a.match(u)};m.relative=function(a,c){""===a&&(a=".");a=a.replace(/\/$/,"");for(var b=0;0!==c.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return c;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return c;++b}return Array(b+1).join("../")+c.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?q:e;m.fromSetString= -n?q:a;m.compareByOriginalPositions=function(a,c,d){var b=a.source-c.source;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;if(0!==b||d)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.generatedLine-c.generatedLine;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsDeflated=function(a,c,d){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b||d)return b;b=a.source-c.source; -if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsInflated=function(a,c){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.source;var d=c.source;b=b===d?0:b>d?1:-1;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;0===b&&(b=a.name,d=c.name,b=b===d?0:b>d?1:-1);return b}}, -{}],18:[function(n,v,m){m.SourceMapGenerator=n("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=n("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=n("./lib/source-node").SourceNode},{"./lib/source-map-consumer":14,"./lib/source-map-generator":15,"./lib/source-node":16}],19:[function(n,v,m){(function(c,d){function k(){return"browser"===K?!0:"node"===K?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&& -"renderer"===window.process.type)}function q(a){return function(b){for(var c=0;c";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||""):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"")}d&&(b+=" ("+a+")");return b}function r(a){var b= -{};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=u;return b}function b(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var d=b.getLineNumber(),e=b.getColumnNumber()-1;1===d&&62=0.4.15 <0.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register" - ] - ], - "_from": "source-map-support@>=0.4.15 <0.5.0", - "_id": "source-map-support@0.4.18", - "_inCache": true, - "_location": "/source-map-support", - "_nodeVersion": "8.4.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/source-map-support-0.4.18.tgz_1505036646969_0.3184988219290972" - }, - "_npmUser": { - "name": "linusu", - "email": "linus@folkdatorn.se" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "source-map-support@^0.4.15", - "scope": null, - "escapedName": "source-map-support", - "name": "source-map-support", - "rawSpec": "^0.4.15", - "spec": ">=0.4.15 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-register" - ], - "_resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "_shasum": "0286a6de8be42641338594e97ccea75f0a2c585f", - "_shrinkwrap": null, - "_spec": "source-map-support@^0.4.15", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-register", - "bugs": { - "url": "https://github.com/evanw/node-source-map-support/issues" - }, - "dependencies": { - "source-map": "^0.5.6" - }, - "description": "Fixes stack traces for files with source maps", - "devDependencies": { - "browserify": "3.44.2", - "coffee-script": "1.7.1", - "http-server": "^0.8.5", - "mocha": "1.18.2", - "webpack": "^1.13.3" - }, - "directories": {}, - "dist": { - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "shasum": "0286a6de8be42641338594e97ccea75f0a2c585f", - "tarball": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz" - }, - "gitHead": "b9b5a5576272916237a253393220770c858685d6", - "homepage": "https://github.com/evanw/node-source-map-support#readme", - "license": "MIT", - "main": "./source-map-support.js", - "maintainers": [ - { - "name": "linusu", - "email": "linus@folkdatorn.se" - }, - { - "name": "julien-f", - "email": "julien.fontanet@isonoe.net" - }, - { - "name": "evanw", - "email": "evan.exe@gmail.com" - } - ], - "name": "source-map-support", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/node-source-map-support.git" - }, - "scripts": { - "build": "node build.js", - "prepublish": "npm run build", - "serve-tests": "http-server -p 1336", - "test": "mocha" - }, - "version": "0.4.18" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/register.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/register.js deleted file mode 100644 index 4f68e67..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/register.js +++ /dev/null @@ -1 +0,0 @@ -require('./').install(); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/source-map-support.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/source-map-support.js deleted file mode 100644 index abd8886..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map-support/source-map-support.js +++ /dev/null @@ -1,527 +0,0 @@ -var SourceMapConsumer = require('source-map').SourceMapConsumer; -var path = require('path'); - -var fs; -try { - fs = require('fs'); - if (!fs.existsSync || !fs.readFileSync) { - // fs doesn't have all methods we need - fs = null; - } -} catch (err) { - /* nop */ -} - -// Only install once if called multiple times -var errorFormatterInstalled = false; -var uncaughtShimInstalled = false; - -// If true, the caches are reset before a stack trace formatting operation -var emptyCacheBetweenOperations = false; - -// Supports {browser, node, auto} -var environment = "auto"; - -// Maps a file path to a string containing the file contents -var fileContentsCache = {}; - -// Maps a file path to a source map for that file -var sourceMapCache = {}; - -// Regex for detecting source maps -var reSourceMap = /^data:application\/json[^,]+base64,/; - -// Priority list of retrieve handlers -var retrieveFileHandlers = []; -var retrieveMapHandlers = []; - -function isInBrowser() { - if (environment === "browser") - return true; - if (environment === "node") - return false; - return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function') && !(window.require && window.module && window.process && window.process.type === "renderer")); -} - -function hasGlobalProcessEventEmitter() { - return ((typeof process === 'object') && (process !== null) && (typeof process.on === 'function')); -} - -function handlerExec(list) { - return function(arg) { - for (var i = 0; i < list.length; i++) { - var ret = list[i](arg); - if (ret) { - return ret; - } - } - return null; - }; -} - -var retrieveFile = handlerExec(retrieveFileHandlers); - -retrieveFileHandlers.push(function(path) { - // Trim the path to make sure there is no extra whitespace. - path = path.trim(); - if (path in fileContentsCache) { - return fileContentsCache[path]; - } - - var contents = null; - if (!fs) { - // Use SJAX if we are in the browser - var xhr = new XMLHttpRequest(); - xhr.open('GET', path, false); - xhr.send(null); - var contents = null - if (xhr.readyState === 4 && xhr.status === 200) { - contents = xhr.responseText - } - } else if (fs.existsSync(path)) { - // Otherwise, use the filesystem - try { - contents = fs.readFileSync(path, 'utf8'); - } catch (er) { - contents = ''; - } - } - - return fileContentsCache[path] = contents; -}); - -// Support URLs relative to a directory, but be careful about a protocol prefix -// in case we are in the browser (i.e. directories may start with "http://") -function supportRelativeURL(file, url) { - if (!file) return url; - var dir = path.dirname(file); - var match = /^\w+:\/\/[^\/]*/.exec(dir); - var protocol = match ? match[0] : ''; - return protocol + path.resolve(dir.slice(protocol.length), url); -} - -function retrieveSourceMapURL(source) { - var fileData; - - if (isInBrowser()) { - try { - var xhr = new XMLHttpRequest(); - xhr.open('GET', source, false); - xhr.send(null); - fileData = xhr.readyState === 4 ? xhr.responseText : null; - - // Support providing a sourceMappingURL via the SourceMap header - var sourceMapHeader = xhr.getResponseHeader("SourceMap") || - xhr.getResponseHeader("X-SourceMap"); - if (sourceMapHeader) { - return sourceMapHeader; - } - } catch (e) { - } - } - - // Get the URL of the source map - fileData = retrieveFile(source); - var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg; - // Keep executing the search to find the *last* sourceMappingURL to avoid - // picking up sourceMappingURLs from comments, strings, etc. - var lastMatch, match; - while (match = re.exec(fileData)) lastMatch = match; - if (!lastMatch) return null; - return lastMatch[1]; -}; - -// Can be overridden by the retrieveSourceMap option to install. Takes a -// generated source filename; returns a {map, optional url} object, or null if -// there is no source map. The map field may be either a string or the parsed -// JSON object (ie, it must be a valid argument to the SourceMapConsumer -// constructor). -var retrieveSourceMap = handlerExec(retrieveMapHandlers); -retrieveMapHandlers.push(function(source) { - var sourceMappingURL = retrieveSourceMapURL(source); - if (!sourceMappingURL) return null; - - // Read the contents of the source map - var sourceMapData; - if (reSourceMap.test(sourceMappingURL)) { - // Support source map URL as a data url - var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); - sourceMapData = new Buffer(rawData, "base64").toString(); - sourceMappingURL = source; - } else { - // Support source map URLs relative to the source URL - sourceMappingURL = supportRelativeURL(source, sourceMappingURL); - sourceMapData = retrieveFile(sourceMappingURL); - } - - if (!sourceMapData) { - return null; - } - - return { - url: sourceMappingURL, - map: sourceMapData - }; -}); - -function mapSourcePosition(position) { - var sourceMap = sourceMapCache[position.source]; - if (!sourceMap) { - // Call the (overrideable) retrieveSourceMap function to get the source map. - var urlAndMap = retrieveSourceMap(position.source); - if (urlAndMap) { - sourceMap = sourceMapCache[position.source] = { - url: urlAndMap.url, - map: new SourceMapConsumer(urlAndMap.map) - }; - - // Load all sources stored inline with the source map into the file cache - // to pretend like they are already loaded. They may not exist on disk. - if (sourceMap.map.sourcesContent) { - sourceMap.map.sources.forEach(function(source, i) { - var contents = sourceMap.map.sourcesContent[i]; - if (contents) { - var url = supportRelativeURL(sourceMap.url, source); - fileContentsCache[url] = contents; - } - }); - } - } else { - sourceMap = sourceMapCache[position.source] = { - url: null, - map: null - }; - } - } - - // Resolve the source URL relative to the URL of the source map - if (sourceMap && sourceMap.map) { - var originalPosition = sourceMap.map.originalPositionFor(position); - - // Only return the original position if a matching line was found. If no - // matching line is found then we return position instead, which will cause - // the stack trace to print the path and line for the compiled file. It is - // better to give a precise location in the compiled file than a vague - // location in the original file. - if (originalPosition.source !== null) { - originalPosition.source = supportRelativeURL( - sourceMap.url, originalPosition.source); - return originalPosition; - } - } - - return position; -} - -// Parses code generated by FormatEvalOrigin(), a function inside V8: -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js -function mapEvalOrigin(origin) { - // Most eval() calls are in this format - var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); - if (match) { - var position = mapSourcePosition({ - source: match[2], - line: +match[3], - column: match[4] - 1 - }); - return 'eval at ' + match[1] + ' (' + position.source + ':' + - position.line + ':' + (position.column + 1) + ')'; - } - - // Parse nested eval() calls using recursion - match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); - if (match) { - return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; - } - - // Make sure we still return useful information if we didn't find anything - return origin; -} - -// This is copied almost verbatim from the V8 source code at -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The -// implementation of wrapCallSite() used to just forward to the actual source -// code of CallSite.prototype.toString but unfortunately a new release of V8 -// did something to the prototype chain and broke the shim. The only fix I -// could find was copy/paste. -function CallSiteToString() { - var fileName; - var fileLocation = ""; - if (this.isNative()) { - fileLocation = "native"; - } else { - fileName = this.getScriptNameOrSourceURL(); - if (!fileName && this.isEval()) { - fileLocation = this.getEvalOrigin(); - fileLocation += ", "; // Expecting source position to follow. - } - - if (fileName) { - fileLocation += fileName; - } else { - // Source code does not originate from a file and is not native, but we - // can still get the source position inside the source string, e.g. in - // an eval string. - fileLocation += ""; - } - var lineNumber = this.getLineNumber(); - if (lineNumber != null) { - fileLocation += ":" + lineNumber; - var columnNumber = this.getColumnNumber(); - if (columnNumber) { - fileLocation += ":" + columnNumber; - } - } - } - - var line = ""; - var functionName = this.getFunctionName(); - var addSuffix = true; - var isConstructor = this.isConstructor(); - var isMethodCall = !(this.isToplevel() || isConstructor); - if (isMethodCall) { - var typeName = this.getTypeName(); - // Fixes shim to be backward compatable with Node v0 to v4 - if (typeName === "[object Object]") { - typeName = "null"; - } - var methodName = this.getMethodName(); - if (functionName) { - if (typeName && functionName.indexOf(typeName) != 0) { - line += typeName + "."; - } - line += functionName; - if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { - line += " [as " + methodName + "]"; - } - } else { - line += typeName + "." + (methodName || ""); - } - } else if (isConstructor) { - line += "new " + (functionName || ""); - } else if (functionName) { - line += functionName; - } else { - line += fileLocation; - addSuffix = false; - } - if (addSuffix) { - line += " (" + fileLocation + ")"; - } - return line; -} - -function cloneCallSite(frame) { - var object = {}; - Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { - object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; - }); - object.toString = CallSiteToString; - return object; -} - -function wrapCallSite(frame) { - if(frame.isNative()) { - return frame; - } - - // Most call sites will return the source file from getFileName(), but code - // passed to eval() ending in "//# sourceURL=..." will return the source file - // from getScriptNameOrSourceURL() instead - var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); - if (source) { - var line = frame.getLineNumber(); - var column = frame.getColumnNumber() - 1; - - // Fix position in Node where some (internal) code is prepended. - // See https://github.com/evanw/node-source-map-support/issues/36 - var headerLength = 62; - if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { - column -= headerLength; - } - - var position = mapSourcePosition({ - source: source, - line: line, - column: column - }); - frame = cloneCallSite(frame); - frame.getFileName = function() { return position.source; }; - frame.getLineNumber = function() { return position.line; }; - frame.getColumnNumber = function() { return position.column + 1; }; - frame.getScriptNameOrSourceURL = function() { return position.source; }; - return frame; - } - - // Code called using eval() needs special handling - var origin = frame.isEval() && frame.getEvalOrigin(); - if (origin) { - origin = mapEvalOrigin(origin); - frame = cloneCallSite(frame); - frame.getEvalOrigin = function() { return origin; }; - return frame; - } - - // If we get here then we were unable to change the source position - return frame; -} - -// This function is part of the V8 stack trace API, for more info see: -// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi -function prepareStackTrace(error, stack) { - if (emptyCacheBetweenOperations) { - fileContentsCache = {}; - sourceMapCache = {}; - } - - return error + stack.map(function(frame) { - return '\n at ' + wrapCallSite(frame); - }).join(''); -} - -// Generate position and snippet of original source with pointer -function getErrorSource(error) { - var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); - if (match) { - var source = match[1]; - var line = +match[2]; - var column = +match[3]; - - // Support the inline sourceContents inside the source map - var contents = fileContentsCache[source]; - - // Support files on disk - if (!contents && fs && fs.existsSync(source)) { - try { - contents = fs.readFileSync(source, 'utf8'); - } catch (er) { - contents = ''; - } - } - - // Format the line from the original source code like node does - if (contents) { - var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; - if (code) { - return source + ':' + line + '\n' + code + '\n' + - new Array(column).join(' ') + '^'; - } - } - } - return null; -} - -function printErrorAndExit (error) { - var source = getErrorSource(error); - - if (source) { - console.error(); - console.error(source); - } - - console.error(error.stack); - process.exit(1); -} - -function shimEmitUncaughtException () { - var origEmit = process.emit; - - process.emit = function (type) { - if (type === 'uncaughtException') { - var hasStack = (arguments[1] && arguments[1].stack); - var hasListeners = (this.listeners(type).length > 0); - - if (hasStack && !hasListeners) { - return printErrorAndExit(arguments[1]); - } - } - - return origEmit.apply(this, arguments); - }; -} - -exports.wrapCallSite = wrapCallSite; -exports.getErrorSource = getErrorSource; -exports.mapSourcePosition = mapSourcePosition; -exports.retrieveSourceMap = retrieveSourceMap; - -exports.install = function(options) { - options = options || {}; - - if (options.environment) { - environment = options.environment; - if (["node", "browser", "auto"].indexOf(environment) === -1) { - throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") - } - } - - // Allow sources to be found by methods other than reading the files - // directly from disk. - if (options.retrieveFile) { - if (options.overrideRetrieveFile) { - retrieveFileHandlers.length = 0; - } - - retrieveFileHandlers.unshift(options.retrieveFile); - } - - // Allow source maps to be found by methods other than reading the files - // directly from disk. - if (options.retrieveSourceMap) { - if (options.overrideRetrieveSourceMap) { - retrieveMapHandlers.length = 0; - } - - retrieveMapHandlers.unshift(options.retrieveSourceMap); - } - - // Support runtime transpilers that include inline source maps - if (options.hookRequire && !isInBrowser()) { - var Module; - try { - Module = require('module'); - } catch (err) { - // NOP: Loading in catch block to convert webpack error to warning. - } - var $compile = Module.prototype._compile; - - if (!$compile.__sourceMapSupport) { - Module.prototype._compile = function(content, filename) { - fileContentsCache[filename] = content; - sourceMapCache[filename] = undefined; - return $compile.call(this, content, filename); - }; - - Module.prototype._compile.__sourceMapSupport = true; - } - } - - // Configure options - if (!emptyCacheBetweenOperations) { - emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? - options.emptyCacheBetweenOperations : false; - } - - // Install the error reformatter - if (!errorFormatterInstalled) { - errorFormatterInstalled = true; - Error.prepareStackTrace = prepareStackTrace; - } - - if (!uncaughtShimInstalled) { - var installHandler = 'handleUncaughtExceptions' in options ? - options.handleUncaughtExceptions : true; - - // Provide the option to not install the uncaught exception handler. This is - // to support other uncaught exception handlers (in test frameworks, for - // example). If this handler is not installed and there are no other uncaught - // exception handlers, uncaught exceptions will be caught by node's built-in - // exception handler and the process will still be terminated. However, the - // generated JavaScript code will be shown above the stack trace instead of - // the original source code. - if (installHandler && hasGlobalProcessEventEmitter()) { - uncaughtShimInstalled = true; - shimEmitUncaughtException(); - } - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/CHANGELOG.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/README.md deleted file mode 100644 index 3281339..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/README.md +++ /dev/null @@ -1,729 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.debug.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab638..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.min.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/array-set.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64-vlq.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b404..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/binary-search.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac94..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/mapping-list.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/quick-sort.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caad..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-consumer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc28..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-generator.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-node.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/util.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e45..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/package.json deleted file mode 100644 index 9fdcc2b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/package.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "source-map@^0.5.6", - "scope": null, - "escapedName": "source-map", - "name": "source-map", - "rawSpec": "^0.5.6", - "spec": ">=0.5.6 <0.6.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core" - ] - ], - "_from": "source-map@>=0.5.6 <0.6.0", - "_id": "source-map@0.5.7", - "_inCache": true, - "_location": "/source-map", - "_nodeVersion": "6.11.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/source-map-0.5.7.tgz_1503333015516_0.19087489508092403" - }, - "_npmUser": { - "name": "tromey", - "email": "tom@tromey.com" - }, - "_npmVersion": "3.10.10", - "_phantomChildren": {}, - "_requested": { - "raw": "source-map@^0.5.6", - "scope": null, - "escapedName": "source-map", - "name": "source-map", - "rawSpec": "^0.5.6", - "spec": ">=0.5.6 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-core", - "/babel-generator", - "/concat-with-sourcemaps", - "/source-map-support", - "/vinyl-sourcemaps-apply" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", - "_shrinkwrap": null, - "_spec": "source-map@^0.5.6", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-core", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "dependencies": {}, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "directories": {}, - "dist": { - "shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", - "tarball": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "gitHead": "326dd955a366569759d9537ef5f0f167c89d92d2", - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "maintainers": [ - { - "name": "tromey", - "email": "tom@tromey.com" - }, - { - "name": "ejpbruel", - "email": "ejpbruel@gmail.com" - }, - { - "name": "mozilla-devtools", - "email": "nfitzgerald@mozilla.com" - }, - { - "name": "mozilla", - "email": "dherman@mozilla.com" - }, - { - "name": "nickfitzgerald", - "email": "fitzgen@gmail.com" - } - ], - "name": "source-map", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/source-map.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/LICENSE deleted file mode 100644 index 2d92a2b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blaine Bublitz - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/README.md deleted file mode 100644 index 8dfdb9c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/README.md +++ /dev/null @@ -1,41 +0,0 @@ -sparkles -======== - -[![Build Status](https://travis-ci.org/phated/sparkles.svg?branch=master)](https://travis-ci.org/phated/sparkles) - -Namespaced global event emitter - -## Usage - -Sparkles exports a function that returns a singleton `EventEmitter`. -This EE can be shared across your application, whether or not node loads -multiple copies. - -```js -var sparkles = require('sparkles')(); // make sure to call the function - -sparkles.on('my-event', function(evt){ - console.log('my-event handled', evt); -}); - -sparkles.emit('my-event', { my: 'event' }); -``` - -## API - -### sparkles(namespace) - -Returns an EventEmitter that is shared amongst the provided namespace. If no namespace -is provided, returns a default EventEmitter. - -### sparkles.exists(namespace); - -Checks whether a namespace exists and returns true or false. - -## Why the name? - -This is a "global emitter"; shortened: "glitter" but it was already taken; so we got sparkles instead :smile: - -## License - -MIT diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/index.js deleted file mode 100644 index 1183745..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var EventEmitter = require('events').EventEmitter; - -var sparklesNamespace = 'store@sparkles'; -var defaultNamespace = 'default'; - -function getStore(){ - var store = global[sparklesNamespace]; - - if(!store){ - store = global[sparklesNamespace] = {}; - } - - return store; -} - -function getEmitter(namespace){ - - var store = getStore(); - - namespace = namespace || defaultNamespace; - - var ee = store[namespace]; - - if(!ee){ - ee = store[namespace] = new EventEmitter(); - ee.setMaxListeners(0); - ee.remove = function remove(){ - ee.removeAllListeners(); - delete store[namespace]; - }; - } - - return ee; -} - -function exists(namespace){ - var store = getStore(); - - return !!(store[namespace]); -} - -module.exports = getEmitter; -module.exports.exists = exists; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/package.json deleted file mode 100644 index 16d950e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/sparkles/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "sparkles@^1.0.0", - "scope": null, - "escapedName": "sparkles", - "name": "sparkles", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glogg" - ] - ], - "_from": "sparkles@>=1.0.0 <2.0.0", - "_id": "sparkles@1.0.0", - "_inCache": true, - "_location": "/sparkles", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "phated", - "email": "blaine@iceddev.com" - }, - "_npmVersion": "2.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "sparkles@^1.0.0", - "scope": null, - "escapedName": "sparkles", - "name": "sparkles", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glogg", - "/has-gulplog" - ], - "_resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "_shasum": "1acbbfb592436d10bbe8f785b7cc6f82815012c3", - "_shrinkwrap": null, - "_spec": "sparkles@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glogg", - "author": { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://iceddev.com/" - }, - "bugs": { - "url": "https://github.com/phated/sparkles/issues" - }, - "contributors": [], - "dependencies": {}, - "description": "Namespaced global event emitter", - "devDependencies": { - "@phated/eslint-config-iceddev": "^0.2.1", - "code": "^1.5.0", - "eslint": "^1.3.1", - "eslint-plugin-mocha": "^0.5.1", - "eslint-plugin-react": "^3.3.1", - "lab": "^5.16.0" - }, - "directories": {}, - "dist": { - "shasum": "1acbbfb592436d10bbe8f785b7cc6f82815012c3", - "tarball": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "gitHead": "66eed55eeac9f3ba641d4643c5ad2ed598bc6a72", - "homepage": "https://github.com/phated/sparkles#readme", - "keywords": [ - "ee", - "emitter", - "events", - "global", - "namespaced" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "sparkles", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/phated/sparkles.git" - }, - "scripts": { - "test": "lab -cvL --ignore store@sparkles" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/LICENSE deleted file mode 100644 index 4b54239..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -SPDX:Apache-2.0 - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - -(b) You must cause any modified files to carry prominent notices stating that You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/README.md deleted file mode 100644 index 4289e5c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/README.md +++ /dev/null @@ -1,10 +0,0 @@ -```javascript -var correct = require('spdx-correct'); -var assert = require('assert'); - -assert.equal(correct('mit'), 'MIT') - -assert.equal(correct('Apache 2'), 'Apache-2.0') - -assert(correct('No idea what license') === null) -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/index.js deleted file mode 100644 index 75b7a21..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/index.js +++ /dev/null @@ -1,237 +0,0 @@ -var licenseIDs = require('spdx-license-ids'); - -function valid(string) { - return licenseIDs.indexOf(string) > -1; -} - -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['WTH', 'WTF'], - ['-License', ''] -]; - -var TRANSPOSED = 0; -var CORRECT = 1; - -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function(argument) { - return argument.toUpperCase(); - }, - // e.g. 'MIT ' - function(argument) { - return argument.trim(); - }, - // e.g. 'M.I.T.' - function(argument) { - return argument.replace(/\./g, ''); - }, - // e.g. 'Apache- 2.0' - function(argument) { - return argument.replace(/\s+/g, ''); - }, - // e.g. 'CC BY 4.0'' - function(argument) { - return argument.replace(/\s+/g, '-'); - }, - // e.g. 'LGPLv2.1' - function(argument) { - return argument.replace('v', '-'); - }, - // e.g. 'Apache 2.0' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1'); - }, - // e.g. 'GPL 2' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0'); - }, - // e.g. 'Apache Version 2.0' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); - }, - // e.g. 'Apache Version 2' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); - }, - // e.g. 'ZLIB' - function(argument) { - return argument[0].toUpperCase() + argument.slice(1); - }, - // e.g. 'MPL/2.0' - function(argument) { - return argument.replace('/', '-'); - }, - // e.g. 'Apache 2' - function(argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0'); - }, - // e.g. 'GPL-2.0-' - function(argument) { - return argument.slice(0, argument.length - 1); - }, - // e.g. 'GPL2' - function(argument) { - return argument.replace(/(\d)$/, '-$1.0'); - }, - // e.g. 'BSD 3' - function(argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); - }, - // e.g. 'BSD clause 3' - function(argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); - }, - // e.g. 'BY-NC-4.0' - function(argument) { - return 'CC-' + argument; - }, - // e.g. 'BY-NC' - function(argument) { - return 'CC-' + argument + '-4.0'; - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, ''); - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0'; - } -]; - -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0'], - ['AGPL', 'AGPL-3.0'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0'], - ['LGPL', 'LGPL-3.0'], - ['GPL', 'GPL-3.0'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -]; - -var SUBSTRING = 0; -var IDENTIFIER = 1; - -var validTransformation = function(identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier); - if (transformed !== identifier && valid(transformed)) { - return transformed; - } - } - return null; -}; - -var validLastResort = function(identifier) { - var upperCased = identifier.toUpperCase(); - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i]; - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER]; - } - } - return null; -}; - -var anyCorrection = function(identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i]; - var transposed = transposition[TRANSPOSED]; - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ); - var checked = check(corrected); - if (checked !== null) { - return checked; - } - } - } - return null; -}; - -module.exports = function(identifier) { - identifier = identifier.replace(/\+$/, ''); - if (valid(identifier)) { - return identifier; - } - var transformed = validTransformation(identifier); - if (transformed !== null) { - return transformed; - } - transformed = anyCorrection(identifier, function(argument) { - if (valid(argument)) { - return argument; - } - return validTransformation(argument); - }); - if (transformed !== null) { - return transformed; - } - transformed = validLastResort(identifier); - if (transformed !== null) { - return transformed; - } - transformed = anyCorrection(identifier, validLastResort); - if (transformed !== null) { - return transformed; - } - return null; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/package.json deleted file mode 100644 index 6cb8207..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "spdx-correct@~1.0.0", - "scope": null, - "escapedName": "spdx-correct", - "name": "spdx-correct", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license" - ] - ], - "_from": "spdx-correct@>=1.0.0 <1.1.0", - "_id": "spdx-correct@1.0.2", - "_inCache": true, - "_location": "/spdx-correct", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "raw": "spdx-correct@~1.0.0", - "scope": null, - "escapedName": "spdx-correct", - "name": "spdx-correct", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/validate-npm-package-license" - ], - "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "_shasum": "4b3073d933ff51f3912f03ac5519498a4150db40", - "_shrinkwrap": null, - "_spec": "spdx-correct@~1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license", - "author": { - "name": "Kyle E. Mitchell", - "email": "kyle@kemitchell.com", - "url": "https://kemitchell.com" - }, - "bugs": { - "url": "https://github.com/kemitchell/spdx-correct.js/issues" - }, - "dependencies": { - "spdx-license-ids": "^1.0.2" - }, - "description": "correct invalid SPDX identifiers", - "devDependencies": { - "defence-cli": "^1.0.1", - "replace-require-self": "^1.0.0", - "spdx-expression-parse": "^1.0.0", - "tape": "~4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "4b3073d933ff51f3912f03ac5519498a4150db40", - "tarball": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz" - }, - "gitHead": "8430a3ad521e1455208db33faafcb79c7b074236", - "homepage": "https://github.com/kemitchell/spdx-correct.js#readme", - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata" - ], - "license": "Apache-2.0", - "maintainers": [ - { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "name": "spdx-correct", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/kemitchell/spdx-correct.js.git" - }, - "scripts": { - "test": "defence README.md | replace-require-self | node && tape *.test.js" - }, - "version": "1.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/AUTHORS b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 155f0f6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/README.md deleted file mode 100644 index 9928cdc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/README.md +++ /dev/null @@ -1,83 +0,0 @@ -This package parses SPDX license expression strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools. - -In a nutshell: - -```javascript -var parse = require('spdx-expression-parse') -var assert = require('assert') - -assert.deepEqual( - // Licensed under the terms of the Two-Clause BSD License. - parse('BSD-2-Clause'), - {license: 'BSD-2-Clause'} -) - -assert.throws(function () { - // An invalid SPDX license expression. - // Should be `Apache-2.0`. - parse('Apache 2') -}) - -assert.deepEqual( - // Dual licensed under LGPL 2.1 or a combination of the Three-Clause - // BSD License and the MIT License. - parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'), - { - left: {license: 'LGPL-2.1'}, - conjunction: 'or', - right: { - left: {license: 'BSD-3-Clause'}, - conjunction: 'and', - right: {license: 'MIT'} - } - } -) -``` - -The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.org/), a standard from the [Linux Foundation](https://www.linuxfoundation.org) for shareable data about software package license terms. SPDX aims to make sharing and auditing license data easy, especially for users of open-source software. - -The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard: - -1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-exceptions) and [spdx-exceptions](https://www.npmjs.com/package/spdx-license-ids) packages implement the license list. They are development dependencies of this package. - - Any license identifier from the license list is a valid license expression: - - ```javascript - require('spdx-license-ids').forEach(function (id) { - assert.deepEqual(parse(id), {license: id}) - }) - ``` - - So is any license identifier `WITH` a standardized license exception: - - ```javascript - require('spdx-license-ids').forEach(function (id) { - require('spdx-exceptions').forEach(function (e) { - assert.deepEqual( - parse(id + ' WITH ' + e), - {license: id, exception: e} - ) - }) - }) - ``` - -2. The license expression language, for describing simple and complex license terms, like `MIT` for MIT-licensed and `(GPL-2.0 OR Apache-2.0)` for dual-licensing under GPL 2.0 and Apache 2.0. This package implements the license expression language. - - ```javascript - assert.deepEqual( - // Licensed under a combination of the MIT License and a combination - // of LGPL 2.1 (or a later version) and the Three-Clause BSD License. - parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), - { - left: {license: 'MIT'}, - conjunction: 'and', - right: { - left: {license: 'LGPL-2.1', plus: true}, - conjunction: 'and', - right: {license: 'BSD-3-Clause'} - } - } - ) - ``` - -The Linux Foundation and its contributors license the SPDX standard under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. The authors of this package license their work under the terms of the MIT License. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 56a9b50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var parser = require('./parser').parser - -module.exports = function (argument) { - return parser.parse(argument) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index b7eea12..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "spdx-expression-parse@~1.0.0", - "scope": null, - "escapedName": "spdx-expression-parse", - "name": "spdx-expression-parse", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license" - ] - ], - "_from": "spdx-expression-parse@>=1.0.0 <1.1.0", - "_id": "spdx-expression-parse@1.0.4", - "_inCache": true, - "_location": "/spdx-expression-parse", - "_nodeVersion": "4.6.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/spdx-expression-parse-1.0.4.tgz_1475698361593_0.7478717286139727" - }, - "_npmUser": { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - "_npmVersion": "3.10.8", - "_phantomChildren": {}, - "_requested": { - "raw": "spdx-expression-parse@~1.0.0", - "scope": null, - "escapedName": "spdx-expression-parse", - "name": "spdx-expression-parse", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/validate-npm-package-license" - ], - "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "_shasum": "9bdf2f20e1f40ed447fbe273266191fced51626c", - "_shrinkwrap": null, - "_spec": "spdx-expression-parse@~1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license", - "author": { - "name": "Kyle E. Mitchell", - "email": "kyle@kemitchell.com", - "url": "http://kemitchell.com" - }, - "bugs": { - "url": "https://github.com/kemitchell/spdx-expression-parse.js/issues" - }, - "contributors": [ - { - "name": "C. Scott Ananian", - "email": "cscott@cscott.net", - "url": "http://cscott.net" - }, - { - "name": "Kyle E. Mitchell", - "email": "kyle@kemitchell.com", - "url": "https://kemitchell.com" - }, - { - "name": "Shinnosuke Watanabe", - "email": "snnskwtnb@gmail.com" - } - ], - "dependencies": {}, - "description": "parse SPDX license expressions", - "devDependencies": { - "defence-cli": "^1.0.1", - "jison": "^0.4.15", - "replace-require-self": "^1.0.0", - "spdx-exceptions": "^1.0.4", - "spdx-license-ids": "^1.0.0", - "standard": "^8.0.0" - }, - "directories": {}, - "dist": { - "shasum": "9bdf2f20e1f40ed447fbe273266191fced51626c", - "tarball": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz" - }, - "files": [ - "AUTHORS", - "index.js", - "parser.js" - ], - "gitHead": "326b222ed9e89e9ef472656e9970649b9ee4e8f3", - "homepage": "https://github.com/kemitchell/spdx-expression-parse.js#readme", - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "(MIT AND CC-BY-3.0)", - "maintainers": [ - { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - } - ], - "name": "spdx-expression-parse", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/kemitchell/spdx-expression-parse.js.git" - }, - "scripts": { - "lint": "standard", - "prepublish": "node generate-parser.js > parser.js", - "pretest": "npm run prepublish", - "test": "defence -i javascript README.md | replace-require-self | node" - }, - "version": "1.0.4" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/parser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/parser.js deleted file mode 100644 index a5e2edb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-expression-parse/parser.js +++ /dev/null @@ -1,1357 +0,0 @@ -/* parser generated by jison 0.4.17 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var spdxparse = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, -productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: -return this.$ = $$[$0-1] -break; -case 2: case 4: case 5: -this.$ = {license: yytext} -break; -case 3: -this.$ = {license: $$[$0-1], plus: true} -break; -case 6: -this.$ = $$[$0] -break; -case 7: -this.$ = {exception: $$[$0]} -this.$.license = $$[$0-2].license -if ($$[$0-2].hasOwnProperty('plus')) { - this.$.plus = $$[$0-2].plus -} -break; -case 8: -this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]} -break; -case 9: -this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]} -break; -case 10: -this.$ = $$[$0-1] -break; -} -}, -table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], -defaultActions: {8:[2,1]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - function _parseError (msg, hash) { - this.message = msg; - this.hash = hash; - } - _parseError.prototype = Error; - - throw new _parseError(str, hash); - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - _token_stack: - var lex = function () { - var token; - token = lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - }; - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 5 -break; -case 1:/* skip whitespace */ -break; -case 2:return 8 -break; -case 3:return 16 -break; -case 4:return 17 -break; -case 5:return 11 -break; -case 6:return 10 -break; -case 7:return 9 -break; -case 8:return 14 -break; -case 9:return 15 -break; -case 10:return 12 -break; -case 11:return 7 -break; -case 12:return 7 -break; -case 13:return 7 -break; -case 14:return 7 -break; -case 15:return 7 -break; -case 16:return 7 -break; -case 17:return 7 -break; -case 18:return 7 -break; -case 19:return 7 -break; -case 20:return 7 -break; -case 21:return 7 -break; -case 22:return 7 -break; -case 23:return 7 -break; -case 24:return 13 -break; -case 25:return 13 -break; -case 26:return 13 -break; -case 27:return 13 -break; -case 28:return 13 -break; -case 29:return 13 -break; -case 30:return 13 -break; -case 31:return 13 -break; -case 32:return 7 -break; -case 33:return 13 -break; -case 34:return 7 -break; -case 35:return 13 -break; -case 36:return 7 -break; -case 37:return 13 -break; -case 38:return 13 -break; -case 39:return 7 -break; -case 40:return 13 -break; -case 41:return 13 -break; -case 42:return 13 -break; -case 43:return 13 -break; -case 44:return 13 -break; -case 45:return 7 -break; -case 46:return 13 -break; -case 47:return 7 -break; -case 48:return 7 -break; -case 49:return 7 -break; -case 50:return 7 -break; -case 51:return 7 -break; -case 52:return 7 -break; -case 53:return 7 -break; -case 54:return 7 -break; -case 55:return 7 -break; -case 56:return 7 -break; -case 57:return 7 -break; -case 58:return 7 -break; -case 59:return 7 -break; -case 60:return 7 -break; -case 61:return 7 -break; -case 62:return 7 -break; -case 63:return 13 -break; -case 64:return 7 -break; -case 65:return 7 -break; -case 66:return 13 -break; -case 67:return 7 -break; -case 68:return 7 -break; -case 69:return 7 -break; -case 70:return 7 -break; -case 71:return 7 -break; -case 72:return 7 -break; -case 73:return 13 -break; -case 74:return 7 -break; -case 75:return 13 -break; -case 76:return 7 -break; -case 77:return 7 -break; -case 78:return 7 -break; -case 79:return 7 -break; -case 80:return 7 -break; -case 81:return 7 -break; -case 82:return 7 -break; -case 83:return 7 -break; -case 84:return 7 -break; -case 85:return 7 -break; -case 86:return 7 -break; -case 87:return 7 -break; -case 88:return 7 -break; -case 89:return 7 -break; -case 90:return 7 -break; -case 91:return 7 -break; -case 92:return 7 -break; -case 93:return 7 -break; -case 94:return 7 -break; -case 95:return 7 -break; -case 96:return 7 -break; -case 97:return 7 -break; -case 98:return 7 -break; -case 99:return 7 -break; -case 100:return 7 -break; -case 101:return 7 -break; -case 102:return 7 -break; -case 103:return 7 -break; -case 104:return 7 -break; -case 105:return 7 -break; -case 106:return 7 -break; -case 107:return 7 -break; -case 108:return 7 -break; -case 109:return 7 -break; -case 110:return 7 -break; -case 111:return 7 -break; -case 112:return 7 -break; -case 113:return 7 -break; -case 114:return 7 -break; -case 115:return 7 -break; -case 116:return 7 -break; -case 117:return 7 -break; -case 118:return 7 -break; -case 119:return 7 -break; -case 120:return 7 -break; -case 121:return 7 -break; -case 122:return 7 -break; -case 123:return 7 -break; -case 124:return 7 -break; -case 125:return 7 -break; -case 126:return 7 -break; -case 127:return 7 -break; -case 128:return 7 -break; -case 129:return 7 -break; -case 130:return 7 -break; -case 131:return 7 -break; -case 132:return 7 -break; -case 133:return 7 -break; -case 134:return 7 -break; -case 135:return 7 -break; -case 136:return 7 -break; -case 137:return 7 -break; -case 138:return 7 -break; -case 139:return 7 -break; -case 140:return 7 -break; -case 141:return 7 -break; -case 142:return 7 -break; -case 143:return 7 -break; -case 144:return 7 -break; -case 145:return 7 -break; -case 146:return 7 -break; -case 147:return 7 -break; -case 148:return 7 -break; -case 149:return 7 -break; -case 150:return 7 -break; -case 151:return 7 -break; -case 152:return 7 -break; -case 153:return 7 -break; -case 154:return 7 -break; -case 155:return 7 -break; -case 156:return 7 -break; -case 157:return 7 -break; -case 158:return 7 -break; -case 159:return 7 -break; -case 160:return 7 -break; -case 161:return 7 -break; -case 162:return 7 -break; -case 163:return 7 -break; -case 164:return 7 -break; -case 165:return 7 -break; -case 166:return 7 -break; -case 167:return 7 -break; -case 168:return 7 -break; -case 169:return 7 -break; -case 170:return 7 -break; -case 171:return 7 -break; -case 172:return 7 -break; -case 173:return 7 -break; -case 174:return 7 -break; -case 175:return 7 -break; -case 176:return 7 -break; -case 177:return 7 -break; -case 178:return 7 -break; -case 179:return 7 -break; -case 180:return 7 -break; -case 181:return 7 -break; -case 182:return 7 -break; -case 183:return 7 -break; -case 184:return 7 -break; -case 185:return 7 -break; -case 186:return 7 -break; -case 187:return 7 -break; -case 188:return 7 -break; -case 189:return 7 -break; -case 190:return 7 -break; -case 191:return 7 -break; -case 192:return 7 -break; -case 193:return 7 -break; -case 194:return 7 -break; -case 195:return 7 -break; -case 196:return 7 -break; -case 197:return 7 -break; -case 198:return 7 -break; -case 199:return 7 -break; -case 200:return 7 -break; -case 201:return 7 -break; -case 202:return 7 -break; -case 203:return 7 -break; -case 204:return 7 -break; -case 205:return 7 -break; -case 206:return 7 -break; -case 207:return 7 -break; -case 208:return 7 -break; -case 209:return 7 -break; -case 210:return 7 -break; -case 211:return 7 -break; -case 212:return 7 -break; -case 213:return 7 -break; -case 214:return 7 -break; -case 215:return 7 -break; -case 216:return 7 -break; -case 217:return 7 -break; -case 218:return 7 -break; -case 219:return 7 -break; -case 220:return 7 -break; -case 221:return 7 -break; -case 222:return 7 -break; -case 223:return 7 -break; -case 224:return 7 -break; -case 225:return 7 -break; -case 226:return 7 -break; -case 227:return 7 -break; -case 228:return 7 -break; -case 229:return 7 -break; -case 230:return 7 -break; -case 231:return 7 -break; -case 232:return 7 -break; -case 233:return 7 -break; -case 234:return 7 -break; -case 235:return 7 -break; -case 236:return 7 -break; -case 237:return 7 -break; -case 238:return 7 -break; -case 239:return 7 -break; -case 240:return 7 -break; -case 241:return 7 -break; -case 242:return 7 -break; -case 243:return 7 -break; -case 244:return 7 -break; -case 245:return 7 -break; -case 246:return 7 -break; -case 247:return 7 -break; -case 248:return 7 -break; -case 249:return 7 -break; -case 250:return 7 -break; -case 251:return 7 -break; -case 252:return 7 -break; -case 253:return 7 -break; -case 254:return 7 -break; -case 255:return 7 -break; -case 256:return 7 -break; -case 257:return 7 -break; -case 258:return 7 -break; -case 259:return 7 -break; -case 260:return 7 -break; -case 261:return 7 -break; -case 262:return 7 -break; -case 263:return 7 -break; -case 264:return 7 -break; -case 265:return 7 -break; -case 266:return 7 -break; -case 267:return 7 -break; -case 268:return 7 -break; -case 269:return 7 -break; -case 270:return 7 -break; -case 271:return 7 -break; -case 272:return 7 -break; -case 273:return 7 -break; -case 274:return 7 -break; -case 275:return 7 -break; -case 276:return 7 -break; -case 277:return 7 -break; -case 278:return 7 -break; -case 279:return 7 -break; -case 280:return 7 -break; -case 281:return 7 -break; -case 282:return 7 -break; -case 283:return 7 -break; -case 284:return 7 -break; -case 285:return 7 -break; -case 286:return 7 -break; -case 287:return 7 -break; -case 288:return 7 -break; -case 289:return 7 -break; -case 290:return 7 -break; -case 291:return 7 -break; -case 292:return 7 -break; -case 293:return 7 -break; -case 294:return 7 -break; -case 295:return 7 -break; -case 296:return 7 -break; -case 297:return 7 -break; -case 298:return 7 -break; -case 299:return 7 -break; -case 300:return 7 -break; -case 301:return 7 -break; -case 302:return 7 -break; -case 303:return 7 -break; -case 304:return 7 -break; -case 305:return 7 -break; -case 306:return 7 -break; -case 307:return 7 -break; -case 308:return 7 -break; -case 309:return 7 -break; -case 310:return 7 -break; -case 311:return 7 -break; -case 312:return 7 -break; -case 313:return 7 -break; -case 314:return 7 -break; -case 315:return 7 -break; -case 316:return 7 -break; -case 317:return 7 -break; -case 318:return 7 -break; -case 319:return 7 -break; -case 320:return 7 -break; -case 321:return 7 -break; -case 322:return 7 -break; -case 323:return 7 -break; -case 324:return 7 -break; -case 325:return 7 -break; -case 326:return 7 -break; -case 327:return 7 -break; -case 328:return 7 -break; -case 329:return 7 -break; -case 330:return 7 -break; -case 331:return 7 -break; -case 332:return 7 -break; -case 333:return 7 -break; -case 334:return 7 -break; -case 335:return 7 -break; -case 336:return 7 -break; -case 337:return 7 -break; -case 338:return 7 -break; -case 339:return 7 -break; -case 340:return 7 -break; -case 341:return 7 -break; -case 342:return 7 -break; -case 343:return 7 -break; -case 344:return 7 -break; -case 345:return 7 -break; -case 346:return 7 -break; -case 347:return 7 -break; -case 348:return 7 -break; -case 349:return 7 -break; -case 350:return 7 -break; -case 351:return 7 -break; -case 352:return 7 -break; -case 353:return 7 -break; -case 354:return 7 -break; -case 355:return 7 -break; -case 356:return 7 -break; -case 357:return 7 -break; -case 358:return 7 -break; -case 359:return 7 -break; -case 360:return 7 -break; -case 361:return 7 -break; -case 362:return 7 -break; -case 363:return 7 -break; -case 364:return 7 -break; -} -}, -rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-4-Clause)/,/^(?:BSD-3-Clause)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-NC-1\.0)/,/^(?:bzip2-1\.0\.6)/,/^(?:Unicode-TOU)/,/^(?:CNRI-Jython)/,/^(?:ImageMagick)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:OLDAP-2\.2\.2)/,/^(?:LiLiQ-R-1\.1)/,/^(?:bzip2-1\.0\.5)/,/^(?:LiLiQ-P-1\.1)/,/^(?:OLDAP-2\.0\.1)/,/^(?:OLDAP-2\.2\.1)/,/^(?:CNRI-Python)/,/^(?:XFree86-1\.1)/,/^(?:OSET-PL-2\.1)/,/^(?:Apache-2\.0)/,/^(?:Watcom-1\.0)/,/^(?:PostgreSQL)/,/^(?:Python-2\.0)/,/^(?:RHeCos-1\.1)/,/^(?:EUDatagrid)/,/^(?:Spencer-99)/,/^(?:Intel-ACPI)/,/^(?:CECILL-1\.0)/,/^(?:CECILL-1\.1)/,/^(?:JasPer-2\.0)/,/^(?:CECILL-2\.0)/,/^(?:CECILL-2\.1)/,/^(?:gSOAP-1\.3b)/,/^(?:Spencer-94)/,/^(?:Apache-1\.1)/,/^(?:Spencer-86)/,/^(?:Apache-1\.0)/,/^(?:ClArtistic)/,/^(?:TORQUE-1\.1)/,/^(?:CATOSL-1\.1)/,/^(?:Adobe-2006)/,/^(?:Zimbra-1\.4)/,/^(?:Zimbra-1\.3)/,/^(?:Condor-1\.1)/,/^(?:CC-BY-3\.0)/,/^(?:CC-BY-2\.5)/,/^(?:OLDAP-2\.4)/,/^(?:SGI-B-1\.1)/,/^(?:SISSL-1\.2)/,/^(?:SGI-B-1\.0)/,/^(?:OLDAP-2\.3)/,/^(?:CC-BY-4\.0)/,/^(?:Crossword)/,/^(?:SimPL-2\.0)/,/^(?:OLDAP-2\.2)/,/^(?:OLDAP-2\.1)/,/^(?:ErlPL-1\.1)/,/^(?:LPPL-1\.3a)/,/^(?:LPPL-1\.3c)/,/^(?:OLDAP-2\.0)/,/^(?:Leptonica)/,/^(?:CPOL-1\.02)/,/^(?:OLDAP-1\.4)/,/^(?:OLDAP-1\.3)/,/^(?:CC-BY-2\.0)/,/^(?:Unlicense)/,/^(?:OLDAP-2\.8)/,/^(?:OLDAP-1\.2)/,/^(?:MakeIndex)/,/^(?:OLDAP-2\.7)/,/^(?:OLDAP-1\.1)/,/^(?:Sleepycat)/,/^(?:D-FSL-1\.0)/,/^(?:CC-BY-1\.0)/,/^(?:OLDAP-2\.6)/,/^(?:WXwindows)/,/^(?:NPOSL-3\.0)/,/^(?:FreeImage)/,/^(?:SGI-B-2\.0)/,/^(?:OLDAP-2\.5)/,/^(?:Beerware)/,/^(?:Newsletr)/,/^(?:NBPL-1\.0)/,/^(?:NASA-1\.3)/,/^(?:NLOD-1\.0)/,/^(?:AGPL-1\.0)/,/^(?:OCLC-2\.0)/,/^(?:ODbL-1\.0)/,/^(?:PDDL-1\.0)/,/^(?:Motosoto)/,/^(?:Afmparse)/,/^(?:ANTLR-PD)/,/^(?:LPL-1\.02)/,/^(?:Abstyles)/,/^(?:eCos-2\.0)/,/^(?:APSL-1\.0)/,/^(?:LPPL-1\.2)/,/^(?:LPPL-1\.1)/,/^(?:LPPL-1\.0)/,/^(?:APSL-1\.1)/,/^(?:APSL-2\.0)/,/^(?:Info-ZIP)/,/^(?:Zend-2\.0)/,/^(?:IBM-pibs)/,/^(?:LGPL-2\.0)/,/^(?:LGPL-3\.0)/,/^(?:LGPL-2\.1)/,/^(?:GFDL-1\.3)/,/^(?:PHP-3\.01)/,/^(?:GFDL-1\.2)/,/^(?:GFDL-1\.1)/,/^(?:AGPL-3\.0)/,/^(?:Giftware)/,/^(?:EUPL-1\.1)/,/^(?:RPSL-1\.0)/,/^(?:EUPL-1\.0)/,/^(?:MIT-enna)/,/^(?:CECILL-B)/,/^(?:diffmark)/,/^(?:CECILL-C)/,/^(?:CDDL-1\.0)/,/^(?:Sendmail)/,/^(?:CDDL-1\.1)/,/^(?:CPAL-1\.0)/,/^(?:APSL-1\.2)/,/^(?:NPL-1\.1)/,/^(?:AFL-1\.2)/,/^(?:Caldera)/,/^(?:AFL-2\.0)/,/^(?:FSFULLR)/,/^(?:AFL-2\.1)/,/^(?:VSL-1\.0)/,/^(?:VOSTROM)/,/^(?:UPL-1\.0)/,/^(?:Dotseqn)/,/^(?:CPL-1\.0)/,/^(?:dvipdfm)/,/^(?:EPL-1\.0)/,/^(?:OCCT-PL)/,/^(?:ECL-1\.0)/,/^(?:Latex2e)/,/^(?:ECL-2\.0)/,/^(?:GPL-1\.0)/,/^(?:GPL-2\.0)/,/^(?:GPL-3\.0)/,/^(?:AFL-3\.0)/,/^(?:LAL-1\.2)/,/^(?:LAL-1\.3)/,/^(?:EFL-1\.0)/,/^(?:EFL-2\.0)/,/^(?:gnuplot)/,/^(?:Aladdin)/,/^(?:LPL-1\.0)/,/^(?:libtiff)/,/^(?:Entessa)/,/^(?:AMDPLPA)/,/^(?:IPL-1\.0)/,/^(?:OPL-1\.0)/,/^(?:OSL-1\.0)/,/^(?:OSL-1\.1)/,/^(?:OSL-2\.0)/,/^(?:OSL-2\.1)/,/^(?:OSL-3\.0)/,/^(?:OpenSSL)/,/^(?:ZPL-2\.1)/,/^(?:PHP-3\.0)/,/^(?:ZPL-2\.0)/,/^(?:ZPL-1\.1)/,/^(?:CC0-1\.0)/,/^(?:SPL-1\.0)/,/^(?:psutils)/,/^(?:MPL-1\.0)/,/^(?:QPL-1\.0)/,/^(?:MPL-1\.1)/,/^(?:MPL-2\.0)/,/^(?:APL-1\.0)/,/^(?:RPL-1\.1)/,/^(?:RPL-1\.5)/,/^(?:MIT-CMU)/,/^(?:Multics)/,/^(?:Eurosym)/,/^(?:BSL-1\.0)/,/^(?:MIT-feh)/,/^(?:Saxpath)/,/^(?:Borceux)/,/^(?:OFL-1\.1)/,/^(?:OFL-1\.0)/,/^(?:AFL-1\.1)/,/^(?:YPL-1\.1)/,/^(?:YPL-1\.0)/,/^(?:NPL-1\.0)/,/^(?:iMatix)/,/^(?:mpich2)/,/^(?:APAFML)/,/^(?:Bahyph)/,/^(?:RSA-MD)/,/^(?:psfrag)/,/^(?:Plexus)/,/^(?:eGenix)/,/^(?:Glulxe)/,/^(?:SAX-PD)/,/^(?:Imlib2)/,/^(?:Wsuipa)/,/^(?:LGPLLR)/,/^(?:Libpng)/,/^(?:xinetd)/,/^(?:MITNFA)/,/^(?:NetCDF)/,/^(?:Naumen)/,/^(?:SMPPL)/,/^(?:Nunit)/,/^(?:FSFUL)/,/^(?:GL2PS)/,/^(?:SMLNJ)/,/^(?:Rdisc)/,/^(?:Noweb)/,/^(?:Nokia)/,/^(?:SISSL)/,/^(?:Qhull)/,/^(?:Intel)/,/^(?:Glide)/,/^(?:Xerox)/,/^(?:AMPAS)/,/^(?:WTFPL)/,/^(?:MS-PL)/,/^(?:XSkat)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:RSCPL)/,/^(?:TMate)/,/^(?:OGTSL)/,/^(?:FSFAP)/,/^(?:NCSA)/,/^(?:Zlib)/,/^(?:SCEA)/,/^(?:SNIA)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:ADSL)/,/^(?:MTLL)/,/^(?:NLPL)/,/^(?:Ruby)/,/^(?:JSON)/,/^(?:Barr)/,/^(?:0BSD)/,/^(?:Xnet)/,/^(?:Cube)/,/^(?:curl)/,/^(?:DSDP)/,/^(?:Fair)/,/^(?:HPND)/,/^(?:TOSL)/,/^(?:IJG)/,/^(?:SWL)/,/^(?:Vim)/,/^(?:FTL)/,/^(?:ICU)/,/^(?:OML)/,/^(?:NRL)/,/^(?:DOC)/,/^(?:TCL)/,/^(?:W3C)/,/^(?:NTP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = spdxparse; -exports.Parser = spdxparse.Parser; -exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/LICENSE deleted file mode 100644 index 68a49da..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/README.md deleted file mode 100755 index 9252353..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# spdx-license-ids - -A list of [SPDX license](https://spdx.org/licenses/) identifiers - -[**Download JSON**](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids.json) - -## Use as a JavaScript Library - -[![NPM version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids) -[![Bower version](https://img.shields.io/bower/v/spdx-license-ids.svg)](https://github.com/shinnn/spdx-license-ids/releases) -[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids) -[![Coverage Status](https://img.shields.io/coveralls/shinnn/spdx-license-ids.svg)](https://coveralls.io/r/shinnn/spdx-license-ids) -[![devDependency Status](https://david-dm.org/shinnn/spdx-license-ids/dev-status.svg)](https://david-dm.org/shinnn/spdx-license-ids#info=devDependencies) - -### Installation - -#### Package managers - -##### [npm](https://www.npmjs.com/) - -```sh -npm install spdx-license-ids -``` - -##### [bower](http://bower.io/) - -```sh -bower install spdx-license-ids -``` - -##### [Duo](http://duojs.org/) - -```javascript -const spdxLicenseIds = require('shinnn/spdx-license-ids'); -``` - -#### Standalone - -[Download the script file directly.](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids-browser.js) - -### API - -#### spdxLicenseIds - -Type: `Array` of `String` - -It returns an array of SPDX license identifiers. - -```javascript -const spdxLicenseIds = require('spdx-license-ids'); //=> ['Glide', 'Abstyles', 'AFL-1.1', ... ] -``` - -## License - -[The Unlicense](./LICENSE). diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/package.json deleted file mode 100644 index b16a165..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "spdx-license-ids@^1.0.2", - "scope": null, - "escapedName": "spdx-license-ids", - "name": "spdx-license-ids", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct" - ] - ], - "_from": "spdx-license-ids@>=1.0.2 <2.0.0", - "_id": "spdx-license-ids@1.2.2", - "_inCache": true, - "_location": "/spdx-license-ids", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/spdx-license-ids-1.2.2.tgz_1469529975605_0.35518706892617047" - }, - "_npmUser": { - "name": "shinnn", - "email": "snnskwtnb@gmail.com" - }, - "_npmVersion": "3.10.5", - "_phantomChildren": {}, - "_requested": { - "raw": "spdx-license-ids@^1.0.2", - "scope": null, - "escapedName": "spdx-license-ids", - "name": "spdx-license-ids", - "rawSpec": "^1.0.2", - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/spdx-correct" - ], - "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "_shasum": "c9df7a3424594ade6bd11900d596696dc06bac57", - "_shrinkwrap": null, - "_spec": "spdx-license-ids@^1.0.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-correct", - "author": { - "name": "Shinnosuke Watanabe", - "url": "https://github.com/shinnn" - }, - "bugs": { - "url": "https://github.com/shinnn/spdx-license-ids/issues" - }, - "dependencies": {}, - "description": "A list of SPDX license identifiers", - "devDependencies": { - "@shinnn/eslint-config-node": "^3.0.0", - "chalk": "^1.1.3", - "eslint": "^3.1.1", - "get-spdx-license-ids": "^1.0.0", - "istanbul": "^0.4.4", - "loud-rejection": "^1.6.0", - "rimraf-promise": "^2.0.0", - "stringify-object": "^2.4.0", - "tap-spec": "^4.1.1", - "tape": "^4.6.0", - "write-file-atomically": "1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "c9df7a3424594ade6bd11900d596696dc06bac57", - "tarball": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz" - }, - "files": [ - "spdx-license-ids.json" - ], - "gitHead": "70e2541bf04b4fbef4c5df52c581a1861fd355b2", - "homepage": "https://github.com/shinnn/spdx-license-ids#readme", - "keywords": [ - "spdx", - "license", - "licenses", - "id", - "identifier", - "identifiers", - "json", - "array", - "oss", - "browser", - "client-side" - ], - "license": "Unlicense", - "main": "spdx-license-ids.json", - "maintainers": [ - { - "name": "shinnn", - "email": "snnskwtnb@gmail.com" - } - ], - "name": "spdx-license-ids", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/shinnn/spdx-license-ids.git" - }, - "scripts": { - "build": "node --strong_mode build.js", - "coverage": "node --strong_mode node_modules/.bin/istanbul cover test.js", - "lint": "eslint --config @shinnn/node --env browser --ignore-path .gitignore .", - "pretest": "${npm_package_scripts_build} && ${npm_package_scripts_lint}", - "test": "node --strong_mode test.js | tap-spec" - }, - "version": "1.2.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/spdx-license-ids.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/spdx-license-ids.json deleted file mode 100644 index 1c60d6e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/spdx-license-ids/spdx-license-ids.json +++ /dev/null @@ -1,334 +0,0 @@ -[ - "Glide", - "Abstyles", - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0", - "AMPAS", - "APL-1.0", - "Adobe-Glyph", - "APAFML", - "Adobe-2006", - "AGPL-1.0", - "Afmparse", - "Aladdin", - "ADSL", - "AMDPLPA", - "ANTLR-PD", - "Apache-1.0", - "Apache-1.1", - "Apache-2.0", - "AML", - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0", - "Artistic-1.0", - "Artistic-1.0-Perl", - "Artistic-1.0-cl8", - "Artistic-2.0", - "AAL", - "Bahyph", - "Barr", - "Beerware", - "BitTorrent-1.0", - "BitTorrent-1.1", - "BSL-1.0", - "Borceux", - "BSD-2-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-2-Clause-NetBSD", - "BSD-3-Clause", - "BSD-3-Clause-Clear", - "BSD-4-Clause", - "BSD-Protection", - "BSD-Source-Code", - "BSD-3-Clause-Attribution", - "0BSD", - "BSD-4-Clause-UC", - "bzip2-1.0.5", - "bzip2-1.0.6", - "Caldera", - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0", - "CECILL-2.1", - "CECILL-B", - "CECILL-C", - "ClArtistic", - "MIT-CMU", - "CNRI-Jython", - "CNRI-Python", - "CNRI-Python-GPL-Compatible", - "CPOL-1.02", - "CDDL-1.0", - "CDDL-1.1", - "CPAL-1.0", - "CPL-1.0", - "CATOSL-1.1", - "Condor-1.1", - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-4.0", - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-ND-4.0", - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-4.0", - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-ND-3.0", - "CC-BY-NC-ND-4.0", - "CC-BY-NC-SA-1.0", - "CC-BY-NC-SA-2.0", - "CC-BY-NC-SA-2.5", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-4.0", - "CC-BY-SA-1.0", - "CC-BY-SA-2.0", - "CC-BY-SA-2.5", - "CC-BY-SA-3.0", - "CC-BY-SA-4.0", - "CC0-1.0", - "Crossword", - "CrystalStacker", - "CUA-OPL-1.0", - "Cube", - "curl", - "D-FSL-1.0", - "diffmark", - "WTFPL", - "DOC", - "Dotseqn", - "DSDP", - "dvipdfm", - "EPL-1.0", - "ECL-1.0", - "ECL-2.0", - "eGenix", - "EFL-1.0", - "EFL-2.0", - "MIT-advertising", - "MIT-enna", - "Entessa", - "ErlPL-1.1", - "EUDatagrid", - "EUPL-1.0", - "EUPL-1.1", - "Eurosym", - "Fair", - "MIT-feh", - "Frameworx-1.0", - "FreeImage", - "FTL", - "FSFAP", - "FSFUL", - "FSFULLR", - "Giftware", - "GL2PS", - "Glulxe", - "AGPL-3.0", - "GFDL-1.1", - "GFDL-1.2", - "GFDL-1.3", - "GPL-1.0", - "GPL-2.0", - "GPL-3.0", - "LGPL-2.1", - "LGPL-3.0", - "LGPL-2.0", - "gnuplot", - "gSOAP-1.3b", - "HaskellReport", - "HPND", - "IBM-pibs", - "IPL-1.0", - "ICU", - "ImageMagick", - "iMatix", - "Imlib2", - "IJG", - "Info-ZIP", - "Intel-ACPI", - "Intel", - "Interbase-1.0", - "IPA", - "ISC", - "JasPer-2.0", - "JSON", - "LPPL-1.0", - "LPPL-1.1", - "LPPL-1.2", - "LPPL-1.3a", - "LPPL-1.3c", - "Latex2e", - "BSD-3-Clause-LBNL", - "Leptonica", - "LGPLLR", - "Libpng", - "libtiff", - "LAL-1.2", - "LAL-1.3", - "LiLiQ-P-1.1", - "LiLiQ-Rplus-1.1", - "LiLiQ-R-1.1", - "LPL-1.02", - "LPL-1.0", - "MakeIndex", - "MTLL", - "MS-PL", - "MS-RL", - "MirOS", - "MITNFA", - "MIT", - "Motosoto", - "MPL-1.0", - "MPL-1.1", - "MPL-2.0", - "MPL-2.0-no-copyleft-exception", - "mpich2", - "Multics", - "Mup", - "NASA-1.3", - "Naumen", - "NBPL-1.0", - "NetCDF", - "NGPL", - "NOSL", - "NPL-1.0", - "NPL-1.1", - "Newsletr", - "NLPL", - "Nokia", - "NPOSL-3.0", - "NLOD-1.0", - "Noweb", - "NRL", - "NTP", - "Nunit", - "OCLC-2.0", - "ODbL-1.0", - "PDDL-1.0", - "OCCT-PL", - "OGTSL", - "OLDAP-2.2.2", - "OLDAP-1.1", - "OLDAP-1.2", - "OLDAP-1.3", - "OLDAP-1.4", - "OLDAP-2.0", - "OLDAP-2.0.1", - "OLDAP-2.1", - "OLDAP-2.2", - "OLDAP-2.2.1", - "OLDAP-2.3", - "OLDAP-2.4", - "OLDAP-2.5", - "OLDAP-2.6", - "OLDAP-2.7", - "OLDAP-2.8", - "OML", - "OPL-1.0", - "OSL-1.0", - "OSL-1.1", - "OSL-2.0", - "OSL-2.1", - "OSL-3.0", - "OpenSSL", - "OSET-PL-2.1", - "PHP-3.0", - "PHP-3.01", - "Plexus", - "PostgreSQL", - "psfrag", - "psutils", - "Python-2.0", - "QPL-1.0", - "Qhull", - "Rdisc", - "RPSL-1.0", - "RPL-1.1", - "RPL-1.5", - "RHeCos-1.1", - "RSCPL", - "RSA-MD", - "Ruby", - "SAX-PD", - "Saxpath", - "SCEA", - "SWL", - "SMPPL", - "Sendmail", - "SGI-B-1.0", - "SGI-B-1.1", - "SGI-B-2.0", - "OFL-1.0", - "OFL-1.1", - "SimPL-2.0", - "Sleepycat", - "SNIA", - "Spencer-86", - "Spencer-94", - "Spencer-99", - "SMLNJ", - "SugarCRM-1.1.3", - "SISSL", - "SISSL-1.2", - "SPL-1.0", - "Watcom-1.0", - "TCL", - "Unlicense", - "TMate", - "TORQUE-1.1", - "TOSL", - "Unicode-TOU", - "UPL-1.0", - "NCSA", - "Vim", - "VOSTROM", - "VSL-1.0", - "W3C-19980720", - "W3C", - "Wsuipa", - "Xnet", - "X11", - "Xerox", - "XFree86-1.1", - "xinetd", - "xpp", - "XSkat", - "YPL-1.0", - "YPL-1.1", - "Zed", - "Zend-2.0", - "Zimbra-1.3", - "Zimbra-1.4", - "Zlib", - "zlib-acknowledgement", - "ZPL-1.1", - "ZPL-2.0", - "ZPL-2.1", - "BSD-3-Clause-No-Nuclear-License", - "BSD-3-Clause-No-Nuclear-Warranty", - "BSD-3-Clause-No-Nuclear-License-2014", - "eCos-2.0", - "GPL-2.0-with-autoconf-exception", - "GPL-2.0-with-bison-exception", - "GPL-2.0-with-classpath-exception", - "GPL-2.0-with-font-exception", - "GPL-2.0-with-GCC-exception", - "GPL-3.0-with-autoconf-exception", - "GPL-3.0-with-GCC-exception", - "StandardML-NJ", - "WXwindows" -] diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/README.md deleted file mode 100644 index d7c9c90..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# stream-consume - -A node module ensures a Readable stream continues flowing if it's not piped to -another destination. - - npm install stream-consume - -## Usage - -Simply pass a stream to `stream-consume`. -Both legacy streams and streams2 are supported. - -``` js -var consume = require('stream-consume'); - -consume(readableStream); -``` - -## Details - -Only Readable streams are processed (as determined by presence of `readable` -property and a `resume` property that is a function). If called with anything -else, it's a NOP. - -For a streams2 stream (as determined by presence of a `_readableState` -property), nothing is done if the stream has already been piped to at least -one other destination. - -`resume()` is used to cause the stream to continue flowing. - -## License - -The MIT License (MIT) - -Copyright (c) 2014 Aron Nopanen - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/index.js deleted file mode 100644 index 122edb1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/index.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = function(stream) { - if (stream.readable && typeof stream.resume === 'function') { - var state = stream._readableState; - if (!state || state.pipesCount === 0) { - // Either a classic stream or streams2 that's not piped to another destination - try { - stream.resume(); - } catch (err) { - console.error("Got error: " + err); - // If we can't, it's not worth dying over - } - } - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/package.json deleted file mode 100644 index adb53f4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "stream-consume@~0.1.0", - "scope": null, - "escapedName": "stream-consume", - "name": "stream-consume", - "rawSpec": "~0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/orchestrator" - ] - ], - "_from": "stream-consume@>=0.1.0 <0.2.0", - "_id": "stream-consume@0.1.0", - "_inCache": true, - "_location": "/stream-consume", - "_npmUser": { - "name": "aroneous", - "email": "aron.nopanen@gmail.com" - }, - "_npmVersion": "1.5.0-alpha-3", - "_phantomChildren": {}, - "_requested": { - "raw": "stream-consume@~0.1.0", - "scope": null, - "escapedName": "stream-consume", - "name": "stream-consume", - "rawSpec": "~0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/orchestrator" - ], - "_resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", - "_shasum": "a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f", - "_shrinkwrap": null, - "_spec": "stream-consume@~0.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/orchestrator", - "author": { - "name": "Aron Nopanen" - }, - "bugs": { - "url": "https://github.com/aroneous/stream-consume/issues" - }, - "dependencies": {}, - "description": "Consume a stream to ensure it keeps flowing", - "devDependencies": { - "mocha": "^1.20.1", - "should": "^4.0.4", - "through2": "^0.5.1" - }, - "directories": {}, - "dist": { - "shasum": "a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f", - "tarball": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" - }, - "gitHead": "54496fd47e0f10bf6924728ef405b72a4bbad6de", - "homepage": "https://github.com/aroneous/stream-consume", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "aroneous", - "email": "aron.nopanen@gmail.com" - } - ], - "name": "stream-consume", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/aroneous/stream-consume.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/test/tests.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/test/tests.js deleted file mode 100644 index 660e37a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/stream-consume/test/tests.js +++ /dev/null @@ -1,180 +0,0 @@ -/*jshint node:true */ -/*global describe:false, it:false */ -"use strict"; - -var consume = require('../'); -var Stream = require('stream'); -var Readable = Stream.Readable; -var Writable = Stream.Writable; -var Duplex = Stream.Duplex; -var should = require('should'); -var through = require('through2'); -require('mocha'); - -describe('stream-consume', function() { - - it('should cause a Readable stream to complete if it\'s not piped anywhere', function(done) { - var rs = new Readable({highWaterMark: 2}); - var a = 0; - var ended = false; - rs._read = function() { - if (a++ < 100) { - rs.push(a + ""); - } else { - ended = true; - rs.push(null); - } - }; - - rs.on("end", function() { - a.should.be.above(99); - ended.should.be.true; - done(); - }); - - consume(rs); - }); - - it('should work with Readable streams in objectMode', function(done) { - var rs = new Readable({highWaterMark: 2, objectMode: true}); - var a = 0; - var ended = false; - rs._read = function() { - if (a++ < 100) { - rs.push(a); - } else { - ended = true; - rs.push(null); - } - }; - - rs.on("end", function() { - a.should.be.above(99); - ended.should.be.true; - done(); - }); - - consume(rs); - }); - - it('should not interfere with a Readable stream that is piped somewhere', function(done) { - var rs = new Readable({highWaterMark: 2}); - var a = 0; - var ended = false; - rs._read = function() { - if (a++ < 100) { - rs.push("."); - } else { - ended = true; - rs.push(null); - } - }; - - var sizeRead = 0; - var ws = new Writable({highWaterMark: 2}); - ws._write = function(chunk, enc, next) { - sizeRead += chunk.length; - next(); - } - - ws.on("finish", function() { - a.should.be.above(99); - ended.should.be.true; - sizeRead.should.equal(100); - done(); - }); - - rs.pipe(ws); - - consume(rs); - }); - - it('should not interfere with a Writable stream', function(done) { - var rs = new Readable({highWaterMark: 2}); - var a = 0; - var ended = false; - rs._read = function() { - if (a++ < 100) { - rs.push("."); - } else { - ended = true; - rs.push(null); - } - }; - - var sizeRead = 0; - var ws = new Writable({highWaterMark: 2}); - ws._write = function(chunk, enc, next) { - sizeRead += chunk.length; - next(); - } - - ws.on("finish", function() { - a.should.be.above(99); - ended.should.be.true; - sizeRead.should.equal(100); - done(); - }); - - rs.pipe(ws); - - consume(ws); - }); - - it('should handle a Transform stream', function(done) { - var rs = new Readable({highWaterMark: 2}); - var a = 0; - var ended = false; - rs._read = function() { - if (a++ < 100) { - rs.push("."); - } else { - ended = true; - rs.push(null); - } - }; - - var sizeRead = 0; - var flushed = false; - var ts = through({highWaterMark: 2}, function(chunk, enc, cb) { - sizeRead += chunk.length; - this.push(chunk); - cb(); - }, function(cb) { - flushed = true; - cb(); - }); - - ts.on("end", function() { - a.should.be.above(99); - ended.should.be.true; - sizeRead.should.equal(100); - flushed.should.be.true; - done(); - }); - - rs.pipe(ts); - - consume(ts); - }); - - it('should handle a classic stream', function(done) { - var rs = new Stream(); - var ended = false; - var i; - - rs.on("end", function() { - ended.should.be.true; - done(); - }); - - consume(rs); - - for (i = 0; i < 100; i++) { - rs.emit("data", i); - } - ended = true; - rs.emit("end"); - }); - -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.npmignore deleted file mode 100755 index 64a1134..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*~ -*.swp -node_modules/ -.git -tests/results -.coveralls.yml diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.travis.yml deleted file mode 100755 index 4e161d5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - -before_script: - - npm install --dev - -script: - - npm test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/LICENCE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/LICENCE deleted file mode 100755 index 454ab9d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013 Nicolas Froidure, - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/README.md deleted file mode 100755 index 12b14eb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# StreamQueue -> StreamQueue pipe the queued streams one by one in order to preserve their content - order. - -[![NPM version](https://badge.fury.io/js/streamqueue.png)](https://npmjs.org/package/streamqueue) [![Build Status](https://travis-ci.org/nfroidure/StreamQueue.png?branch=master)](https://travis-ci.org/nfroidure/StreamQueue) [![Dependency Status](https://david-dm.org/nfroidure/streamqueue.png)](https://david-dm.org/nfroidure/streamqueue) [![devDependency Status](https://david-dm.org/nfroidure/streamqueue/dev-status.png)](https://david-dm.org/nfroidure/streamqueue#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/nfroidure/StreamQueue/badge.png?branch=master)](https://coveralls.io/r/nfroidure/StreamQueue?branch=master) [![Code Climate](https://codeclimate.com/github/nfroidure/StreamQueue.png)](https://codeclimate.com/github/nfroidure/StreamQueue) - -## Usage -Install the [npm module](https://npmjs.org/package/streamqueue): -```sh -npm install streamqueue --save -``` -Then, in your scripts: -```js -var streamqueue = require('streamqueue'); - -var queue = streamqueue( - Fs.createReadStream('input.txt'), - Fs.createReadStream('input2.txt'), - Fs.createReadStream('input3.txt') -).pipe(process.stdout); -``` -StreamQueue also accept functions returning streams, the above can be written - like this, doing system calls only when piping: -```js -var streamqueue = require('streamqueue'); - -var queue = streamqueue( - Fs.createReadStream.bind(null, 'input.txt'), - Fs.createReadStream.bind(null, 'input2.txt'), - Fs.createReadStream.bind(null, 'input3.txt') -).pipe(process.stdout); -``` - -Object-oriented traditionnal API offers more flexibility: -```js -var StreamQueue = require('streamqueue'); - -var queue = new StreamQueue(); -queue.queue( - Fs.createReadStream('input.txt'), - Fs.createReadStream('input2.txt'), - Fs.createReadStream('input3.txt') -); -queue.done(); - -queue.pipe(process.stdout); -``` -You can also chain StreamQueue methods like that: -```js -var StreamQueue = require('streamqueue'); - -new StreamQueue() - .queue(Fs.createReadStream('input.txt')) - .queue(Fs.createReadStream('input2.txt')) - .queue(Fs.createReadStream('input3.txt')) - .done() - .pipe(process.stdout); -``` - -You can queue new streams at any moment until you call the done() method. So the - created stream will not fire the end event until done() call. - -Note that stream queue is compatible with the Node 0.10+ streams. For older - streams, stream queue will wrap them with - [`Readable.wrap`](http://nodejs.org/api/stream.html#stream_readable_wrap_stream) - before queueing. Please fix your dependencies or report issues to libraries - using 0.8 streams since this extra code will finally be removed. - -## API - -### StreamQueue([options], [stream1, stream2, ... streamN]) - -#### options - -##### options.objectMode -Type: `Boolean` -Default value: `false` - -Use if piped in streams are in object mode. In this case, the stream queue will - also be in the object mode. - -##### options.pauseFlowingStream -Type: `Boolean` -Default value: `true` - -If a stream is in flowing mode, then it will be paused before queueing. - -##### options.resumeFlowingStream -Type: `Boolean` -Default value: `true` - -If a stream is in flowing mode, then it will be resumed before piping. - -##### options.* - -StreamQueue inherits of Stream.PassThrough, the options are passed to the - parent constructor so you can use it's options too. - -#### streamN -Type: `Stream` - -Append streams given in argument to the queue and ends when the queue is empty. - -### StreamQueue.queue(stream1, [stream2, ... streamN]) - -Append streams given in argument to the queue. - -### StreamQueue.done([stream1, stream2, ... streamN]) - -Append streams given in argument to the queue and ends when the queue is empty. - -## Stats - -[![NPM](https://nodei.co/npm/streamqueue.png?downloads=true&stars=true)](https://nodei.co/npm/streamqueue/) -[![NPM](https://nodei.co/npm-dl/streamqueue.png)](https://nodei.co/npm/streamqueue/) - - -## Contributing -Feel free to pull your code if you agree with publishing it under the MIT license. - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e80..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 6307220..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/package.json deleted file mode 100644 index 37a0bb1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@~1.0.33", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~1.0.33", - "spec": ">=1.0.33 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue" - ] - ], - "_from": "readable-stream@>=1.0.33 <1.1.0", - "_id": "readable-stream@1.0.34", - "_inCache": true, - "_location": "/streamqueue/readable-stream", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@~1.0.33", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "~1.0.33", - "spec": ">=1.0.33 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/streamqueue" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_shrinkwrap": null, - "_spec": "readable-stream@~1.0.33", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "homepage": "https://github.com/isaacs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "1.0.34" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/package.json deleted file mode 100644 index e88c9f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "streamqueue@^0.1.3", - "scope": null, - "escapedName": "streamqueue", - "name": "streamqueue", - "rawSpec": "^0.1.3", - "spec": ">=0.1.3 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp" - ] - ], - "_from": "streamqueue@>=0.1.3 <0.2.0", - "_id": "streamqueue@0.1.3", - "_inCache": true, - "_location": "/streamqueue", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "nfroidure", - "email": "nfroidure@elitwork.com" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - }, - "_requested": { - "raw": "streamqueue@^0.1.3", - "scope": null, - "escapedName": "streamqueue", - "name": "streamqueue", - "rawSpec": "^0.1.3", - "spec": ">=0.1.3 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/flarum-gulp" - ], - "_resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-0.1.3.tgz", - "_shasum": "b10d65158af579ce3a5f48c9276d01db23d4f8b5", - "_shrinkwrap": null, - "_spec": "streamqueue@^0.1.3", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/flarum-gulp", - "author": { - "name": "Nicolas Froidure", - "url": "http://www.insertafter.com/blog.html" - }, - "bugs": { - "url": "https://github.com/nfroidure/StreamQueue/issues" - }, - "dependencies": { - "isstream": "~0.1.1", - "readable-stream": "~1.0.33" - }, - "description": "Pipe queued streams progressively, keeping datas order.", - "devDependencies": { - "coveralls": "~2.11.2", - "istanbul": "~0.3.5", - "mocha": "~2.1.0", - "mocha-lcov-reporter": "~0.0.1", - "streamtest": "~1.2.0" - }, - "directories": {}, - "dist": { - "shasum": "b10d65158af579ce3a5f48c9276d01db23d4f8b5", - "tarball": "https://registry.npmjs.org/streamqueue/-/streamqueue-0.1.3.tgz" - }, - "engines": { - "node": ">= 0.10.0" - }, - "gitHead": "b54a8121c93bcb2283dd586b1f46f9f4e14aa5c2", - "homepage": "https://github.com/nfroidure/StreamQueue", - "keywords": [ - "queue", - "streaming", - "stream", - "async", - "pipe" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/nfroidure/StreamQueue/blob/master/LICENSE" - } - ], - "main": "src/index.js", - "maintainers": [ - { - "name": "nfroidure", - "email": "nfroidure@elitwork.com" - } - ], - "name": "streamqueue", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nfroidure/StreamQueue.git" - }, - "scripts": { - "cover": "./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/mocha/bin/_mocha -- tests/*.mocha.js -R spec -t 5000", - "coveralls": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", - "test": "./node_modules/mocha/bin/mocha tests/*.mocha.js" - }, - "version": "0.1.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/src/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/src/index.js deleted file mode 100644 index 8da45f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/src/index.js +++ /dev/null @@ -1,182 +0,0 @@ -var Stream = require('readable-stream') - , isStream = require('isstream') - , util = require('util') -; - -// Inherit of Readable stream -util.inherits(StreamQueue, Stream.Readable); - -// Constructor -function StreamQueue(options) { - var _self = this; - - options = options || {}; - - // Ensure new were used - if (!(this instanceof StreamQueue)) { - return new (StreamQueue.bind.apply(StreamQueue, - [StreamQueue].concat([].slice.call(arguments,0)))); - } - - // Set queue state object - this._queueState = { - _pauseFlowingStream: true, - _resumeFlowingStream: true, - _objectMode: false, - _streams: [], - _running: false, - _ending: false, - _awaitDrain: null, - _internalStream: null, - _curStream: null - }; - - // Options - if(!(isStream(options) || 'function' === typeof options)) { - if('boolean' == typeof options.pauseFlowingStream) { - this._queueState._pauseFlowingStream = options.pauseFlowingStream; - delete options.pauseFlowingStream; - } - if('boolean' == typeof options.resumeFlowingStream) { - this._queueState._resumeFlowingStream = options.resumeFlowingStream; - delete options.resumeFlowingStream; - } - if('boolean' == typeof options.objectMode) { - this._queueState._objectMode = options.objectMode; - } - } - - // Prepare the stream to pipe in - this._queueState._internalStream = new Stream.Writable( - isStream(options) || 'function' === typeof options - ? undefined - : options - ); - this._queueState._internalStream._write = function(chunk, encoding, cb) { - if(_self.push(chunk)) { - cb(); - return true; - }; - _self._queueState._awaitDrain = cb; - return false; - }; - - // Parent constructor - Stream.Readable.call(this, - isStream(options) || 'function' === typeof options - ? undefined - : options - ); - - // Queue given streams and ends - if(arguments.length > 1 || isStream(options) - || 'function' === typeof options) { - this.done.apply(this, - [].slice.call(arguments, - isStream(options) || 'function' === typeof options ? 0 : 1)); - } - -} - -// Queue each stream given in argument -StreamQueue.prototype.queue = function() { - var streams = [].slice.call(arguments, 0) - , _self = this; - - if(this._queueState._ending) { - throw new Error('Cannot add more streams to the queue.'); - } - - streams = streams.map(function(stream) { - function wrapper(stream) { - stream.on('error', function(err) { - _self.emit('error', err); - }); - if('undefined' == typeof stream._readableState) { - stream = (new Stream.Readable({objectMode: _self._queueState._objectMode})) - .wrap(stream); - } - if(_self._queueState._pauseFlowingStream && stream._readableState.flowing) { - stream.pause(); - } - return stream; - } - if('function' === typeof stream) { - return function() { - return wrapper(stream()); - }; - } - return wrapper(stream); - }); - - this._queueState._streams = this._queueState._streams.length ? - this._queueState._streams.concat(streams) : streams; - - if(!this._queueState._running) { - this._pipeNextStream(); - } - - return this; - -}; - -// Pipe the next available stream -StreamQueue.prototype._read = function(size) { - if(this._queueState._awaitDrain) { - this._queueState._awaitDrain(); - this._queueState._awaitDrain = null; - this._queueState._internalStream.emit('drain'); - } -}; - -// Pipe the next available stream -StreamQueue.prototype._pipeNextStream = function() { - var _self = this; - if(!this._queueState._streams.length) { - if(this._queueState._ending) { - _self.push(null); - } else { - this._queueState._running = false; - } - return; - } - this._queueState._running = true; - if('function' === typeof this._queueState._streams[0]) { - this._queueState._curStream = this._queueState._streams.shift()(); - } else { - this._queueState._curStream = this._queueState._streams.shift(); - } - this._queueState._curStream.once('end', function() { - _self._pipeNextStream(); - }); - if(_self._queueState._resumeFlowingStream&&this._queueState._curStream._readableState.flowing) { - this._queueState._curStream.resume(); - } - this._queueState._curStream.pipe(this._queueState._internalStream, {end: false}); -}; - -// Queue each stream given in argument -StreamQueue.prototype.done = function() { - var _self = this; - if(this._queueState._ending) { - throw new Error('streamqueue: The queue is already ending.'); - } - if(arguments.length) { - this.queue.apply(this, arguments); - } - this._queueState._ending = true; - if(!this._queueState._running) { - _self.push(null); - } - return this; -}; - -// Length -Object.defineProperty(StreamQueue.prototype, 'length', { - get: function() { - return this._queueState._streams.length + (this._queueState._running ? 1 : 0); - } -}); - -module.exports = StreamQueue; - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/tests/index.mocha.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/tests/index.mocha.js deleted file mode 100755 index 6414414..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/streamqueue/tests/index.mocha.js +++ /dev/null @@ -1,660 +0,0 @@ -var assert = require('assert'); -var Stream = require('readable-stream'); -var StreamTest = require('streamtest'); -var StreamQueue = require('../src'); - - - -// Tests -describe('StreamQueue', function() { - - // Iterating through versions - StreamTest.versions.forEach(function(version) { - - describe('for ' + version + ' streams', function() { - - describe('in binary mode', function() { - - describe('and with async streams', function() { - - it('should work with functionnal API', function(done) { - StreamQueue( - StreamTest[version].fromChunks(['wa','dup']), - StreamTest[version].fromChunks(['pl','op']), - StreamTest[version].fromChunks(['ki','koo','lol']) - ).pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - }); - - it('should work with functionnal API and options', function(done) { - StreamQueue({}, - StreamTest[version].fromChunks(['wa','dup']), - StreamTest[version].fromChunks(['pl','op']), - StreamTest[version].fromChunks(['ki','koo','lol']) - ).pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - }); - - it('should work with POO API', function(done) { - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(StreamTest[version].fromChunks(['pl','op'])); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should pause streams in flowing mode', function(done) { - var queue = new StreamQueue({ - pauseFlowingStream: true, - resumeFlowingStream: true - }); - var flowingStream = StreamTest[version].fromChunks(['pl','op']); - flowingStream.on('data', function() {}); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(flowingStream); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should work with POO API and options', function(done) { - var queue = new StreamQueue({ - pauseFlowingStream: true, - resumeFlowingStream: true - }); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(StreamTest[version].fromChunks(['pl','op'])); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should work with POO API and a late done call', function(done) { - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(StreamTest[version].fromChunks(['pl','op'])); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - setTimeout(function() { - queue.done(); - }, 100); - }); - - it('should work with POO API and no stream plus sync done', function(done) { - var queue = new StreamQueue(); - assert.equal(queue.length, 0); - queue.queue(); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - queue.done(); - }); - - it('should work with POO API and no stream plus async done', function(done) { - var queue = new StreamQueue(); - assert.equal(queue.length, 0); - queue.queue(); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - setTimeout(function() { - queue.done(); - }, 100); - }); - - it('should work with POO API and a streamqueue stream plus async done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - queue.queue(child); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - child.done(); - setTimeout(function() { - queue.done(); - }, 100); - }); - - it('should work with POO API and a streamqueue stream plus async done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - queue.queue(child); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - child.done(); - queue.done(); - }); - - it('should work with POO API and a streamqueue ended stream plus async done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - queue.queue(child); - child.done(); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - setTimeout(function() { - queue.done(); - }, 100); - }); - - it('should fire end asynchronously with streams', function(done) { - var queue = new StreamQueue(); - var ended = false; - queue.queue(StreamTest[version].fromChunks(['wa','dup']) - .on('end', function() { - assert.equal(ended, false); - })); - queue.queue(StreamTest[version].fromChunks(['pl','op']) - .on('end', function() { - assert.equal(ended, false); - })); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol']) - .on('end', function() { - assert.equal(ended, false); - })); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.on('end', function() { - ended = true; - }); - queue.done(); - assert.equal(ended, false); - }); - - it('should fire end asynchronously when empty', function(done) { - var queue = new StreamQueue(); - var ended = false; - assert.equal(queue.length, 0); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - queue.on('end', function() { - ended = true; - }); - queue.done(); - assert.equal(ended, false); - }); - - it('should work with POO API and a streamqueue ended stream plus sync done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - queue.queue(child); - child.done(); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - queue.done(); - }); - - it('should work with POO API and a streamqueue ended stream plus async done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - child.done(); - queue.queue(child); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - setTimeout(function() { - queue.done(); - }, 100); - }); - - it('should work with POO API and a streamqueue ended stream plus sync done', function(done) { - var queue = new StreamQueue(); - var child = new StreamQueue(); - child.done(); - queue.queue(child); - assert.equal(queue.length, 1); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, ''); - done(); - })); - queue.done(); - }); - - if('v2' === version) - it('should reemit errors', function(done) { - var _err; - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromErroredChunks(new Error('Aouch!'), [])); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(StreamTest[version].fromChunks(['pl','op'])); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 4); - queue.on('error', function(err) { - _err = err; - }); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert(_err); - assert.equal(_err.message, 'Aouch!'); - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - if('v2' === version) - it('should reemit errors elsewhere', function(done) { - var _err; - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks(['wa','dup'])); - queue.queue(StreamTest[version].fromChunks(['pl','op'])); - queue.queue(StreamTest[version].fromErroredChunks(new Error('Aouch!'), [])); - queue.queue(StreamTest[version].fromChunks(['ki','koo','lol'])); - assert.equal(queue.length, 4); - queue.on('error', function(err) { - _err = err; - }); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert(_err); - assert.equal(_err.message, 'Aouch!'); - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - }); - - describe('and with sync streams', function() { - - it('should work with functionnal API', function(done) { - var stream1 = StreamTest[version].syncReadableChunks(); - var stream2 = StreamTest[version].syncReadableChunks(); - var stream3 = StreamTest[version].syncReadableChunks(); - StreamQueue( - stream1, stream2, stream3 - ).pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - StreamTest[version].syncWrite(stream1, ['wa','dup']); - StreamTest[version].syncWrite(stream2, ['pl','op']); - StreamTest[version].syncWrite(stream3, ['ki','koo', 'lol']); - }); - - it('should work with POO API', function(done) { - var queue = new StreamQueue(); - var stream1 = StreamTest[version].syncReadableChunks(); - var stream2 = StreamTest[version].syncReadableChunks(); - var stream3 = StreamTest[version].syncReadableChunks(); - queue.queue(stream1); - queue.queue(stream2); - queue.queue(stream3); - StreamTest[version].syncWrite(stream1, ['wa','dup']); - StreamTest[version].syncWrite(stream2, ['pl','op']); - StreamTest[version].syncWrite(stream3, ['ki','koo', 'lol']); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should emit an error when calling done twice', function(done) { - var queue = new StreamQueue(); - var stream1 = StreamTest[version].syncReadableChunks(); - var stream2 = StreamTest[version].syncReadableChunks(); - var stream3 = StreamTest[version].syncReadableChunks(); - queue.queue(stream1); - queue.queue(stream2); - queue.queue(stream3); - StreamTest[version].syncWrite(stream1, ['wa','dup']); - StreamTest[version].syncWrite(stream2, ['pl','op']); - StreamTest[version].syncWrite(stream3, ['ki','koo', 'lol']); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - assert.throws(function() { - queue.done(); - }); - }); - - it('should emit an error when queueing after done was called', function(done) { - var queue = new StreamQueue(); - var stream1 = StreamTest[version].syncReadableChunks(); - var stream2 = StreamTest[version].syncReadableChunks(); - var stream3 = StreamTest[version].syncReadableChunks(); - queue.queue(stream1); - queue.queue(stream2); - queue.queue(stream3); - StreamTest[version].syncWrite(stream1, ['wa','dup']); - StreamTest[version].syncWrite(stream2, ['pl','op']); - StreamTest[version].syncWrite(stream3, ['ki','koo', 'lol']); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - assert.throws(function() { - queue.queue(StreamTest[version].syncReadableChunks()); - }); - }); - - if('v2' === version) - it('should reemit errors', function(done) { - var _err; - var queue = new StreamQueue(); - var stream1 = StreamTest[version].syncReadableChunks(); - var stream2 = StreamTest[version].syncReadableChunks(); - var stream3 = StreamTest[version].syncReadableChunks(); - var stream4 = StreamTest[version].syncReadableChunks(); - queue.queue(stream1); - queue.queue(stream2); - queue.queue(stream3); - queue.queue(stream4); - queue.on('error', function(err) { - _err = err; - }); - StreamTest[version].syncError(stream1, new Error('Aouch!')); - StreamTest[version].syncWrite(stream2, ['wa','dup']); - StreamTest[version].syncWrite(stream3, ['pl','op']); - StreamTest[version].syncWrite(stream4, ['ki','koo', 'lol']); - assert.equal(queue.length, 4); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert(_err); - assert.equal(_err.message, 'Aouch!'); - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - }); - - describe('and with functions returning streams', function() { - - it('should work with functionnal API', function(done) { - StreamQueue( - StreamTest[version].fromChunks.bind(null, ['wa','dup']), - StreamTest[version].fromChunks.bind(null, ['pl','op']), - StreamTest[version].fromChunks.bind(null, ['ki','koo','lol']) - ).pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - }); - - it('should work with functionnal API and options', function(done) { - StreamQueue( - StreamTest[version].fromChunks.bind(null, ['wa','dup']), - StreamTest[version].fromChunks.bind(null, ['pl','op']), - StreamTest[version].fromChunks.bind(null, ['ki','koo','lol']) - ).pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - }); - - it('should work with POO API', function(done) { - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['pl','op'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should pause streams in flowing mode', function(done) { - var queue = new StreamQueue({ - pauseFlowingStream: true, - resumeFlowingStream: true - }); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(function() { - var stream = StreamTest[version].fromChunks(['pl','op']); - stream.on('data', function() {}); - return stream; - }); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should work with POO API and options', function(done) { - var queue = new StreamQueue({ - pauseFlowingStream: true, - resumeFlowingStream: true - }); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['pl','op'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - it('should work with POO API and a late done call', function(done) { - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['pl','op'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 3); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - setTimeout(function() { - queue.done(); - }, 100); - }); - - if('v2' === version) - it('should reemit errors', function(done) { - var _err; - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromErroredChunks.bind(null, new Error('Aouch!'), [])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['pl','op'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 4); - queue.on('error', function(err) { - _err = err; - }); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert(_err); - assert.equal(_err.message, 'Aouch!'); - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - if('v2' === version) - it('should reemit errors elsewhere', function(done) { - var _err; - var queue = new StreamQueue(); - queue.queue(StreamTest[version].fromChunks.bind(null, ['wa','dup'])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['pl','op'])); - queue.queue(StreamTest[version].fromErroredChunks.bind(null, new Error('Aouch!'), [])); - queue.queue(StreamTest[version].fromChunks.bind(null, ['ki','koo','lol'])); - assert.equal(queue.length, 4); - queue.on('error', function(err) { - _err = err; - }); - queue.pipe(StreamTest[version].toText(function(err, text) { - if(err) { - done(err); - } - assert(_err); - assert.equal(_err.message, 'Aouch!'); - assert.equal(text, 'wadupplopkikoolol'); - done(); - })); - queue.done(); - }); - - }); - - }); - - describe('in object mode', function() { - - it('should work', function(done) { - var queue = new StreamQueue({objectMode: true}); - queue.queue(StreamTest[version].fromObjects([{s:'wa'},{s:'dup'}])); - queue.queue(StreamTest[version].fromObjects([{s:'pl'},{s:'op'}])); - queue.queue(StreamTest[version].fromObjects([{s:'ki'},{s:'koo'},{s:'lol'}])); - queue.pipe(StreamTest[version].toObjects(function(err, objs) { - if(err) { - done(err); - } - assert.deepEqual(objs, [{s:'wa'},{s:'dup'},{s:'pl'},{s:'op'},{s:'ki'},{s:'koo'},{s:'lol'}]); - done(); - })); - queue.done(); - }); - - }); - - }); - - }); - -}); - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa00..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/package.json deleted file mode 100644 index 3a079b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/string_decoder/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_location": "/string_decoder", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "raw": "string_decoder@~0.10.x", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~0.10.x", - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream/readable-stream", - "/gulp-file/readable-stream", - "/gulp-remember/readable-stream", - "/readable-stream", - "/streamqueue/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, - "description": "The string_decoder module from Node core", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/index.js deleted file mode 100644 index 099480f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/package.json deleted file mode 100644 index 98abb1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "strip-ansi@^3.0.0", - "scope": null, - "escapedName": "strip-ansi", - "name": "strip-ansi", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/chalk" - ] - ], - "_from": "strip-ansi@>=3.0.0 <4.0.0", - "_id": "strip-ansi@3.0.1", - "_inCache": true, - "_location": "/strip-ansi", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" - }, - "_npmUser": { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "raw": "strip-ansi@^3.0.0", - "scope": null, - "escapedName": "strip-ansi", - "name": "strip-ansi", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "_shrinkwrap": null, - "_spec": "strip-ansi@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "description": "Strip ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8270705c704956da865623e564eba4875c3ea17f", - "homepage": "https://github.com/chalk/strip-ansi", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "name": "strip-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/readme.md deleted file mode 100644 index cb7d9ff..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save strip-ansi -``` - - -## Usage - -```js -var stripAnsi = require('strip-ansi'); - -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' -``` - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/index.js deleted file mode 100644 index 5695c5c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -var isUtf8 = require('is-utf8'); - -module.exports = function (x) { - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) { - return x.slice(1); - } - - if (Buffer.isBuffer(x) && isUtf8(x) && - x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) { - return x.slice(3); - } - - return x; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/package.json deleted file mode 100644 index aad1146..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "strip-bom@^2.0.0", - "scope": null, - "escapedName": "strip-bom", - "name": "strip-bom", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file" - ] - ], - "_from": "strip-bom@>=2.0.0 <3.0.0", - "_id": "strip-bom@2.0.0", - "_inCache": true, - "_location": "/strip-bom", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "strip-bom@^2.0.0", - "scope": null, - "escapedName": "strip-bom", - "name": "strip-bom", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/load-json-file" - ], - "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "_shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e", - "_shrinkwrap": null, - "_spec": "strip-bom@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/load-json-file", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-bom/issues" - }, - "dependencies": { - "is-utf8": "^0.2.0" - }, - "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e", - "tarball": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "851b9c126dba9561cc14ef3dc2634dcc11df4d11", - "homepage": "https://github.com/sindresorhus/strip-bom", - "keywords": [ - "bom", - "strip", - "byte", - "mark", - "unicode", - "utf8", - "utf-8", - "remove", - "delete", - "trim", - "text", - "buffer", - "string" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "strip-bom", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-bom.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/readme.md deleted file mode 100644 index 8ecf258..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-bom/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom) - -> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer - -From Wikipedia: - -> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. - - -## Install - -``` -$ npm install --save strip-bom -``` - - -## Usage - -```js -var fs = require('fs'); -var stripBom = require('strip-bom'); - -stripBom('\uFEFFunicorn'); -//=> 'unicorn' - -stripBom(fs.readFileSync('unicorn.txt')); -//=> 'unicorn' -``` - - -## Related - -- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module -- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/cli.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/cli.js deleted file mode 100755 index bcd5f8d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/cli.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var stdin = require('get-stdin'); -var pkg = require('./package.json'); -var stripIndent = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' strip-indent ', - ' echo | strip-indent', - '', - ' Example', - ' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent', - ' unicorn', - ' \tcake' - ].join('\n')); -} - -function init(data) { - console.log(stripIndent(data)); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (process.stdin.isTTY) { - if (!input) { - help(); - return; - } - - init(fs.readFileSync(input, 'utf8')); -} else { - stdin(init); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/index.js deleted file mode 100644 index 8f8f4f4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; -module.exports = function (str) { - var match = str.match(/^[ \t]*(?=\S)/gm); - - if (!match) { - return str; - } - - var indent = Math.min.apply(Math, match.map(function (el) { - return el.length; - })); - - var re = new RegExp('^[ \\t]{' + indent + '}', 'gm'); - - return indent > 0 ? str.replace(re, '') : str; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/package.json deleted file mode 100644 index f381860..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "strip-indent@^1.0.1", - "scope": null, - "escapedName": "strip-indent", - "name": "strip-indent", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/redent" - ] - ], - "_from": "strip-indent@>=1.0.1 <2.0.0", - "_id": "strip-indent@1.0.1", - "_inCache": true, - "_location": "/strip-indent", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "raw": "strip-indent@^1.0.1", - "scope": null, - "escapedName": "strip-indent", - "name": "strip-indent", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/redent" - ], - "_resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "_shasum": "0c7962a6adefa7bbd4ac366460a638552ae1a0a2", - "_shrinkwrap": null, - "_spec": "strip-indent@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/redent", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "strip-indent": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-indent/issues" - }, - "dependencies": { - "get-stdin": "^4.0.1" - }, - "description": "Strip leading whitespace from every line in a string", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "0c7962a6adefa7bbd4ac366460a638552ae1a0a2", - "tarball": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "cli.js" - ], - "gitHead": "addcf90a56001ea122e9f1254987016bc87e5b5f", - "homepage": "https://github.com/sindresorhus/strip-indent", - "keywords": [ - "cli", - "bin", - "browser", - "strip", - "normalize", - "remove", - "indent", - "indentation", - "whitespace", - "space", - "tab", - "string", - "str" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "strip-indent", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-indent.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/readme.md deleted file mode 100644 index d622f03..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/strip-indent/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent) - -> Strip leading whitespace from every line in a string - -The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove. - -Useful for removing redundant indentation. - - -## Install - -```sh -$ npm install --save strip-indent -``` - - -## Usage - -```js -var str = '\tunicorn\n\t\tcake'; -/* - unicorn - cake -*/ - -stripIndent('\tunicorn\n\t\tcake'); -/* -unicorn - cake -*/ -``` - - -## CLI - -```sh -$ npm install --global strip-indent -``` - -```sh -$ strip-indent --help - - Usage - strip-indent - echo | strip-indent - - Example - echo '\tunicorn\n\t\tcake' | strip-indent - unicorn - cake -``` - - -## Related - -- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/index.js deleted file mode 100644 index 4346e27..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; -var argv = process.argv; - -var terminator = argv.indexOf('--'); -var hasFlag = function (flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); -}; - -module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - return false; - } - - if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/package.json deleted file mode 100644 index d575fb9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "supports-color@^2.0.0", - "scope": null, - "escapedName": "supports-color", - "name": "supports-color", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/chalk" - ] - ], - "_from": "supports-color@>=2.0.0 <3.0.0", - "_id": "supports-color@2.0.0", - "_inCache": true, - "_location": "/supports-color", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "supports-color@^2.0.0", - "scope": null, - "escapedName": "supports-color", - "name": "supports-color", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "_shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "_shrinkwrap": null, - "_spec": "supports-color@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588", - "homepage": "https://github.com/chalk/supports-color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - } - ], - "name": "supports-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/readme.md deleted file mode 100644 index b4761f1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/supports-color/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/.travis.yml deleted file mode 100644 index c693a93..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.APACHE2 b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c04..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.MIT b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/index.js deleted file mode 100644 index ca5fc59..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/package.json deleted file mode 100644 index 652e84e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "through@~2.3.4", - "scope": null, - "escapedName": "through", - "name": "through", - "rawSpec": "~2.3.4", - "spec": ">=2.3.4 <2.4.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-order" - ] - ], - "_from": "through@>=2.3.4 <2.4.0", - "_id": "through@2.3.8", - "_inCache": true, - "_location": "/through", - "_nodeVersion": "2.3.1", - "_npmUser": { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - }, - "_npmVersion": "2.12.0", - "_phantomChildren": {}, - "_requested": { - "raw": "through@~2.3.4", - "scope": null, - "escapedName": "through", - "name": "through", - "rawSpec": "~2.3.4", - "spec": ">=2.3.4 <2.4.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-order" - ], - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_shrinkwrap": null, - "_spec": "through@~2.3.4", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-order", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "dependencies": {}, - "description": "simplified stream construction", - "devDependencies": { - "from": "~0.1.3", - "stream-spec": "~0.3.5", - "tape": "~2.3.2" - }, - "directories": {}, - "dist": { - "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "tarball": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", - "homepage": "https://github.com/dominictarr/through", - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "dominictarr", - "email": "dominic.tarr@gmail.com" - } - ], - "name": "through", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "version": "2.3.8" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/readme.markdown b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/readme.markdown deleted file mode 100644 index cb34c81..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/async.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/async.js deleted file mode 100644 index 46bdbae..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/auto-destroy.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd00..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/buffering.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/end.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/end.js deleted file mode 100644 index fa113f5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/index.js deleted file mode 100644 index 96da82f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/.npmignore deleted file mode 100644 index 1e1dcab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.jshintrc -.travis.yml \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.html b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.html deleted file mode 100644 index ac47818..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - -
    -

    The MIT License (MIT)

    -

    Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors

    -

    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.

    -
    -
    - - \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.md deleted file mode 100644 index 7f0b93d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -# The MIT License (MIT) - -**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors** - -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. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/README.md deleted file mode 100644 index a916f15..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) - .on('finish', function () { - doSomethingSpecial() - }) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - function (chunk, enc, cb) { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit == "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/Makefile b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## 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/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/component.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/component.json deleted file mode 100644 index 9e31b68..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/index.js deleted file mode 100644 index a57f634..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/package.json deleted file mode 100644 index 854bb2b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "isarray@>=1.0.0 <1.1.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_location": "/through2/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "isarray@~1.0.0", - "scope": null, - "escapedName": "isarray", - "name": "isarray", - "rawSpec": "~1.0.0", - "spec": ">=1.0.0 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@~1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..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/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/test.js deleted file mode 100644 index e0c3444..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 6d270c6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js -.zuul.yml -.nyc_output -coverage -docs/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 0c5d2bc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 6 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 6 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 6 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 6 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 6 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 6 - env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index b24a2c8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# readable-stream - -***Node-core v8.1.3 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.1.3/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex-browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index c599463..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - processNextTick(cb, err); -}; - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c8358..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index ee9001c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1007 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -'use strict'; - -/**/ - -var processNextTick = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -// TODO(bmeurer): Change this back to const once hole checks are -// properly optimized away early in Ignition+TurboFan. -/**/ -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') { - return emitter.prependListener(event, fn); - } else { - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; - } -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index a0c2317..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return stream.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er, data) { - done(stream, er, data); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data !== null && data !== undefined) stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index d20da88..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,664 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var processNextTick = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = _isUint8Array(chunk) && !state.objectMode; - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - processNextTick(cb, er); - // this can emit finish, and it will always happen - // after error - processNextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - processNextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index d467615..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -/**/ - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index b3e58c3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -/**/ - -var processNextTick = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - processNextTick(emitErrorNT, this, err); - } - return; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - processNextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index 0a42f1a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@^2.1.5", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "^2.1.5", - "spec": ">=2.1.5 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2" - ] - ], - "_from": "readable-stream@>=2.1.5 <3.0.0", - "_id": "readable-stream@2.3.3", - "_inCache": true, - "_location": "/through2/readable-stream", - "_nodeVersion": "8.1.3", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/readable-stream-2.3.3.tgz_1498745872585_0.8663316275924444" - }, - "_npmUser": { - "name": "matteo.collina", - "email": "hello@matteocollina.com" - }, - "_npmVersion": "5.0.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@^2.1.5", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": "^2.1.5", - "spec": ">=2.1.5 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "_shasum": "368f2512d79f9d46fdfc71349ae7878bbc1eb95c", - "_shrinkwrap": null, - "_spec": "readable-stream@^2.1.5", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "~1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "nyc": "^6.4.0", - "tap": "~0.7.1", - "tape": "~4.5.1", - "zuul": "~3.10.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "shasum": "368f2512d79f9d46fdfc71349ae7878bbc1eb95c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - }, - "gitHead": "cd59995050105b946884ee20e3bcadc252feda8c", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "nodejs-foundation", - "email": "build@iojs.org" - }, - { - "name": "matteo.collina", - "email": "hello@matteocollina.com" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js", - "cover": "nyc npm test", - "local": "zuul --local 3000 --no-coverage -- test/browser.js", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.3.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable-browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e503725..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable-browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/README.md deleted file mode 100644 index dc3a2d2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# string_decoder - -***Node-core v7.0.0 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoderstring_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 26fb94c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,272 +0,0 @@ -'use strict'; - -var Buffer = require('safe-buffer').Buffer; - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return -1; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'.repeat(p); - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'.repeat(p + 1); - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'.repeat(p + 2); - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character for each buffered byte of a (partial) -// character needs to be added to the output. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/package.json deleted file mode 100644 index 0e6b2fa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/string_decoder/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "string_decoder@~1.0.3", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~1.0.3", - "spec": ">=1.0.3 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@>=1.0.3 <1.1.0", - "_id": "string_decoder@1.0.3", - "_inCache": true, - "_location": "/through2/string_decoder", - "_nodeVersion": "8.1.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/string_decoder-1.0.3.tgz_1498156574101_0.8198789858724922" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "5.0.3", - "_phantomChildren": {}, - "_requested": { - "raw": "string_decoder@~1.0.3", - "scope": null, - "escapedName": "string_decoder", - "name": "string_decoder", - "rawSpec": "~1.0.3", - "spec": ">=1.0.3 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "_shasum": "0fc67d7c141825de94282dd536bec6b9bce860ab", - "_shrinkwrap": null, - "_spec": "string_decoder@~1.0.3", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "shasum": "0fc67d7c141825de94282dd536bec6b9bce860ab", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" - }, - "gitHead": "e97f24dd3d047b72b9836518e2a0788e2a6a2fdb", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "maintainers": [ - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - { - "name": "matteo.collina", - "email": "hello@matteocollina.com" - }, - { - "name": "nodejs-foundation", - "email": "build@iojs.org" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "substack", - "email": "substack@gmail.com" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.0.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/package.json deleted file mode 100644 index 2f320ee..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "through2@^2.0.0", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel" - ] - ], - "_from": "through2@>=2.0.0 <3.0.0", - "_id": "through2@2.0.3", - "_inCache": true, - "_location": "/through2", - "_nodeVersion": "7.2.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/through2-2.0.3.tgz_1480373529377_0.264686161885038" - }, - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "_npmVersion": "3.10.9", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "raw": "through2@^2.0.0", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^2.0.0", - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/cloneable-readable", - "/gulp-babel", - "/gulp-cached", - "/gulp-concat", - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", - "_shrinkwrap": null, - "_spec": "through2@^2.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "dependencies": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - }, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": "~1.1.2", - "faucet": "0.0.1", - "stream-spigot": "~3.0.5", - "tape": "~4.6.2" - }, - "directories": {}, - "dist": { - "shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", - "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" - }, - "gitHead": "4383b10b2cb6a32ae215760715b317513abe609f", - "homepage": "https://github.com/rvagg/through2#readme", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "name": "through2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js | faucet", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "version": "2.0.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/through2.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/through2.js deleted file mode 100644 index 5b7a880..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/index.js deleted file mode 100644 index ee8eb93..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; -var path = require('path'); -var osHomedir = require('os-homedir'); -var home = osHomedir(); - -module.exports = function (str) { - str = path.normalize(str) + path.sep; - return (str.indexOf(home) === 0 ? str.replace(home + path.sep, '~' + path.sep) : str).slice(0, -1); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/package.json deleted file mode 100644 index f31c416..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "tildify@^1.0.0", - "scope": null, - "escapedName": "tildify", - "name": "tildify", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp" - ] - ], - "_from": "tildify@>=1.0.0 <2.0.0", - "_id": "tildify@1.2.0", - "_inCache": true, - "_location": "/tildify", - "_nodeVersion": "4.4.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/tildify-1.2.0.tgz_1460447164123_0.6345257461071014" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.0", - "_phantomChildren": {}, - "_requested": { - "raw": "tildify@^1.0.0", - "scope": null, - "escapedName": "tildify", - "name": "tildify", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp" - ], - "_resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", - "_shasum": "dcec03f55dca9b7aa3e5b04f21817eb56e63588a", - "_shrinkwrap": null, - "_spec": "tildify@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/tildify/issues" - }, - "dependencies": { - "os-homedir": "^1.0.0" - }, - "description": "Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "dcec03f55dca9b7aa3e5b04f21817eb56e63588a", - "tarball": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "c323a7ebf1098dfbf3e333a93c3f0c51c6ca48e0", - "homepage": "https://github.com/sindresorhus/tildify#readme", - "keywords": [ - "unexpand", - "homedir", - "tilde", - "tildify", - "collapse", - "path", - "home", - "dir", - "directory", - "user", - "expand" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "tildify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/tildify.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/readme.md deleted file mode 100644 index 2a70d69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/tildify/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# tildify [![Build Status](https://travis-ci.org/sindresorhus/tildify.svg?branch=master)](https://travis-ci.org/sindresorhus/tildify) - -> Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev` - - -## Install - -``` -$ npm install --save tildify -``` - - -## Usage - -```js -const tildify = require('tildify'); - -tildify('/Users/sindresorhus/dev'); -//=> '~/dev' -``` - - -## Related - -See [untildify](https://github.com/sindresorhus/untildify) for the inverse. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/LICENSE deleted file mode 100644 index 83b56e7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/README.md deleted file mode 100644 index a12d3e1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# time-stamp [![NPM version](https://img.shields.io/npm/v/time-stamp.svg?style=flat)](https://www.npmjs.com/package/time-stamp) [![NPM monthly downloads](https://img.shields.io/npm/dm/time-stamp.svg?style=flat)](https://npmjs.org/package/time-stamp) [![NPM total downloads](https://img.shields.io/npm/dt/time-stamp.svg?style=flat)](https://npmjs.org/package/time-stamp) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/time-stamp.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/time-stamp) - -> Get a formatted timestamp. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save time-stamp -``` - -## Usage - -```js -var timestamp = require('time-stamp'); - -timestamp(); -//=> 2017:05:14 - -timestamp('YYYYMMDD'); -//=> 20170514 - -timestamp('YYYYMMDD:ss'); -//=> 20170514:26 - -timestamp('YYYY/MM/DD:mm:ss'); -//=> 2017/05/14:52:26 - -timestamp('YYYY:MM:DD'); -//=> 2017:05:14 - -timestamp('[YYYY:MM:DD]'); -//=> [2017:05:14] - -timestamp('YYYY/MM/DD'); -//=> 2017/05/14 - -timestamp('YYYY:MM'); -//=> 2017:05 - -timestamp('YYYY'); -//=> 2017 - -timestamp('MM'); -//=> 05 - -timestamp('DD'); -//=> 14 - -timestamp('HH'); -//=> 20 - -timestamp('mm'); -//=> 52 - -timestamp('ss'); -//=> 26 - -timestamp('ms'); -//=> 481 -``` - -**Valid patterns** - -* `YYYY`: full year (ex: **2017**) -* `MM`: month (ex: **04**) -* `DD`: day (ex: **01**) -* `HH`: hours (ex: **12**) -* `mm`: minutes (ex: **59**) -* `ss`: seconds (ex: **09**) -* `ms`: milliseconds (ex: **532**) - -## About - -### Related projects - -* [days](https://www.npmjs.com/package/days): Days of the week. | [homepage](https://github.com/jonschlinkert/days "Days of the week.") -* [iso-week](https://www.npmjs.com/package/iso-week): Get the ISO week of the year. | [homepage](https://github.com/jonschlinkert/iso-week "Get the ISO week of the year.") -* [month](https://www.npmjs.com/package/month): Get the name or number of the current month or any month of the year. | [homepage](https://github.com/datetime/month "Get the name or number of the current month or any month of the year.") -* [months](https://www.npmjs.com/package/months): Months of the year. | [homepage](https://github.com/jonschlinkert/months "Months of the year.") -* [o-clock](https://www.npmjs.com/package/o-clock): Simple javascript utility for displaying the time in 12-hour clock format. | [homepage](https://github.com/jonschlinkert/o-clock "Simple javascript utility for displaying the time in 12-hour clock format.") -* [seconds](https://www.npmjs.com/package/seconds): Get the number of seconds for a minute, hour, day and week. | [homepage](https://github.com/jonschlinkert/seconds "Get the number of seconds for a minute, hour, day and week.") -* [week](https://www.npmjs.com/package/week): Get the current week number. | [homepage](https://github.com/datetime/week "Get the current week number.") -* [weekday](https://www.npmjs.com/package/weekday): Get the name and number of the current weekday. Or get the name of the… [more](https://github.com/datetime/weekday) | [homepage](https://github.com/datetime/weekday "Get the name and number of the current weekday. Or get the name of the weekday for a given number.") -* [year](https://www.npmjs.com/package/year): Simple utility to get the current year with 2 or 4 digits. | [homepage](https://github.com/jonschlinkert/year "Simple utility to get the current year with 2 or 4 digits.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 21 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [evocateur](https://github.com/evocateur) | -| 1 | [mendenhallmagic](https://github.com/mendenhallmagic) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 14, 2017._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/index.js deleted file mode 100644 index 0c93048..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/index.js +++ /dev/null @@ -1,56 +0,0 @@ -/*! - * time-stamp - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -/** - * Parse the given pattern and return a formatted - * timestamp. - * - * @param {String} `pattern` Date pattern. - * @param {Date} `date` Date object. - * @return {String} - */ - -module.exports = function(pattern, date) { - if (typeof pattern !== 'string') { - date = pattern; - pattern = 'YYYY:MM:DD'; - } - - if (!date) date = new Date(); - - function timestamp() { - var regex = /(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))\1([:\/]*)/; - var match = regex.exec(pattern); - - if (match) { - var increment = method(match[1]); - var val = '00' + String(date[increment[0]]() + (increment[2] || 0)); - var res = val.slice(-increment[1]) + (match[2] || ''); - pattern = pattern.replace(match[0], res); - timestamp(); - } - } - - timestamp(pattern); - return pattern; -}; - -function method(key) { - return ({ - YYYY: ['getFullYear', 4], - YY: ['getFullYear', 2], - // getMonth is zero-based, thus the extra increment field - MM: ['getMonth', 2, 1], - DD: ['getDate', 2], - HH: ['getHours', 2], - mm: ['getMinutes', 2], - ss: ['getSeconds', 2], - ms: ['getMilliseconds', 3] - })[key]; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/package.json deleted file mode 100644 index e96683d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/time-stamp/package.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "time-stamp@^1.0.0", - "scope": null, - "escapedName": "time-stamp", - "name": "time-stamp", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fancy-log" - ] - ], - "_from": "time-stamp@>=1.0.0 <2.0.0", - "_id": "time-stamp@1.1.0", - "_inCache": true, - "_location": "/time-stamp", - "_nodeVersion": "7.7.3", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/time-stamp-1.1.0.tgz_1494809609879_0.2116724606603384" - }, - "_npmUser": { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - "_npmVersion": "4.5.0", - "_phantomChildren": {}, - "_requested": { - "raw": "time-stamp@^1.0.0", - "scope": null, - "escapedName": "time-stamp", - "name": "time-stamp", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fancy-log" - ], - "_resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "_shasum": "764a5a11af50561921b133f3b44e618687e0f5c3", - "_shrinkwrap": null, - "_spec": "time-stamp@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/fancy-log", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/time-stamp/issues" - }, - "contributors": [ - { - "name": "Daniel Stockman", - "url": "http://evocateur.org" - }, - { - "name": "Drew", - "url": "https://github.com/mendenhallmagic" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": {}, - "description": "Get a formatted timestamp.", - "devDependencies": { - "gulp-format-md": "^0.1.12", - "mocha": "^3.4.1", - "pad-left": "^2.1.0" - }, - "directories": {}, - "dist": { - "shasum": "764a5a11af50561921b133f3b44e618687e0f5c3", - "tarball": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "30533a5f71944f368b3b1ccaedd895a26b6c5bff", - "homepage": "https://github.com/jonschlinkert/time-stamp", - "keywords": [ - "console", - "date", - "format", - "formatting", - "log", - "pretty", - "stamp", - "terminal", - "time", - "time-stamp" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - } - ], - "name": "time-stamp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/time-stamp.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "helpers": { - "timestamp": "./index.js" - }, - "related": { - "list": [ - "days", - "iso-week", - "month", - "months", - "o-clock", - "seconds", - "week", - "weekday", - "year" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.1.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/index.js deleted file mode 100644 index 56fc00b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = function toFastproperties(o) { - function Sub() {} - Sub.prototype = o; - var receiver = new Sub(); // create an instance - function ic() { return typeof receiver.foo; } // perform access - ic(); - ic(); - return o; - eval("o" + o); // ensure no dead code elimination -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/license deleted file mode 100644 index 55cc204..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/license +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Petka Antonov - 2015 Sindre Sorhus - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/package.json deleted file mode 100644 index 27877b4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "to-fast-properties@^1.0.3", - "scope": null, - "escapedName": "to-fast-properties", - "name": "to-fast-properties", - "rawSpec": "^1.0.3", - "spec": ">=1.0.3 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types" - ] - ], - "_from": "to-fast-properties@>=1.0.3 <2.0.0", - "_id": "to-fast-properties@1.0.3", - "_inCache": true, - "_location": "/to-fast-properties", - "_nodeVersion": "7.8.0", - "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/to-fast-properties-1.0.3.tgz_1493539544656_0.5382057083770633" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "4.2.0", - "_phantomChildren": {}, - "_requested": { - "raw": "to-fast-properties@^1.0.3", - "scope": null, - "escapedName": "to-fast-properties", - "name": "to-fast-properties", - "rawSpec": "^1.0.3", - "spec": ">=1.0.3 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-types" - ], - "_resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "_shasum": "b83571fa4d8c25b82e231b06e3a3055de4ca1a47", - "_shrinkwrap": null, - "_spec": "to-fast-properties@^1.0.3", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-types", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/to-fast-properties/issues" - }, - "dependencies": {}, - "description": "Force V8 to use fast properties for an object", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "b83571fa4d8c25b82e231b06e3a3055de4ca1a47", - "tarball": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "76e30a0b6040781a705cb351fb2e4a1d879f1adb", - "homepage": "https://github.com/sindresorhus/to-fast-properties#readme", - "keywords": [ - "object", - "obj", - "properties", - "props", - "v8", - "optimize", - "fast", - "convert", - "mode" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "to-fast-properties", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/to-fast-properties.git" - }, - "scripts": { - "test": "node --allow-natives-syntax test.js" - }, - "version": "1.0.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/readme.md deleted file mode 100644 index e298c20..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/to-fast-properties/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# to-fast-properties [![Build Status](https://travis-ci.org/sindresorhus/to-fast-properties.svg?branch=master)](https://travis-ci.org/sindresorhus/to-fast-properties) - -> Force V8 to use fast properties for an object - -[Read more.](http://stackoverflow.com/questions/24987896/) - -Use `%HasFastProperties(object)` and `--allow-natives-syntax` to check whether an object already has fast properties. - - -## Install - -``` -$ npm install --save to-fast-properties -``` - - -## Usage - -```js -const toFastProperties = require('to-fast-properties'); - -const obj = { - foo: true, - bar: true -}; - -delete obj.foo; -// `obj` now has slow properties - -toFastProperties(obj); -// `obj` now has fast properties -``` - - -## License - -MIT © Petka Antonov, Sindre Sorhus diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/index.js deleted file mode 100644 index da31efd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var fn = module.exports = function (x) { - return fn.end(fn.start(x)); -}; - -fn.start = function (x) { - return x.replace(/^[\r\n]+/, ''); -}; - -fn.end = function (x) { - return x.replace(/[\r\n]+$/, ''); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/package.json deleted file mode 100644 index dc8f3d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "trim-newlines@^1.0.0", - "scope": null, - "escapedName": "trim-newlines", - "name": "trim-newlines", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/meow" - ] - ], - "_from": "trim-newlines@>=1.0.0 <2.0.0", - "_id": "trim-newlines@1.0.0", - "_inCache": true, - "_location": "/trim-newlines", - "_nodeVersion": "4.1.1", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "trim-newlines@^1.0.0", - "scope": null, - "escapedName": "trim-newlines", - "name": "trim-newlines", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/meow" - ], - "_resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "_shasum": "5887966bb582a4503a41eb524f7d35011815a613", - "_shrinkwrap": null, - "_spec": "trim-newlines@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/meow", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/trim-newlines/issues" - }, - "dependencies": {}, - "description": "Trim newlines from the start and/or end of a string", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "5887966bb582a4503a41eb524f7d35011815a613", - "tarball": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "f651a2d4cbf382c2936e6e53edee9316602e4ce7", - "homepage": "https://github.com/sindresorhus/trim-newlines", - "keywords": [ - "trim", - "newline", - "newlines", - "linebreak", - "lf", - "crlf", - "left", - "right", - "start", - "end", - "string", - "str", - "remove", - "delete", - "strip" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "trim-newlines", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/trim-newlines.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/readme.md deleted file mode 100644 index fedb3ca..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-newlines/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# trim-newlines [![Build Status](https://travis-ci.org/sindresorhus/trim-newlines.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-newlines) - -> Trim [newlines](https://en.wikipedia.org/wiki/Newline) from the start and/or end of a string - - -## Install - -``` -$ npm install --save trim-newlines -``` - - -## Usage - -```js -var trimNewlines = require('trim-newlines'); - -trimNewlines('\nunicorn\r\n'); -//=> 'unicorn' -``` - - -## API - -### trimNewlines(input) - -Trim from the start and end of a string. - -### trimNewlines.start(input) - -Trim from the start of a string. - -### trimNewlines.end(input) - -Trim from the end of a string. - - -## Related - -- [trim-left](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left -- [trim-right](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/index.js deleted file mode 100644 index 666f4b2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -module.exports = function (str) { - var tail = str.length; - - while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) { - tail--; - } - - return str.slice(0, tail); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/package.json deleted file mode 100644 index 3dbdbfe..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "trim-right@^1.0.1", - "scope": null, - "escapedName": "trim-right", - "name": "trim-right", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator" - ] - ], - "_from": "trim-right@>=1.0.1 <2.0.0", - "_id": "trim-right@1.0.1", - "_inCache": true, - "_location": "/trim-right", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "trim-right@^1.0.1", - "scope": null, - "escapedName": "trim-right", - "name": "trim-right", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/babel-generator" - ], - "_resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "_shasum": "cb2e1203067e0c8de1f614094b9fe45704ea6003", - "_shrinkwrap": null, - "_spec": "trim-right@^1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/babel-generator", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/trim-right/issues" - }, - "dependencies": {}, - "description": "Similar to String#trim() but removes only whitespace on the right", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "cb2e1203067e0c8de1f614094b9fe45704ea6003", - "tarball": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "105fb46669afb0deb49d14bd688b276297e59dff", - "homepage": "https://github.com/sindresorhus/trim-right", - "keywords": [ - "trim", - "right", - "string", - "str", - "util", - "utils", - "utility", - "whitespace", - "space", - "remove", - "delete" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "trim-right", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/trim-right.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/readme.md deleted file mode 100644 index 0a4438a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/trim-right/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# trim-right [![Build Status](https://travis-ci.org/sindresorhus/trim-right.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-right) - -> Similar to [`String#trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) but removes only whitespace on the right - - -## Install - -``` -$ npm install --save trim-right -``` - - -## Usage - -```js -var trimRight = require('trim-right'); - -trimRight(' unicorn '); -//=> ' unicorn' -``` - - -## Related - -- [`trim-left`](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/README.md deleted file mode 100644 index e0eddda..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# unc-path-regex [![NPM version](https://badge.fury.io/js/unc-path-regex.svg)](http://badge.fury.io/js/unc-path-regex) [![Build Status](https://travis-ci.org/jonschlinkert/unc-path-regex.svg)](https://travis-ci.org/jonschlinkert/unc-path-regex) - -> Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property. - -Visit the MSDN reference for [Common Data Types 2.2.57 UNC](https://msdn.microsoft.com/en-us/library/gg465305.aspx) for more information about UNC paths. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i unc-path-regex --save -``` - -## Usage - -```js -// unc-path-regex returns a function -var regex = require('unc-path-regex')(); -``` - -**true** - -Returns true for windows UNC paths: - -```js -regex.test('\\/foo/bar'); -regex.test('\\\\foo/bar'); -regex.test('\\\\foo\\admin$'); -regex.test('\\\\foo\\admin$\\system32'); -regex.test('\\\\foo\\temp'); -regex.test('\\\\/foo/bar'); -regex.test('\\\\\\/foo/bar'); -``` - -**false** - -Returns false for non-UNC paths: - -```js -regex.test('/foo/bar'); -regex.test('/'); -regex.test('/foo'); -regex.test('/foo/'); -regex.test('c:'); -regex.test('c:.'); -regex.test('c:./'); -regex.test('c:./file'); -regex.test('c:/'); -regex.test('c:/file'); -``` - -## Related projects - -* [dotfile-regex](https://github.com/regexps/dotfile-regex): Regular expresson for matching dotfiles. -* [dotdir-regex](https://github.com/regexps/dotdir-regex): Regex for matching dot-directories, like `.git/` -* [dirname-regex](https://github.com/regexps/dirname-regex): Regular expression for matching the directory part of a file path. -* [is-unc-path](https://github.com/jonschlinkert/is-unc-path): Returns true if a filepath is a windows UNC file path. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [path-regex](https://github.com/regexps/path-regex): Regular expression for matching the parts of a file path. - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/unc-path-regex/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 07, 2015._ \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/index.js deleted file mode 100644 index c268404..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function uncPathRegex() { - return /^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/package.json deleted file mode 100644 index ab015ea..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unc-path-regex/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "unc-path-regex@^0.1.0", - "scope": null, - "escapedName": "unc-path-regex", - "name": "unc-path-regex", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/is-unc-path" - ] - ], - "_from": "unc-path-regex@>=0.1.0 <0.2.0", - "_id": "unc-path-regex@0.1.2", - "_inCache": true, - "_location": "/unc-path-regex", - "_nodeVersion": "5.8.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/unc-path-regex-0.1.2.tgz_1460256703094_0.4246507475618273" - }, - "_npmUser": { - "name": "tunnckocore", - "email": "mameto_100@mail.bg" - }, - "_npmVersion": "3.8.5", - "_phantomChildren": {}, - "_requested": { - "raw": "unc-path-regex@^0.1.0", - "scope": null, - "escapedName": "unc-path-regex", - "name": "unc-path-regex", - "rawSpec": "^0.1.0", - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/is-unc-path" - ], - "_resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "_shasum": "e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa", - "_shrinkwrap": null, - "_spec": "unc-path-regex@^0.1.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/is-unc-path", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/regexhq/unc-path-regex/issues" - }, - "dependencies": {}, - "description": "Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property.", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa", - "tarball": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8962715152d8438fac975f90ac218017b41fea20", - "homepage": "https://github.com/regexhq/unc-path-regex", - "keywords": [ - "absolute", - "expression", - "file", - "filepath", - "match", - "matching", - "path", - "regex", - "regexp", - "regular", - "unc", - "win", - "windows" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "tunnckocore", - "email": "mameto_100@mail.bg" - } - ], - "name": "unc-path-regex", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/regexhq/unc-path-regex.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "dotfile-regex", - "is-unc-path", - "unc-path-regex", - "dotdir-regex", - "path-regex", - "dirname-regex", - "is-glob" - ] - } - }, - "version": "0.1.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.npmignore deleted file mode 100644 index 4443039..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.swp -.DS_Store -node_modules/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.travis.yml deleted file mode 100644 index 6e5919d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/LICENSE deleted file mode 100644 index cd2225a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2014 Eugene Ware - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/README.md deleted file mode 100644 index f19b20a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# unique-stream - -node.js through stream that emits a unique stream of objects based on criteria - -[![build status](https://secure.travis-ci.org/eugeneware/unique-stream.png)](http://travis-ci.org/eugeneware/unique-stream) - -## Installation - -Install via npm: - -``` -$ npm install unique-stream -``` - -## Examples - -### Dedupe a ReadStream based on JSON.stringify: - -``` js -var unique = require('unique-stream') - , Stream = require('stream'); - -// return a stream of 3 identical objects -function makeStreamOfObjects() { - var s = new Stream; - s.readable = true; - var count = 3; - for (var i = 0; i < 3; i++) { - setImmediate(function () { - s.emit('data', { name: 'Bob', number: 123 }); - --count && end(); - }); - } - - function end() { - s.emit('end'); - } - - return s; -} - -// Will only print out one object as the rest are dupes. (Uses JSON.stringify) -makeStreamOfObjects() - .pipe(unique()) - .on('data', console.log); - -``` - -### Dedupe a ReadStream based on an object property: - -``` js -// Use name as the key field to dedupe on. Will only print one object -makeStreamOfObjects() - .pipe(unique('name')) - .on('data', console.log); -``` - -### Dedupe a ReadStream based on a custom function: - -``` js -// Use a custom function to dedupe on. Use the 'number' field. Will only print one object. -makeStreamOfObjects() - .pipe(function (data) { - return data.number; - }) - .on('data', console.log); -``` - -## Dedupe multiple streams - -The reason I wrote this was to dedupe multiple object streams: - -``` js -var aggregator = unique(); - -// Stream 1 -makeStreamOfObjects() - .pipe(aggregator); - -// Stream 2 -makeStreamOfObjects() - .pipe(aggregator); - -// Stream 3 -makeStreamOfObjects() - .pipe(aggregator); - -aggregator.on('data', console.log); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/index.js deleted file mode 100644 index 0c13168..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/index.js +++ /dev/null @@ -1,54 +0,0 @@ -var Stream = require('stream'); - -function prop(propName) { - return function (data) { - return data[propName]; - }; -} - -module.exports = unique; -function unique(propName) { - var keyfn = JSON.stringify; - if (typeof propName === 'string') { - keyfn = prop(propName); - } else if (typeof propName === 'function') { - keyfn = propName; - } - var seen = {}; - var s = new Stream(); - s.readable = true; - s.writable = true; - var pipes = 0; - - s.write = function (data) { - var key = keyfn(data); - if (seen[key] === undefined) { - seen[key] = true; - s.emit('data', data); - } - }; - - var ended = 0; - s.end = function (data) { - if (arguments.length) s.write(data); - ended++; - if (ended === pipes || pipes === 0) { - s.writable = false; - s.emit('end'); - } - }; - - s.destroy = function (data) { - s.writable = false; - }; - - s.on('pipe', function () { - pipes++; - }); - - s.on('unpipe', function () { - pipes--; - }); - - return s; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/package.json deleted file mode 100644 index 8f4e225..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "unique-stream@^1.0.0", - "scope": null, - "escapedName": "unique-stream", - "name": "unique-stream", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream" - ] - ], - "_from": "unique-stream@>=1.0.0 <2.0.0", - "_id": "unique-stream@1.0.0", - "_inCache": true, - "_location": "/unique-stream", - "_npmUser": { - "name": "eugeneware", - "email": "eugene@noblesamurai.com" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "raw": "unique-stream@^1.0.0", - "scope": null, - "escapedName": "unique-stream", - "name": "unique-stream", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", - "_shasum": "d59a4a75427447d9aa6c91e70263f8d26a4b104b", - "_shrinkwrap": null, - "_spec": "unique-stream@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/glob-stream", - "author": { - "name": "Eugene Ware", - "email": "eugene@noblesamurai.com" - }, - "bugs": { - "url": "https://github.com/eugeneware/unique-stream/issues" - }, - "dependencies": {}, - "description": "node.js through stream that emits a unique stream of objects based on criteria", - "devDependencies": { - "after": "~0.8.1", - "chai": "~1.7.2", - "mocha": "^1.18.2" - }, - "directories": {}, - "dist": { - "shasum": "d59a4a75427447d9aa6c91e70263f8d26a4b104b", - "tarball": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz" - }, - "homepage": "https://github.com/eugeneware/unique-stream", - "keywords": [ - "unique", - "stream", - "unique-stream", - "streaming", - "streams" - ], - "license": "BSD", - "main": "index.js", - "maintainers": [ - { - "name": "eugeneware", - "email": "eugene@noblesamurai.com" - } - ], - "name": "unique-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/eugeneware/unique-stream.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/test/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/test/index.js deleted file mode 100644 index fca02b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/unique-stream/test/index.js +++ /dev/null @@ -1,109 +0,0 @@ -var expect = require('chai').expect - , unique = require('..') - , Stream = require('stream') - , after = require('after') - , setImmediate = global.setImmediate || process.nextTick; - -describe('unique stream', function() { - - function makeStream(type) { - var s = new Stream(); - s.readable = true; - - var n = 10; - var next = after(n, function () { - setImmediate(function () { - s.emit('end'); - }); - }); - - for (var i = 0; i < n; i++) { - var o = { - type: type, - name: 'name ' + i, - number: i * 10 - }; - - (function (o) { - setImmediate(function () { - s.emit('data', o); - next(); - }); - })(o); - } - return s; - } - - it('should be able to uniqueify objects based on JSON data', function(done) { - var aggregator = unique(); - makeStream('a') - .pipe(aggregator); - makeStream('a') - .pipe(aggregator); - - var n = 0; - aggregator - .on('data', function () { - n++; - }) - .on('end', function () { - expect(n).to.equal(10); - done(); - }); - }); - - it('should be able to uniqueify objects based on a property', function(done) { - var aggregator = unique('number'); - makeStream('a') - .pipe(aggregator); - makeStream('b') - .pipe(aggregator); - - var n = 0; - aggregator - .on('data', function () { - n++; - }) - .on('end', function () { - expect(n).to.equal(10); - done(); - }); - }); - - it('should be able to uniqueify objects based on a function', function(done) { - var aggregator = unique(function (data) { - return data.name; - }); - - makeStream('a') - .pipe(aggregator); - makeStream('b') - .pipe(aggregator); - - var n = 0; - aggregator - .on('data', function () { - n++; - }) - .on('end', function () { - expect(n).to.equal(10); - done(); - }); - }); - - it('should be able to handle uniqueness when not piped', function(done) { - var stream = unique(); - var count = 0; - stream.on('data', function (data) { - expect(data).to.equal('hello'); - count++; - }); - stream.on('end', function() { - expect(count).to.equal(1); - done(); - }); - stream.write('hello'); - stream.write('hello'); - stream.end(); - }); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/cli.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/cli.js deleted file mode 100755 index bacbd22..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/cli.js +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var pkg = require('./package.json'); -var userHome = require('./'); - -function help() { - console.log([ - pkg.description, - '', - 'Example', - ' $ user-home', - ' /Users/sindresorhus' - ].join('\n')); -} - -if (process.argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (process.argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -process.stdout.write(userHome); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/index.js deleted file mode 100644 index d53b793..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -var env = process.env; -var home = env.HOME; -var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; - -if (process.platform === 'win32') { - module.exports = env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; -} else if (process.platform === 'darwin') { - module.exports = home || (user ? '/Users/' + user : null) || null; -} else if (process.platform === 'linux') { - module.exports = home || - (user ? (process.getuid() === 0 ? '/root' : '/home/' + user) : null) || null; -} else { - module.exports = home || null; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/license b/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/license deleted file mode 100644 index 654d0bf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/license +++ /dev/null @@ -1,21 +0,0 @@ -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/package.json deleted file mode 100644 index 3580392..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "user-home@^1.1.1", - "scope": null, - "escapedName": "user-home", - "name": "user-home", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags" - ] - ], - "_from": "user-home@>=1.1.1 <2.0.0", - "_id": "user-home@1.1.1", - "_inCache": true, - "_location": "/user-home", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.1.16", - "_phantomChildren": {}, - "_requested": { - "raw": "user-home@^1.1.1", - "scope": null, - "escapedName": "user-home", - "name": "user-home", - "rawSpec": "^1.1.1", - "spec": ">=1.1.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/v8flags" - ], - "_resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "_shasum": "2b5be23a32b63a7c9deb8d0f28d485724a3df190", - "_shrinkwrap": null, - "_spec": "user-home@^1.1.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "user-home": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/user-home/issues" - }, - "dependencies": {}, - "description": "Get the path to the user home directory", - "devDependencies": { - "ava": "0.0.3" - }, - "directories": {}, - "dist": { - "shasum": "2b5be23a32b63a7c9deb8d0f28d485724a3df190", - "tarball": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "cli.js" - ], - "gitHead": "cf6ba885d3e6bf625fb3c15ad0334fa623968481", - "homepage": "https://github.com/sindresorhus/user-home", - "keywords": [ - "cli", - "bin", - "user", - "home", - "homedir", - "dir", - "directory", - "folder", - "path" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "user-home", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/user-home.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/readme.md deleted file mode 100644 index 5307a07..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/user-home/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# user-home [![Build Status](https://travis-ci.org/sindresorhus/user-home.svg?branch=master)](https://travis-ci.org/sindresorhus/user-home) - -> Get the path to the user home directory - - -## Install - -```sh -$ npm install --save user-home -``` - - -## Usage - -```js -var userHome = require('user-home'); - -console.log(userHome); -//=> /Users/sindresorhus -``` - -Returns `null` in the unlikely scenario that the home directory can't be found. - - -## CLI - -```sh -$ npm install --global user-home -``` - -```sh -$ user-home --help - -Example - $ user-home - /Users/sindresorhus -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/History.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/browser.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/node.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/package.json deleted file mode 100644 index 885defc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream" - ] - ], - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_location": "/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "raw": "util-deprecate@~1.0.1", - "scope": null, - "escapedName": "util-deprecate", - "name": "util-deprecate", - "rawSpec": "~1.0.1", - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/.npmignore deleted file mode 100644 index ae16e5f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -*.yml -LICENSE -README.md -test.js diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/LICENSE deleted file mode 100644 index a55f5b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2014 Tyler Kellen - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/README.md deleted file mode 100644 index ca6065b..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# v8flags [![Build Status](https://secure.travis-ci.org/js-cli/js-v8flags.png)](http://travis-ci.org/js-cli/js-v8flags) [![Build status](https://ci.appveyor.com/api/projects/status/9psgmwayx9kpol1a?svg=true)](https://ci.appveyor.com/project/js-cli/js-v8flags) -> Get available v8 flags. - -[![NPM](https://nodei.co/npm/v8flags.png)](https://nodei.co/npm/v8flags/) - -## Example -```js -const v8flags = require('v8flags'); - -v8flags(function (err, results) { - console.log(results); // [ '--use_strict', - // '--es5_readonly', - // '--es52_globals', - // '--harmony_typeof', - // '--harmony_scoping', - // '--harmony_modules', - // '--harmony_proxies', - // '--harmony_collections', - // '--harmony', - // ... -}); -``` - -## Release History - -* 2017-04-18 - v2.1.0 - hash username to support invalid path characters -* 2017-03-31 - v2.0.12 - don't pollute global namespace -* 2015-12-07 - v2.0.11 - cache to temp directory if home is present but unwritable -* 2015-07-28 - v2.0.10 - don't throw for electron runtime, just call back with empty array -* 2015-06-25 - v2.0.9 - call back with flags even if cache file can't be written -* 2015-06-15 - v2.0.7 - revert to 2.0.5 behavior. -* 2015-06-15 - v2.0.6 - store cache file in ~/.cache or ~/AppData/Local depending on platform -* 2015-04-18 - v2.0.5 - attempt to require config file, if this throws for any reason, fopen w+ and re-create -* 2015-04-16 - v2.0.4 - when concurrent processes are run and no config exists, don't append to the cached config. -* 2015-03-31 - v2.0.3 - prefer to store config files in user home over tmp -* 2015-01-18 - v2.0.2 - keep his dark tentacles contained -* 2015-01-15 - v2.0.1 - store temp file in `os.tmpdir()`, drop support for node 0.8 -* 2015-01-15 - v2.0.0 - make the stupid thing async -* 2014-12-22 - v1.0.8 - exclude `--help` flag -* 2014-12-20 - v1.0.7 - pre-cache flags for every version of node from 0.8 to 0.11 -* 2014-12-09 - v1.0.6 - revert to 1.0.0 behavior -* 2014-11-26 - v1.0.5 - get node executable from `process.execPath` -* 2014-11-18 - v1.0.4 - wrap node executable path in quotes -* 2014-11-17 - v1.0.3 - get node executable during npm install via `process.env.NODE` -* 2014-11-17 - v1.0.2 - get node executable from `process.env._` -* 2014-09-03 - v1.0.0 - first major version release -* 2014-09-02 - v0.3.0 - keep -- in flag names -* 2014-09-02 - v0.2.0 - cache flags -* 2014-05-09 - v0.1.0 - initial release diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/index.js deleted file mode 100644 index 40404d0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/index.js +++ /dev/null @@ -1,133 +0,0 @@ -// this entire module is depressing. i should have spent my time learning -// how to patch v8 so that these options would just be available on the -// process object. - -const os = require('os'); -const fs = require('fs'); -const path = require('path'); -const crypto = require('crypto'); -const execFile = require('child_process').execFile; -const env = process.env; -const user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME || ''; -const exclusions = ['--help']; - -const configfile = '.v8flags.'+process.versions.v8+'.'+crypto.createHash('md5').update(user).digest('hex')+'.json'; - -const failureMessage = [ - 'Unable to cache a config file for v8flags to a your home directory', - 'or a temporary folder. To fix this problem, please correct your', - 'environment by setting HOME=/path/to/home or TEMP=/path/to/temp.', - 'NOTE: the user running this must be able to access provided path.', - 'If all else fails, please open an issue here:', - 'http://github.com/tkellen/js-v8flags' -].join('\n'); - -function fail (err) { - err.message += '\n\n' + failureMessage; - return err; -} - -function openConfig (cb) { - var userHome = require('user-home'); - if (!userHome) { - return tryOpenConfig(path.join(os.tmpdir(), configfile), cb); - } - - tryOpenConfig(path.join(userHome, configfile), function (err, fd) { - if (err) return tryOpenConfig(path.join(os.tmpdir(), configfile), cb); - return cb(null, fd); - }); -} - -function tryOpenConfig (configpath, cb) { - try { - // if the config file is valid, it should be json and therefore - // node should be able to require it directly. if this doesn't - // throw, we're done! - var content = require(configpath); - process.nextTick(function () { - cb(null, content); - }); - } catch (e) { - // if requiring the config file failed, maybe it doesn't exist, or - // perhaps it has become corrupted. instead of calling back with the - // content of the file, call back with a file descriptor that we can - // write the cached data to - fs.open(configpath, 'w+', function (err, fd) { - if (err) { - return cb(err); - } - return cb(null, fd); - }); - } -} - -// i can't wait for the day this whole module is obsolete because these -// options are available on the process object. this executes node with -// `--v8-options` and parses the result, returning an array of command -// line flags. -function getFlags (cb) { - execFile(process.execPath, ['--v8-options'], function (execErr, result) { - if (execErr) { - return cb(execErr); - } - var flags = result.match(/\s\s--(\w+)/gm).map(function (match) { - return match.substring(2); - }).filter(function (name) { - return exclusions.indexOf(name) === -1; - }); - return cb(null, flags); - }); -} - -// write some json to a file descriptor. if this fails, call back -// with both the error and the data that was meant to be written. -function writeConfig (fd, flags, cb) { - var buf = new Buffer(JSON.stringify(flags)); - return fs.write(fd, buf, 0, buf.length, 0 , function (writeErr) { - fs.close(fd, function (closeErr) { - var err = writeErr || closeErr; - if (err) { - return cb(fail(err), flags); - } - return cb(null, flags); - }); - }); -} - -module.exports = function (cb) { - // bail early if this is not node - var isElectron = process.versions && process.versions.electron; - if (isElectron) { - return process.nextTick(function () { - cb(null, []); - }); - } - - // attempt to open/read cache file - openConfig(function (openErr, result) { - if (!openErr && typeof result !== 'number') { - return cb(null, result); - } - // if the result is not an array, we need to go fetch - // the flags by invoking node with `--v8-options` - getFlags(function (flagsErr, flags) { - // if there was an error fetching the flags, bail immediately - if (flagsErr) { - return cb(flagsErr); - } - // if there was a problem opening the config file for writing - // throw an error but include the flags anyway so that users - // can continue to execute (at the expense of having to fetch - // flags on every run until they fix the underyling problem). - if (openErr) { - return cb(fail(openErr), flags); - } - // write the config file to disk so subsequent runs can read - // flags out of a cache file. - return writeConfig(result, flags, cb); - }); - }); -}; - -module.exports.configfile = configfile; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/package.json deleted file mode 100644 index 61e27b6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/v8flags/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "v8flags@^2.0.2", - "scope": null, - "escapedName": "v8flags", - "name": "v8flags", - "rawSpec": "^2.0.2", - "spec": ">=2.0.2 <3.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp" - ] - ], - "_from": "v8flags@>=2.0.2 <3.0.0", - "_id": "v8flags@2.1.1", - "_inCache": true, - "_location": "/v8flags", - "_nodeVersion": "0.10.41", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/v8flags-2.1.1.tgz_1492553662014_0.08135617268271744" - }, - "_npmUser": { - "name": "phated", - "email": "blaine.bublitz@gmail.com" - }, - "_npmVersion": "2.15.2", - "_phantomChildren": {}, - "_requested": { - "raw": "v8flags@^2.0.2", - "scope": null, - "escapedName": "v8flags", - "name": "v8flags", - "rawSpec": "^2.0.2", - "spec": ">=2.0.2 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp" - ], - "_resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "_shasum": "aab1a1fa30d45f88dd321148875ac02c0b55e5b4", - "_shrinkwrap": null, - "_spec": "v8flags@^2.0.2", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp", - "author": { - "name": "Tyler Kellen", - "url": "http://goingslowly.com/" - }, - "bugs": { - "url": "https://github.com/tkellen/node-v8flags/issues" - }, - "dependencies": { - "user-home": "^1.1.1" - }, - "description": "Get available v8 flags.", - "devDependencies": { - "async": "^0.9.0", - "chai": "~1.9.1", - "mocha": "~1.21.4" - }, - "directories": {}, - "dist": { - "shasum": "aab1a1fa30d45f88dd321148875ac02c0b55e5b4", - "tarball": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz" - }, - "engines": { - "node": ">= 0.10.0" - }, - "gitHead": "4c628146efa7eda11df0e10c73b3d8687873569e", - "homepage": "https://github.com/tkellen/node-v8flags", - "keywords": [ - "v8 flags", - "harmony flags" - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tkellen/node-v8flags/blob/master/LICENSE" - } - ], - "main": "index.js", - "maintainers": [ - { - "name": "ilikebits", - "email": "leo@leozhang.me" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - }, - { - "name": "tkellen", - "email": "tyler@sleekcode.net" - } - ], - "name": "v8flags", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/tkellen/node-v8flags.git" - }, - "scripts": { - "test": "_mocha -R spec test.js" - }, - "version": "2.1.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/LICENSE deleted file mode 100644 index a5e905d..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/LICENSE +++ /dev/null @@ -1,174 +0,0 @@ -SPDX:Apache-2.0 - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the -copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other -entities that control, are controlled by, or are under common control -with that entity. For the purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management -of such entity, whether by contract or otherwise, or (ii) ownership of -fifty percent (50%) or more of the outstanding shares, or (iii) -beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, -including but not limited to software source code, documentation source, -and configuration files. - -"Object" form shall mean any form resulting from mechanical -transformation or translation of a Source form, including but not -limited to compiled object code, generated documentation, and -conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object -form, made available under the License, as indicated by a copyright -notice that is included in or attached to the work (an example is -provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object -form, that is based on (or derived from) the Work and for which the -editorial revisions, annotations, elaborations, or other modifications -represent, as a whole, an original work of authorship. For the purposes -of this License, Derivative Works shall not include works that remain -separable from, or merely link (or bind by name) to the interfaces of, -the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original -version of the Work and any modifications or additions to that Work or -Derivative Works thereof, that is intentionally submitted to Licensor -for inclusion in the Work by the copyright owner or by an individual or -Legal Entity authorized to submit on behalf of the copyright owner. For -the purposes of this definition, "submitted" means any form of -electronic, verbal, or written communication sent to the Licensor or its -representatives, including but not limited to communication on -electronic mailing lists, source code control systems, and issue -tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding -communication that is conspicuously marked or otherwise designated in -writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on -behalf of whom a Contribution has been received by Licensor and -subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of -this License, each Contributor hereby grants to You a perpetual, -worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright -license to reproduce, prepare Derivative Works of, publicly display, -publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, -non-exclusive, no-charge, royalty-free, irrevocable (except as stated in -this section) patent license to make, have made, use, offer to sell, -sell, import, and otherwise transfer the Work, where such license -applies only to those patent claims licensable by such Contributor that -are necessarily infringed by their Contribution(s) alone or by -combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation -against any entity (including a cross-claim or counterclaim in a -lawsuit) alleging that the Work or a Contribution incorporated within -the Work constitutes direct or contributory patent infringement, then -any patent licenses granted to You under this License for that Work -shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work -or Derivative Works thereof in any medium, with or without -modifications, and in Source or Object form, provided that You meet the -following conditions: - -(a) You must give any other recipients of the Work or Derivative Works a -copy of this License; and - -(b) You must cause any modified files to carry prominent notices stating -that You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You -distribute, all copyright, patent, trademark, and attribution notices -from the Source form of the Work, excluding those notices that do not -pertain to any part of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its -distribution, then any Derivative Works that You distribute must include -a readable copy of the attribution notices contained within such NOTICE -file, excluding those notices that do not pertain to any part of the -Derivative Works, in at least one of the following places: within a -NOTICE text file distributed as part of the Derivative Works; within the -Source form or documentation, if provided along with the Derivative -Works; or, within a display generated by the Derivative Works, if and -wherever such third-party notices normally appear. The contents of the -NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative -Works that You distribute, alongside or as an addendum to the NOTICE -text from the Work, provided that such additional attribution notices -cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may -provide additional or different license terms and conditions for use, -reproduction, or distribution of Your modifications, or for any such -Derivative Works as a whole, provided Your use, reproduction, and -distribution of the Work otherwise complies with the conditions stated -in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, -any Contribution intentionally submitted for inclusion in the Work by -You to the Licensor shall be under the terms and conditions of this -License, without any additional terms or conditions. Notwithstanding the -above, nothing herein shall supersede or modify the terms of any -separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. This License does not grant permission to use the trade -names, trademarks, service marks, or product names of the Licensor, -except as required for reasonable and customary use in describing the -origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed -to in writing, Licensor provides the Work (and each Contributor provides -its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS -OF ANY KIND, either express or implied, including, without limitation, -any warranties or conditions of TITLE, NON-INFRINGEMENT, -MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely -responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, -whether in tort (including negligence), contract, or otherwise, unless -required by applicable law (such as deliberate and grossly negligent -acts) or agreed to in writing, shall any Contributor be liable to You -for damages, including any direct, indirect, special, incidental, or -consequential damages of any character arising as a result of this -License or out of the use or inability to use the Work (including but -not limited to damages for loss of goodwill, work stoppage, computer -failure or malfunction, or any and all other commercial damages or -losses), even if such Contributor has been advised of the possibility of -such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the -Work or Derivative Works thereof, You may choose to offer, and charge a -fee for, acceptance of support, warranty, indemnity, or other liability -obligations and/or rights consistent with this License. However, in -accepting such obligations, You may act only on Your own behalf and on -Your sole responsibility, not on behalf of any other Contributor, and -only if You agree to indemnify, defend, and hold each Contributor -harmless for any liability incurred by, or claims asserted against, such -Contributor by reason of your accepting any such warranty or additional -liability. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/README.md deleted file mode 100644 index c5b3bfc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/README.md +++ /dev/null @@ -1,113 +0,0 @@ -validate-npm-package-license -============================ - -Give me a string and I'll tell you if it's a valid npm package license string. - -```javascript -var valid = require('validate-npm-package-license'); -``` - -SPDX license identifiers are valid license strings: - -```javascript - -var assert = require('assert'); -var validSPDXExpression = { - validForNewPackages: true, - validForOldPackages: true, - spdx: true -}; - -assert.deepEqual(valid('MIT'), validSPDXExpression); -assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); -assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); -assert.deepEqual(valid('ISC'), validSPDXExpression); -``` -The function will return a warning and suggestion for nearly-correct license identifiers: - -```javascript -assert.deepEqual( - valid('Apache 2.0'), - { - validForOldPackages: false, - validForNewPackages: false, - warnings: [ - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "', - 'license is similar to the valid expression "Apache-2.0"' - ] - } -); -``` - -SPDX expressions are valid, too ... - -```javascript -// Simple SPDX license expression for dual licensing -assert.deepEqual( - valid('(GPL-3.0 OR BSD-2-Clause)'), - validSPDXExpression -); -``` - -... except if they contain `LicenseRef`: - -```javascript -var warningAboutLicenseRef = { - validForOldPackages: false, - validForNewPackages: false, - spdx: true, - warnings: [ - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "', - ] -}; - -assert.deepEqual( - valid('LicenseRef-Made-Up'), - warningAboutLicenseRef -); - -assert.deepEqual( - valid('(MIT OR LicenseRef-Made-Up)'), - warningAboutLicenseRef -); -``` - -If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: - -```javascript -assert.deepEqual( - valid('SEE LICENSE IN LICENSE.txt'), - { - validForNewPackages: true, - validForOldPackages: true, - inFile: 'LICENSE.txt' - } -); - -assert.deepEqual( - valid('SEE LICENSE IN license.md'), - { - validForNewPackages: true, - validForOldPackages: true, - inFile: 'license.md' - } -); -``` - -If there aren't any licensing terms, use `UNLICENSED`: - -```javascript -var unlicensed = { - validForNewPackages: true, - validForOldPackages: true, - unlicensed: true -}; -assert.deepEqual(valid('UNLICENSED'), unlicensed); -assert.deepEqual(valid('UNLICENCED'), unlicensed); -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/index.js deleted file mode 100644 index 2ad98d9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/index.js +++ /dev/null @@ -1,84 +0,0 @@ -var parse = require('spdx-expression-parse'); -var correct = require('spdx-correct'); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/package.json deleted file mode 100644 index 1ef58a0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/validate-npm-package-license/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "validate-npm-package-license@^3.0.1", - "scope": null, - "escapedName": "validate-npm-package-license", - "name": "validate-npm-package-license", - "rawSpec": "^3.0.1", - "spec": ">=3.0.1 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/normalize-package-data" - ] - ], - "_from": "validate-npm-package-license@>=3.0.1 <4.0.0", - "_id": "validate-npm-package-license@3.0.1", - "_inCache": true, - "_location": "/validate-npm-package-license", - "_nodeVersion": "0.12.7", - "_npmUser": { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - "_npmVersion": "2.13.5", - "_phantomChildren": {}, - "_requested": { - "raw": "validate-npm-package-license@^3.0.1", - "scope": null, - "escapedName": "validate-npm-package-license", - "name": "validate-npm-package-license", - "rawSpec": "^3.0.1", - "spec": ">=3.0.1 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/normalize-package-data" - ], - "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "_shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", - "_shrinkwrap": null, - "_spec": "validate-npm-package-license@^3.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/normalize-package-data", - "author": { - "name": "Kyle E. Mitchell", - "email": "kyle@kemitchell.com", - "url": "https://kemitchell.com" - }, - "bugs": { - "url": "https://github.com/kemitchell/validate-npm-package-license.js/issues" - }, - "dependencies": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" - }, - "description": "Give me a string and I'll tell you if it's a valid npm package license string", - "devDependencies": { - "defence-cli": "^1.0.1", - "replace-require-self": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", - "tarball": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" - }, - "gitHead": "00200d28f9960985f221bc1a8a71e4760daf39bf", - "homepage": "https://github.com/kemitchell/validate-npm-package-license.js#readme", - "keywords": [ - "license", - "npm", - "package", - "validation" - ], - "license": "Apache-2.0", - "maintainers": [ - { - "name": "kemitchell", - "email": "kyle@kemitchell.com" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "name": "validate-npm-package-license", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/kemitchell/validate-npm-package-license.js.git" - }, - "scripts": { - "test": "defence README.md | replace-require-self | node" - }, - "version": "3.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/LICENSE deleted file mode 100755 index 7cbe012..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/README.md deleted file mode 100644 index d3248d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# vinyl-fs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl-fs) - -## Information - - - - - - - - - - - - - -
    Packagevinyl-fs
    DescriptionVinyl adapter for the file system
    Node Version>= 0.10
    - -## Usage - -```javascript -var map = require('map-stream'); -var fs = require('vinyl-fs'); - -var log = function(file, cb) { - console.log(file.path); - cb(null, file); -}; - -fs.src(['./js/**/*.js', '!./js/vendor/*.js']) - .pipe(map(log)) - .pipe(fs.dest('./output')); -``` - -## API - -### src(globs[, opt]) - -- Takes a glob string or an array of glob strings as the first argument. -- Possible options for the second argument: - - cwd - Specify the working directory the folder is relative to. Default is `process.cwd()` - - base - Specify the folder relative to the cwd. Default is where the glob begins. This is used to determine the file names when saving in `.dest()` - - buffer - `true` or `false` if you want to buffer the file. - - Default value is `true` - - `false` will make file.contents a paused Stream - - read - `true` or `false` if you want the file to be read or not. Useful for stuff like `rm`ing files. - - Default value is `true` - - `false` will disable writing the file to disk via `.dest()` - - Any glob-related options are documented in [glob-stream] and [node-glob] -- Returns a Readable/Writable stream. -- On write the stream will simply pass items through. -- This stream emits matching [vinyl] File objects - -### watch(globs[, opt, cb]) - -This is just [glob-watcher] - -- Takes a glob string or an array of glob strings as the first argument. -- Possible options for the second argument: - - Any options are passed to [gaze] -- Returns an EventEmitter - - 'changed' event is emitted on each file change -- Optionally calls the callback on each change event - -### dest(folder[, opt]) - -- Takes a folder path as the first argument. -- First argument can also be a function that takes in a file and returns a folder path. -- Possible options for the second argument: - - cwd - Specify the working directory the folder is relative to. Default is `process.cwd()` - - mode - Specify the mode the files should be created with. Default is the mode of the input file (file.stat.mode) -- Returns a Readable/Writable stream. -- On write the stream will save the [vinyl] File to disk at the folder/cwd specified. -- After writing the file to disk, it will be emitted from the stream so you can keep piping these around -- The file will be modified after being written to this stream - - `cwd`, `base`, and `path` will be overwritten to match the folder - - `stat.mode` will be overwritten if you used a mode parameter - - `contents` will have it's position reset to the beginning if it is a stream - -[glob-stream]: https://github.com/wearefractal/glob-stream -[node-glob]: https://github.com/isaacs/node-glob -[gaze]: https://github.com/shama/gaze -[glob-watcher]: https://github.com/wearefractal/glob-watcher -[vinyl]: https://github.com/wearefractal/vinyl - -[npm-url]: https://npmjs.org/package/vinyl-fs -[npm-image]: https://badge.fury.io/js/vinyl-fs.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl-fs -[travis-image]: https://travis-ci.org/wearefractal/vinyl-fs.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl-fs -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl-fs/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl-fs -[depstat-image]: https://david-dm.org/wearefractal/vinyl-fs.png diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/index.js deleted file mode 100644 index 7306aa7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = { - src: require('./lib/src'), - dest: require('./lib/dest'), - watch: require('glob-watcher') -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/index.js deleted file mode 100644 index 1b94ad3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/index.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var defaults = require('defaults'); -var path = require('path'); -var through2 = require('through2'); -var mkdirp = require('mkdirp'); -var fs = require('graceful-fs'); - -var writeContents = require('./writeContents'); - - -function dest(outFolder, opt) { - opt = opt || {}; - if (typeof outFolder !== 'string' && typeof outFolder !== 'function') { - throw new Error('Invalid output folder'); - } - - var options = defaults(opt, { - cwd: process.cwd() - }); - - if (typeof options.mode === 'string') { - options.mode = parseInt(options.mode, 8); - } - - var cwd = path.resolve(options.cwd); - - function saveFile (file, enc, cb) { - var basePath; - if (typeof outFolder === 'string') { - basePath = path.resolve(cwd, outFolder); - } - if (typeof outFolder === 'function') { - basePath = path.resolve(cwd, outFolder(file)); - } - var writePath = path.resolve(basePath, file.relative); - var writeFolder = path.dirname(writePath); - - // wire up new properties - file.stat = file.stat ? file.stat : new fs.Stats(); - file.stat.mode = (options.mode || file.stat.mode); - file.cwd = cwd; - file.base = basePath; - file.path = writePath; - - // mkdirp the folder the file is going in - mkdirp(writeFolder, function(err){ - if (err) { - return cb(err); - } - writeContents(writePath, file, cb); - }); - } - - var stream = through2.obj(saveFile); - // TODO: option for either backpressure or lossy - stream.resume(); - return stream; -} - -module.exports = dest; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/index.js deleted file mode 100644 index ab8f0f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var writeDir = require('./writeDir'); -var writeStream = require('./writeStream'); -var writeBuffer = require('./writeBuffer'); - -function writeContents(writePath, file, cb) { - var written = function(err) { - var done = function(err) { - cb(err, file); - }; - if (err) { - return done(err); - } - - if (!file.stat || typeof file.stat.mode !== 'number') { - return done(); - } - - fs.stat(writePath, function(err, st) { - if (err) { - return done(err); - } - // octal 7777 = decimal 4095 - var currentMode = (st.mode & 4095); - if (currentMode === file.stat.mode) { - return done(); - } - fs.chmod(writePath, file.stat.mode, done); - }); - }; - - // if directory then mkdirp it - if (file.isDirectory()) { - writeDir(writePath, file, written); - return; - } - - // stream it to disk yo - if (file.isStream()) { - writeStream(writePath, file, written); - return; - } - - // write it like normal - if (file.isBuffer()) { - writeBuffer(writePath, file, written); - return; - } - - // if no contents then do nothing - if (file.isNull()) { - cb(null, file); - return; - } -} - -module.exports = writeContents; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js deleted file mode 100644 index fe4be8f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); - -function writeBuffer(writePath, file, cb) { - var opt = { - mode: file.stat.mode - }; - - fs.writeFile(writePath, file.contents, opt, cb); -} - -module.exports = writeBuffer; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js deleted file mode 100644 index 9614b54..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var mkdirp = require('mkdirp'); - -function writeDir (writePath, file, cb) { - mkdirp(writePath, file.stat.mode, cb); -} - -module.exports = writeDir; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js deleted file mode 100644 index c49017a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var streamFile = require('../../src/getContents/streamFile'); -var fs = require('graceful-fs'); - -function writeStream (writePath, file, cb) { - var opt = { - mode: file.stat.mode - }; - - var outStream = fs.createWriteStream(writePath, opt); - - file.contents.once('error', cb); - outStream.once('error', cb); - outStream.once('finish', function() { - streamFile(file, cb); - }); - - file.contents.pipe(outStream); -} - -module.exports = writeStream; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js deleted file mode 100644 index 4448eb7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); -var stripBom = require('strip-bom'); - -function bufferFile(file, cb) { - fs.readFile(file.path, function (err, data) { - if (err) { - return cb(err); - } - file.contents = stripBom(data); - cb(null, file); - }); -} - -module.exports = bufferFile; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/index.js deleted file mode 100644 index d21a254..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/index.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var through2 = require('through2'); - -var readDir = require('./readDir'); -var bufferFile = require('./bufferFile'); -var streamFile = require('./streamFile'); - -function getContents(opt) { - return through2.obj(function (file, enc, cb) { - // don't fail to read a directory - if (file.isDirectory()) { - return readDir(file, cb); - } - - // read and pass full contents - if (opt.buffer !== false) { - return bufferFile(file, cb); - } - - // dont buffer anything - just pass streams - return streamFile(file, cb); - }); -} - -module.exports = getContents; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/readDir.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/readDir.js deleted file mode 100644 index 783fac2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/readDir.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -function readDir(file, cb) { - // do nothing for now - cb(null, file); -} - -module.exports = readDir; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/streamFile.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/streamFile.js deleted file mode 100644 index 1743edd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getContents/streamFile.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); -var stripBom = require('strip-bom'); - -function streamFile(file, cb) { - file.contents = fs.createReadStream(file.path) - .pipe(stripBom.stream()); - - cb(null, file); -} - -module.exports = streamFile; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getStats.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getStats.js deleted file mode 100644 index 8380087..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/getStats.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var through2 = require('through2'); -var fs = require('graceful-fs'); - -function getStats() { - return through2.obj(fetchStats); -} - -function fetchStats(file, enc, cb) { - fs.lstat(file.path, function (err, stat) { - if (stat) { - file.stat = stat; - } - cb(err, file); - }); -} - -module.exports = getStats; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/index.js deleted file mode 100644 index 21a1771..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/lib/src/index.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var defaults = require('defaults'); -var through = require('through2'); -var gs = require('glob-stream'); -var File = require('vinyl'); - -var getContents = require('./getContents'); -var getStats = require('./getStats'); - -function createFile (globFile, enc, cb) { - cb(null, new File(globFile)); -} - -function src(glob, opt) { - opt = opt || {}; - var pass = through.obj(); - - if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument: ' + glob); - } - // return dead stream if empty array - if (Array.isArray(glob) && glob.length === 0) { - process.nextTick(pass.end.bind(pass)); - return pass; - } - - var options = defaults(opt, { - read: true, - buffer: true - }); - - var globStream = gs.create(glob, options); - - // when people write to use just pass it through - var outputStream = globStream - .pipe(through.obj(createFile)) - .pipe(getStats(options)); - - if (options.read !== false) { - outputStream = outputStream - .pipe(getContents(options)); - } - - return outputStream.pipe(pass); -} - -function isValidGlob(glob) { - if (typeof glob === 'string') { - return true; - } - if (Array.isArray(glob) && glob.length !== 0) { - return glob.every(isValidGlob); - } - if (Array.isArray(glob) && glob.length === 0) { - return true; - } - return false; -} - -module.exports = src; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/.bin/strip-bom b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/.bin/strip-bom deleted file mode 120000 index ba65fdf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/.bin/strip-bom +++ /dev/null @@ -1 +0,0 @@ -../strip-bom/cli.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.travis.yml deleted file mode 100644 index 58f2371..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.10 diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/LICENSE deleted file mode 100644 index fc808cc..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2011-2014 Paul Vorbach - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/README.md deleted file mode 100644 index d7231cf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# clone - -[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) - -offers foolproof _deep cloning_ of variables in JavaScript. - - -## Installation - - npm install clone - -or - - ender build clone - - -## Example - -~~~ javascript -var clone = require('clone'); - -var a, b; - -a = { foo: { bar: 'baz' } }; // initial value of a - -b = clone(a); // clone a -> b -a.foo.bar = 'foo'; // change a - -console.log(a); // show a -console.log(b); // show b -~~~ - -This will print: - -~~~ javascript -{ foo: { bar: 'foo' } } -{ foo: { bar: 'baz' } } -~~~ - -**clone** masters cloning simple objects (even with custom prototype), arrays, -Date objects, and RegExp objects. Everything is cloned recursively, so that you -can clone dates in arrays in objects, for example. - - -## API - -`clone(val, circular, depth)` - - * `val` -- the value that you want to clone, any type allowed - * `circular` -- boolean - - Call `clone` with `circular` set to `false` if you are certain that `obj` - contains no circular references. This will give better performance if needed. - There is no error if `undefined` or `null` is passed as `obj`. - * `depth` -- depth to which the object is to be cloned (optional, - defaults to infinity) - -`clone.clonePrototype(obj)` - - * `obj` -- the object that you want to clone - -Does a prototype clone as -[described by Oran Looney](http://oranlooney.com/functional-javascript/). - - -## Circular References - -~~~ javascript -var a, b; - -a = { hello: 'world' }; - -a.myself = a; -b = clone(a); - -console.log(b); -~~~ - -This will print: - -~~~ javascript -{ hello: "world", myself: [Circular] } -~~~ - -So, `b.myself` points to `b`, not `a`. Neat! - - -## Test - - npm test - - -## Caveat - -Some special objects like a socket or `process.stdout`/`stderr` are known to not -be cloneable. If you find other objects that cannot be cloned, please [open an -issue](https://github.com/pvorb/node-clone/issues/new). - - -## Bugs and Issues - -If you encounter any bugs or issues, feel free to [open an issue at -github](https://github.com/pvorb/node-clone/issues) or send me an email to -. I also always like to hear from you, if you’re using my code. - -## License - -Copyright © 2011-2014 [Paul Vorbach](http://paul.vorba.ch/) and -[contributors](https://github.com/pvorb/node-clone/graphs/contributors). - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/clone.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/clone.js deleted file mode 100644 index f8fa315..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/clone.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -// shim for Node's 'util' package -// DO NOT REMOVE THIS! It is required for compatibility with EnderJS (http://enderjs.com/). -var util = { - isArray: function (ar) { - return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); - }, - isDate: function (d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; - }, - isRegExp: function (re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; - }, - getRegExpFlags: function (re) { - var flags = ''; - re.global && (flags += 'g'); - re.ignoreCase && (flags += 'i'); - re.multiline && (flags += 'm'); - return flags; - } -}; - - -if (typeof module === 'object') - module.exports = clone; - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). -*/ - -function clone(parent, circular, depth, prototype) { - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth == 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (util.isArray(parent)) { - child = []; - } else if (util.isRegExp(parent)) { - child = new RegExp(parent.source, util.getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (util.isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - child = new Buffer(parent.length); - parent.copy(child); - return child; - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - return child; - } - - return _clone(parent, depth); -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/package.json deleted file mode 100644 index 29bccc1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/package.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "clone@^0.2.0", - "scope": null, - "escapedName": "clone", - "name": "clone", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl" - ] - ], - "_from": "clone@>=0.2.0 <0.3.0", - "_id": "clone@0.2.0", - "_inCache": true, - "_location": "/vinyl-fs/clone", - "_npmUser": { - "name": "pvorb", - "email": "paul@vorba.ch" - }, - "_npmVersion": "1.4.14", - "_phantomChildren": {}, - "_requested": { - "raw": "clone@^0.2.0", - "scope": null, - "escapedName": "clone", - "name": "clone", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs/vinyl" - ], - "_resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "_shasum": "c6126a90ad4f72dbf5acdb243cc37724fe93fc1f", - "_shrinkwrap": null, - "_spec": "clone@^0.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl", - "author": { - "name": "Paul Vorbach", - "email": "paul@vorba.ch", - "url": "http://paul.vorba.ch/" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "contributors": [ - { - "name": "Blake Miner", - "email": "miner.blake@gmail.com", - "url": "http://www.blakeminer.com/" - }, - { - "name": "Tian You", - "email": "axqd001@gmail.com", - "url": "http://blog.axqd.net/" - }, - { - "name": "George Stagas", - "email": "gstagas@gmail.com", - "url": "http://stagas.com/" - }, - { - "name": "Tobiasz Cudnik", - "email": "tobiasz.cudnik@gmail.com", - "url": "https://github.com/TobiaszCudnik" - }, - { - "name": "Pavel Lang", - "email": "langpavel@phpskelet.org", - "url": "https://github.com/langpavel" - }, - { - "name": "Dan MacTough", - "url": "http://yabfog.com/" - }, - { - "name": "w1nk", - "url": "https://github.com/w1nk" - }, - { - "name": "Hugh Kennedy", - "url": "http://twitter.com/hughskennedy" - }, - { - "name": "Dustin Diaz", - "url": "http://dustindiaz.com" - }, - { - "name": "Ilya Shaisultanov", - "url": "https://github.com/diversario" - }, - { - "name": "Nathan MacInnes", - "email": "nathan@macinn.es", - "url": "http://macinn.es/" - }, - { - "name": "Benjamin E. Coe", - "email": "ben@npmjs.com", - "url": "https://twitter.com/benjamincoe" - }, - { - "name": "Nathan Zadoks", - "url": "https://github.com/nathan7" - }, - { - "name": "Róbert Oroszi", - "email": "robert+gh@oroszi.net", - "url": "https://github.com/oroce" - } - ], - "dependencies": {}, - "description": "deep cloning of objects and arrays", - "devDependencies": { - "nodeunit": "*", - "underscore": "*" - }, - "directories": {}, - "dist": { - "shasum": "c6126a90ad4f72dbf5acdb243cc37724fe93fc1f", - "tarball": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" - }, - "engines": { - "node": "*" - }, - "gitHead": "bb11a43363a0f69e8ac014cb5376ce215ea1f8fd", - "homepage": "https://github.com/pvorb/node-clone", - "license": "MIT", - "main": "clone.js", - "maintainers": [ - { - "name": "pvorb", - "email": "paul@vorb.de" - } - ], - "name": "clone", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "scripts": { - "test": "nodeunit test.js" - }, - "tags": [ - "clone", - "object", - "array", - "function", - "date" - ], - "version": "0.2.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/test.js deleted file mode 100644 index cb3d166..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/clone/test.js +++ /dev/null @@ -1,289 +0,0 @@ -if(module.parent === null) { - console.log('Run this test file with nodeunit:'); - console.log('$ nodeunit test.js'); -} - - -var clone = require('./'); -var util = require('util'); -var _ = require('underscore'); - - - -exports["clone string"] = function(test) { - test.expect(2); // how many tests? - - var a = "foo"; - test.strictEqual(clone(a), a); - a = ""; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone number"] = function(test) { - test.expect(5); // how many tests? - - var a = 0; - test.strictEqual(clone(a), a); - a = 1; - test.strictEqual(clone(a), a); - a = -1000; - test.strictEqual(clone(a), a); - a = 3.1415927; - test.strictEqual(clone(a), a); - a = -3.1415927; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone date"] = function(test) { - test.expect(3); // how many tests? - - var a = new Date; - var c = clone(a); - test.ok(a instanceof Date); - test.ok(c instanceof Date); - test.equal(c.getTime(), a.getTime()); - - test.done(); -}; - - - -exports["clone object"] = function(test) { - test.expect(2); // how many tests? - - var a = { foo: { bar: "baz" } }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone array"] = function(test) { - test.expect(2); // how many tests? - - var a = [ - { foo: "bar" }, - "baz" - ]; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - -exports["clone buffer"] = function(test) { - test.expect(1); - - var a = new Buffer("this is a test buffer"); - var b = clone(a); - - // no underscore equal since it has no concept of Buffers - test.deepEqual(b, a); - test.done(); -}; - - - -exports["clone regexp"] = function(test) { - test.expect(5); - - var a = /abc123/gi; - var b = clone(a); - - test.deepEqual(b, a); - - var c = /a/g; - test.ok(c.lastIndex === 0); - - c.exec('123a456a'); - test.ok(c.lastIndex === 4); - - var d = clone(c); - test.ok(d.global); - test.ok(d.lastIndex === 4); - - test.done(); -}; - - -exports["clone object containing array"] = function(test) { - test.expect(2); // how many tests? - - var a = { - arr1: [ { a: '1234', b: '2345' } ], - arr2: [ { c: '345', d: '456' } ] - }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone object with circular reference"] = function(test) { - test.expect(8); // how many tests? - - var _ = test.ok; - var c = [1, "foo", {'hello': 'bar'}, function() {}, false, [2]]; - var b = [c, 2, 3, 4]; - var a = {'b': b, 'c': c}; - a.loop = a; - a.loop2 = a; - c.loop = c; - c.aloop = a; - var aCopy = clone(a); - _(a != aCopy); - _(a.c != aCopy.c); - _(aCopy.c == aCopy.b[0]); - _(aCopy.c.loop.loop.aloop == aCopy); - _(aCopy.c[0] == a.c[0]); - - //console.log(util.inspect(aCopy, true, null) ); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(a, true, null) ); - _(eq(a, aCopy)); - aCopy.c[0] = 2; - _(!eq(a, aCopy)); - aCopy.c = "2"; - _(!eq(a, aCopy)); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(aCopy, true, null) ); - - function eq(x, y) { - return util.inspect(x, true, null) === util.inspect(y, true, null); - } - - test.done(); -}; - - - -exports['clonePrototype'] = function(test) { - test.expect(3); // how many tests? - - var a = { - a: "aaa", - x: 123, - y: 45.65 - }; - var b = clone.clonePrototype(a); - - test.strictEqual(b.a, a.a); - test.strictEqual(b.x, a.x); - test.strictEqual(b.y, a.y); - - test.done(); -} - -exports['cloneWithinNewVMContext'] = function(test) { - test.expect(3); - var vm = require('vm'); - var ctx = vm.createContext({ clone: clone }); - var script = "clone( {array: [1, 2, 3], date: new Date(), regex: /^foo$/ig} );"; - var results = vm.runInContext(script, ctx); - test.ok(results.array instanceof Array); - test.ok(results.date instanceof Date); - test.ok(results.regex instanceof RegExp); - test.done(); -} - -exports['cloneObjectWithNoConstructor'] = function(test) { - test.expect(3); - var n = null; - var a = { foo: 'bar' }; - a.__proto__ = n; - test.ok(typeof a === 'object'); - test.ok(typeof a !== null); - var b = clone(a); - test.ok(a.foo, b.foo); - test.done(); -} - -exports['clone object with depth argument'] = function (test) { - test.expect(6); - var a = { - foo: { - bar : { - baz : 'qux' - } - } - }; - var b = clone(a, false, 1); - test.deepEqual(b, a); - test.notEqual(b, a); - test.strictEqual(b.foo, a.foo); - - b = clone(a, true, 2); - test.deepEqual(b, a); - test.notEqual(b.foo, a.foo); - test.strictEqual(b.foo.bar, a.foo.bar); - test.done(); -} - -exports['maintain prototype chain in clones'] = function (test) { - test.expect(1); - function Constructor() {} - var a = new Constructor(); - var b = clone(a); - test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b)); - test.done(); -} - -exports['parent prototype is overriden with prototype provided'] = function (test) { - test.expect(1); - function Constructor() {} - var a = new Constructor(); - var b = clone(a, true, Infinity, null); - test.strictEqual(b.__defineSetter__, undefined); - test.done(); -} - -exports['clone object with null children'] = function(test) { - test.expect(1); - var a = { - foo: { - bar: null, - baz: { - qux: false - } - } - }; - var b = clone(a); - test.deepEqual(b, a); - test.done(); -} - -exports['clone instance with getter'] = function(test) { - test.expect(1); - function Ctor() {}; - Object.defineProperty(Ctor.prototype, 'prop', { - configurable: true, - enumerable: true, - get: function() { - return 'value'; - } - }); - - var a = new Ctor(); - var b = clone(a); - - test.strictEqual(b.prop, 'value'); - test.done(); -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore deleted file mode 100644 index 2f24c57..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -coverage/ -.nyc_output/ diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml deleted file mode 100644 index b535ef4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -sudo: false -language: node_js -node_js: - - '0.10' - - '0.12' - - '4' - - '6' diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/README.md deleted file mode 100644 index 13a2e86..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over [fs module](http://api.nodejs.org/fs.html) - -graceful-fs: - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## USAGE - -```javascript -// use just like fs -var fs = require('graceful-fs') - -// now go and do stuff with it... -fs.readFileSync('some-file-or-whatever') -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js deleted file mode 100644 index 7a37bb1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('natives').require('fs', ['stream']) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index fb206b8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,158 +0,0 @@ -// Monkey-patching the fs module. -// It's ugly, but there is simply no other way to do this. -var fs = module.exports = require('./fs.js') - -var assert = require('assert') - -// fix up some busted stuff, mostly on windows and old nodes -require('./polyfills.js') - -var util = require('util') - -function noop () {} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs') -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') - console.error(m) - } - -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug('fds', fds) - debug(queue) - assert.equal(queue.length, 0) - }) -} - - -var originalOpen = fs.open -fs.open = open - -function open(path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - new OpenReq(path, flags, mode, cb) -} - -function OpenReq(path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb - Req.call(this) -} - -util.inherits(OpenReq, Req) - -OpenReq.prototype.process = function() { - originalOpen.call(fs, this.path, this.flags, this.mode, this.done) -} - -var fds = {} -OpenReq.prototype.done = function(er, fd) { - debug('open done', er, fd) - if (fd) - fds['fd' + fd] = this.path - Req.prototype.done.call(this, er, fd) -} - - -var originalReaddir = fs.readdir -fs.readdir = readdir - -function readdir(path, cb) { - if (typeof cb !== "function") cb = noop - new ReaddirReq(path, cb) -} - -function ReaddirReq(path, cb) { - this.path = path - this.cb = cb - Req.call(this) -} - -util.inherits(ReaddirReq, Req) - -ReaddirReq.prototype.process = function() { - originalReaddir.call(fs, this.path, this.done) -} - -ReaddirReq.prototype.done = function(er, files) { - if (files && files.sort) - files = files.sort() - Req.prototype.done.call(this, er, files) - onclose() -} - - -var originalClose = fs.close -fs.close = close - -function close (fd, cb) { - debug('close', fd) - if (typeof cb !== "function") cb = noop - delete fds['fd' + fd] - originalClose.call(fs, fd, function(er) { - onclose() - cb(er) - }) -} - - -var originalCloseSync = fs.closeSync -fs.closeSync = closeSync - -function closeSync (fd) { - try { - return originalCloseSync(fd) - } finally { - onclose() - } -} - - -// Req class -function Req () { - // start processing - this.done = this.done.bind(this) - this.failures = 0 - this.process() -} - -Req.prototype.done = function (er, result) { - var tryAgain = false - if (er) { - var code = er.code - var tryAgain = code === "EMFILE" || code === "ENFILE" - if (process.platform === "win32") - tryAgain = tryAgain || code === "OK" - } - - if (tryAgain) { - this.failures ++ - enqueue(this) - } else { - var cb = this.cb - cb(er, result) - } -} - -var queue = [] - -function enqueue(req) { - queue.push(req) - debug('enqueue %d %s', queue.length, req.constructor.name, req) -} - -function onclose() { - var req = queue.shift() - if (req) { - debug('process', req.constructor.name, req) - req.process() - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/package.json deleted file mode 100644 index 7be0d1f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "graceful-fs@^3.0.0", - "scope": null, - "escapedName": "graceful-fs", - "name": "graceful-fs", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "graceful-fs@>=3.0.0 <4.0.0", - "_id": "graceful-fs@3.0.11", - "_inCache": true, - "_location": "/vinyl-fs/graceful-fs", - "_nodeVersion": "6.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/graceful-fs-3.0.11.tgz_1472583712827_0.6562602713238448" - }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "3.10.7", - "_phantomChildren": {}, - "_requested": { - "raw": "graceful-fs@^3.0.0", - "scope": null, - "escapedName": "graceful-fs", - "name": "graceful-fs", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "_shasum": "7613c778a1afea62f25c630a086d7f3acbbdd818", - "_shrinkwrap": null, - "_spec": "graceful-fs@^3.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "dependencies": { - "natives": "^1.1.0" - }, - "description": "A drop-in replacement for fs, making various improvements.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^1.2.0" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "7613c778a1afea62f25c630a086d7f3acbbdd818", - "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz" - }, - "engines": { - "node": ">=0.4.0" - }, - "gitHead": "03d3cc6dbd4a499b1e13834eedbc469094a27582", - "homepage": "https://github.com/isaacs/node-graceful-fs#readme", - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "main": "graceful-fs.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "graceful-fs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "3.0.11" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 4270539..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,255 +0,0 @@ -var fs = require('./fs.js') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -// (re-)implement some things that are known busted or missing. - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. -// It should not fail on enosys ever, as this just indicates -// that a fs doesn't support the intended operation. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chmod = chownFix(fs.chmod) -fs.fchmod = chownFix(fs.fchmod) -fs.lchmod = chownFix(fs.lchmod) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -fs.chmodSync = chownFix(fs.chmodSync) -fs.fchmodSync = chownFix(fs.fchmodSync) -fs.lchmodSync = chownFix(fs.lchmodSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -// ENOSYS means that the fs doesn't support the op. Just ignore -// that, because it doesn't matter. -// -// if there's no getuid, or if getuid() is something other -// than 0, and the error is EINVAL or EPERM, then just ignore -// it. -// -// This specific case is a silent failure in cp, install, tar, -// and most other unix tools that manage permissions. -// -// When running as root, or if other types of errors are -// encountered, then it's strict. -function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - if(cb) cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js deleted file mode 100644 index a6b9ba4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js +++ /dev/null @@ -1,69 +0,0 @@ -var test = require('tap').test -var fs = require('../') - -test('open lots of stuff', function (t) { - // Get around EBADF from libuv by making sure that stderr is opened - // Otherwise Darwin will refuse to give us a FD for stderr! - process.stderr.write('') - - // How many parallel open()'s to do - var n = 1024 - var opens = 0 - var fds = [] - var going = true - var closing = false - var doneCalled = 0 - - for (var i = 0; i < n; i++) { - go() - } - - function go() { - opens++ - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fds.push(fd) - if (going) go() - }) - } - - // should hit ulimit pretty fast - setTimeout(function () { - going = false - t.equal(opens - fds.length, n) - done() - }, 100) - - - function done () { - if (closing) return - doneCalled++ - - if (fds.length === 0) { - console.error('done called %d times', doneCalled) - // First because of the timeout - // Then to close the fd's opened afterwards - // Then this time, to complete. - // Might take multiple passes, depending on CPU speed - // and ulimit, but at least 3 in every case. - t.ok(doneCalled >= 2) - return t.end() - } - - closing = true - setTimeout(function () { - // console.error('do closing again') - closing = false - done() - }, 100) - - // console.error('closing time') - var closes = fds.slice(0) - fds.length = 0 - closes.forEach(function (fd) { - fs.close(fd, function (er) { - if (er) throw er - }) - }) - } -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 85732f2..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is monkeypatched fs', function (t) { - t.equal(fs, require('../fs.js')) - t.end() -}) - -test('open an existing file works', function (t) { - var fd = fs.openSync(__filename, 'r') - fs.closeSync(fd) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fs.close(fd, function (er) { - if (er) throw er - t.pass('works') - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.end() - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js deleted file mode 100644 index cb63a68..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require("tap").test -var fs = require("../fs.js") - -var readdir = fs.readdir -fs.readdir = function(path, cb) { - process.nextTick(function() { - cb(null, ["b", "z", "a"]) - }) -} - -var g = require("../") - -test("readdir reorder", function (t) { - g.readdir("whatevers", function (er, files) { - if (er) - throw er - t.same(files, [ "a", "b", "z" ]) - t.end() - }) -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js deleted file mode 100644 index 21e4c26..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js +++ /dev/null @@ -1,47 +0,0 @@ -var fs = require('../'); -var rimraf = require('rimraf'); -var mkdirp = require('mkdirp'); -var test = require('tap').test; -var p = require('path').resolve(__dirname, 'files'); - -process.chdir(__dirname) - -// Make sure to reserve the stderr fd -process.stderr.write(''); - -var num = 4097; -var paths = new Array(num); - -test('make files', function (t) { - rimraf.sync(p); - mkdirp.sync(p); - - for (var i = 0; i < num; ++i) { - paths[i] = 'files/file-' + i; - fs.writeFileSync(paths[i], 'content'); - } - - t.end(); -}) - -test('read files', function (t) { - // now read them - var done = 0; - for (var i = 0; i < num; ++i) { - fs.readFile(paths[i], function(err, data) { - if (err) - throw err; - - ++done; - if (done === num) { - t.pass('success'); - t.end() - } - }); - } -}); - -test('cleanup', function (t) { - rimraf.sync(p); - t.end(); -}); diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/README.md deleted file mode 100644 index 3fb3e80..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index b513d61..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 895ca50..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 6307220..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; - -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -var Stream = require('stream'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - var ret; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - ret = null; - - // In cases where the decoder did not receive enough data - // to produce a full chunk, then immediately received an - // EOF, state.buffer will contain [, ]. - // howMuchToRead will see this and coerce the amount to - // read to zero (because it's looking at the length of the - // first in state.buffer), and we'll end up here. - // - // This can only happen via state.decoder -- no other venue - // exists for pushing a zero-length chunk into state.buffer - // and triggering this behavior. In this case, we return our - // remaining data and end the stream, if appropriate. - if (state.length > 0 && state.decoder) { - ret = fromList(n, state); - state.length -= ret.length; - } - - if (state.length === 0) - endReadable(this); - - return ret; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - forEach(state.pipes, write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - //if (state.objectMode && util.isNullOrUndefined(chunk)) - if (state.objectMode && (chunk === null || chunk === undefined)) - return; - else if (!state.objectMode && (!chunk || !chunk.length)) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} - -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index eb188df..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 4bdaa4f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; - -/**/ -var Buffer = require('buffer').Buffer; -/**/ - -Writable.WritableState = WritableState; - - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/package.json deleted file mode 100644 index 84e49ad..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": ">=1.0.33-1 <1.1.0-0", - "spec": ">=1.0.33-1 <1.1.0-0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2" - ] - ], - "_from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "_id": "readable-stream@1.0.34", - "_inCache": true, - "_location": "/vinyl-fs/readable-stream", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" - }, - "_npmUser": { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - }, - "_npmVersion": "3.8.3", - "_phantomChildren": {}, - "_requested": { - "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", - "scope": null, - "escapedName": "readable-stream", - "name": "readable-stream", - "rawSpec": ">=1.0.33-1 <1.1.0-0", - "spec": ">=1.0.33-1 <1.1.0-0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "_shrinkwrap": null, - "_spec": "readable-stream@>=1.0.33-1 <1.1.0-0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", - "homepage": "https://github.com/isaacs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "cwmma", - "email": "calvin.metcalf@gmail.com" - } - ], - "name": "readable-stream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "1.0.34" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/readable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/readable.js deleted file mode 100644 index 26511e8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,11 +0,0 @@ -var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/transform.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/writable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efd..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/cli.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/cli.js deleted file mode 100755 index 2c1e7c4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/cli.js +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var pkg = require('./package.json'); -var stripBom = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' strip-bom > ', - ' cat | strip-bom > ', - '', - ' Example', - ' strip-bom unicorn.txt > unicorn-without-bom.txt' - ].join('\n')); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (process.stdin.isTTY) { - if (!input) { - help(); - return; - } - - fs.createReadStream(input).pipe(stripBom.stream()).pipe(process.stdout); -} else { - process.stdin.pipe(stripBom.stream()).pipe(process.stdout); -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/index.js deleted file mode 100644 index c085b4c..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -var isUtf8 = require('is-utf8'); - -var stripBom = module.exports = function (arg) { - if (typeof arg === 'string') { - return arg.replace(/^\ufeff/g, ''); - } - - if (Buffer.isBuffer(arg) && isUtf8(arg) && - arg[0] === 0xef && arg[1] === 0xbb && arg[2] === 0xbf) { - return arg.slice(3); - } - - return arg; -}; - -stripBom.stream = function () { - var firstChunk = require('first-chunk-stream'); - - return firstChunk({minSize: 3}, function (chunk, enc, cb) { - this.push(stripBom(chunk)); - cb(); - }); -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/package.json deleted file mode 100644 index 238b4c8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "strip-bom@^1.0.0", - "scope": null, - "escapedName": "strip-bom", - "name": "strip-bom", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "strip-bom@>=1.0.0 <2.0.0", - "_id": "strip-bom@1.0.0", - "_inCache": true, - "_location": "/vinyl-fs/strip-bom", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.9", - "_phantomChildren": {}, - "_requested": { - "raw": "strip-bom@^1.0.0", - "scope": null, - "escapedName": "strip-bom", - "name": "strip-bom", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", - "_shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", - "_shrinkwrap": null, - "_spec": "strip-bom@^1.0.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "strip-bom": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-bom/issues" - }, - "dependencies": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" - }, - "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer/stream", - "devDependencies": { - "concat-stream": "^1.4.5", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "85b8862f3844b5a6d5ec8467a93598173a36f794", - "tarball": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "cli.js", - "index.js" - ], - "homepage": "https://github.com/sindresorhus/strip-bom", - "keywords": [ - "cli", - "bin", - "app", - "bom", - "strip", - "byte", - "mark", - "unicode", - "utf8", - "utf-8", - "remove", - "trim", - "text", - "buffer", - "string", - "stream", - "streams" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "strip-bom", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-bom.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/readme.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/readme.md deleted file mode 100644 index 10e1d8f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/strip-bom/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom) - -> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer/stream - -From Wikipedia: - -> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. - - -## Usage - -```sh -$ npm install --save strip-bom -``` - -```js -var fs = require('fs'); -var stripBom = require('strip-bom'); - -stripBom('\ufeffUnicorn'); -//=> Unicorn - -stripBom(fs.readFileSync('unicorn.txt')); -//=> Unicorn -``` - -Or as a [Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform): - -```js -var fs = require('fs'); -var stripBom = require('strip-bom'); - -fs.createReadStream('unicorn.txt') - .pipe(stripBom.stream()) - .pipe(fs.createWriteStream('unicorn.txt')); -``` - - -## CLI - -```sh -$ npm install --global strip-bom -``` - -``` -$ strip-bom --help - - Usage - strip-bom > - cat | strip-bom > - - Example - strip-bom unicorn.txt > unicorn-without-bom.txt -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/.npmignore deleted file mode 100644 index 1e1dcab..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.jshintrc -.travis.yml \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/README.md deleted file mode 100644 index 11259a5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - function (chunk, enc, cb) { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/package.json deleted file mode 100644 index 30010ae..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "through2@^0.6.1", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^0.6.1", - "spec": ">=0.6.1 <0.7.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "through2@>=0.6.1 <0.7.0", - "_id": "through2@0.6.5", - "_inCache": true, - "_location": "/vinyl-fs/through2", - "_npmUser": { - "name": "bryce", - "email": "bryce@ravenwall.com" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "raw": "through2@^0.6.1", - "scope": null, - "escapedName": "through2", - "name": "through2", - "rawSpec": "^0.6.1", - "spec": ">=0.6.1 <0.7.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "_shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", - "_shrinkwrap": null, - "_spec": "through2@^0.6.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "dependencies": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - }, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": ">=0.9.0 <0.10.0-0", - "stream-spigot": ">=3.0.4 <3.1.0-0", - "tape": ">=2.14.0 <2.15.0-0" - }, - "directories": {}, - "dist": { - "shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", - "tarball": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - }, - "gitHead": "ba4a87875f2c82323c10023e36f4ae4b386c1bf8", - "homepage": "https://github.com/rvagg/through2", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "bryce", - "email": "bryce@ravenwall.com" - } - ], - "name": "through2", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "version": "0.6.5" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/through2.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/through2.js deleted file mode 100644 index 5b7a880..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/LICENSE deleted file mode 100644 index 4f482f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/README.md deleted file mode 100644 index ae6f16f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) - - -## Information - - - - - - - - - - - - - -
    Packagevinyl
    DescriptionA virtual file format
    Node Version>= 0.9
    - -## What is this? - -Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee", - contents: new Buffer("test = 123") -}); -``` - -### constructor(options) - -#### options.cwd - -Type: `String` -Default: `process.cwd()` - -#### options.base - -Used for relative pathing. Typically where a glob starts. - -Type: `String` -Default: `options.cwd` - -#### options.path - -Full path to the file. - -Type: `String` -Default: `null` - -#### options.stat - -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats` -Default: `null` - -#### options.contents - -File contents. - -Type: `Buffer, Stream, or null` -Default: `null` - -### isBuffer() - -Returns true if file.contents is a Buffer. - -### isStream() - -Returns true if file.contents is a Stream. - -### isNull() - -Returns true if file.contents is null. - -### clone() - -Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. - -### pipe(stream[, opt]) - -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is false, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() - -Returns a pretty String interpretation of the File. Useful for console.log. - -### relative - -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/index.js deleted file mode 100644 index 9aa47b7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/index.js +++ /dev/null @@ -1,175 +0,0 @@ -var path = require('path'); -var clone = require('clone'); -var cloneStats = require('clone-stats'); -var cloneBuffer = require('./lib/cloneBuffer'); -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var Stream = require('stream'); - -function File(file) { - if (!file) file = {}; - - // record path change - var history = file.path ? [file.path] : file.history; - this.history = history || []; - - // TODO: should this be moved to vinyl-fs? - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - // stat = fs stats object - // TODO: should this be moved to vinyl-fs? - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function(opt) { - if (typeof opt === 'boolean') { - opt = { - deep: opt, - contents: true - }; - } else if (!opt) { - opt = { - deep: false, - contents: true - }; - } else { - opt.deep = opt.deep === true; - opt.contents = opt.contents !== false; - } - - // clone our file contents - var contents; - if (this.isStream()) { - contents = this.contents.pipe(new Stream.PassThrough()); - this.contents = this.contents.pipe(new Stream.PassThrough()); - } else if (this.isBuffer()) { - contents = opt.contents ? cloneBuffer(this.contents) : this.contents; - } - - var file = new File({ - cwd: this.cwd, - base: this.base, - stat: (this.stat ? cloneStats(this.stat) : null), - history: this.history.slice(), - contents: contents - }); - - // clone our custom properties - Object.keys(this).forEach(function(key) { - // ignore built-in fields - if (key === '_contents' || key === 'stat' || - key === 'history' || key === 'path' || - key === 'base' || key === 'cwd') { - return; - } - file[key] = opt.deep ? clone(this[key], true) : this[key]; - }, this); - return file; -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - - // isNull - if (opt.end) stream.end(); - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return ''; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error('File.contents can only be a Buffer, a Stream, or null.'); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -Object.defineProperty(File.prototype, 'path', { - get: function() { - return this.history[this.history.length - 1]; - }, - set: function(path) { - if (typeof path !== 'string') throw new Error('path should be string'); - - // record history only when path changed - if (path && path !== this.path) { - this.history.push(path); - } - } -}); - -module.exports = File; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 89f09ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index d36df6f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,11 +0,0 @@ -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 0e23782..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 7f22c63..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/package.json deleted file mode 100644 index 5c2a485..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/node_modules/vinyl/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "vinyl@^0.4.0", - "scope": null, - "escapedName": "vinyl", - "name": "vinyl", - "rawSpec": "^0.4.0", - "spec": ">=0.4.0 <0.5.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs" - ] - ], - "_from": "vinyl@>=0.4.0 <0.5.0", - "_id": "vinyl@0.4.6", - "_inCache": true, - "_location": "/vinyl-fs/vinyl", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "2.1.6", - "_phantomChildren": {}, - "_requested": { - "raw": "vinyl@^0.4.0", - "scope": null, - "escapedName": "vinyl", - "name": "vinyl", - "rawSpec": "^0.4.0", - "spec": ">=0.4.0 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "_shasum": "2f356c87a550a255461f36bbeb2a5ba8bf784847", - "_shrinkwrap": null, - "_spec": "vinyl@^0.4.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "dependencies": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" - }, - "description": "A virtual file format", - "devDependencies": { - "buffer-equal": "0.0.1", - "coveralls": "^2.6.1", - "event-stream": "^3.1.0", - "istanbul": "^0.3.0", - "jshint": "^2.4.1", - "lodash.templatesettings": "^2.4.1", - "mocha": "^2.0.0", - "mocha-lcov-reporter": "^0.0.1", - "rimraf": "^2.2.5", - "should": "^4.0.4" - }, - "directories": {}, - "dist": { - "shasum": "2f356c87a550a255461f36bbeb2a5ba8bf784847", - "tarball": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz" - }, - "engines": { - "node": ">= 0.9" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "8255a5f1de7fecb1cd5e7ba7ac1ec997395f6be1", - "homepage": "http://github.com/wearefractal/vinyl", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } - ], - "name": "vinyl", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "test": "mocha --reporter spec && jshint lib" - }, - "version": "0.4.6" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/package.json deleted file mode 100644 index 110ec69..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-fs/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "vinyl-fs@^0.3.0", - "scope": null, - "escapedName": "vinyl-fs", - "name": "vinyl-fs", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp" - ] - ], - "_from": "vinyl-fs@>=0.3.0 <0.4.0", - "_id": "vinyl-fs@0.3.14", - "_inCache": true, - "_location": "/vinyl-fs", - "_nodeVersion": "0.10.36", - "_npmUser": { - "name": "phated", - "email": "blaine@iceddev.com" - }, - "_npmVersion": "2.14.3", - "_phantomChildren": { - "clone-stats": "0.0.1", - "core-util-is": "1.0.2", - "first-chunk-stream": "1.0.0", - "inherits": "2.0.3", - "is-utf8": "0.2.1", - "isarray": "0.0.1", - "natives": "1.1.0", - "string_decoder": "0.10.31", - "xtend": "4.0.1" - }, - "_requested": { - "raw": "vinyl-fs@^0.3.0", - "scope": null, - "escapedName": "vinyl-fs", - "name": "vinyl-fs", - "rawSpec": "^0.3.0", - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp" - ], - "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "_shasum": "9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6", - "_shrinkwrap": null, - "_spec": "vinyl-fs@^0.3.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/vinyl-fs/issues" - }, - "dependencies": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" - }, - "description": "Vinyl adapter for the file system", - "devDependencies": { - "buffer-equal": "^0.0.1", - "coveralls": "^2.6.1", - "istanbul": "^0.3.0", - "jshint": "^2.4.1", - "mocha": "^2.0.0", - "mocha-lcov-reporter": "^0.0.1", - "rimraf": "^2.2.5", - "should": "^4.0.0", - "sinon": "^1.10.3" - }, - "directories": {}, - "dist": { - "shasum": "9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6", - "tarball": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "1e026b90df987b6da0ca7da941fd61a7cd1e6d8f", - "homepage": "http://github.com/wearefractal/vinyl-fs", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl-fs/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "vinyl-fs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl-fs.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "test": "mocha --reporter spec && jshint lib" - }, - "version": "0.3.14" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.jshintrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.jshintrc deleted file mode 100644 index 36a93d9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "node": true, - "strict": true -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.npmignore deleted file mode 100644 index 91dfed8..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -node_modules \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/README.md deleted file mode 100644 index b1d2c48..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# vinyl-sourcemaps-apply - -Apply a source map to a vinyl file, merging it with preexisting source maps. - -## Usage: - -```javascript -var applySourceMap = require('vinyl-sourcemaps-apply'); -applySourceMap(vinylFile, sourceMap); -``` - -### Example (Gulp plugin): - -```javascript -var through = require('through2'); -var applySourceMap = require('vinyl-sourcemaps-apply'); -var myTransform = require('myTransform'); - -module.exports = function(options) { - - function transform(file, encoding, callback) { - // generate source maps if plugin source-map present - if (file.sourceMap) { - options.makeSourceMaps = true; - } - - // do normal plugin logic - var result = myTransform(file.contents, options); - file.contents = new Buffer(result.code); - - // apply source map to the chain - if (file.sourceMap) { - applySourceMap(file, result.map); - } - - this.push(file); - callback(); - } - - return through.obj(transform); -}; -``` \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/index.js deleted file mode 100644 index c966b80..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -var SourceMapGenerator = require('source-map').SourceMapGenerator; -var SourceMapConsumer = require('source-map').SourceMapConsumer; - -module.exports = function applySourceMap(file, sourceMap) { - if (typeof sourceMap === 'string' || sourceMap instanceof String) { - sourceMap = JSON.parse(sourceMap); - } - - if (file.sourceMap && (typeof file.sourceMap === 'string' || file.sourceMap instanceof String)) { - file.sourceMap = JSON.parse(file.sourceMap); - } - - // check source map properties - assertProperty(sourceMap, "file"); - assertProperty(sourceMap, "mappings"); - assertProperty(sourceMap, "sources"); - - // fix paths if Windows style paths - sourceMap.file = sourceMap.file.replace(/\\/g, '/'); - sourceMap.sources = sourceMap.sources.map(function(filePath) { - return filePath.replace(/\\/g, '/'); - }); - - if (file.sourceMap && file.sourceMap.mappings !== '') { - var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(sourceMap)); - generator.applySourceMap(new SourceMapConsumer(file.sourceMap)); - file.sourceMap = JSON.parse(generator.toString()); - } else { - file.sourceMap = sourceMap; - } -}; - -function assertProperty(sourceMap, propertyName) { - if (!sourceMap.hasOwnProperty(propertyName)) { - var e = new Error('Source map to be applied is missing the \"' + propertyName + '\" property'); - throw e; - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/package.json deleted file mode 100644 index 97ae1d4..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl-sourcemaps-apply/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "vinyl-sourcemaps-apply@^0.2.0", - "scope": null, - "escapedName": "vinyl-sourcemaps-apply", - "name": "vinyl-sourcemaps-apply", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel" - ] - ], - "_from": "vinyl-sourcemaps-apply@>=0.2.0 <0.3.0", - "_id": "vinyl-sourcemaps-apply@0.2.1", - "_inCache": true, - "_location": "/vinyl-sourcemaps-apply", - "_nodeVersion": "0.12.7", - "_npmUser": { - "name": "floridoo", - "email": "florian.reiterer@gmail.com" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "raw": "vinyl-sourcemaps-apply@^0.2.0", - "scope": null, - "escapedName": "vinyl-sourcemaps-apply", - "name": "vinyl-sourcemaps-apply", - "rawSpec": "^0.2.0", - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-babel" - ], - "_resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "_shasum": "ab6549d61d172c2b1b87be5c508d239c8ef87705", - "_shrinkwrap": null, - "_spec": "vinyl-sourcemaps-apply@^0.2.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-babel", - "author": { - "name": "Florian Reiterer", - "email": "me@florianreiterer.com" - }, - "bugs": { - "url": "https://github.com/floridoo/vinyl-sourcemaps-apply/issues" - }, - "dependencies": { - "source-map": "^0.5.1" - }, - "description": "Apply a source map to a vinyl file, merging it with preexisting source maps", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ab6549d61d172c2b1b87be5c508d239c8ef87705", - "tarball": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz" - }, - "gitHead": "30320c97c112f44ccba02dd73ce5bed1ad4361de", - "homepage": "http://github.com/floridoo/vinyl-sourcemaps-apply", - "keywords": [ - "vinyl", - "sourcemaps", - "source maps", - "gulp" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "floridoo", - "email": "florian.reiterer@gmail.com" - } - ], - "name": "vinyl-sourcemaps-apply", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/floridoo/vinyl-sourcemaps-apply.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "0.2.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/LICENSE deleted file mode 100644 index 4f482f9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/README.md deleted file mode 100644 index 2d57d85..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/README.md +++ /dev/null @@ -1,195 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) -## Information -











    Packagevinyl
    DescriptionA virtual file format
    Node Version>= 0.9
    - -## What is this? -Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466) - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee", - contents: new Buffer("test = 123") -}); -``` - -### isVinyl -When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead. - -```js -var File = require('vinyl'); - -var dummy = new File({stuff}); -var notAFile = {}; - -File.isVinyl(dummy); // true -File.isVinyl(notAFile); // false -``` - -### constructor(options) -#### options.cwd -Type: `String`

    Default: `process.cwd()` - -#### options.base -Used for relative pathing. Typically where a glob starts. - -Type: `String`

    Default: `options.cwd` - -#### options.path -Full path to the file. - -Type: `String`

    Default: `undefined` - -#### options.history -Path history. Has no effect if `options.path` is passed. - -Type: `Array`

    Default: `options.path ? [options.path] : []` - -#### options.stat -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats`

    Default: `null` - -#### options.contents -File contents. - -Type: `Buffer, Stream, or null`

    Default: `null` - -### isBuffer() -Returns true if file.contents is a Buffer. - -### isStream() -Returns true if file.contents is a Stream. - -### isNull() -Returns true if file.contents is null. - -### clone([opt]) -Returns a new File object with all attributes cloned.
    By default custom attributes are deep-cloned. - -If opt or opt.deep is false, custom attributes will not be deep-cloned. - -If opt.contents is false, it will copy file.contents Buffer's reference. - -### pipe(stream[, opt]) -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is false, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() -Returns a pretty String interpretation of the File. Useful for console.log. - -### contents -The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification. - -For example: - -```js -if (file.isBuffer()) { - console.log(file.contents.toString()); // logs out the string of contents -} -``` - -### path -Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`. - -### history -Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`. - -### relative -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -### dirname -Gets and sets path.dirname for the file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.dirname); // /test - -file.dirname = '/specs'; - -console.log(file.dirname); // /specs -console.log(file.path); // /specs/file.coffee -` -``` - -### basename -Gets and sets path.basename for the file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.basename); // file.coffee - -file.basename = 'file.js'; - -console.log(file.basename); // file.js -console.log(file.path); // /test/file.js -` -``` - -### extname -Gets and sets path.extname for the file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.extname); // .coffee - -file.extname = '.js'; - -console.log(file.extname); // .js -console.log(file.path); // /test/file.js -` -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/index.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/index.js deleted file mode 100644 index c8f113f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/index.js +++ /dev/null @@ -1,213 +0,0 @@ -var path = require('path'); -var clone = require('clone'); -var cloneStats = require('clone-stats'); -var cloneBuffer = require('./lib/cloneBuffer'); -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var Stream = require('stream'); -var replaceExt = require('replace-ext'); - -function File(file) { - if (!file) file = {}; - - // record path change - var history = file.path ? [file.path] : file.history; - this.history = history || []; - - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - // stat = files stats object - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; - - this._isVinyl = true; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function(opt) { - if (typeof opt === 'boolean') { - opt = { - deep: opt, - contents: true - }; - } else if (!opt) { - opt = { - deep: true, - contents: true - }; - } else { - opt.deep = opt.deep === true; - opt.contents = opt.contents !== false; - } - - // clone our file contents - var contents; - if (this.isStream()) { - contents = this.contents.pipe(new Stream.PassThrough()); - this.contents = this.contents.pipe(new Stream.PassThrough()); - } else if (this.isBuffer()) { - contents = opt.contents ? cloneBuffer(this.contents) : this.contents; - } - - var file = new File({ - cwd: this.cwd, - base: this.base, - stat: (this.stat ? cloneStats(this.stat) : null), - history: this.history.slice(), - contents: contents - }); - - // clone our custom properties - Object.keys(this).forEach(function(key) { - // ignore built-in fields - if (key === '_contents' || key === 'stat' || - key === 'history' || key === 'path' || - key === 'base' || key === 'cwd') { - return; - } - file[key] = opt.deep ? clone(this[key], true) : this[key]; - }, this); - return file; -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - - // isNull - if (opt.end) stream.end(); - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return ''; -}; - -File.isVinyl = function(file) { - return file && file._isVinyl === true; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error('File.contents can only be a Buffer, a Stream, or null.'); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -Object.defineProperty(File.prototype, 'dirname', { - get: function() { - if (!this.path) throw new Error('No path specified! Can not get dirname.'); - return path.dirname(this.path); - }, - set: function(dirname) { - if (!this.path) throw new Error('No path specified! Can not set dirname.'); - this.path = path.join(dirname, path.basename(this.path)); - } -}); - -Object.defineProperty(File.prototype, 'basename', { - get: function() { - if (!this.path) throw new Error('No path specified! Can not get basename.'); - return path.basename(this.path); - }, - set: function(basename) { - if (!this.path) throw new Error('No path specified! Can not set basename.'); - this.path = path.join(path.dirname(this.path), basename); - } -}); - -Object.defineProperty(File.prototype, 'extname', { - get: function() { - if (!this.path) throw new Error('No path specified! Can not get extname.'); - return path.extname(this.path); - }, - set: function(extname) { - if (!this.path) throw new Error('No path specified! Can not set extname.'); - this.path = replaceExt(this.path, extname); - } -}); - -Object.defineProperty(File.prototype, 'path', { - get: function() { - return this.history[this.history.length - 1]; - }, - set: function(path) { - if (typeof path !== 'string') throw new Error('path should be string'); - - // record history only when path changed - if (path && path !== this.path) { - this.history.push(path); - } - } -}); - -module.exports = File; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/cloneBuffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 89f09ed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/inspectStream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index d36df6f..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,11 +0,0 @@ -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isBuffer.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 8a767d1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('buffer').Buffer.isBuffer; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isNull.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 7f22c63..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isStream.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/package.json deleted file mode 100644 index 350e239..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/vinyl/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "vinyl@^0.5.0", - "scope": null, - "escapedName": "vinyl", - "name": "vinyl", - "rawSpec": "^0.5.0", - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util" - ] - ], - "_from": "vinyl@>=0.5.0 <0.6.0", - "_id": "vinyl@0.5.3", - "_inCache": true, - "_location": "/vinyl", - "_nodeVersion": "2.5.0", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "2.13.4", - "_phantomChildren": {}, - "_requested": { - "raw": "vinyl@^0.5.0", - "scope": null, - "escapedName": "vinyl", - "name": "vinyl", - "rawSpec": "^0.5.0", - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-util" - ], - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "_shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", - "_shrinkwrap": null, - "_spec": "vinyl@^0.5.0", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/gulp-util", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "dependencies": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - }, - "description": "A virtual file format", - "devDependencies": { - "buffer-equal": "0.0.1", - "event-stream": "^3.1.0", - "istanbul": "^0.3.0", - "istanbul-coveralls": "^1.0.1", - "jshint": "^2.4.1", - "lodash.templatesettings": "^3.1.0", - "mocha": "^2.0.0", - "rimraf": "^2.2.5", - "should": "^7.0.0" - }, - "directories": {}, - "dist": { - "shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", - "tarball": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz" - }, - "engines": { - "node": ">= 0.9" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "6f19648bd67040bfd0dc755ad031e1e5e0b58429", - "homepage": "http://github.com/wearefractal/vinyl", - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "vinyl", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "scripts": { - "coveralls": "istanbul cover _mocha && istanbul-coveralls", - "test": "mocha && jshint lib" - }, - "version": "0.5.3" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/CHANGELOG.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/CHANGELOG.md deleted file mode 100644 index 367acb1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/CHANGELOG.md +++ /dev/null @@ -1,147 +0,0 @@ -# Changes - - -## v1.3.0 - -* Add nothrow option to which.sync -* update tap - -## v1.2.14 - -* appveyor: drop node 5 and 0.x -* travis-ci: add node 6, drop 0.x - -## v1.2.13 - -* test: Pass missing option to pass on windows -* update tap -* update isexe to 2.0.0 -* neveragain.tech pledge request - -## v1.2.12 - -* Removed unused require - -## v1.2.11 - -* Prevent changelog script from being included in package - -## v1.2.10 - -* Use env.PATH only, not env.Path - -## v1.2.9 - -* fix for paths starting with ../ -* Remove unused `is-absolute` module - -## v1.2.8 - -* bullet items in changelog that contain (but don't start with) # - -## v1.2.7 - -* strip 'update changelog' changelog entries out of changelog - -## v1.2.6 - -* make the changelog bulleted - -## v1.2.5 - -* make a changelog, and keep it up to date -* don't include tests in package -* Properly handle relative-path executables -* appveyor -* Attach error code to Not Found error -* Make tests pass on Windows - -## v1.2.4 - -* Fix typo - -## v1.2.3 - -* update isexe, fix regression in pathExt handling - -## v1.2.2 - -* update deps, use isexe module, test windows - -## v1.2.1 - -* Sometimes windows PATH entries are quoted -* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. -* doc cli - -## v1.2.0 - -* Add support for opt.all and -as cli flags -* test the bin -* update travis -* Allow checking for multiple programs in bin/which -* tap 2 - -## v1.1.2 - -* travis -* Refactored and fixed undefined error on Windows -* Support strict mode - -## v1.1.1 - -* test +g exes against secondary groups, if available -* Use windows exe semantics on cygwin & msys -* cwd should be first in path on win32, not last -* Handle lower-case 'env.Path' on Windows -* Update docs -* use single-quotes - -## v1.1.0 - -* Add tests, depend on is-absolute - -## v1.0.9 - -* which.js: root is allowed to execute files owned by anyone - -## v1.0.8 - -* don't use graceful-fs - -## v1.0.7 - -* add license to package.json - -## v1.0.6 - -* isc license - -## 1.0.5 - -* Awful typo - -## 1.0.4 - -* Test for path absoluteness properly -* win: Allow '' as a pathext if cmd has a . in it - -## 1.0.3 - -* Remove references to execPath -* Make `which.sync()` work on Windows by honoring the PATHEXT variable. -* Make `isExe()` always return true on Windows. -* MIT - -## 1.0.2 - -* Only files can be exes - -## 1.0.1 - -* Respect the PATHEXT env for win32 support -* should 0755 the bin -* binary -* guts -* package -* 1st diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/README.md deleted file mode 100644 index 8c0b0cb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# which - -Like the unix `which` utility. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. - -## USAGE - -```javascript -var which = require('which') - -// async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) - -// sync usage -// throws if not found -var resolved = which.sync('node') - -// if nothrow option is used, returns null if not found -resolved = which.sync('node', {nothrow: true}) - -// Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) -``` - -## CLI USAGE - -Same as the BSD `which(1)` binary. - -``` -usage: which [-as] program ... -``` - -## OPTIONS - -You may pass an options object as the second argument. - -- `path`: Use instead of the `PATH` environment variable. -- `pathExt`: Use instead of the `PATHEXT` environment variable. -- `all`: Return all matches, instead of just the first one. Note that - this means the function returns an array of strings instead of a - single string. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/bin/which b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/bin/which deleted file mode 100755 index 7cee372..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/bin/which +++ /dev/null @@ -1,52 +0,0 @@ -#!/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/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/package.json deleted file mode 100644 index 3ca1aeb..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "which@^1.2.12", - "scope": null, - "escapedName": "which", - "name": "which", - "rawSpec": "^1.2.12", - "spec": ">=1.2.12 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix" - ] - ], - "_from": "which@>=1.2.12 <2.0.0", - "_id": "which@1.3.0", - "_inCache": true, - "_location": "/which", - "_nodeVersion": "8.2.1", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/which-1.3.0.tgz_1501548893969_0.39246653905138373" - }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_npmVersion": "5.3.0", - "_phantomChildren": {}, - "_requested": { - "raw": "which@^1.2.12", - "scope": null, - "escapedName": "which", - "name": "which", - "rawSpec": "^1.2.12", - "spec": ">=1.2.12 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/global-prefix" - ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "_shasum": "ff04bdfc010ee547d780bec38e1ac1c2777d253a", - "_shrinkwrap": null, - "_spec": "which@^1.2.12", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/global-prefix", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bin": { - "which": "./bin/which" - }, - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "dependencies": { - "isexe": "^2.0.0" - }, - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.3.3", - "tap": "^10.7.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "shasum": "ff04bdfc010ee547d780bec38e1ac1c2777d253a", - "tarball": "https://registry.npmjs.org/which/-/which-1.3.0.tgz" - }, - "files": [ - "which.js", - "bin/which" - ], - "gitHead": "6b2de9381d6f6484489187faf24d22ac5bf3d668", - "homepage": "https://github.com/isaacs/node-which#readme", - "license": "ISC", - "main": "which.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "which", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "scripts": { - "changelog": "bash gen-changelog.sh", - "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", - "test": "tap test/*.js --cov" - }, - "version": "1.3.0" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/which.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/which.js deleted file mode 100644 index 4347f91..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/which/which.js +++ /dev/null @@ -1,135 +0,0 @@ -module.exports = which -which.sync = whichSync - -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -var path = require('path') -var COLON = isWindows ? ';' : ':' -var isexe = require('isexe') - -function getNotFoundError (cmd) { - var er = new Error('not found: ' + cmd) - er.code = 'ENOENT' - - return er -} - -function getPathInfo (cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] - - pathEnv = pathEnv.split(colon) - - var pathExtExe = '' - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') - pathExt = pathExtExe.split(colon) - - - // Always test the cmd itself first. isexe will check to make sure - // it's found in the pathExt set. - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) - pathEnv = [''] - - return { - env: pathEnv, - ext: pathExt, - extExe: pathExtExe - } -} - -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(getNotFoundError(cmd)) - } - - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && (/^\.[\\\/]/).test(cmd)) { - p = cmd.slice(0, 2) + p - } - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd, opt) { - opt = opt || {} - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && /^\.[\\\/]/.test(cmd)) { - p = cmd.slice(0, 2) + p - } - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var is - try { - is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/LICENSE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/README.md deleted file mode 100644 index 98eab25..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/package.json deleted file mode 100644 index 48efdc7..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "wrappy@1", - "scope": null, - "escapedName": "wrappy", - "name": "wrappy", - "rawSpec": "1", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/once" - ] - ], - "_from": "wrappy@>=1.0.0 <2.0.0", - "_id": "wrappy@1.0.2", - "_inCache": true, - "_location": "/wrappy", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" - }, - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, - "_npmVersion": "3.9.1", - "_phantomChildren": {}, - "_requested": { - "raw": "wrappy@1", - "scope": null, - "escapedName": "wrappy", - "name": "wrappy", - "rawSpec": "1", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inflight", - "/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_shrinkwrap": null, - "_spec": "wrappy@1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/once", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "dependencies": {}, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^2.3.1" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "files": [ - "wrappy.js" - ], - "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "name": "wrappy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.0.2" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/wrappy.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.jshintrc b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.npmignore b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/LICENCE b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b43..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -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/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/Makefile b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/README.md b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/README.md deleted file mode 100644 index 093cb29..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: 'c' -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/immutable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/mutable.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/mutable.js deleted file mode 100644 index 72debed..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/package.json b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/package.json deleted file mode 100644 index 8d76ef1..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "xtend@~4.0.1", - "scope": null, - "escapedName": "xtend", - "name": "xtend", - "rawSpec": "~4.0.1", - "spec": ">=4.0.1 <4.1.0", - "type": "range" - }, - "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2" - ] - ], - "_from": "xtend@>=4.0.1 <4.1.0", - "_id": "xtend@4.0.1", - "_inCache": true, - "_location": "/xtend", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "raynos", - "email": "raynos2@gmail.com" - }, - "_npmVersion": "2.14.1", - "_phantomChildren": {}, - "_requested": { - "raw": "xtend@~4.0.1", - "scope": null, - "escapedName": "xtend", - "name": "xtend", - "rawSpec": "~4.0.1", - "spec": ">=4.0.1 <4.1.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream/through2", - "/through2", - "/vinyl-fs/through2" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_shrinkwrap": null, - "_spec": "xtend@~4.0.1", - "_where": "/Users/roman/flarum/workbench/flarum-ext-shawTheme/js/forum/node_modules/through2", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "directories": {}, - "dist": { - "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "engines": { - "node": ">=0.4" - }, - "gitHead": "23dc302a89756da89c1897bc732a752317e35390", - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "license": "MIT", - "main": "immutable", - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "name": "xtend", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "4.0.1" -} diff --git a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/test.js b/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/test.js deleted file mode 100644 index 093a2b0..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/node_modules/xtend/test.js +++ /dev/null @@ -1,83 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/workbench/flarum-ext-shawTheme/js/forum/package.json b/workbench/flarum-ext-shawTheme/js/forum/package.json deleted file mode 100644 index 34e1b71..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private": true, - "devDependencies": { - "gulp": "^3.8.11", - "flarum-gulp": "^0.2.0" - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/src/listInline.js b/workbench/flarum-ext-shawTheme/js/forum/src/listInline.js deleted file mode 100644 index 5c3308a..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/src/listInline.js +++ /dev/null @@ -1,33 +0,0 @@ -import { extend } from 'flarum/extend'; -import Component from 'flarum/Component'; -import listItems from 'flarum/helpers/listItems'; - -export default class listInline extends Component { - static initProps(props) { - super.initProps(props); - props.className = props.className || ''; - props.buttonClassName = props.buttonClassName || ''; - props.menuClassName = props.menuClassName || ''; - props.label = props.label || ''; - props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'caret-down'; - } - init(){ - this.showing = false; - } - view(){ - const items = this.props.children ? listItems(this.props.children) : []; - - return ( -
    - {this.getMenu(items)} -
    - ); - } - getMenu(items) { - return ( -
      - {items} -
    - ); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/src/main.js b/workbench/flarum-ext-shawTheme/js/forum/src/main.js deleted file mode 100644 index 0a96376..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/src/main.js +++ /dev/null @@ -1,204 +0,0 @@ -import { extend } from 'flarum/extend'; -import Post from 'flarum/components/Post'; -import Component from 'flarum/Component'; -import Page from 'flarum/components/Page'; -import HeaderSecondary from 'flarum/components/HeaderSecondary'; -import SessionDropdown from 'flarum/components/SessionDropdown'; -import Dropdown from 'flarum/components/Dropdown'; -import IndexPage from 'flarum/components/IndexPage'; -import listItems from 'flarum/helpers/listItems'; -import ItemList from 'flarum/utils/ItemList'; -import Button from 'flarum/components/Button'; -import LinkButton from 'flarum/components/LinkButton'; -import SelectDropdown from 'flarum/components/SelectDropdown'; -import tagLabel from 'flarum/tags/helpers/tagLabel'; -import sortTags from 'flarum/tags/utils/sortTags'; -import TagsPage from 'flarum/tags/components/TagsPage'; -import humanTime from 'flarum/helpers/humanTime'; -import icon from 'flarum/helpers/icon'; -import avatar from 'flarum/helpers/avatar'; -import username from 'flarum/helpers/username'; -import listInline from 'romanzpolski/shawTheme/listInline'; - - - -app.initializers.add('romanzpolski/shawTheme', () => { - - - - SessionDropdown.prototype.getButtonContent = function() { - const user = app.session.user; - const attrs = {}; - attrs.style = {background: '#000'}; - return [ - {username(user)}, - avatar(user), ' ' - ]; - }; - - - - IndexPage.prototype.viewItems = function(){ - const items = new ItemList(); - const sortMap = app.cache.discussionList.sortMap(); - - const sortOptions = {}; - for (const i in sortMap) { - sortOptions[i] = app.translator.trans('core.forum.index_sort.' + i + '_button'); - } - - items.add('sort', - listInline.component({ - buttonClassName: 'Button', - label: sortOptions[this.params().sort] || Object.keys(sortMap).map(key => sortOptions[key])[0], - children: Object.keys(sortOptions).map(value => { - const label = sortOptions[value]; - const active = (this.params().sort || Object.keys(sortMap)[0]) === value; - - return Button.component({ - className: 'Button', - children: label, - icon: active ? 'check' : true, - onclick: this.changeSort.bind(this, value), - active: active, - }) - }), - }) - - ); - - return items; - }; - - - IndexPage.prototype.sidebarItems = function() { - const items = new ItemList(); - const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user; - - items.add('newDiscussion', - Button.component({ - children: app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button'), - icon: 'edit', - className: 'Button Button--primary IndexPage-newDiscussion', - itemClassName: 'App-primaryControl', - onclick: this.newDiscussion.bind(this), - disabled: !canStartDiscussion - }) - ); - - items.add('nav', - SelectDropdown.component({ - children: this.navItems(this).toArray(), - buttonClassName: 'Button', - className: 'App-titleControl' - }) - ); - return items; - }; - - - TagsPage.prototype.view = function() { - const pinned = this.tags.filter(tag => tag.position() !== null); - const cloud = this.tags.filter(tag => tag.position() === null); - - return ( -
    - {IndexPage.prototype.hero()} -
    - - -
    - - - {cloud.length ? ( -
    - {cloud.map(tag => { - const color = tag.color(); - - return [ - tagLabel(tag, {link: true}), - ' ' - ]; - })} -
    - ) : ''} -
    -
    -
    - ); - }; - - - - - IndexPage.prototype.view = function() { - console.log(this.sidebarItems().toArray()); -// console.log(this.viewItems().toArray()); - return ( -
    - {this.hero()} -
    - - -
    -
    -
      {listItems(this.viewItems().toArray())}
    -
      {listItems(this.actionItems().toArray())}
    -
    - {app.cache.discussionList.render()} -
    -
    -
    - ); - }; - -/* extend(Post.prototype, 'view', function(vdom) { -// vdom.children.push('

    this is some stuff to add after each post

    '); - vdom.attrs.style = 'background-color: #fafafa; border-bottom: 1px solid #000'; - });*/ -}); \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/js/forum/src/newComponent.js b/workbench/flarum-ext-shawTheme/js/forum/src/newComponent.js deleted file mode 100644 index 5589176..0000000 --- a/workbench/flarum-ext-shawTheme/js/forum/src/newComponent.js +++ /dev/null @@ -1,33 +0,0 @@ -import { extend } from 'flarum/extend'; -import Component from 'flarum/Component'; -import listItems from 'flarum/helpers/listItems'; - -export default class NewComponent extends Component { - static initProps(props) { - super.initProps(props); - props.className = props.className || ''; - props.buttonClassName = props.buttonClassName || ''; - props.menuClassName = props.menuClassName || ''; - props.label = props.label || ''; - props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'caret-down'; - } - init(){ - this.showing = false; - } - view(){ - const items = this.props.children ? listItems(this.props.children) : []; - - return ( -
    - {this.getMenu(items)} -
    - ); - } - getMenu(items) { - return ( -
      - {items} -
    - ); - } -} \ No newline at end of file diff --git a/workbench/flarum-ext-shawTheme/less/forum/extension.less b/workbench/flarum-ext-shawTheme/less/forum/extension.less deleted file mode 100644 index c55fdbc..0000000 --- a/workbench/flarum-ext-shawTheme/less/forum/extension.less +++ /dev/null @@ -1,228 +0,0 @@ -// --------------------------------- -// CONFIG - -@config-primary-color: #4EA1CA; -@config-secondary-color: #4EA1CA; -@config-dark-mode: false; -@config-colored-header: false; - -// --------------------------------- -// COLORS - -@primary-hue: hue(@primary-color); -@primary-sat: saturation(@primary-color); - -@secondary-hue: hue(@secondary-color); -@secondary-sat: saturation(@secondary-color); - -// Derive the primary/secondary colors from the config variables. In dark mode, -// we make the user-set colors a bit darker, otherwise they will stand out too -// much. -.define-colors(@config-dark-mode); -.define-colors(false) { - @primary-color: @config-primary-color; - @secondary-color: @config-secondary-color; - - @body-bg: #fff; - @text-color: #111; - @link-color: saturate(@primary-color, 10%); - @heading-color: @text-color; - @muted-color: hsl(@secondary-hue, min(20%, @secondary-sat), 50%); - @muted-more-color: #aaa; - @shadow-color: rgba(0, 0, 0, 0.35); - - @control-bg: #F2F3F3; - @control-color: @muted-color; - @control-danger-bg: #fdd; - @control-danger-color: #d66; - - @overlay-bg: fade(@secondary-color, 90%); - - @code-bg: darken(@body-bg, 3%); - @code-color: lighten(@text-color, 30%); -} -.define-colors(true) { - @primary-color: @config-primary-color; - @secondary-color: @config-secondary-color; - - @body-bg: hsl(@secondary-hue, min(20%, @secondary-sat), 10%); - @text-color: #ddd; - @link-color: saturate(@primary-color, 10%); - @heading-color: @text-color; - @muted-color: hsl(@secondary-hue, min(15%, @secondary-sat), 50%); - @muted-more-color: hsl(@secondary-hue, min(10%, @secondary-sat), 40%); - @shadow-color: rgba(0, 0, 0, 0.5); - - @control-bg: #F2F3F3; - @control-color: @muted-color; - @control-danger-bg: #411; - @control-danger-color: #a88; - - @overlay-bg: fade(darken(@body-bg, 5%), 90%); - - @code-bg: darken(@body-bg, 3%); - @code-color: #fff; -} - -@hero-bg: @control-bg; -@hero-color: @control-color; -@hero-muted-color: @control-color; - -@alert-bg: #fff2ae; -@alert-color: #ad6c00; - -@alert-error-bg: #d83e3e; -@alert-error-color: #fff; - -@alert-success-bg: #B4F1AF; -@alert-success-color: #33722D; - -.define-header(@config-colored-header); -.define-header(false) { - @header-bg: #4FA4CE; - @header-color: @body-bg; - @header-control-bg: hsl(@secondary-hue, min(15%, @secondary-sat), 50%); - @header-control-color: #000; -} -.define-header(true) { - @header-bg: #4FA4CE; - @header-color: @body-bg; - @header-control-bg: hsl(@secondary-hue, min(15%, @secondary-sat), 50%); - @header-control-color: @control-bg; -} - -// --------------------------------- -// LAYOUT - -@drawer-width: 270px; -@pane-width: 400px; -@header-height: 66px; -@header-height-phone: 46px; - -@border-radius: 0px; - -@zindex-header: 1000; -@zindex-pane: 1010; -@zindex-composer: 1020; -@zindex-dropdown: 1030; -@zindex-modal-background: 1040; -@zindex-modal: 1050; -@zindex-alerts: 1060; -@zindex-tooltip: 1070; - -// --------------------------------- -// BREAKPOINTS - -@screen-phone-max: (@screen-tablet - 1); - -@screen-tablet: 768px; -@screen-tablet-max: (@screen-desktop - 1); - -@screen-desktop: 992px; -@screen-desktop-max: (@screen-desktop-hd - 1); - -@screen-desktop-hd: 1100px; - -@phone: ~"(max-width: @{screen-phone-max})"; -@tablet: ~"(min-width: @{screen-tablet}) and (max-width: @{screen-tablet-max})"; -@desktop: ~"(min-width: @{screen-desktop}) and (max-width: @{screen-desktop-max})"; -@desktop-hd: ~"(min-width: @{screen-desktop-hd})"; - -@tablet-up: ~"(min-width: @{screen-tablet})"; -@desktop-up: ~"(min-width: @{screen-desktop})"; - -// --------------------------------- -// COMPONENTS - -@tooltip-bg: rgba(0, 0, 0, 0.9); -@tooltip-color: #fff; - -@online-user-circle-color: #7FBA00; - -// ---- end vars --- start mixinis - -.header-background() { - box-shadow: 0px 0px 25px rgba(0,0,0,0.5); -} - -// -------- - -.Button { - text-transform: uppercase; - font-weight: 300; -} -.Header-title { - padding: 0px; - font-size: 16px; - font-weight: normal; - margin: 0; - text-align: center; - - > img { - min-width: 200px; - height: auto; - } - .Header-logo { - max-height: none; - vertical-align: middle; - } -} -.Header-navigation { - float: left; - margin-right: 25px; - margin-top: 8px; -} -.Header-controls { - margin: 4px; - padding: 0; - list-style: none; -} -li.TagTile.bgImg { - color: #fff !important; - background-position: center center; - background-size: cover; - text-shadow: 0px 0px 5px rgba(0,0,0,0.4); - > a { - color: #fff; - text-transform: uppercase; - font-weight: 300; - > h3 { - color: #fff; - } - .TagTile-children a { - color: #fff; - display: block; - } - } -} -li.TagTile.bgImg.photography { - background-image: url('https://dt9ph4xofvj87.cloudfront.net/user/sites/shawacademy.com/themes/mytheme/images/courses/photography/slider-card.png'); -} -li.TagTile.bgImg.marketing { - background-image: url('https://dt9ph4xofvj87.cloudfront.net/user/sites/shawacademy.com/themes/mytheme/images/courses/marketing/slider-card.png'); -} -li.TagTile.bgImg.nutrition { - background-image: url('https://dt9ph4xofvj87.cloudfront.net/user/sites/shawacademy.com/themes/mytheme/images/courses/nutrition/slider-card.png'); -} -body .SessionDropdown .Dropdown-toggle { - border-radius: 18px; - - .Avatar { - margin: -8px -15px -5px 10px; - .Avatar--size(43px); - } - .Button-label .username { - margin-top: 5px; - display: inline-block; - } -} -.viewNavInline { - .listInline { - padding: 0px; - list-style: none; - > li { - display: inline-block; - margin: 0px 5px 5px 0px; - } - } -}