@visactor/vrender-core 0.17.0-alpha.2 → 0.17.0-alpha.3
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/cjs/common/Reflect-metadata.js +349 -358
- package/cjs/common/Reflect-metadata.js.map +1 -1
- package/cjs/core/stage.js +5 -5
- package/cjs/core/stage.js.map +1 -1
- package/cjs/event/event-manager.js +3 -2
- package/cjs/event/event-manager.js.map +1 -1
- package/cjs/render/contributions/render/area-render.d.ts +1 -0
- package/cjs/render/contributions/render/area-render.js +42 -5
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.js +4 -10
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/module.js +7 -7
- package/cjs/render/contributions/render/module.js.map +1 -1
- package/dist/index.js +109 -62
- package/dist/index.min.js +1 -1
- package/es/common/Reflect-metadata.js +349 -358
- package/es/common/Reflect-metadata.js.map +1 -1
- package/es/core/stage.js +4 -1
- package/es/core/stage.js.map +1 -1
- package/es/event/event-manager.js +3 -2
- package/es/event/event-manager.js.map +1 -1
- package/es/render/contributions/render/area-render.d.ts +1 -0
- package/es/render/contributions/render/area-render.js +42 -5
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.js +2 -14
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/module.js +21 -17
- package/es/render/contributions/render/module.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,391 +1,382 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
let Reflect;
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: !0
|
|
7
5
|
}), exports.default = function(Reflect) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} : function() {
|
|
32
|
-
return MakeDictionary({});
|
|
33
|
-
},
|
|
34
|
-
has: downLevel ? function(map, key) {
|
|
35
|
-
return hasOwn.call(map, key);
|
|
36
|
-
} : function(map, key) {
|
|
37
|
-
return key in map;
|
|
38
|
-
},
|
|
39
|
-
get: downLevel ? function(map, key) {
|
|
40
|
-
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
41
|
-
} : function(map, key) {
|
|
42
|
-
return map[key];
|
|
43
|
-
}
|
|
44
|
-
}, functionPrototype = Object.getPrototypeOf(Function), usePolyfill = "object" == typeof process && process.env && "true" === process.env.REFLECT_METADATA_USE_MAP_POLYFILL, _Map = usePolyfill || "function" != typeof Map || "function" != typeof Map.prototype.entries ? CreateMapPolyfill() : Map, Metadata = (usePolyfill || "function" != typeof Set || "function" != typeof Set.prototype.entries ? CreateSetPolyfill() : Set,
|
|
45
|
-
new (usePolyfill || "function" != typeof WeakMap ? CreateWeakMapPolyfill() : WeakMap));
|
|
46
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
47
|
-
if (!IsObject(target)) throw new TypeError;
|
|
48
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
49
|
-
}
|
|
50
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
51
|
-
if (!IsObject(target)) throw new TypeError;
|
|
52
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
53
|
-
}
|
|
54
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
55
|
-
if (!IsObject(target)) throw new TypeError;
|
|
56
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
57
|
-
}
|
|
58
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
59
|
-
if (!IsObject(target)) throw new TypeError;
|
|
60
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
61
|
-
}
|
|
62
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
63
|
-
let targetMetadata = Metadata.get(O);
|
|
64
|
-
if (IsUndefined(targetMetadata)) {
|
|
65
|
-
if (!Create) return;
|
|
66
|
-
targetMetadata = new _Map, Metadata.set(O, targetMetadata);
|
|
67
|
-
}
|
|
68
|
-
let metadataMap = targetMetadata.get(P);
|
|
69
|
-
if (IsUndefined(metadataMap)) {
|
|
70
|
-
if (!Create) return;
|
|
71
|
-
metadataMap = new _Map, targetMetadata.set(P, metadataMap);
|
|
72
|
-
}
|
|
73
|
-
return metadataMap;
|
|
74
|
-
}
|
|
75
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
76
|
-
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
|
|
77
|
-
const parent = OrdinaryGetPrototypeOf(O);
|
|
78
|
-
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
79
|
-
}
|
|
80
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
81
|
-
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
82
|
-
return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
|
|
6
|
+
var target, previous;
|
|
7
|
+
return function(exporter) {
|
|
8
|
+
const hasOwn = Object.prototype.hasOwnProperty, supportsSymbol = "function" == typeof Symbol, toPrimitiveSymbol = supportsSymbol && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", iteratorSymbol = supportsSymbol && void 0 !== Symbol.iterator ? Symbol.iterator : "@@iterator", supportsCreate = "function" == typeof Object.create, supportsProto = {
|
|
9
|
+
__proto__: []
|
|
10
|
+
} instanceof Array, downLevel = !supportsCreate && !supportsProto, HashMap = {
|
|
11
|
+
create: supportsCreate ? function() {
|
|
12
|
+
return MakeDictionary(Object.create(null));
|
|
13
|
+
} : supportsProto ? function() {
|
|
14
|
+
return MakeDictionary({
|
|
15
|
+
__proto__: null
|
|
16
|
+
});
|
|
17
|
+
} : function() {
|
|
18
|
+
return MakeDictionary({});
|
|
19
|
+
},
|
|
20
|
+
has: downLevel ? function(map, key) {
|
|
21
|
+
return hasOwn.call(map, key);
|
|
22
|
+
} : function(map, key) {
|
|
23
|
+
return key in map;
|
|
24
|
+
},
|
|
25
|
+
get: downLevel ? function(map, key) {
|
|
26
|
+
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
27
|
+
} : function(map, key) {
|
|
28
|
+
return map[key];
|
|
83
29
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
30
|
+
}, functionPrototype = Object.getPrototypeOf(Function), usePolyfill = "object" == typeof process && process.env && "true" === process.env.REFLECT_METADATA_USE_MAP_POLYFILL, _Map = usePolyfill || "function" != typeof Map || "function" != typeof Map.prototype.entries ? CreateMapPolyfill() : Map, Metadata = (usePolyfill || "function" != typeof Set || "function" != typeof Set.prototype.entries ? CreateSetPolyfill() : Set,
|
|
31
|
+
new (usePolyfill || "function" != typeof WeakMap ? CreateWeakMapPolyfill() : WeakMap));
|
|
32
|
+
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
33
|
+
if (!IsObject(target)) throw new TypeError;
|
|
34
|
+
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
35
|
+
}
|
|
36
|
+
function hasMetadata(metadataKey, target, propertyKey) {
|
|
37
|
+
if (!IsObject(target)) throw new TypeError;
|
|
38
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
39
|
+
}
|
|
40
|
+
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
41
|
+
if (!IsObject(target)) throw new TypeError;
|
|
42
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
43
|
+
}
|
|
44
|
+
function getMetadata(metadataKey, target, propertyKey) {
|
|
45
|
+
if (!IsObject(target)) throw new TypeError;
|
|
46
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
47
|
+
}
|
|
48
|
+
function GetOrCreateMetadataMap(O, P, Create) {
|
|
49
|
+
let targetMetadata = Metadata.get(O);
|
|
50
|
+
if (IsUndefined(targetMetadata)) {
|
|
51
|
+
if (!Create) return;
|
|
52
|
+
targetMetadata = new _Map, Metadata.set(O, targetMetadata);
|
|
92
53
|
}
|
|
93
|
-
|
|
94
|
-
|
|
54
|
+
let metadataMap = targetMetadata.get(P);
|
|
55
|
+
if (IsUndefined(metadataMap)) {
|
|
56
|
+
if (!Create) return;
|
|
57
|
+
metadataMap = new _Map, targetMetadata.set(P, metadataMap);
|
|
95
58
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
59
|
+
return metadataMap;
|
|
60
|
+
}
|
|
61
|
+
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
62
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
|
|
63
|
+
const parent = OrdinaryGetPrototypeOf(O);
|
|
64
|
+
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
65
|
+
}
|
|
66
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
67
|
+
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
68
|
+
return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
|
|
69
|
+
}
|
|
70
|
+
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
71
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
72
|
+
const parent = OrdinaryGetPrototypeOf(O);
|
|
73
|
+
return IsNull(parent) ? void 0 : OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
74
|
+
}
|
|
75
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
76
|
+
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
77
|
+
if (!IsUndefined(metadataMap)) return metadataMap.get(MetadataKey);
|
|
78
|
+
}
|
|
79
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
80
|
+
GetOrCreateMetadataMap(O, P, !0).set(MetadataKey, MetadataValue);
|
|
81
|
+
}
|
|
82
|
+
function Type(x) {
|
|
83
|
+
if (null === x) return 1;
|
|
84
|
+
switch (typeof x) {
|
|
85
|
+
case "undefined":
|
|
86
|
+
return 0;
|
|
101
87
|
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
case "boolean":
|
|
89
|
+
return 2;
|
|
104
90
|
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
case "string":
|
|
92
|
+
return 3;
|
|
107
93
|
|
|
108
|
-
|
|
109
|
-
|
|
94
|
+
case "symbol":
|
|
95
|
+
return 4;
|
|
110
96
|
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
case "number":
|
|
98
|
+
return 5;
|
|
113
99
|
|
|
114
|
-
|
|
115
|
-
|
|
100
|
+
case "object":
|
|
101
|
+
return null === x ? 1 : 6;
|
|
116
102
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function IsUndefined(x) {
|
|
122
|
-
return void 0 === x;
|
|
103
|
+
default:
|
|
104
|
+
return 6;
|
|
123
105
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
106
|
+
}
|
|
107
|
+
function IsUndefined(x) {
|
|
108
|
+
return void 0 === x;
|
|
109
|
+
}
|
|
110
|
+
function IsNull(x) {
|
|
111
|
+
return null === x;
|
|
112
|
+
}
|
|
113
|
+
function IsSymbol(x) {
|
|
114
|
+
return "symbol" == typeof x;
|
|
115
|
+
}
|
|
116
|
+
function IsObject(x) {
|
|
117
|
+
return "object" == typeof x ? null !== x : "function" == typeof x;
|
|
118
|
+
}
|
|
119
|
+
function ToPrimitive(input, PreferredType) {
|
|
120
|
+
switch (Type(input)) {
|
|
121
|
+
case 0:
|
|
122
|
+
case 1:
|
|
123
|
+
case 2:
|
|
124
|
+
case 3:
|
|
125
|
+
case 4:
|
|
126
|
+
case 5:
|
|
127
|
+
return input;
|
|
129
128
|
}
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
const hint = 3 === PreferredType ? "string" : 5 === PreferredType ? "number" : "default", exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
130
|
+
if (void 0 !== exoticToPrim) {
|
|
131
|
+
const result = exoticToPrim.call(input, hint);
|
|
132
|
+
if (IsObject(result)) throw new TypeError;
|
|
133
|
+
return result;
|
|
132
134
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return input;
|
|
135
|
+
return OrdinaryToPrimitive(input, "default" === hint ? "number" : hint);
|
|
136
|
+
}
|
|
137
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
138
|
+
if ("string" === hint) {
|
|
139
|
+
const toString_1 = O.toString;
|
|
140
|
+
if (IsCallable(toString_1)) {
|
|
141
|
+
const result = toString_1.call(O);
|
|
142
|
+
if (!IsObject(result)) return result;
|
|
142
143
|
}
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
const result =
|
|
146
|
-
if (IsObject(result))
|
|
147
|
-
return result;
|
|
144
|
+
const valueOf = O.valueOf;
|
|
145
|
+
if (IsCallable(valueOf)) {
|
|
146
|
+
const result = valueOf.call(O);
|
|
147
|
+
if (!IsObject(result)) return result;
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (IsCallable(toString_1)) {
|
|
155
|
-
const result = toString_1.call(O);
|
|
156
|
-
if (!IsObject(result)) return result;
|
|
157
|
-
}
|
|
158
|
-
const valueOf = O.valueOf;
|
|
159
|
-
if (IsCallable(valueOf)) {
|
|
160
|
-
const result = valueOf.call(O);
|
|
161
|
-
if (!IsObject(result)) return result;
|
|
162
|
-
}
|
|
163
|
-
} else {
|
|
164
|
-
const valueOf = O.valueOf;
|
|
165
|
-
if (IsCallable(valueOf)) {
|
|
166
|
-
const result = valueOf.call(O);
|
|
167
|
-
if (!IsObject(result)) return result;
|
|
168
|
-
}
|
|
169
|
-
const toString_2 = O.toString;
|
|
170
|
-
if (IsCallable(toString_2)) {
|
|
171
|
-
const result = toString_2.call(O);
|
|
172
|
-
if (!IsObject(result)) return result;
|
|
173
|
-
}
|
|
149
|
+
} else {
|
|
150
|
+
const valueOf = O.valueOf;
|
|
151
|
+
if (IsCallable(valueOf)) {
|
|
152
|
+
const result = valueOf.call(O);
|
|
153
|
+
if (!IsObject(result)) return result;
|
|
174
154
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
function ToString(argument) {
|
|
181
|
-
return "" + argument;
|
|
182
|
-
}
|
|
183
|
-
function ToPropertyKey(argument) {
|
|
184
|
-
const key = ToPrimitive(argument, 3);
|
|
185
|
-
return IsSymbol(key) ? key : ToString(key);
|
|
186
|
-
}
|
|
187
|
-
function IsCallable(argument) {
|
|
188
|
-
return "function" == typeof argument;
|
|
189
|
-
}
|
|
190
|
-
function GetMethod(V, P) {
|
|
191
|
-
const func = V[P];
|
|
192
|
-
if (null != func) {
|
|
193
|
-
if (!IsCallable(func)) throw new TypeError;
|
|
194
|
-
return func;
|
|
155
|
+
const toString_2 = O.toString;
|
|
156
|
+
if (IsCallable(toString_2)) {
|
|
157
|
+
const result = toString_2.call(O);
|
|
158
|
+
if (!IsObject(result)) return result;
|
|
195
159
|
}
|
|
196
160
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
161
|
+
throw new TypeError;
|
|
162
|
+
}
|
|
163
|
+
function ToBoolean(argument) {
|
|
164
|
+
return !!argument;
|
|
165
|
+
}
|
|
166
|
+
function ToString(argument) {
|
|
167
|
+
return "" + argument;
|
|
168
|
+
}
|
|
169
|
+
function ToPropertyKey(argument) {
|
|
170
|
+
const key = ToPrimitive(argument, 3);
|
|
171
|
+
return IsSymbol(key) ? key : ToString(key);
|
|
172
|
+
}
|
|
173
|
+
function IsCallable(argument) {
|
|
174
|
+
return "function" == typeof argument;
|
|
175
|
+
}
|
|
176
|
+
function GetMethod(V, P) {
|
|
177
|
+
const func = V[P];
|
|
178
|
+
if (null != func) {
|
|
179
|
+
if (!IsCallable(func)) throw new TypeError;
|
|
180
|
+
return func;
|
|
205
181
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
234
|
-
{
|
|
235
|
-
value: value,
|
|
236
|
-
done: !0
|
|
182
|
+
}
|
|
183
|
+
function OrdinaryGetPrototypeOf(O) {
|
|
184
|
+
const proto = Object.getPrototypeOf(O);
|
|
185
|
+
if ("function" != typeof O || O === functionPrototype) return proto;
|
|
186
|
+
if (proto !== functionPrototype) return proto;
|
|
187
|
+
const prototype = O.prototype, prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
188
|
+
if (null == prototypeProto || prototypeProto === Object.prototype) return proto;
|
|
189
|
+
const constructor = prototypeProto.constructor;
|
|
190
|
+
return "function" != typeof constructor || constructor === O ? proto : constructor;
|
|
191
|
+
}
|
|
192
|
+
function CreateMapPolyfill() {
|
|
193
|
+
const cacheSentinel = {}, arraySentinel = [], MapIterator = function() {
|
|
194
|
+
function MapIterator(keys, values, selector) {
|
|
195
|
+
this._index = 0, this._keys = keys, this._values = values, this._selector = selector;
|
|
196
|
+
}
|
|
197
|
+
return MapIterator.prototype["@@iterator"] = function() {
|
|
198
|
+
return this;
|
|
199
|
+
}, MapIterator.prototype[iteratorSymbol] = function() {
|
|
200
|
+
return this;
|
|
201
|
+
}, MapIterator.prototype.next = function() {
|
|
202
|
+
const index = this._index;
|
|
203
|
+
if (index >= 0 && index < this._keys.length) {
|
|
204
|
+
const result = this._selector(this._keys[index], this._values[index]);
|
|
205
|
+
return index + 1 >= this._keys.length ? (this._index = -1, this._keys = arraySentinel,
|
|
206
|
+
this._values = arraySentinel) : this._index++, {
|
|
207
|
+
value: result,
|
|
208
|
+
done: !1
|
|
237
209
|
};
|
|
238
|
-
}, MapIterator;
|
|
239
|
-
}();
|
|
240
|
-
return function() {
|
|
241
|
-
function Map() {
|
|
242
|
-
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
243
210
|
}
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
for (let i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
263
|
-
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel,
|
|
264
|
-
this._cacheIndex = -2), !0;
|
|
265
|
-
}
|
|
266
|
-
return !1;
|
|
267
|
-
}, Map.prototype.clear = function() {
|
|
268
|
-
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel,
|
|
269
|
-
this._cacheIndex = -2;
|
|
270
|
-
}, Map.prototype.keys = function() {
|
|
271
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
272
|
-
}, Map.prototype.values = function() {
|
|
273
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
274
|
-
}, Map.prototype.entries = function() {
|
|
275
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
276
|
-
}, Map.prototype["@@iterator"] = function() {
|
|
277
|
-
return this.entries();
|
|
278
|
-
}, Map.prototype[iteratorSymbol] = function() {
|
|
279
|
-
return this.entries();
|
|
280
|
-
}, Map.prototype._find = function(key, insert) {
|
|
281
|
-
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)),
|
|
282
|
-
this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key),
|
|
283
|
-
this._values.push(void 0)), this._cacheIndex;
|
|
284
|
-
}, Map;
|
|
285
|
-
}();
|
|
286
|
-
function getKey(key, _) {
|
|
287
|
-
return key;
|
|
288
|
-
}
|
|
289
|
-
function getValue(_, value) {
|
|
290
|
-
return value;
|
|
291
|
-
}
|
|
292
|
-
function getEntry(key, value) {
|
|
293
|
-
return [ key, value ];
|
|
211
|
+
return {
|
|
212
|
+
value: void 0,
|
|
213
|
+
done: !0
|
|
214
|
+
};
|
|
215
|
+
}, MapIterator.prototype.throw = function(error) {
|
|
216
|
+
throw this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
217
|
+
error;
|
|
218
|
+
}, MapIterator.prototype.return = function(value) {
|
|
219
|
+
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
220
|
+
{
|
|
221
|
+
value: value,
|
|
222
|
+
done: !0
|
|
223
|
+
};
|
|
224
|
+
}, MapIterator;
|
|
225
|
+
}();
|
|
226
|
+
return function() {
|
|
227
|
+
function Map() {
|
|
228
|
+
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
294
229
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
230
|
+
return Object.defineProperty(Map.prototype, "size", {
|
|
231
|
+
get: function() {
|
|
232
|
+
return this._keys.length;
|
|
233
|
+
},
|
|
234
|
+
enumerable: !0,
|
|
235
|
+
configurable: !0
|
|
236
|
+
}), Map.prototype.has = function(key) {
|
|
237
|
+
return this._find(key, !1) >= 0;
|
|
238
|
+
}, Map.prototype.get = function(key) {
|
|
239
|
+
const index = this._find(key, !1);
|
|
240
|
+
return index >= 0 ? this._values[index] : void 0;
|
|
241
|
+
}, Map.prototype.set = function(key, value) {
|
|
242
|
+
const index = this._find(key, !0);
|
|
243
|
+
return this._values[index] = value, this;
|
|
244
|
+
}, Map.prototype.delete = function(key) {
|
|
245
|
+
const index = this._find(key, !1);
|
|
246
|
+
if (index >= 0) {
|
|
247
|
+
const size = this._keys.length;
|
|
248
|
+
for (let i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
249
|
+
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel,
|
|
250
|
+
this._cacheIndex = -2), !0;
|
|
300
251
|
}
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}, Set.prototype[iteratorSymbol] = function() {
|
|
324
|
-
return this.keys();
|
|
325
|
-
}, Set;
|
|
326
|
-
}();
|
|
252
|
+
return !1;
|
|
253
|
+
}, Map.prototype.clear = function() {
|
|
254
|
+
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel,
|
|
255
|
+
this._cacheIndex = -2;
|
|
256
|
+
}, Map.prototype.keys = function() {
|
|
257
|
+
return new MapIterator(this._keys, this._values, getKey);
|
|
258
|
+
}, Map.prototype.values = function() {
|
|
259
|
+
return new MapIterator(this._keys, this._values, getValue);
|
|
260
|
+
}, Map.prototype.entries = function() {
|
|
261
|
+
return new MapIterator(this._keys, this._values, getEntry);
|
|
262
|
+
}, Map.prototype["@@iterator"] = function() {
|
|
263
|
+
return this.entries();
|
|
264
|
+
}, Map.prototype[iteratorSymbol] = function() {
|
|
265
|
+
return this.entries();
|
|
266
|
+
}, Map.prototype._find = function(key, insert) {
|
|
267
|
+
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)),
|
|
268
|
+
this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key),
|
|
269
|
+
this._values.push(void 0)), this._cacheIndex;
|
|
270
|
+
}, Map;
|
|
271
|
+
}();
|
|
272
|
+
function getKey(key, _) {
|
|
273
|
+
return key;
|
|
327
274
|
}
|
|
328
|
-
function
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
340
|
-
}, WeakMap.prototype.set = function(target, value) {
|
|
341
|
-
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
342
|
-
}, WeakMap.prototype.delete = function(target) {
|
|
343
|
-
const table = GetOrCreateWeakMapTable(target, !1);
|
|
344
|
-
return void 0 !== table && delete table[this._key];
|
|
345
|
-
}, WeakMap.prototype.clear = function() {
|
|
346
|
-
this._key = CreateUniqueKey();
|
|
347
|
-
}, WeakMap;
|
|
348
|
-
}();
|
|
349
|
-
function CreateUniqueKey() {
|
|
350
|
-
let key;
|
|
351
|
-
do {
|
|
352
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
353
|
-
} while (HashMap.has(keys, key));
|
|
354
|
-
return keys[key] = !0, key;
|
|
355
|
-
}
|
|
356
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
357
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
358
|
-
if (!create) return;
|
|
359
|
-
Object.defineProperty(target, rootKey, {
|
|
360
|
-
value: HashMap.create()
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
return target[rootKey];
|
|
364
|
-
}
|
|
365
|
-
function FillRandomBytes(buffer, size) {
|
|
366
|
-
for (let i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
367
|
-
return buffer;
|
|
275
|
+
function getValue(_, value) {
|
|
276
|
+
return value;
|
|
277
|
+
}
|
|
278
|
+
function getEntry(key, value) {
|
|
279
|
+
return [ key, value ];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function CreateSetPolyfill() {
|
|
283
|
+
return function() {
|
|
284
|
+
function Set() {
|
|
285
|
+
this._map = new _Map;
|
|
368
286
|
}
|
|
369
|
-
|
|
370
|
-
|
|
287
|
+
return Object.defineProperty(Set.prototype, "size", {
|
|
288
|
+
get: function() {
|
|
289
|
+
return this._map.size;
|
|
290
|
+
},
|
|
291
|
+
enumerable: !0,
|
|
292
|
+
configurable: !0
|
|
293
|
+
}), Set.prototype.has = function(value) {
|
|
294
|
+
return this._map.has(value);
|
|
295
|
+
}, Set.prototype.add = function(value) {
|
|
296
|
+
return this._map.set(value, value), this;
|
|
297
|
+
}, Set.prototype.delete = function(value) {
|
|
298
|
+
return this._map.delete(value);
|
|
299
|
+
}, Set.prototype.clear = function() {
|
|
300
|
+
this._map.clear();
|
|
301
|
+
}, Set.prototype.keys = function() {
|
|
302
|
+
return this._map.keys();
|
|
303
|
+
}, Set.prototype.values = function() {
|
|
304
|
+
return this._map.values();
|
|
305
|
+
}, Set.prototype.entries = function() {
|
|
306
|
+
return this._map.entries();
|
|
307
|
+
}, Set.prototype["@@iterator"] = function() {
|
|
308
|
+
return this.keys();
|
|
309
|
+
}, Set.prototype[iteratorSymbol] = function() {
|
|
310
|
+
return this.keys();
|
|
311
|
+
}, Set;
|
|
312
|
+
}();
|
|
313
|
+
}
|
|
314
|
+
function CreateWeakMapPolyfill() {
|
|
315
|
+
const UUID_SIZE = 16, keys = HashMap.create(), rootKey = CreateUniqueKey();
|
|
316
|
+
return function() {
|
|
317
|
+
function WeakMap() {
|
|
318
|
+
this._key = CreateUniqueKey();
|
|
371
319
|
}
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
320
|
+
return WeakMap.prototype.has = function(target) {
|
|
321
|
+
const table = GetOrCreateWeakMapTable(target, !1);
|
|
322
|
+
return void 0 !== table && HashMap.has(table, this._key);
|
|
323
|
+
}, WeakMap.prototype.get = function(target) {
|
|
324
|
+
const table = GetOrCreateWeakMapTable(target, !1);
|
|
325
|
+
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
326
|
+
}, WeakMap.prototype.set = function(target, value) {
|
|
327
|
+
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
328
|
+
}, WeakMap.prototype.delete = function(target) {
|
|
329
|
+
const table = GetOrCreateWeakMapTable(target, !1);
|
|
330
|
+
return void 0 !== table && delete table[this._key];
|
|
331
|
+
}, WeakMap.prototype.clear = function() {
|
|
332
|
+
this._key = CreateUniqueKey();
|
|
333
|
+
}, WeakMap;
|
|
334
|
+
}();
|
|
335
|
+
function CreateUniqueKey() {
|
|
336
|
+
let key;
|
|
337
|
+
do {
|
|
338
|
+
key = "@@WeakMap@@" + CreateUUID();
|
|
339
|
+
} while (HashMap.has(keys, key));
|
|
340
|
+
return keys[key] = !0, key;
|
|
341
|
+
}
|
|
342
|
+
function GetOrCreateWeakMapTable(target, create) {
|
|
343
|
+
if (!hasOwn.call(target, rootKey)) {
|
|
344
|
+
if (!create) return;
|
|
345
|
+
Object.defineProperty(target, rootKey, {
|
|
346
|
+
value: HashMap.create()
|
|
347
|
+
});
|
|
382
348
|
}
|
|
349
|
+
return target[rootKey];
|
|
350
|
+
}
|
|
351
|
+
function FillRandomBytes(buffer, size) {
|
|
352
|
+
for (let i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
353
|
+
return buffer;
|
|
383
354
|
}
|
|
384
|
-
function
|
|
385
|
-
return
|
|
355
|
+
function GenRandomBytes(size) {
|
|
356
|
+
return "function" == typeof Uint8Array ? "undefined" != typeof crypto ? crypto.getRandomValues(new Uint8Array(size)) : FillRandomBytes(new Uint8Array(size), size) : FillRandomBytes(new Array(size), size);
|
|
386
357
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
358
|
+
function CreateUUID() {
|
|
359
|
+
const data = GenRandomBytes(UUID_SIZE);
|
|
360
|
+
data[6] = 79 & data[6] | 64, data[8] = 191 & data[8] | 128;
|
|
361
|
+
let result = "";
|
|
362
|
+
for (let offset = 0; offset < UUID_SIZE; ++offset) {
|
|
363
|
+
const byte = data[offset];
|
|
364
|
+
4 !== offset && 6 !== offset && 8 !== offset || (result += "-"), byte < 16 && (result += "0"),
|
|
365
|
+
result += byte.toString(16).toLowerCase();
|
|
366
|
+
}
|
|
367
|
+
return result;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function MakeDictionary(obj) {
|
|
371
|
+
return obj.__ = void 0, delete obj.__, obj;
|
|
372
|
+
}
|
|
373
|
+
exporter("defineMetadata", defineMetadata), exporter("hasMetadata", hasMetadata),
|
|
374
|
+
exporter("hasOwnMetadata", hasOwnMetadata), exporter("getMetadata", getMetadata);
|
|
375
|
+
}((target = Reflect, function(key, value) {
|
|
376
|
+
"function" != typeof target[key] && Object.defineProperty(target, key, {
|
|
377
|
+
configurable: !0,
|
|
378
|
+
writable: !0,
|
|
379
|
+
value: value
|
|
380
|
+
}), previous && previous(key, value);
|
|
381
|
+
})), Reflect;
|
|
382
|
+
}({});
|