@azrico/webobject 1.2.31 → 1.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -52
- package/dist/index.js +0 -2
- package/dist/src/WebObjects/ParentWebObject.js +5 -29
- package/dist/src/WebObjects/WebObject.d.ts +1 -1
- package/dist/src/WebObjects/WebObject.js +284 -462
- package/dist/src/WebObjects/WebObjectManager.d.ts +1 -0
- package/dist/src/WebObjects/WebObjectManager.js +134 -209
- package/dist/src/index.js +0 -18
- package/dist/src/structs/DummyObject.js +3 -22
- package/dist/src/structs/MapableObject.js +4 -35
- package/dist/src/structs/MetaObject.js +28 -74
- package/dist/src/structs/ObjectArray.d.ts +1 -1
- package/dist/src/structs/ObjectArray.js +5 -17
- package/dist/src/structs/ObjectManager.d.ts +4 -4
- package/dist/src/structs/ObjectManager.js +152 -295
- package/dist/src/structs/SimpleObject.d.ts +10 -10
- package/dist/src/structs/SimpleObject.js +190 -414
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _SimpleObject = require("./structs/SimpleObject");
|
|
8
|
-
|
|
9
7
|
Object.keys(_SimpleObject).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _SimpleObject[key]) return;
|
|
@@ -16,9 +14,7 @@ Object.keys(_SimpleObject).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _ObjectArray = require("./structs/ObjectArray");
|
|
21
|
-
|
|
22
18
|
Object.keys(_ObjectArray).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _ObjectArray[key]) return;
|
|
@@ -29,9 +25,7 @@ Object.keys(_ObjectArray).forEach(function (key) {
|
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
|
-
|
|
33
28
|
var _MapableObject = require("./structs/MapableObject");
|
|
34
|
-
|
|
35
29
|
Object.keys(_MapableObject).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
37
31
|
if (key in exports && exports[key] === _MapableObject[key]) return;
|
|
@@ -42,9 +36,7 @@ Object.keys(_MapableObject).forEach(function (key) {
|
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
|
-
|
|
46
39
|
var _MetaObject = require("./structs/MetaObject");
|
|
47
|
-
|
|
48
40
|
Object.keys(_MetaObject).forEach(function (key) {
|
|
49
41
|
if (key === "default" || key === "__esModule") return;
|
|
50
42
|
if (key in exports && exports[key] === _MetaObject[key]) return;
|
|
@@ -55,9 +47,7 @@ Object.keys(_MetaObject).forEach(function (key) {
|
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
49
|
});
|
|
58
|
-
|
|
59
50
|
var _DummyObject = require("./structs/DummyObject");
|
|
60
|
-
|
|
61
51
|
Object.keys(_DummyObject).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
53
|
if (key in exports && exports[key] === _DummyObject[key]) return;
|
|
@@ -68,9 +58,7 @@ Object.keys(_DummyObject).forEach(function (key) {
|
|
|
68
58
|
}
|
|
69
59
|
});
|
|
70
60
|
});
|
|
71
|
-
|
|
72
61
|
var _ObjectManager = require("./structs/ObjectManager");
|
|
73
|
-
|
|
74
62
|
Object.keys(_ObjectManager).forEach(function (key) {
|
|
75
63
|
if (key === "default" || key === "__esModule") return;
|
|
76
64
|
if (key in exports && exports[key] === _ObjectManager[key]) return;
|
|
@@ -81,9 +69,7 @@ Object.keys(_ObjectManager).forEach(function (key) {
|
|
|
81
69
|
}
|
|
82
70
|
});
|
|
83
71
|
});
|
|
84
|
-
|
|
85
72
|
var _WebObjectManager = require("./WebObjects/WebObjectManager");
|
|
86
|
-
|
|
87
73
|
Object.keys(_WebObjectManager).forEach(function (key) {
|
|
88
74
|
if (key === "default" || key === "__esModule") return;
|
|
89
75
|
if (key in exports && exports[key] === _WebObjectManager[key]) return;
|
|
@@ -94,9 +80,7 @@ Object.keys(_WebObjectManager).forEach(function (key) {
|
|
|
94
80
|
}
|
|
95
81
|
});
|
|
96
82
|
});
|
|
97
|
-
|
|
98
83
|
var _WebObject = require("./WebObjects/WebObject");
|
|
99
|
-
|
|
100
84
|
Object.keys(_WebObject).forEach(function (key) {
|
|
101
85
|
if (key === "default" || key === "__esModule") return;
|
|
102
86
|
if (key in exports && exports[key] === _WebObject[key]) return;
|
|
@@ -107,9 +91,7 @@ Object.keys(_WebObject).forEach(function (key) {
|
|
|
107
91
|
}
|
|
108
92
|
});
|
|
109
93
|
});
|
|
110
|
-
|
|
111
94
|
var _ParentWebObject = require("./WebObjects/ParentWebObject");
|
|
112
|
-
|
|
113
95
|
Object.keys(_ParentWebObject).forEach(function (key) {
|
|
114
96
|
if (key === "default" || key === "__esModule") return;
|
|
115
97
|
if (key in exports && exports[key] === _ParentWebObject[key]) return;
|
|
@@ -1,54 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = exports.DummyObject = void 0;
|
|
9
|
-
|
|
10
8
|
var _SimpleObject2 = require("./SimpleObject");
|
|
11
|
-
|
|
12
|
-
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; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
-
|
|
9
|
+
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; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
-
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
|
|
18
14
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
19
|
-
|
|
20
15
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
|
-
|
|
22
16
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
-
|
|
24
17
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
|
-
|
|
26
18
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
|
-
|
|
28
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
-
|
|
30
20
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
-
|
|
32
21
|
var DummyObject = /*#__PURE__*/function (_SimpleObject) {
|
|
33
22
|
_inherits(DummyObject, _SimpleObject);
|
|
34
|
-
|
|
35
23
|
var _super = _createSuper(DummyObject);
|
|
36
|
-
|
|
37
24
|
function DummyObject(initObject) {
|
|
38
25
|
var _this;
|
|
39
|
-
|
|
40
26
|
_classCallCheck(this, DummyObject);
|
|
41
|
-
|
|
42
27
|
_this = _super.call(this, false);
|
|
43
|
-
|
|
44
28
|
_this.loadValues(initObject, true);
|
|
45
|
-
|
|
46
29
|
return _this;
|
|
47
30
|
}
|
|
48
|
-
|
|
49
31
|
return _createClass(DummyObject);
|
|
50
32
|
}(_SimpleObject2.SimpleObject);
|
|
51
|
-
|
|
52
33
|
exports.DummyObject = DummyObject;
|
|
53
34
|
var _default = DummyObject;
|
|
54
35
|
exports["default"] = _default;
|
|
@@ -4,55 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.MapableObject = void 0;
|
|
7
|
-
|
|
8
7
|
var _ObjectArray = _interopRequireDefault(require("./ObjectArray"));
|
|
9
|
-
|
|
10
8
|
var _object = require("@azrico/object");
|
|
11
|
-
|
|
12
9
|
var _string = require("@azrico/string");
|
|
13
|
-
|
|
14
10
|
var _uid = require("@azrico/uid");
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
12
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
19
|
-
|
|
20
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
|
|
22
|
-
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; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
-
|
|
14
|
+
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; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
24
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
28
19
|
/**
|
|
29
20
|
* This object can be mapped and converted
|
|
30
21
|
*/
|
|
31
22
|
var MapableObject = /*#__PURE__*/function () {
|
|
32
23
|
function MapableObject() {
|
|
33
24
|
_classCallCheck(this, MapableObject);
|
|
34
|
-
|
|
35
25
|
_defineProperty(this, "__uid", void 0);
|
|
36
|
-
|
|
37
26
|
_defineProperty(this, "__data_id", void 0);
|
|
38
|
-
|
|
39
27
|
_defineProperty(this, "__table_id", void 0);
|
|
40
|
-
|
|
41
28
|
_defineProperty(this, "__parent__table_id", void 0);
|
|
42
|
-
|
|
43
29
|
_defineProperty(this, "__row_number", void 0);
|
|
44
|
-
|
|
45
30
|
this.__uid = _uid.uid.localuid();
|
|
46
31
|
this.__table_id = this.__uid;
|
|
47
32
|
}
|
|
48
|
-
|
|
49
33
|
_createClass(MapableObject, [{
|
|
50
34
|
key: "getUID",
|
|
51
35
|
value: function getUID() {
|
|
52
36
|
return MapableObject.getUID(this);
|
|
53
37
|
}
|
|
54
38
|
/* -------------------------------------------------------------------------- */
|
|
55
|
-
|
|
56
39
|
}], [{
|
|
57
40
|
key: "getUID",
|
|
58
41
|
value: function getUID(o) {
|
|
@@ -62,27 +45,21 @@ var MapableObject = /*#__PURE__*/function () {
|
|
|
62
45
|
key: "mapto",
|
|
63
46
|
value: function mapto(maptoType, objectlist) {
|
|
64
47
|
var _this = this;
|
|
65
|
-
|
|
66
48
|
var is_readonly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
67
|
-
|
|
68
49
|
for (var _len = arguments.length, p = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
69
50
|
p[_key - 3] = arguments[_key];
|
|
70
51
|
}
|
|
71
|
-
|
|
72
52
|
if (objectlist === undefined) {
|
|
73
53
|
if (maptoType === undefined) return [];
|
|
74
54
|
if (maptoType instanceof Object) return [];
|
|
75
55
|
objectlist = maptoType;
|
|
76
56
|
maptoType = this;
|
|
77
57
|
}
|
|
78
|
-
|
|
79
58
|
if (objectlist == null) return [];
|
|
80
59
|
if (objectlist instanceof _ObjectArray["default"]) objectlist = objectlist.getObjects();
|
|
81
|
-
|
|
82
60
|
if (!Array.isArray(objectlist)) {
|
|
83
61
|
objectlist = [objectlist];
|
|
84
62
|
}
|
|
85
|
-
|
|
86
63
|
return objectlist.map(function (r) {
|
|
87
64
|
return _this.ensure.apply(_this, [maptoType, r, is_readonly].concat(p));
|
|
88
65
|
});
|
|
@@ -94,20 +71,16 @@ var MapableObject = /*#__PURE__*/function () {
|
|
|
94
71
|
object = maptoType;
|
|
95
72
|
maptoType = this;
|
|
96
73
|
}
|
|
97
|
-
|
|
98
74
|
for (var _len2 = arguments.length, p = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
|
|
99
75
|
p[_key2 - 3] = arguments[_key2];
|
|
100
76
|
}
|
|
101
|
-
|
|
102
77
|
return _object.object_ensure.apply(void 0, [maptoType, object, is_readonly].concat(p));
|
|
103
78
|
}
|
|
104
79
|
/* -------------------------------------------------------------------------- */
|
|
105
|
-
|
|
106
80
|
}, {
|
|
107
81
|
key: "map_rowindex",
|
|
108
82
|
value: function map_rowindex(objectlist) {
|
|
109
83
|
var _objectlist$map;
|
|
110
|
-
|
|
111
84
|
var index = 0;
|
|
112
85
|
return (_objectlist$map = objectlist === null || objectlist === void 0 ? void 0 : objectlist.map(function (r, i) {
|
|
113
86
|
r.__row_number = ++index;
|
|
@@ -118,11 +91,9 @@ var MapableObject = /*#__PURE__*/function () {
|
|
|
118
91
|
key: "map_tableid",
|
|
119
92
|
value: function map_tableid(objectlist) {
|
|
120
93
|
var _objectlist$map2;
|
|
121
|
-
|
|
122
94
|
var index = 0;
|
|
123
95
|
return (_objectlist$map2 = objectlist === null || objectlist === void 0 ? void 0 : objectlist.map(function (r, i) {
|
|
124
96
|
var _r$__uid;
|
|
125
|
-
|
|
126
97
|
r.__table_id = (_r$__uid = r.__uid) !== null && _r$__uid !== void 0 ? _r$__uid : String(++index);
|
|
127
98
|
return r;
|
|
128
99
|
})) !== null && _objectlist$map2 !== void 0 ? _objectlist$map2 : [];
|
|
@@ -137,10 +108,8 @@ var MapableObject = /*#__PURE__*/function () {
|
|
|
137
108
|
return (0, _string.string_equals_ignorecase)(a, b);
|
|
138
109
|
}
|
|
139
110
|
}]);
|
|
140
|
-
|
|
141
111
|
return MapableObject;
|
|
142
112
|
}();
|
|
143
|
-
|
|
144
113
|
exports.MapableObject = MapableObject;
|
|
145
114
|
var _default = MapableObject;
|
|
146
115
|
exports["default"] = _default;
|
|
@@ -4,61 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.MetaObject = void 0;
|
|
7
|
-
|
|
8
7
|
var _object = require("@azrico/object");
|
|
9
|
-
|
|
10
8
|
var _SimpleObject2 = _interopRequireDefault(require("./SimpleObject"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) 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 ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 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) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(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; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(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 ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15
|
-
|
|
10
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 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) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(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; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(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 ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
16
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
-
|
|
18
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
|
|
20
13
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
21
|
-
|
|
22
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
|
|
24
|
-
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; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
|
-
|
|
15
|
+
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; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
26
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
-
|
|
28
17
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
|
-
|
|
30
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
-
|
|
32
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
|
-
|
|
34
20
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
|
-
|
|
36
21
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
-
|
|
38
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
24
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
44
27
|
var MetaObject = /*#__PURE__*/function (_SimpleObject) {
|
|
45
28
|
_inherits(MetaObject, _SimpleObject);
|
|
46
|
-
|
|
47
29
|
var _super = _createSuper(MetaObject);
|
|
48
|
-
|
|
49
30
|
function MetaObject(initObject, value) {
|
|
50
31
|
var _this;
|
|
51
|
-
|
|
52
32
|
_classCallCheck(this, MetaObject);
|
|
53
|
-
|
|
54
33
|
_this = _super.call(this, false);
|
|
55
|
-
|
|
56
34
|
_defineProperty(_assertThisInitialized(_this), "id", void 0);
|
|
57
|
-
|
|
58
35
|
_defineProperty(_assertThisInitialized(_this), "key", "");
|
|
59
|
-
|
|
60
36
|
_defineProperty(_assertThisInitialized(_this), "value", void 0);
|
|
61
|
-
|
|
62
37
|
if (_typeof(initObject) === "object") {
|
|
63
38
|
_this.id = initObject.id;
|
|
64
39
|
_this.key = initObject.key;
|
|
@@ -67,38 +42,29 @@ var MetaObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
67
42
|
_this.key = initObject;
|
|
68
43
|
_this.value = value;
|
|
69
44
|
}
|
|
70
|
-
|
|
71
45
|
_this.setOriginal();
|
|
72
|
-
|
|
73
46
|
return _this;
|
|
74
47
|
}
|
|
75
|
-
|
|
76
48
|
_createClass(MetaObject, [{
|
|
77
49
|
key: "get_saveObject",
|
|
78
50
|
value: function () {
|
|
79
51
|
var _get_saveObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
80
52
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
81
|
-
while (1) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
case 3:
|
|
91
|
-
case "end":
|
|
92
|
-
return _context.stop();
|
|
93
|
-
}
|
|
53
|
+
while (1) switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
_context.next = 2;
|
|
56
|
+
return MetaObject.get_saveObject(this);
|
|
57
|
+
case 2:
|
|
58
|
+
return _context.abrupt("return", _context.sent);
|
|
59
|
+
case 3:
|
|
60
|
+
case "end":
|
|
61
|
+
return _context.stop();
|
|
94
62
|
}
|
|
95
63
|
}, _callee, this);
|
|
96
64
|
}));
|
|
97
|
-
|
|
98
65
|
function get_saveObject() {
|
|
99
66
|
return _get_saveObject.apply(this, arguments);
|
|
100
67
|
}
|
|
101
|
-
|
|
102
68
|
return get_saveObject;
|
|
103
69
|
}()
|
|
104
70
|
}, {
|
|
@@ -106,28 +72,22 @@ var MetaObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
106
72
|
value: function () {
|
|
107
73
|
var _Prepare = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
108
74
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
109
|
-
while (1) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
case 4:
|
|
120
|
-
case "end":
|
|
121
|
-
return _context2.stop();
|
|
122
|
-
}
|
|
75
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
76
|
+
case 0:
|
|
77
|
+
this.key = String(this.key);
|
|
78
|
+
_context2.next = 3;
|
|
79
|
+
return Promise.resolve(true);
|
|
80
|
+
case 3:
|
|
81
|
+
return _context2.abrupt("return", _context2.sent);
|
|
82
|
+
case 4:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context2.stop();
|
|
123
85
|
}
|
|
124
86
|
}, _callee2, this);
|
|
125
87
|
}));
|
|
126
|
-
|
|
127
88
|
function Prepare() {
|
|
128
89
|
return _Prepare.apply(this, arguments);
|
|
129
90
|
}
|
|
130
|
-
|
|
131
91
|
return Prepare;
|
|
132
92
|
}()
|
|
133
93
|
}, {
|
|
@@ -145,27 +105,21 @@ var MetaObject = /*#__PURE__*/function (_SimpleObject) {
|
|
|
145
105
|
value: function () {
|
|
146
106
|
var _get_saveObject2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(obj) {
|
|
147
107
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
148
|
-
while (1) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return _context3.stop();
|
|
153
|
-
}
|
|
108
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
109
|
+
case 0:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context3.stop();
|
|
154
112
|
}
|
|
155
113
|
}, _callee3);
|
|
156
114
|
}));
|
|
157
|
-
|
|
158
115
|
function get_saveObject(_x) {
|
|
159
116
|
return _get_saveObject2.apply(this, arguments);
|
|
160
117
|
}
|
|
161
|
-
|
|
162
118
|
return get_saveObject;
|
|
163
119
|
}()
|
|
164
120
|
}]);
|
|
165
|
-
|
|
166
121
|
return MetaObject;
|
|
167
122
|
}(_SimpleObject2["default"]);
|
|
168
|
-
|
|
169
123
|
exports.MetaObject = MetaObject;
|
|
170
124
|
var _default = MetaObject;
|
|
171
125
|
exports["default"] = _default;
|
|
@@ -4,40 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.ObjectArray = void 0;
|
|
7
|
-
|
|
7
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
-
|
|
10
|
-
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; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
11
|
-
|
|
9
|
+
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; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
14
|
var ObjectArray = /*#__PURE__*/function () {
|
|
17
15
|
/* -------------------------------------------------------------------------- */
|
|
18
|
-
|
|
19
16
|
/* Values */
|
|
20
|
-
|
|
21
17
|
/* -------------------------------------------------------------------------- */
|
|
22
18
|
|
|
23
19
|
/* -------------------------------------------------------------------------- */
|
|
24
|
-
|
|
25
20
|
/* Base */
|
|
26
|
-
|
|
27
21
|
/* -------------------------------------------------------------------------- */
|
|
28
22
|
function ObjectArray(initObject, mapto_type) {
|
|
29
23
|
_classCallCheck(this, ObjectArray);
|
|
30
|
-
|
|
31
24
|
_defineProperty(this, "objArray", []);
|
|
32
|
-
|
|
33
25
|
this.setObjects(initObject, mapto_type);
|
|
34
26
|
}
|
|
35
|
-
|
|
36
27
|
_createClass(ObjectArray, [{
|
|
37
28
|
key: "addObjects",
|
|
38
29
|
value: function addObjects(initObject, mapto_type) {
|
|
39
30
|
var _this = this;
|
|
40
|
-
|
|
41
31
|
if (initObject == null) return false;
|
|
42
32
|
var resultObjects = ObjectArray.flattenWebObjects(initObject);
|
|
43
33
|
if (mapto_type) resultObjects = resultObjects.map(function (r) {
|
|
@@ -75,10 +65,8 @@ var ObjectArray = /*#__PURE__*/function () {
|
|
|
75
65
|
} else return [inputData];
|
|
76
66
|
}
|
|
77
67
|
}]);
|
|
78
|
-
|
|
79
68
|
return ObjectArray;
|
|
80
69
|
}();
|
|
81
|
-
|
|
82
70
|
exports.ObjectArray = ObjectArray;
|
|
83
71
|
var _default = ObjectArray;
|
|
84
72
|
exports["default"] = _default;
|
|
@@ -33,9 +33,9 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
33
33
|
getSaveResult(): any;
|
|
34
34
|
getSaveResultType(): saveResultType | null;
|
|
35
35
|
setSaveResult(toObj: any, type: saveResultType): void | undefined;
|
|
36
|
-
apply_changes():
|
|
37
|
-
getValue(key: PropOf<ObjType>, original?: boolean): import("./SimpleObject").PropType<
|
|
38
|
-
get: (key: PropOf<ObjType>, original?: boolean) => import("./SimpleObject").PropType<
|
|
36
|
+
apply_changes(): boolean | undefined;
|
|
37
|
+
getValue(key: PropOf<ObjType>, original?: boolean): import("./SimpleObject").PropType<ObjType, any> | undefined;
|
|
38
|
+
get: (key: PropOf<ObjType>, original?: boolean) => import("./SimpleObject").PropType<ObjType, any> | undefined;
|
|
39
39
|
/**
|
|
40
40
|
* set value
|
|
41
41
|
* @param key
|
|
@@ -51,7 +51,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
|
|
|
51
51
|
* @return true if changed , false otherwise
|
|
52
52
|
*/
|
|
53
53
|
setSubValue(key: PropOf<ObjType>, objKey: string, subvalue: any): Promise<boolean>;
|
|
54
|
-
pushValue(key: PropOf<ObjType>, value: any): Promise<false | NonNullable<ObjType
|
|
54
|
+
pushValue(key: PropOf<ObjType>, value: any): Promise<false | NonNullable<Awaited<ObjType[any]>>>;
|
|
55
55
|
getIndexOrID(): number | string;
|
|
56
56
|
getIndex(): number;
|
|
57
57
|
getID(): string;
|