Commit 2101a218 authored by Alfakhori's avatar Alfakhori
Browse files

Merge branch 'Rosenstein' into 'master'

update some ui

See merge request !1
parents bf137ad8 91e89eab
var a = /[\u3400-\u4DB5\u4E00-\u9FEF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29\u{20000}-\u{2A6D6}\u{2A700}-\u{2B734}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}][\0-\t\x0B\f\x0E-\u2027\u202A-\u{10FFFF}]/u;
var b = /[\u3400-\u4DB5\u4E00-\u9FEF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29\u{20000}-\u{2A6D6}\u{2A700}-\u{2B734}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}][\0-\u{10FFFF}]/u;
import runner from "@babel/helper-plugin-test-runner";
runner(__dirname);
MIT License
Copyright (c) 2014-present Sebastian McKenzie 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.
# @babel/plugin-transform-duplicate-keys
> Compile objects with duplicate keys to valid strict ES5
See our website [@babel/plugin-transform-duplicate-keys](https://babeljs.io/docs/en/next/babel-plugin-transform-duplicate-keys.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-duplicate-keys
```
or using yarn:
```sh
yarn add @babel/plugin-transform-duplicate-keys --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function getName(key) {
if (_core().types.isIdentifier(key)) {
return key.name;
}
return key.value.toString();
}
var _default = (0, _helperPluginUtils().declare)(api => {
api.assertVersion(7);
return {
name: "transform-duplicate-keys",
visitor: {
ObjectExpression(path) {
const {
node
} = path;
const plainProps = node.properties.filter(prop => !_core().types.isSpreadElement(prop) && !prop.computed);
const alreadySeenData = Object.create(null);
const alreadySeenGetters = Object.create(null);
const alreadySeenSetters = Object.create(null);
for (const prop of plainProps) {
const name = getName(prop.key);
let 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 = _core().types.stringLiteral(name);
}
}
}
}
};
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-transform-duplicate-keys@^7.2.0",
"_id": "@babel/plugin-transform-duplicate-keys@7.5.0",
"_inBundle": false,
"_integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==",
"_location": "/@babel/plugin-transform-duplicate-keys",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-transform-duplicate-keys@^7.2.0",
"name": "@babel/plugin-transform-duplicate-keys",
"escapedName": "@babel%2fplugin-transform-duplicate-keys",
"scope": "@babel",
"rawSpec": "^7.2.0",
"saveSpec": null,
"fetchSpec": "^7.2.0"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz",
"_shasum": "c5dbf5106bf84cdf691222c0974c12b1df931853",
"_spec": "@babel/plugin-transform-duplicate-keys@^7.2.0",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bundleDependencies": false,
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0"
},
"deprecated": false,
"description": "Compile objects with duplicate keys to valid strict ES5",
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4",
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-transform-duplicate-keys",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-duplicate-keys"
},
"version": "7.5.0"
}
MIT License
Copyright (c) 2014-2018 Sebastian McKenzie 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.
# @babel/plugin-transform-exponentiation-operator
> Compile exponentiation operator to ES5
See our website [@babel/plugin-transform-exponentiation-operator](https://babeljs.io/docs/en/next/babel-plugin-transform-exponentiation-operator.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-exponentiation-operator
```
or using yarn:
```sh
yarn add @babel/plugin-transform-exponentiation-operator --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _helperBuilderBinaryAssignmentOperatorVisitor() {
const data = _interopRequireDefault(require("@babel/helper-builder-binary-assignment-operator-visitor"));
_helperBuilderBinaryAssignmentOperatorVisitor = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = (0, _helperPluginUtils().declare)(api => {
api.assertVersion(7);
return {
name: "transform-exponentiation-operator",
visitor: (0, _helperBuilderBinaryAssignmentOperatorVisitor().default)({
operator: "**",
build(left, right) {
return _core().types.callExpression(_core().types.memberExpression(_core().types.identifier("Math"), _core().types.identifier("pow")), [left, right]);
}
})
};
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-transform-exponentiation-operator@^7.2.0",
"_id": "@babel/plugin-transform-exponentiation-operator@7.2.0",
"_inBundle": false,
"_integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==",
"_location": "/@babel/plugin-transform-exponentiation-operator",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-transform-exponentiation-operator@^7.2.0",
"name": "@babel/plugin-transform-exponentiation-operator",
"escapedName": "@babel%2fplugin-transform-exponentiation-operator",
"scope": "@babel",
"rawSpec": "^7.2.0",
"saveSpec": null,
"fetchSpec": "^7.2.0"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz",
"_shasum": "a63868289e5b4007f7054d46491af51435766008",
"_spec": "@babel/plugin-transform-exponentiation-operator@^7.2.0",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bundleDependencies": false,
"dependencies": {
"@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0",
"@babel/helper-plugin-utils": "^7.0.0"
},
"deprecated": false,
"description": "Compile exponentiation operator to ES5",
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-transform-exponentiation-operator",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator"
},
"version": "7.2.0"
}
MIT License
Copyright (c) 2014-present Sebastian McKenzie 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.
# @babel/plugin-transform-for-of
> Compile ES2015 for...of to ES5
See our website [@babel/plugin-transform-for-of](https://babeljs.io/docs/en/next/babel-plugin-transform-for-of.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-for-of
```
or using yarn:
```sh
yarn add @babel/plugin-transform-for-of --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
var _default = (0, _helperPluginUtils().declare)((api, options) => {
api.assertVersion(7);
const {
loose,
assumeArray
} = options;
if (loose === true && assumeArray === true) {
throw new Error(`The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of`);
}
if (assumeArray) {
return {
name: "transform-for-of",
visitor: {
ForOfStatement(path) {
const {
scope
} = path;
const {
left,
right,
body
} = path.node;
const i = scope.generateUidIdentifier("i");
let array = scope.maybeGenerateMemoised(right, true);
const inits = [_core().types.variableDeclarator(i, _core().types.numericLiteral(0))];
if (array) {
inits.push(_core().types.variableDeclarator(array, right));
} else {
array = right;
}
const item = _core().types.memberExpression(_core().types.cloneNode(array), _core().types.cloneNode(i), true);
let assignment;
if (_core().types.isVariableDeclaration(left)) {
assignment = left;
assignment.declarations[0].init = item;
} else {
assignment = _core().types.expressionStatement(_core().types.assignmentExpression("=", left, item));
}
const block = _core().types.toBlock(body);
block.body.unshift(assignment);
path.replaceWith(_core().types.forStatement(_core().types.variableDeclaration("let", inits), _core().types.binaryExpression("<", _core().types.cloneNode(i), _core().types.memberExpression(_core().types.cloneNode(array), _core().types.identifier("length"))), _core().types.updateExpression("++", _core().types.cloneNode(i)), block));
}
}
};
}
const pushComputedProps = loose ? pushComputedPropsLoose : pushComputedPropsSpec;
const buildForOfArray = (0, _core().template)(`
for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;
`);
const buildForOfLoose = (0, _core().template)(`
for (var LOOP_OBJECT = OBJECT,
IS_ARRAY = Array.isArray(LOOP_OBJECT),
INDEX = 0,
LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {
INTERMEDIATE;
if (IS_ARRAY) {
if (INDEX >= LOOP_OBJECT.length) break;
ID = LOOP_OBJECT[INDEX++];
} else {
INDEX = LOOP_OBJECT.next();
if (INDEX.done) break;
ID = INDEX.value;
}
}
`);
const buildForOf = (0, _core().template)(`
var ITERATOR_COMPLETION = true;
var ITERATOR_HAD_ERROR_KEY = false;
var ITERATOR_ERROR_KEY = undefined;
try {
for (
var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY;
!(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done);
ITERATOR_COMPLETION = true
) {}
} catch (err) {
ITERATOR_HAD_ERROR_KEY = true;
ITERATOR_ERROR_KEY = err;
} finally {
try {
if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {
ITERATOR_KEY.return();
}
} finally {
if (ITERATOR_HAD_ERROR_KEY) {
throw ITERATOR_ERROR_KEY;
}
}
}
`);
function _ForOfStatementArray(path) {
const {
node,
scope
} = path;
const right = scope.generateUidIdentifierBasedOnNode(node.right, "arr");
const iterationKey = scope.generateUidIdentifier("i");
let loop = buildForOfArray({
BODY: node.body,
KEY: iterationKey,
NAME: right,
ARR: node.right
});
_core().types.inherits(loop, node);
_core().types.ensureBlock(loop);
const iterationValue = _core().types.memberExpression(_core().types.cloneNode(right), _core().types.cloneNode(iterationKey), true);
const left = node.left;
if (_core().types.isVariableDeclaration(left)) {
left.declarations[0].init = iterationValue;
loop.body.body.unshift(left);
} else {
loop.body.body.unshift(_core().types.expressionStatement(_core().types.assignmentExpression("=", left, iterationValue)));
}
if (path.parentPath.isLabeledStatement()) {
loop = _core().types.labeledStatement(path.parentPath.node.label, loop);
}
return [loop];
}
function replaceWithArray(path) {
if (path.parentPath.isLabeledStatement()) {
path.parentPath.replaceWithMultiple(_ForOfStatementArray(path));
} else {
path.replaceWithMultiple(_ForOfStatementArray(path));
}
}
return {
name: "transform-for-of",
visitor: {
ForOfStatement(path, state) {
const right = path.get("right");
if (right.isArrayExpression() || right.isGenericType("Array") || _core().types.isArrayTypeAnnotation(right.getTypeAnnotation())) {
replaceWithArray(path);
return;
}
const {
node
} = path;
const build = pushComputedProps(path, state);
const declar = build.declar;
const loop = build.loop;
const block = loop.body;
path.ensureBlock();
if (declar) {
block.body.push(declar);
}
block.body = block.body.concat(node.body.body);
_core().types.inherits(loop, node);
_core().types.inherits(loop.body, node.body);
if (build.replaceParent) {
path.parentPath.replaceWithMultiple(build.node);
path.remove();
} else {
path.replaceWithMultiple(build.node);
}
}
}
};
function pushComputedPropsLoose(path, file) {
const {
node,
scope,
parent
} = path;
const {
left
} = node;
let declar, id, intermediate;
if (_core().types.isIdentifier(left) || _core().types.isPattern(left) || _core().types.isMemberExpression(left)) {
id = left;
intermediate = null;
} else if (_core().types.isVariableDeclaration(left)) {
id = scope.generateUidIdentifier("ref");
declar = _core().types.variableDeclaration(left.kind, [_core().types.variableDeclarator(left.declarations[0].id, _core().types.identifier(id.name))]);
intermediate = _core().types.variableDeclaration("var", [_core().types.variableDeclarator(_core().types.identifier(id.name))]);
} else {
throw file.buildCodeFrameError(left, `Unknown node type ${left.type} in ForStatement`);
}
const iteratorKey = scope.generateUidIdentifier("iterator");
const isArrayKey = scope.generateUidIdentifier("isArray");
const loop = buildForOfLoose({
LOOP_OBJECT: iteratorKey,
IS_ARRAY: isArrayKey,
OBJECT: node.right,
INDEX: scope.generateUidIdentifier("i"),
ID: id,
INTERMEDIATE: intermediate
});
const isLabeledParent = _core().types.isLabeledStatement(parent);
let labeled;
if (isLabeledParent) {
labeled = _core().types.labeledStatement(parent.label, loop);
}
return {
replaceParent: isLabeledParent,
declar: declar,
node: labeled || loop,
loop: loop
};
}
function pushComputedPropsSpec(path, file) {
const {
node,
scope,
parent
} = path;
const left = node.left;
let declar;
const stepKey = scope.generateUid("step");
const stepValue = _core().types.memberExpression(_core().types.identifier(stepKey), _core().types.identifier("value"));
if (_core().types.isIdentifier(left) || _core().types.isPattern(left) || _core().types.isMemberExpression(left)) {
declar = _core().types.expressionStatement(_core().types.assignmentExpression("=", left, stepValue));
} else if (_core().types.isVariableDeclaration(left)) {
declar = _core().types.variableDeclaration(left.kind, [_core().types.variableDeclarator(left.declarations[0].id, stepValue)]);
} else {
throw file.buildCodeFrameError(left, `Unknown node type ${left.type} in ForStatement`);
}
const template = buildForOf({
ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
STEP_KEY: _core().types.identifier(stepKey),
OBJECT: node.right
});
const isLabeledParent = _core().types.isLabeledStatement(parent);
const tryBody = template[3].block.body;
const loop = tryBody[0];
if (isLabeledParent) {
tryBody[0] = _core().types.labeledStatement(parent.label, loop);
}
return {
replaceParent: isLabeledParent,
declar: declar,
loop: loop,
node: template
};
}
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-transform-for-of@^7.2.0",
"_id": "@babel/plugin-transform-for-of@7.4.4",
"_inBundle": false,
"_integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==",
"_location": "/@babel/plugin-transform-for-of",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-transform-for-of@^7.2.0",
"name": "@babel/plugin-transform-for-of",
"escapedName": "@babel%2fplugin-transform-for-of",
"scope": "@babel",
"rawSpec": "^7.2.0",
"saveSpec": null,
"fetchSpec": "^7.2.0"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz",
"_shasum": "0267fc735e24c808ba173866c6c4d1440fc3c556",
"_spec": "@babel/plugin-transform-for-of@^7.2.0",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bundleDependencies": false,
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0"
},
"deprecated": false,
"description": "Compile ES2015 for...of to ES5",
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba",
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-transform-for-of",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-for-of"
},
"version": "7.4.4"
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment