isomorfeus-redux 4.2.0 → 22.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +176 -0
- data/lib/app_state.rb +25 -0
- data/lib/isomorfeus/browser_store_api.rb +0 -16
- data/lib/isomorfeus/redux/config.rb +97 -14
- data/lib/isomorfeus/redux/handler.rb +35 -0
- data/lib/isomorfeus/redux/version.rb +5 -0
- data/lib/isomorfeus/redux_imports.rb +14 -0
- data/lib/{redux/reducers.rb → isomorfeus/redux_reducers.rb} +15 -13
- data/lib/isomorfeus-redux.rb +18 -30
- data/lib/local_store.rb +27 -30
- data/lib/redux/store.rb +156 -120
- data/lib/session_store.rb +28 -30
- metadata +24 -247
- data/lib/app_store.rb +0 -42
- data/lib/isomorfeus/core_ext/hash/deep_merge.rb +0 -34
- data/lib/isomorfeus/core_ext/kernel.rb +0 -30
- data/lib/isomorfeus/execution_environment.rb +0 -67
- data/lib/isomorfeus/redux/imports.rb +0 -17
- data/lib/redux/version.rb +0 -3
- data/lib/redux.rb +0 -118
- data/node_modules/.package-lock.json +0 -31
- data/node_modules/@babel/runtime/LICENSE +0 -22
- data/node_modules/@babel/runtime/README.md +0 -19
- data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
- data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
- data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
- data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
- data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
- data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
- data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
- data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
- data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
- data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
- data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
- data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
- data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
- data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
- data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
- data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
- data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
- data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
- data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
- data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
- data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/construct.js +0 -26
- data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
- data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
- data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
- data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
- data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
- data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
- data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
- data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
- data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
- data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
- data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
- data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
- data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
- data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
- data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
- data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
- data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
- data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
- data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
- data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
- data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
- data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
- data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
- data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
- data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
- data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
- data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
- data/node_modules/@babel/runtime/helpers/extends.js +0 -21
- data/node_modules/@babel/runtime/helpers/get.js +0 -27
- data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
- data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
- data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
- data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
- data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
- data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
- data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
- data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
- data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
- data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
- data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
- data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
- data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
- data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
- data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
- data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
- data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
- data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
- data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
- data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
- data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
- data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
- data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
- data/node_modules/@babel/runtime/helpers/set.js +0 -55
- data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
- data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
- data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
- data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
- data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
- data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
- data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
- data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
- data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
- data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
- data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
- data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
- data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
- data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
- data/node_modules/@babel/runtime/package.json +0 -848
- data/node_modules/@babel/runtime/regenerator/index.js +0 -1
- data/node_modules/redux/LICENSE.md +0 -21
- data/node_modules/redux/README.md +0 -322
- data/node_modules/redux/dist/redux.js +0 -768
- data/node_modules/redux/dist/redux.min.js +0 -1
- data/node_modules/redux/es/redux.js +0 -716
- data/node_modules/redux/es/redux.mjs +0 -1
- data/node_modules/redux/index.d.ts +0 -776
- data/node_modules/redux/lib/redux.js +0 -730
- data/node_modules/redux/package.json +0 -108
- data/node_modules/redux/src/applyMiddleware.js +0 -41
- data/node_modules/redux/src/bindActionCreators.js +0 -52
- data/node_modules/redux/src/combineReducers.js +0 -175
- data/node_modules/redux/src/compose.js +0 -22
- data/node_modules/redux/src/createStore.js +0 -347
- data/node_modules/redux/src/index.js +0 -37
- data/node_modules/redux/src/utils/actionTypes.js +0 -17
- data/node_modules/redux/src/utils/formatProdErrorMessage.js +0 -15
- data/node_modules/redux/src/utils/isPlainObject.js +0 -14
- data/node_modules/redux/src/utils/kindOf.js +0 -70
- data/node_modules/redux/src/utils/symbol-observable.js +0 -3
- data/node_modules/redux/src/utils/warning.js +0 -19
- data/node_modules/regenerator-runtime/LICENSE +0 -21
- data/node_modules/regenerator-runtime/README.md +0 -31
- data/node_modules/regenerator-runtime/package.json +0 -19
- data/node_modules/regenerator-runtime/path.js +0 -11
- data/node_modules/regenerator-runtime/runtime.js +0 -754
- data/package.json +0 -6
@@ -1,396 +0,0 @@
|
|
1
|
-
import toArray from "./toArray.js";
|
2
|
-
import toPropertyKey from "./toPropertyKey.js";
|
3
|
-
export default function _decorate(decorators, factory, superClass, mixins) {
|
4
|
-
var api = _getDecoratorsApi();
|
5
|
-
|
6
|
-
if (mixins) {
|
7
|
-
for (var i = 0; i < mixins.length; i++) {
|
8
|
-
api = mixins[i](api);
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
var r = factory(function initialize(O) {
|
13
|
-
api.initializeInstanceElements(O, decorated.elements);
|
14
|
-
}, superClass);
|
15
|
-
var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
|
16
|
-
api.initializeClassElements(r.F, decorated.elements);
|
17
|
-
return api.runClassFinishers(r.F, decorated.finishers);
|
18
|
-
}
|
19
|
-
|
20
|
-
function _getDecoratorsApi() {
|
21
|
-
_getDecoratorsApi = function _getDecoratorsApi() {
|
22
|
-
return api;
|
23
|
-
};
|
24
|
-
|
25
|
-
var api = {
|
26
|
-
elementsDefinitionOrder: [["method"], ["field"]],
|
27
|
-
initializeInstanceElements: function initializeInstanceElements(O, elements) {
|
28
|
-
["method", "field"].forEach(function (kind) {
|
29
|
-
elements.forEach(function (element) {
|
30
|
-
if (element.kind === kind && element.placement === "own") {
|
31
|
-
this.defineClassElement(O, element);
|
32
|
-
}
|
33
|
-
}, this);
|
34
|
-
}, this);
|
35
|
-
},
|
36
|
-
initializeClassElements: function initializeClassElements(F, elements) {
|
37
|
-
var proto = F.prototype;
|
38
|
-
["method", "field"].forEach(function (kind) {
|
39
|
-
elements.forEach(function (element) {
|
40
|
-
var placement = element.placement;
|
41
|
-
|
42
|
-
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
|
43
|
-
var receiver = placement === "static" ? F : proto;
|
44
|
-
this.defineClassElement(receiver, element);
|
45
|
-
}
|
46
|
-
}, this);
|
47
|
-
}, this);
|
48
|
-
},
|
49
|
-
defineClassElement: function defineClassElement(receiver, element) {
|
50
|
-
var descriptor = element.descriptor;
|
51
|
-
|
52
|
-
if (element.kind === "field") {
|
53
|
-
var initializer = element.initializer;
|
54
|
-
descriptor = {
|
55
|
-
enumerable: descriptor.enumerable,
|
56
|
-
writable: descriptor.writable,
|
57
|
-
configurable: descriptor.configurable,
|
58
|
-
value: initializer === void 0 ? void 0 : initializer.call(receiver)
|
59
|
-
};
|
60
|
-
}
|
61
|
-
|
62
|
-
Object.defineProperty(receiver, element.key, descriptor);
|
63
|
-
},
|
64
|
-
decorateClass: function decorateClass(elements, decorators) {
|
65
|
-
var newElements = [];
|
66
|
-
var finishers = [];
|
67
|
-
var placements = {
|
68
|
-
"static": [],
|
69
|
-
prototype: [],
|
70
|
-
own: []
|
71
|
-
};
|
72
|
-
elements.forEach(function (element) {
|
73
|
-
this.addElementPlacement(element, placements);
|
74
|
-
}, this);
|
75
|
-
elements.forEach(function (element) {
|
76
|
-
if (!_hasDecorators(element)) return newElements.push(element);
|
77
|
-
var elementFinishersExtras = this.decorateElement(element, placements);
|
78
|
-
newElements.push(elementFinishersExtras.element);
|
79
|
-
newElements.push.apply(newElements, elementFinishersExtras.extras);
|
80
|
-
finishers.push.apply(finishers, elementFinishersExtras.finishers);
|
81
|
-
}, this);
|
82
|
-
|
83
|
-
if (!decorators) {
|
84
|
-
return {
|
85
|
-
elements: newElements,
|
86
|
-
finishers: finishers
|
87
|
-
};
|
88
|
-
}
|
89
|
-
|
90
|
-
var result = this.decorateConstructor(newElements, decorators);
|
91
|
-
finishers.push.apply(finishers, result.finishers);
|
92
|
-
result.finishers = finishers;
|
93
|
-
return result;
|
94
|
-
},
|
95
|
-
addElementPlacement: function addElementPlacement(element, placements, silent) {
|
96
|
-
var keys = placements[element.placement];
|
97
|
-
|
98
|
-
if (!silent && keys.indexOf(element.key) !== -1) {
|
99
|
-
throw new TypeError("Duplicated element (" + element.key + ")");
|
100
|
-
}
|
101
|
-
|
102
|
-
keys.push(element.key);
|
103
|
-
},
|
104
|
-
decorateElement: function decorateElement(element, placements) {
|
105
|
-
var extras = [];
|
106
|
-
var finishers = [];
|
107
|
-
|
108
|
-
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
|
109
|
-
var keys = placements[element.placement];
|
110
|
-
keys.splice(keys.indexOf(element.key), 1);
|
111
|
-
var elementObject = this.fromElementDescriptor(element);
|
112
|
-
var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
|
113
|
-
element = elementFinisherExtras.element;
|
114
|
-
this.addElementPlacement(element, placements);
|
115
|
-
|
116
|
-
if (elementFinisherExtras.finisher) {
|
117
|
-
finishers.push(elementFinisherExtras.finisher);
|
118
|
-
}
|
119
|
-
|
120
|
-
var newExtras = elementFinisherExtras.extras;
|
121
|
-
|
122
|
-
if (newExtras) {
|
123
|
-
for (var j = 0; j < newExtras.length; j++) {
|
124
|
-
this.addElementPlacement(newExtras[j], placements);
|
125
|
-
}
|
126
|
-
|
127
|
-
extras.push.apply(extras, newExtras);
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
return {
|
132
|
-
element: element,
|
133
|
-
finishers: finishers,
|
134
|
-
extras: extras
|
135
|
-
};
|
136
|
-
},
|
137
|
-
decorateConstructor: function decorateConstructor(elements, decorators) {
|
138
|
-
var finishers = [];
|
139
|
-
|
140
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
141
|
-
var obj = this.fromClassDescriptor(elements);
|
142
|
-
var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
|
143
|
-
|
144
|
-
if (elementsAndFinisher.finisher !== undefined) {
|
145
|
-
finishers.push(elementsAndFinisher.finisher);
|
146
|
-
}
|
147
|
-
|
148
|
-
if (elementsAndFinisher.elements !== undefined) {
|
149
|
-
elements = elementsAndFinisher.elements;
|
150
|
-
|
151
|
-
for (var j = 0; j < elements.length - 1; j++) {
|
152
|
-
for (var k = j + 1; k < elements.length; k++) {
|
153
|
-
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
|
154
|
-
throw new TypeError("Duplicated element (" + elements[j].key + ")");
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}
|
158
|
-
}
|
159
|
-
}
|
160
|
-
|
161
|
-
return {
|
162
|
-
elements: elements,
|
163
|
-
finishers: finishers
|
164
|
-
};
|
165
|
-
},
|
166
|
-
fromElementDescriptor: function fromElementDescriptor(element) {
|
167
|
-
var obj = {
|
168
|
-
kind: element.kind,
|
169
|
-
key: element.key,
|
170
|
-
placement: element.placement,
|
171
|
-
descriptor: element.descriptor
|
172
|
-
};
|
173
|
-
var desc = {
|
174
|
-
value: "Descriptor",
|
175
|
-
configurable: true
|
176
|
-
};
|
177
|
-
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
178
|
-
if (element.kind === "field") obj.initializer = element.initializer;
|
179
|
-
return obj;
|
180
|
-
},
|
181
|
-
toElementDescriptors: function toElementDescriptors(elementObjects) {
|
182
|
-
if (elementObjects === undefined) return;
|
183
|
-
return toArray(elementObjects).map(function (elementObject) {
|
184
|
-
var element = this.toElementDescriptor(elementObject);
|
185
|
-
this.disallowProperty(elementObject, "finisher", "An element descriptor");
|
186
|
-
this.disallowProperty(elementObject, "extras", "An element descriptor");
|
187
|
-
return element;
|
188
|
-
}, this);
|
189
|
-
},
|
190
|
-
toElementDescriptor: function toElementDescriptor(elementObject) {
|
191
|
-
var kind = String(elementObject.kind);
|
192
|
-
|
193
|
-
if (kind !== "method" && kind !== "field") {
|
194
|
-
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
|
195
|
-
}
|
196
|
-
|
197
|
-
var key = toPropertyKey(elementObject.key);
|
198
|
-
var placement = String(elementObject.placement);
|
199
|
-
|
200
|
-
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
|
201
|
-
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
|
202
|
-
}
|
203
|
-
|
204
|
-
var descriptor = elementObject.descriptor;
|
205
|
-
this.disallowProperty(elementObject, "elements", "An element descriptor");
|
206
|
-
var element = {
|
207
|
-
kind: kind,
|
208
|
-
key: key,
|
209
|
-
placement: placement,
|
210
|
-
descriptor: Object.assign({}, descriptor)
|
211
|
-
};
|
212
|
-
|
213
|
-
if (kind !== "field") {
|
214
|
-
this.disallowProperty(elementObject, "initializer", "A method descriptor");
|
215
|
-
} else {
|
216
|
-
this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
|
217
|
-
this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
|
218
|
-
this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
|
219
|
-
element.initializer = elementObject.initializer;
|
220
|
-
}
|
221
|
-
|
222
|
-
return element;
|
223
|
-
},
|
224
|
-
toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
|
225
|
-
var element = this.toElementDescriptor(elementObject);
|
226
|
-
|
227
|
-
var finisher = _optionalCallableProperty(elementObject, "finisher");
|
228
|
-
|
229
|
-
var extras = this.toElementDescriptors(elementObject.extras);
|
230
|
-
return {
|
231
|
-
element: element,
|
232
|
-
finisher: finisher,
|
233
|
-
extras: extras
|
234
|
-
};
|
235
|
-
},
|
236
|
-
fromClassDescriptor: function fromClassDescriptor(elements) {
|
237
|
-
var obj = {
|
238
|
-
kind: "class",
|
239
|
-
elements: elements.map(this.fromElementDescriptor, this)
|
240
|
-
};
|
241
|
-
var desc = {
|
242
|
-
value: "Descriptor",
|
243
|
-
configurable: true
|
244
|
-
};
|
245
|
-
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
246
|
-
return obj;
|
247
|
-
},
|
248
|
-
toClassDescriptor: function toClassDescriptor(obj) {
|
249
|
-
var kind = String(obj.kind);
|
250
|
-
|
251
|
-
if (kind !== "class") {
|
252
|
-
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
|
253
|
-
}
|
254
|
-
|
255
|
-
this.disallowProperty(obj, "key", "A class descriptor");
|
256
|
-
this.disallowProperty(obj, "placement", "A class descriptor");
|
257
|
-
this.disallowProperty(obj, "descriptor", "A class descriptor");
|
258
|
-
this.disallowProperty(obj, "initializer", "A class descriptor");
|
259
|
-
this.disallowProperty(obj, "extras", "A class descriptor");
|
260
|
-
|
261
|
-
var finisher = _optionalCallableProperty(obj, "finisher");
|
262
|
-
|
263
|
-
var elements = this.toElementDescriptors(obj.elements);
|
264
|
-
return {
|
265
|
-
elements: elements,
|
266
|
-
finisher: finisher
|
267
|
-
};
|
268
|
-
},
|
269
|
-
runClassFinishers: function runClassFinishers(constructor, finishers) {
|
270
|
-
for (var i = 0; i < finishers.length; i++) {
|
271
|
-
var newConstructor = (0, finishers[i])(constructor);
|
272
|
-
|
273
|
-
if (newConstructor !== undefined) {
|
274
|
-
if (typeof newConstructor !== "function") {
|
275
|
-
throw new TypeError("Finishers must return a constructor.");
|
276
|
-
}
|
277
|
-
|
278
|
-
constructor = newConstructor;
|
279
|
-
}
|
280
|
-
}
|
281
|
-
|
282
|
-
return constructor;
|
283
|
-
},
|
284
|
-
disallowProperty: function disallowProperty(obj, name, objectType) {
|
285
|
-
if (obj[name] !== undefined) {
|
286
|
-
throw new TypeError(objectType + " can't have a ." + name + " property.");
|
287
|
-
}
|
288
|
-
}
|
289
|
-
};
|
290
|
-
return api;
|
291
|
-
}
|
292
|
-
|
293
|
-
function _createElementDescriptor(def) {
|
294
|
-
var key = toPropertyKey(def.key);
|
295
|
-
var descriptor;
|
296
|
-
|
297
|
-
if (def.kind === "method") {
|
298
|
-
descriptor = {
|
299
|
-
value: def.value,
|
300
|
-
writable: true,
|
301
|
-
configurable: true,
|
302
|
-
enumerable: false
|
303
|
-
};
|
304
|
-
} else if (def.kind === "get") {
|
305
|
-
descriptor = {
|
306
|
-
get: def.value,
|
307
|
-
configurable: true,
|
308
|
-
enumerable: false
|
309
|
-
};
|
310
|
-
} else if (def.kind === "set") {
|
311
|
-
descriptor = {
|
312
|
-
set: def.value,
|
313
|
-
configurable: true,
|
314
|
-
enumerable: false
|
315
|
-
};
|
316
|
-
} else if (def.kind === "field") {
|
317
|
-
descriptor = {
|
318
|
-
configurable: true,
|
319
|
-
writable: true,
|
320
|
-
enumerable: true
|
321
|
-
};
|
322
|
-
}
|
323
|
-
|
324
|
-
var element = {
|
325
|
-
kind: def.kind === "field" ? "field" : "method",
|
326
|
-
key: key,
|
327
|
-
placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype",
|
328
|
-
descriptor: descriptor
|
329
|
-
};
|
330
|
-
if (def.decorators) element.decorators = def.decorators;
|
331
|
-
if (def.kind === "field") element.initializer = def.value;
|
332
|
-
return element;
|
333
|
-
}
|
334
|
-
|
335
|
-
function _coalesceGetterSetter(element, other) {
|
336
|
-
if (element.descriptor.get !== undefined) {
|
337
|
-
other.descriptor.get = element.descriptor.get;
|
338
|
-
} else {
|
339
|
-
other.descriptor.set = element.descriptor.set;
|
340
|
-
}
|
341
|
-
}
|
342
|
-
|
343
|
-
function _coalesceClassElements(elements) {
|
344
|
-
var newElements = [];
|
345
|
-
|
346
|
-
var isSameElement = function isSameElement(other) {
|
347
|
-
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
|
348
|
-
};
|
349
|
-
|
350
|
-
for (var i = 0; i < elements.length; i++) {
|
351
|
-
var element = elements[i];
|
352
|
-
var other;
|
353
|
-
|
354
|
-
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
|
355
|
-
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
|
356
|
-
if (_hasDecorators(element) || _hasDecorators(other)) {
|
357
|
-
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
|
358
|
-
}
|
359
|
-
|
360
|
-
other.descriptor = element.descriptor;
|
361
|
-
} else {
|
362
|
-
if (_hasDecorators(element)) {
|
363
|
-
if (_hasDecorators(other)) {
|
364
|
-
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
|
365
|
-
}
|
366
|
-
|
367
|
-
other.decorators = element.decorators;
|
368
|
-
}
|
369
|
-
|
370
|
-
_coalesceGetterSetter(element, other);
|
371
|
-
}
|
372
|
-
} else {
|
373
|
-
newElements.push(element);
|
374
|
-
}
|
375
|
-
}
|
376
|
-
|
377
|
-
return newElements;
|
378
|
-
}
|
379
|
-
|
380
|
-
function _hasDecorators(element) {
|
381
|
-
return element.decorators && element.decorators.length;
|
382
|
-
}
|
383
|
-
|
384
|
-
function _isDataDescriptor(desc) {
|
385
|
-
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
|
386
|
-
}
|
387
|
-
|
388
|
-
function _optionalCallableProperty(obj, name) {
|
389
|
-
var value = obj[name];
|
390
|
-
|
391
|
-
if (value !== undefined && typeof value !== "function") {
|
392
|
-
throw new TypeError("Expected '" + name + "' to be a function");
|
393
|
-
}
|
394
|
-
|
395
|
-
return value;
|
396
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export default function _defaults(obj, defaults) {
|
2
|
-
var keys = Object.getOwnPropertyNames(defaults);
|
3
|
-
|
4
|
-
for (var i = 0; i < keys.length; i++) {
|
5
|
-
var key = keys[i];
|
6
|
-
var value = Object.getOwnPropertyDescriptor(defaults, key);
|
7
|
-
|
8
|
-
if (value && value.configurable && obj[key] === undefined) {
|
9
|
-
Object.defineProperty(obj, key, value);
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
return obj;
|
14
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
export default function _defineEnumerableProperties(obj, descs) {
|
2
|
-
for (var key in descs) {
|
3
|
-
var desc = descs[key];
|
4
|
-
desc.configurable = desc.enumerable = true;
|
5
|
-
if ("value" in desc) desc.writable = true;
|
6
|
-
Object.defineProperty(obj, key, desc);
|
7
|
-
}
|
8
|
-
|
9
|
-
if (Object.getOwnPropertySymbols) {
|
10
|
-
var objectSymbols = Object.getOwnPropertySymbols(descs);
|
11
|
-
|
12
|
-
for (var i = 0; i < objectSymbols.length; i++) {
|
13
|
-
var sym = objectSymbols[i];
|
14
|
-
var desc = descs[sym];
|
15
|
-
desc.configurable = desc.enumerable = true;
|
16
|
-
if ("value" in desc) desc.writable = true;
|
17
|
-
Object.defineProperty(obj, sym, desc);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
return obj;
|
22
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export default function _defineProperty(obj, key, value) {
|
2
|
-
if (key in obj) {
|
3
|
-
Object.defineProperty(obj, key, {
|
4
|
-
value: value,
|
5
|
-
enumerable: true,
|
6
|
-
configurable: true,
|
7
|
-
writable: true
|
8
|
-
});
|
9
|
-
} else {
|
10
|
-
obj[key] = value;
|
11
|
-
}
|
12
|
-
|
13
|
-
return obj;
|
14
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
export default function _extends() {
|
2
|
-
_extends = Object.assign || function (target) {
|
3
|
-
for (var i = 1; i < arguments.length; i++) {
|
4
|
-
var source = arguments[i];
|
5
|
-
|
6
|
-
for (var key in source) {
|
7
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
8
|
-
target[key] = source[key];
|
9
|
-
}
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
return target;
|
14
|
-
};
|
15
|
-
|
16
|
-
return _extends.apply(this, arguments);
|
17
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import superPropBase from "./superPropBase.js";
|
2
|
-
export default function _get(target, property, receiver) {
|
3
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
4
|
-
_get = Reflect.get;
|
5
|
-
} else {
|
6
|
-
_get = function _get(target, property, receiver) {
|
7
|
-
var base = superPropBase(target, property);
|
8
|
-
if (!base) return;
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
10
|
-
|
11
|
-
if (desc.get) {
|
12
|
-
return desc.get.call(receiver);
|
13
|
-
}
|
14
|
-
|
15
|
-
return desc.value;
|
16
|
-
};
|
17
|
-
}
|
18
|
-
|
19
|
-
return _get(target, property, receiver || target);
|
20
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import setPrototypeOf from "./setPrototypeOf.js";
|
2
|
-
export default function _inherits(subClass, superClass) {
|
3
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
4
|
-
throw new TypeError("Super expression must either be null or a function");
|
5
|
-
}
|
6
|
-
|
7
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
8
|
-
constructor: {
|
9
|
-
value: subClass,
|
10
|
-
writable: true,
|
11
|
-
configurable: true
|
12
|
-
}
|
13
|
-
});
|
14
|
-
if (superClass) setPrototypeOf(subClass, superClass);
|
15
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
export default function _initializerDefineProperty(target, property, descriptor, context) {
|
2
|
-
if (!descriptor) return;
|
3
|
-
Object.defineProperty(target, property, {
|
4
|
-
enumerable: descriptor.enumerable,
|
5
|
-
configurable: descriptor.configurable,
|
6
|
-
writable: descriptor.writable,
|
7
|
-
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
8
|
-
});
|
9
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
2
|
-
|
3
|
-
function _getRequireWildcardCache(nodeInterop) {
|
4
|
-
if (typeof WeakMap !== "function") return null;
|
5
|
-
var cacheBabelInterop = new WeakMap();
|
6
|
-
var cacheNodeInterop = new WeakMap();
|
7
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
8
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
9
|
-
})(nodeInterop);
|
10
|
-
}
|
11
|
-
|
12
|
-
export default function _interopRequireWildcard(obj, nodeInterop) {
|
13
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
14
|
-
return obj;
|
15
|
-
}
|
16
|
-
|
17
|
-
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
18
|
-
return {
|
19
|
-
"default": obj
|
20
|
-
};
|
21
|
-
}
|
22
|
-
|
23
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
24
|
-
|
25
|
-
if (cache && cache.has(obj)) {
|
26
|
-
return cache.get(obj);
|
27
|
-
}
|
28
|
-
|
29
|
-
var newObj = {};
|
30
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
31
|
-
|
32
|
-
for (var key in obj) {
|
33
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
34
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
35
|
-
|
36
|
-
if (desc && (desc.get || desc.set)) {
|
37
|
-
Object.defineProperty(newObj, key, desc);
|
38
|
-
} else {
|
39
|
-
newObj[key] = obj[key];
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
newObj["default"] = obj;
|
45
|
-
|
46
|
-
if (cache) {
|
47
|
-
cache.set(obj, newObj);
|
48
|
-
}
|
49
|
-
|
50
|
-
return newObj;
|
51
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export default function _isNativeReflectConstruct() {
|
2
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
3
|
-
if (Reflect.construct.sham) return false;
|
4
|
-
if (typeof Proxy === "function") return true;
|
5
|
-
|
6
|
-
try {
|
7
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
8
|
-
return true;
|
9
|
-
} catch (e) {
|
10
|
-
return false;
|
11
|
-
}
|
12
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
export default function _iterableToArrayLimit(arr, i) {
|
2
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
3
|
-
|
4
|
-
if (_i == null) return;
|
5
|
-
var _arr = [];
|
6
|
-
var _n = true;
|
7
|
-
var _d = false;
|
8
|
-
|
9
|
-
var _s, _e;
|
10
|
-
|
11
|
-
try {
|
12
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
13
|
-
_arr.push(_s.value);
|
14
|
-
|
15
|
-
if (i && _arr.length === i) break;
|
16
|
-
}
|
17
|
-
} catch (err) {
|
18
|
-
_d = true;
|
19
|
-
_e = err;
|
20
|
-
} finally {
|
21
|
-
try {
|
22
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
23
|
-
} finally {
|
24
|
-
if (_d) throw _e;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
return _arr;
|
29
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export default function _iterableToArrayLimitLoose(arr, i) {
|
2
|
-
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
3
|
-
|
4
|
-
if (_i == null) return;
|
5
|
-
var _arr = [];
|
6
|
-
|
7
|
-
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
|
8
|
-
_arr.push(_step.value);
|
9
|
-
|
10
|
-
if (i && _arr.length === i) break;
|
11
|
-
}
|
12
|
-
|
13
|
-
return _arr;
|
14
|
-
}
|