@orion-js/services 4.0.0-next.2 → 4.0.0-next.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/LICENSE +21 -0
- package/dist/index.cjs +177 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +182 -200
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -42,34 +41,26 @@ var Reflect2;
|
|
|
42
41
|
function makeExporter(target, previous) {
|
|
43
42
|
return function(key, value) {
|
|
44
43
|
if (typeof target[key] !== "function") {
|
|
45
|
-
Object.defineProperty(target, key, {
|
|
46
|
-
configurable: true,
|
|
47
|
-
writable: true,
|
|
48
|
-
value
|
|
49
|
-
});
|
|
44
|
+
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
50
45
|
}
|
|
51
|
-
if (previous)
|
|
46
|
+
if (previous)
|
|
47
|
+
previous(key, value);
|
|
52
48
|
};
|
|
53
49
|
}
|
|
54
|
-
__name(makeExporter, "makeExporter");
|
|
55
50
|
})(function(exporter) {
|
|
56
51
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
57
52
|
var supportsSymbol = typeof Symbol === "function";
|
|
58
53
|
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
59
54
|
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
60
55
|
var supportsCreate = typeof Object.create === "function";
|
|
61
|
-
var supportsProto = {
|
|
62
|
-
__proto__: []
|
|
63
|
-
} instanceof Array;
|
|
56
|
+
var supportsProto = { __proto__: [] } instanceof Array;
|
|
64
57
|
var downLevel = !supportsCreate && !supportsProto;
|
|
65
58
|
var HashMap = {
|
|
66
59
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
67
60
|
create: supportsCreate ? function() {
|
|
68
61
|
return MakeDictionary(/* @__PURE__ */ Object.create(null));
|
|
69
62
|
} : supportsProto ? function() {
|
|
70
|
-
return MakeDictionary({
|
|
71
|
-
__proto__: null
|
|
72
|
-
});
|
|
63
|
+
return MakeDictionary({ __proto__: null });
|
|
73
64
|
} : function() {
|
|
74
65
|
return MakeDictionary({});
|
|
75
66
|
},
|
|
@@ -92,148 +83,167 @@ var Reflect2;
|
|
|
92
83
|
var Metadata = new _WeakMap();
|
|
93
84
|
function decorate(decorators, target, propertyKey, attributes) {
|
|
94
85
|
if (!IsUndefined(propertyKey)) {
|
|
95
|
-
if (!IsArray(decorators))
|
|
96
|
-
|
|
97
|
-
if (!IsObject(
|
|
98
|
-
|
|
86
|
+
if (!IsArray(decorators))
|
|
87
|
+
throw new TypeError();
|
|
88
|
+
if (!IsObject(target))
|
|
89
|
+
throw new TypeError();
|
|
90
|
+
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
91
|
+
throw new TypeError();
|
|
92
|
+
if (IsNull(attributes))
|
|
93
|
+
attributes = void 0;
|
|
99
94
|
propertyKey = ToPropertyKey(propertyKey);
|
|
100
95
|
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
101
96
|
} else {
|
|
102
|
-
if (!IsArray(decorators))
|
|
103
|
-
|
|
97
|
+
if (!IsArray(decorators))
|
|
98
|
+
throw new TypeError();
|
|
99
|
+
if (!IsConstructor(target))
|
|
100
|
+
throw new TypeError();
|
|
104
101
|
return DecorateConstructor(decorators, target);
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
|
-
__name(decorate, "decorate");
|
|
108
104
|
exporter("decorate", decorate);
|
|
109
105
|
function metadata(metadataKey, metadataValue) {
|
|
110
106
|
function decorator(target, propertyKey) {
|
|
111
|
-
if (!IsObject(target))
|
|
112
|
-
|
|
107
|
+
if (!IsObject(target))
|
|
108
|
+
throw new TypeError();
|
|
109
|
+
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
110
|
+
throw new TypeError();
|
|
113
111
|
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
114
112
|
}
|
|
115
|
-
__name(decorator, "decorator");
|
|
116
113
|
return decorator;
|
|
117
114
|
}
|
|
118
|
-
__name(metadata, "metadata");
|
|
119
115
|
exporter("metadata", metadata);
|
|
120
116
|
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
121
|
-
if (!IsObject(target))
|
|
122
|
-
|
|
117
|
+
if (!IsObject(target))
|
|
118
|
+
throw new TypeError();
|
|
119
|
+
if (!IsUndefined(propertyKey))
|
|
120
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
123
121
|
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
124
122
|
}
|
|
125
|
-
__name(defineMetadata, "defineMetadata");
|
|
126
123
|
exporter("defineMetadata", defineMetadata);
|
|
127
124
|
function hasMetadata(metadataKey, target, propertyKey) {
|
|
128
|
-
if (!IsObject(target))
|
|
129
|
-
|
|
125
|
+
if (!IsObject(target))
|
|
126
|
+
throw new TypeError();
|
|
127
|
+
if (!IsUndefined(propertyKey))
|
|
128
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
130
129
|
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
131
130
|
}
|
|
132
|
-
__name(hasMetadata, "hasMetadata");
|
|
133
131
|
exporter("hasMetadata", hasMetadata);
|
|
134
132
|
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
135
|
-
if (!IsObject(target))
|
|
136
|
-
|
|
133
|
+
if (!IsObject(target))
|
|
134
|
+
throw new TypeError();
|
|
135
|
+
if (!IsUndefined(propertyKey))
|
|
136
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
137
137
|
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
138
138
|
}
|
|
139
|
-
__name(hasOwnMetadata, "hasOwnMetadata");
|
|
140
139
|
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
141
140
|
function getMetadata(metadataKey, target, propertyKey) {
|
|
142
|
-
if (!IsObject(target))
|
|
143
|
-
|
|
141
|
+
if (!IsObject(target))
|
|
142
|
+
throw new TypeError();
|
|
143
|
+
if (!IsUndefined(propertyKey))
|
|
144
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
144
145
|
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
145
146
|
}
|
|
146
|
-
__name(getMetadata, "getMetadata");
|
|
147
147
|
exporter("getMetadata", getMetadata);
|
|
148
148
|
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
149
|
-
if (!IsObject(target))
|
|
150
|
-
|
|
149
|
+
if (!IsObject(target))
|
|
150
|
+
throw new TypeError();
|
|
151
|
+
if (!IsUndefined(propertyKey))
|
|
152
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
151
153
|
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
152
154
|
}
|
|
153
|
-
__name(getOwnMetadata, "getOwnMetadata");
|
|
154
155
|
exporter("getOwnMetadata", getOwnMetadata);
|
|
155
156
|
function getMetadataKeys(target, propertyKey) {
|
|
156
|
-
if (!IsObject(target))
|
|
157
|
-
|
|
157
|
+
if (!IsObject(target))
|
|
158
|
+
throw new TypeError();
|
|
159
|
+
if (!IsUndefined(propertyKey))
|
|
160
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
158
161
|
return OrdinaryMetadataKeys(target, propertyKey);
|
|
159
162
|
}
|
|
160
|
-
__name(getMetadataKeys, "getMetadataKeys");
|
|
161
163
|
exporter("getMetadataKeys", getMetadataKeys);
|
|
162
164
|
function getOwnMetadataKeys(target, propertyKey) {
|
|
163
|
-
if (!IsObject(target))
|
|
164
|
-
|
|
165
|
+
if (!IsObject(target))
|
|
166
|
+
throw new TypeError();
|
|
167
|
+
if (!IsUndefined(propertyKey))
|
|
168
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
165
169
|
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
166
170
|
}
|
|
167
|
-
__name(getOwnMetadataKeys, "getOwnMetadataKeys");
|
|
168
171
|
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
169
172
|
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
170
|
-
if (!IsObject(target))
|
|
171
|
-
|
|
173
|
+
if (!IsObject(target))
|
|
174
|
+
throw new TypeError();
|
|
175
|
+
if (!IsUndefined(propertyKey))
|
|
176
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
172
177
|
var metadataMap = GetOrCreateMetadataMap(
|
|
173
178
|
target,
|
|
174
179
|
propertyKey,
|
|
175
180
|
/*Create*/
|
|
176
181
|
false
|
|
177
182
|
);
|
|
178
|
-
if (IsUndefined(metadataMap))
|
|
179
|
-
|
|
180
|
-
if (metadataMap.
|
|
183
|
+
if (IsUndefined(metadataMap))
|
|
184
|
+
return false;
|
|
185
|
+
if (!metadataMap.delete(metadataKey))
|
|
186
|
+
return false;
|
|
187
|
+
if (metadataMap.size > 0)
|
|
188
|
+
return true;
|
|
181
189
|
var targetMetadata = Metadata.get(target);
|
|
182
190
|
targetMetadata.delete(propertyKey);
|
|
183
|
-
if (targetMetadata.size > 0)
|
|
191
|
+
if (targetMetadata.size > 0)
|
|
192
|
+
return true;
|
|
184
193
|
Metadata.delete(target);
|
|
185
194
|
return true;
|
|
186
195
|
}
|
|
187
|
-
__name(deleteMetadata, "deleteMetadata");
|
|
188
196
|
exporter("deleteMetadata", deleteMetadata);
|
|
189
197
|
function DecorateConstructor(decorators, target) {
|
|
190
198
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
191
199
|
var decorator = decorators[i];
|
|
192
200
|
var decorated = decorator(target);
|
|
193
201
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
194
|
-
if (!IsConstructor(decorated))
|
|
202
|
+
if (!IsConstructor(decorated))
|
|
203
|
+
throw new TypeError();
|
|
195
204
|
target = decorated;
|
|
196
205
|
}
|
|
197
206
|
}
|
|
198
207
|
return target;
|
|
199
208
|
}
|
|
200
|
-
__name(DecorateConstructor, "DecorateConstructor");
|
|
201
209
|
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
202
210
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
203
211
|
var decorator = decorators[i];
|
|
204
212
|
var decorated = decorator(target, propertyKey, descriptor);
|
|
205
213
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
206
|
-
if (!IsObject(decorated))
|
|
214
|
+
if (!IsObject(decorated))
|
|
215
|
+
throw new TypeError();
|
|
207
216
|
descriptor = decorated;
|
|
208
217
|
}
|
|
209
218
|
}
|
|
210
219
|
return descriptor;
|
|
211
220
|
}
|
|
212
|
-
__name(DecorateProperty, "DecorateProperty");
|
|
213
221
|
function GetOrCreateMetadataMap(O, P, Create) {
|
|
214
222
|
var targetMetadata = Metadata.get(O);
|
|
215
223
|
if (IsUndefined(targetMetadata)) {
|
|
216
|
-
if (!Create)
|
|
224
|
+
if (!Create)
|
|
225
|
+
return void 0;
|
|
217
226
|
targetMetadata = new _Map();
|
|
218
227
|
Metadata.set(O, targetMetadata);
|
|
219
228
|
}
|
|
220
229
|
var metadataMap = targetMetadata.get(P);
|
|
221
230
|
if (IsUndefined(metadataMap)) {
|
|
222
|
-
if (!Create)
|
|
231
|
+
if (!Create)
|
|
232
|
+
return void 0;
|
|
223
233
|
metadataMap = new _Map();
|
|
224
234
|
targetMetadata.set(P, metadataMap);
|
|
225
235
|
}
|
|
226
236
|
return metadataMap;
|
|
227
237
|
}
|
|
228
|
-
__name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
|
|
229
238
|
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
230
239
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
231
|
-
if (hasOwn2)
|
|
240
|
+
if (hasOwn2)
|
|
241
|
+
return true;
|
|
232
242
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
233
|
-
if (!IsNull(parent))
|
|
243
|
+
if (!IsNull(parent))
|
|
244
|
+
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
234
245
|
return false;
|
|
235
246
|
}
|
|
236
|
-
__name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
|
|
237
247
|
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
238
248
|
var metadataMap = GetOrCreateMetadataMap(
|
|
239
249
|
O,
|
|
@@ -241,18 +251,19 @@ var Reflect2;
|
|
|
241
251
|
/*Create*/
|
|
242
252
|
false
|
|
243
253
|
);
|
|
244
|
-
if (IsUndefined(metadataMap))
|
|
254
|
+
if (IsUndefined(metadataMap))
|
|
255
|
+
return false;
|
|
245
256
|
return ToBoolean(metadataMap.has(MetadataKey));
|
|
246
257
|
}
|
|
247
|
-
__name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
|
|
248
258
|
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
249
259
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
250
|
-
if (hasOwn2)
|
|
260
|
+
if (hasOwn2)
|
|
261
|
+
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
251
262
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
252
|
-
if (!IsNull(parent))
|
|
263
|
+
if (!IsNull(parent))
|
|
264
|
+
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
253
265
|
return void 0;
|
|
254
266
|
}
|
|
255
|
-
__name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
|
|
256
267
|
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
257
268
|
var metadataMap = GetOrCreateMetadataMap(
|
|
258
269
|
O,
|
|
@@ -260,10 +271,10 @@ var Reflect2;
|
|
|
260
271
|
/*Create*/
|
|
261
272
|
false
|
|
262
273
|
);
|
|
263
|
-
if (IsUndefined(metadataMap))
|
|
274
|
+
if (IsUndefined(metadataMap))
|
|
275
|
+
return void 0;
|
|
264
276
|
return metadataMap.get(MetadataKey);
|
|
265
277
|
}
|
|
266
|
-
__name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
|
|
267
278
|
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
268
279
|
var metadataMap = GetOrCreateMetadataMap(
|
|
269
280
|
O,
|
|
@@ -273,14 +284,16 @@ var Reflect2;
|
|
|
273
284
|
);
|
|
274
285
|
metadataMap.set(MetadataKey, MetadataValue);
|
|
275
286
|
}
|
|
276
|
-
__name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
|
|
277
287
|
function OrdinaryMetadataKeys(O, P) {
|
|
278
288
|
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
279
289
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
280
|
-
if (parent === null)
|
|
290
|
+
if (parent === null)
|
|
291
|
+
return ownKeys;
|
|
281
292
|
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
282
|
-
if (parentKeys.length <= 0)
|
|
283
|
-
|
|
293
|
+
if (parentKeys.length <= 0)
|
|
294
|
+
return ownKeys;
|
|
295
|
+
if (ownKeys.length <= 0)
|
|
296
|
+
return parentKeys;
|
|
284
297
|
var set = new _Set();
|
|
285
298
|
var keys = [];
|
|
286
299
|
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
@@ -301,7 +314,6 @@ var Reflect2;
|
|
|
301
314
|
}
|
|
302
315
|
return keys;
|
|
303
316
|
}
|
|
304
|
-
__name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
|
|
305
317
|
function OrdinaryOwnMetadataKeys(O, P) {
|
|
306
318
|
var keys = [];
|
|
307
319
|
var metadataMap = GetOrCreateMetadataMap(
|
|
@@ -310,7 +322,8 @@ var Reflect2;
|
|
|
310
322
|
/*Create*/
|
|
311
323
|
false
|
|
312
324
|
);
|
|
313
|
-
if (IsUndefined(metadataMap))
|
|
325
|
+
if (IsUndefined(metadataMap))
|
|
326
|
+
return keys;
|
|
314
327
|
var keysObj = metadataMap.keys();
|
|
315
328
|
var iterator = GetIterator(keysObj);
|
|
316
329
|
var k = 0;
|
|
@@ -333,9 +346,9 @@ var Reflect2;
|
|
|
333
346
|
k++;
|
|
334
347
|
}
|
|
335
348
|
}
|
|
336
|
-
__name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
|
|
337
349
|
function Type(x) {
|
|
338
|
-
if (x === null)
|
|
350
|
+
if (x === null)
|
|
351
|
+
return 1;
|
|
339
352
|
switch (typeof x) {
|
|
340
353
|
case "undefined":
|
|
341
354
|
return 0;
|
|
@@ -353,23 +366,18 @@ var Reflect2;
|
|
|
353
366
|
return 6;
|
|
354
367
|
}
|
|
355
368
|
}
|
|
356
|
-
__name(Type, "Type");
|
|
357
369
|
function IsUndefined(x) {
|
|
358
370
|
return x === void 0;
|
|
359
371
|
}
|
|
360
|
-
__name(IsUndefined, "IsUndefined");
|
|
361
372
|
function IsNull(x) {
|
|
362
373
|
return x === null;
|
|
363
374
|
}
|
|
364
|
-
__name(IsNull, "IsNull");
|
|
365
375
|
function IsSymbol(x) {
|
|
366
376
|
return typeof x === "symbol";
|
|
367
377
|
}
|
|
368
|
-
__name(IsSymbol, "IsSymbol");
|
|
369
378
|
function IsObject(x) {
|
|
370
379
|
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
371
380
|
}
|
|
372
|
-
__name(IsObject, "IsObject");
|
|
373
381
|
function ToPrimitive(input, PreferredType) {
|
|
374
382
|
switch (Type(input)) {
|
|
375
383
|
case 0:
|
|
@@ -389,69 +397,67 @@ var Reflect2;
|
|
|
389
397
|
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
390
398
|
if (exoticToPrim !== void 0) {
|
|
391
399
|
var result = exoticToPrim.call(input, hint);
|
|
392
|
-
if (IsObject(result))
|
|
400
|
+
if (IsObject(result))
|
|
401
|
+
throw new TypeError();
|
|
393
402
|
return result;
|
|
394
403
|
}
|
|
395
404
|
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
396
405
|
}
|
|
397
|
-
__name(ToPrimitive, "ToPrimitive");
|
|
398
406
|
function OrdinaryToPrimitive(O, hint) {
|
|
399
407
|
if (hint === "string") {
|
|
400
408
|
var toString_1 = O.toString;
|
|
401
409
|
if (IsCallable(toString_1)) {
|
|
402
410
|
var result = toString_1.call(O);
|
|
403
|
-
if (!IsObject(result))
|
|
411
|
+
if (!IsObject(result))
|
|
412
|
+
return result;
|
|
404
413
|
}
|
|
405
414
|
var valueOf = O.valueOf;
|
|
406
415
|
if (IsCallable(valueOf)) {
|
|
407
416
|
var result = valueOf.call(O);
|
|
408
|
-
if (!IsObject(result))
|
|
417
|
+
if (!IsObject(result))
|
|
418
|
+
return result;
|
|
409
419
|
}
|
|
410
420
|
} else {
|
|
411
421
|
var valueOf = O.valueOf;
|
|
412
422
|
if (IsCallable(valueOf)) {
|
|
413
423
|
var result = valueOf.call(O);
|
|
414
|
-
if (!IsObject(result))
|
|
424
|
+
if (!IsObject(result))
|
|
425
|
+
return result;
|
|
415
426
|
}
|
|
416
427
|
var toString_2 = O.toString;
|
|
417
428
|
if (IsCallable(toString_2)) {
|
|
418
429
|
var result = toString_2.call(O);
|
|
419
|
-
if (!IsObject(result))
|
|
430
|
+
if (!IsObject(result))
|
|
431
|
+
return result;
|
|
420
432
|
}
|
|
421
433
|
}
|
|
422
434
|
throw new TypeError();
|
|
423
435
|
}
|
|
424
|
-
__name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
|
|
425
436
|
function ToBoolean(argument) {
|
|
426
437
|
return !!argument;
|
|
427
438
|
}
|
|
428
|
-
__name(ToBoolean, "ToBoolean");
|
|
429
439
|
function ToString(argument) {
|
|
430
440
|
return "" + argument;
|
|
431
441
|
}
|
|
432
|
-
__name(ToString, "ToString");
|
|
433
442
|
function ToPropertyKey(argument) {
|
|
434
443
|
var key = ToPrimitive(
|
|
435
444
|
argument,
|
|
436
445
|
3
|
|
437
446
|
/* String */
|
|
438
447
|
);
|
|
439
|
-
if (IsSymbol(key))
|
|
448
|
+
if (IsSymbol(key))
|
|
449
|
+
return key;
|
|
440
450
|
return ToString(key);
|
|
441
451
|
}
|
|
442
|
-
__name(ToPropertyKey, "ToPropertyKey");
|
|
443
452
|
function IsArray(argument) {
|
|
444
453
|
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
445
454
|
}
|
|
446
|
-
__name(IsArray, "IsArray");
|
|
447
455
|
function IsCallable(argument) {
|
|
448
456
|
return typeof argument === "function";
|
|
449
457
|
}
|
|
450
|
-
__name(IsCallable, "IsCallable");
|
|
451
458
|
function IsConstructor(argument) {
|
|
452
459
|
return typeof argument === "function";
|
|
453
460
|
}
|
|
454
|
-
__name(IsConstructor, "IsConstructor");
|
|
455
461
|
function IsPropertyKey(argument) {
|
|
456
462
|
switch (Type(argument)) {
|
|
457
463
|
case 3:
|
|
@@ -462,49 +468,52 @@ var Reflect2;
|
|
|
462
468
|
return false;
|
|
463
469
|
}
|
|
464
470
|
}
|
|
465
|
-
__name(IsPropertyKey, "IsPropertyKey");
|
|
466
471
|
function GetMethod(V, P) {
|
|
467
472
|
var func = V[P];
|
|
468
|
-
if (func === void 0 || func === null)
|
|
469
|
-
|
|
473
|
+
if (func === void 0 || func === null)
|
|
474
|
+
return void 0;
|
|
475
|
+
if (!IsCallable(func))
|
|
476
|
+
throw new TypeError();
|
|
470
477
|
return func;
|
|
471
478
|
}
|
|
472
|
-
__name(GetMethod, "GetMethod");
|
|
473
479
|
function GetIterator(obj) {
|
|
474
480
|
var method = GetMethod(obj, iteratorSymbol);
|
|
475
|
-
if (!IsCallable(method))
|
|
481
|
+
if (!IsCallable(method))
|
|
482
|
+
throw new TypeError();
|
|
476
483
|
var iterator = method.call(obj);
|
|
477
|
-
if (!IsObject(iterator))
|
|
484
|
+
if (!IsObject(iterator))
|
|
485
|
+
throw new TypeError();
|
|
478
486
|
return iterator;
|
|
479
487
|
}
|
|
480
|
-
__name(GetIterator, "GetIterator");
|
|
481
488
|
function IteratorValue(iterResult) {
|
|
482
489
|
return iterResult.value;
|
|
483
490
|
}
|
|
484
|
-
__name(IteratorValue, "IteratorValue");
|
|
485
491
|
function IteratorStep(iterator) {
|
|
486
492
|
var result = iterator.next();
|
|
487
493
|
return result.done ? false : result;
|
|
488
494
|
}
|
|
489
|
-
__name(IteratorStep, "IteratorStep");
|
|
490
495
|
function IteratorClose(iterator) {
|
|
491
496
|
var f = iterator["return"];
|
|
492
|
-
if (f)
|
|
497
|
+
if (f)
|
|
498
|
+
f.call(iterator);
|
|
493
499
|
}
|
|
494
|
-
__name(IteratorClose, "IteratorClose");
|
|
495
500
|
function OrdinaryGetPrototypeOf(O) {
|
|
496
501
|
var proto = Object.getPrototypeOf(O);
|
|
497
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
498
|
-
|
|
502
|
+
if (typeof O !== "function" || O === functionPrototype)
|
|
503
|
+
return proto;
|
|
504
|
+
if (proto !== functionPrototype)
|
|
505
|
+
return proto;
|
|
499
506
|
var prototype = O.prototype;
|
|
500
507
|
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
501
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
508
|
+
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
509
|
+
return proto;
|
|
502
510
|
var constructor = prototypeProto.constructor;
|
|
503
|
-
if (typeof constructor !== "function")
|
|
504
|
-
|
|
511
|
+
if (typeof constructor !== "function")
|
|
512
|
+
return proto;
|
|
513
|
+
if (constructor === O)
|
|
514
|
+
return proto;
|
|
505
515
|
return constructor;
|
|
506
516
|
}
|
|
507
|
-
__name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
|
|
508
517
|
function CreateMapPolyfill() {
|
|
509
518
|
var cacheSentinel = {};
|
|
510
519
|
var arraySentinel = [];
|
|
@@ -517,7 +526,6 @@ var Reflect2;
|
|
|
517
526
|
this._values = values;
|
|
518
527
|
this._selector = selector;
|
|
519
528
|
}
|
|
520
|
-
__name(MapIterator2, "MapIterator");
|
|
521
529
|
MapIterator2.prototype["@@iterator"] = function() {
|
|
522
530
|
return this;
|
|
523
531
|
};
|
|
@@ -535,15 +543,9 @@ var Reflect2;
|
|
|
535
543
|
} else {
|
|
536
544
|
this._index++;
|
|
537
545
|
}
|
|
538
|
-
return {
|
|
539
|
-
value: result,
|
|
540
|
-
done: false
|
|
541
|
-
};
|
|
546
|
+
return { value: result, done: false };
|
|
542
547
|
}
|
|
543
|
-
return {
|
|
544
|
-
value: void 0,
|
|
545
|
-
done: true
|
|
546
|
-
};
|
|
548
|
+
return { value: void 0, done: true };
|
|
547
549
|
};
|
|
548
550
|
MapIterator2.prototype.throw = function(error) {
|
|
549
551
|
if (this._index >= 0) {
|
|
@@ -559,10 +561,7 @@ var Reflect2;
|
|
|
559
561
|
this._keys = arraySentinel;
|
|
560
562
|
this._values = arraySentinel;
|
|
561
563
|
}
|
|
562
|
-
return {
|
|
563
|
-
value,
|
|
564
|
-
done: true
|
|
565
|
-
};
|
|
564
|
+
return { value, done: true };
|
|
566
565
|
};
|
|
567
566
|
return MapIterator2;
|
|
568
567
|
}()
|
|
@@ -570,28 +569,27 @@ var Reflect2;
|
|
|
570
569
|
return (
|
|
571
570
|
/** @class */
|
|
572
571
|
function() {
|
|
573
|
-
function
|
|
572
|
+
function Map2() {
|
|
574
573
|
this._keys = [];
|
|
575
574
|
this._values = [];
|
|
576
575
|
this._cacheKey = cacheSentinel;
|
|
577
576
|
this._cacheIndex = -2;
|
|
578
577
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
get: /* @__PURE__ */ __name(function() {
|
|
578
|
+
Object.defineProperty(Map2.prototype, "size", {
|
|
579
|
+
get: function() {
|
|
582
580
|
return this._keys.length;
|
|
583
|
-
},
|
|
581
|
+
},
|
|
584
582
|
enumerable: true,
|
|
585
583
|
configurable: true
|
|
586
584
|
});
|
|
587
|
-
|
|
585
|
+
Map2.prototype.has = function(key) {
|
|
588
586
|
return this._find(
|
|
589
587
|
key,
|
|
590
588
|
/*insert*/
|
|
591
589
|
false
|
|
592
590
|
) >= 0;
|
|
593
591
|
};
|
|
594
|
-
|
|
592
|
+
Map2.prototype.get = function(key) {
|
|
595
593
|
var index = this._find(
|
|
596
594
|
key,
|
|
597
595
|
/*insert*/
|
|
@@ -599,7 +597,7 @@ var Reflect2;
|
|
|
599
597
|
);
|
|
600
598
|
return index >= 0 ? this._values[index] : void 0;
|
|
601
599
|
};
|
|
602
|
-
|
|
600
|
+
Map2.prototype.set = function(key, value) {
|
|
603
601
|
var index = this._find(
|
|
604
602
|
key,
|
|
605
603
|
/*insert*/
|
|
@@ -608,7 +606,7 @@ var Reflect2;
|
|
|
608
606
|
this._values[index] = value;
|
|
609
607
|
return this;
|
|
610
608
|
};
|
|
611
|
-
|
|
609
|
+
Map2.prototype.delete = function(key) {
|
|
612
610
|
var index = this._find(
|
|
613
611
|
key,
|
|
614
612
|
/*insert*/
|
|
@@ -630,28 +628,28 @@ var Reflect2;
|
|
|
630
628
|
}
|
|
631
629
|
return false;
|
|
632
630
|
};
|
|
633
|
-
|
|
631
|
+
Map2.prototype.clear = function() {
|
|
634
632
|
this._keys.length = 0;
|
|
635
633
|
this._values.length = 0;
|
|
636
634
|
this._cacheKey = cacheSentinel;
|
|
637
635
|
this._cacheIndex = -2;
|
|
638
636
|
};
|
|
639
|
-
|
|
637
|
+
Map2.prototype.keys = function() {
|
|
640
638
|
return new MapIterator(this._keys, this._values, getKey);
|
|
641
639
|
};
|
|
642
|
-
|
|
640
|
+
Map2.prototype.values = function() {
|
|
643
641
|
return new MapIterator(this._keys, this._values, getValue);
|
|
644
642
|
};
|
|
645
|
-
|
|
643
|
+
Map2.prototype.entries = function() {
|
|
646
644
|
return new MapIterator(this._keys, this._values, getEntry);
|
|
647
645
|
};
|
|
648
|
-
|
|
646
|
+
Map2.prototype["@@iterator"] = function() {
|
|
649
647
|
return this.entries();
|
|
650
648
|
};
|
|
651
|
-
|
|
649
|
+
Map2.prototype[iteratorSymbol] = function() {
|
|
652
650
|
return this.entries();
|
|
653
651
|
};
|
|
654
|
-
|
|
652
|
+
Map2.prototype._find = function(key, insert) {
|
|
655
653
|
if (this._cacheKey !== key) {
|
|
656
654
|
this._cacheIndex = this._keys.indexOf(this._cacheKey = key);
|
|
657
655
|
}
|
|
@@ -662,73 +660,64 @@ var Reflect2;
|
|
|
662
660
|
}
|
|
663
661
|
return this._cacheIndex;
|
|
664
662
|
};
|
|
665
|
-
return
|
|
663
|
+
return Map2;
|
|
666
664
|
}()
|
|
667
665
|
);
|
|
668
666
|
function getKey(key, _) {
|
|
669
667
|
return key;
|
|
670
668
|
}
|
|
671
|
-
__name(getKey, "getKey");
|
|
672
669
|
function getValue(_, value) {
|
|
673
670
|
return value;
|
|
674
671
|
}
|
|
675
|
-
__name(getValue, "getValue");
|
|
676
672
|
function getEntry(key, value) {
|
|
677
|
-
return [
|
|
678
|
-
key,
|
|
679
|
-
value
|
|
680
|
-
];
|
|
673
|
+
return [key, value];
|
|
681
674
|
}
|
|
682
|
-
__name(getEntry, "getEntry");
|
|
683
675
|
}
|
|
684
|
-
__name(CreateMapPolyfill, "CreateMapPolyfill");
|
|
685
676
|
function CreateSetPolyfill() {
|
|
686
677
|
return (
|
|
687
678
|
/** @class */
|
|
688
679
|
function() {
|
|
689
|
-
function
|
|
680
|
+
function Set2() {
|
|
690
681
|
this._map = new _Map();
|
|
691
682
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
get: /* @__PURE__ */ __name(function() {
|
|
683
|
+
Object.defineProperty(Set2.prototype, "size", {
|
|
684
|
+
get: function() {
|
|
695
685
|
return this._map.size;
|
|
696
|
-
},
|
|
686
|
+
},
|
|
697
687
|
enumerable: true,
|
|
698
688
|
configurable: true
|
|
699
689
|
});
|
|
700
|
-
|
|
690
|
+
Set2.prototype.has = function(value) {
|
|
701
691
|
return this._map.has(value);
|
|
702
692
|
};
|
|
703
|
-
|
|
693
|
+
Set2.prototype.add = function(value) {
|
|
704
694
|
return this._map.set(value, value), this;
|
|
705
695
|
};
|
|
706
|
-
|
|
696
|
+
Set2.prototype.delete = function(value) {
|
|
707
697
|
return this._map.delete(value);
|
|
708
698
|
};
|
|
709
|
-
|
|
699
|
+
Set2.prototype.clear = function() {
|
|
710
700
|
this._map.clear();
|
|
711
701
|
};
|
|
712
|
-
|
|
702
|
+
Set2.prototype.keys = function() {
|
|
713
703
|
return this._map.keys();
|
|
714
704
|
};
|
|
715
|
-
|
|
705
|
+
Set2.prototype.values = function() {
|
|
716
706
|
return this._map.values();
|
|
717
707
|
};
|
|
718
|
-
|
|
708
|
+
Set2.prototype.entries = function() {
|
|
719
709
|
return this._map.entries();
|
|
720
710
|
};
|
|
721
|
-
|
|
711
|
+
Set2.prototype["@@iterator"] = function() {
|
|
722
712
|
return this.keys();
|
|
723
713
|
};
|
|
724
|
-
|
|
714
|
+
Set2.prototype[iteratorSymbol] = function() {
|
|
725
715
|
return this.keys();
|
|
726
716
|
};
|
|
727
|
-
return
|
|
717
|
+
return Set2;
|
|
728
718
|
}()
|
|
729
719
|
);
|
|
730
720
|
}
|
|
731
|
-
__name(CreateSetPolyfill, "CreateSetPolyfill");
|
|
732
721
|
function CreateWeakMapPolyfill() {
|
|
733
722
|
var UUID_SIZE = 16;
|
|
734
723
|
var keys = HashMap.create();
|
|
@@ -736,11 +725,10 @@ var Reflect2;
|
|
|
736
725
|
return (
|
|
737
726
|
/** @class */
|
|
738
727
|
function() {
|
|
739
|
-
function
|
|
728
|
+
function WeakMap2() {
|
|
740
729
|
this._key = CreateUniqueKey();
|
|
741
730
|
}
|
|
742
|
-
|
|
743
|
-
WeakMap1.prototype.has = function(target) {
|
|
731
|
+
WeakMap2.prototype.has = function(target) {
|
|
744
732
|
var table = GetOrCreateWeakMapTable(
|
|
745
733
|
target,
|
|
746
734
|
/*create*/
|
|
@@ -748,7 +736,7 @@ var Reflect2;
|
|
|
748
736
|
);
|
|
749
737
|
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
750
738
|
};
|
|
751
|
-
|
|
739
|
+
WeakMap2.prototype.get = function(target) {
|
|
752
740
|
var table = GetOrCreateWeakMapTable(
|
|
753
741
|
target,
|
|
754
742
|
/*create*/
|
|
@@ -756,7 +744,7 @@ var Reflect2;
|
|
|
756
744
|
);
|
|
757
745
|
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
758
746
|
};
|
|
759
|
-
|
|
747
|
+
WeakMap2.prototype.set = function(target, value) {
|
|
760
748
|
var table = GetOrCreateWeakMapTable(
|
|
761
749
|
target,
|
|
762
750
|
/*create*/
|
|
@@ -765,7 +753,7 @@ var Reflect2;
|
|
|
765
753
|
table[this._key] = value;
|
|
766
754
|
return this;
|
|
767
755
|
};
|
|
768
|
-
|
|
756
|
+
WeakMap2.prototype.delete = function(target) {
|
|
769
757
|
var table = GetOrCreateWeakMapTable(
|
|
770
758
|
target,
|
|
771
759
|
/*create*/
|
|
@@ -773,10 +761,10 @@ var Reflect2;
|
|
|
773
761
|
);
|
|
774
762
|
return table !== void 0 ? delete table[this._key] : false;
|
|
775
763
|
};
|
|
776
|
-
|
|
764
|
+
WeakMap2.prototype.clear = function() {
|
|
777
765
|
this._key = CreateUniqueKey();
|
|
778
766
|
};
|
|
779
|
-
return
|
|
767
|
+
return WeakMap2;
|
|
780
768
|
}()
|
|
781
769
|
);
|
|
782
770
|
function CreateUniqueKey() {
|
|
@@ -787,31 +775,29 @@ var Reflect2;
|
|
|
787
775
|
keys[key] = true;
|
|
788
776
|
return key;
|
|
789
777
|
}
|
|
790
|
-
__name(CreateUniqueKey, "CreateUniqueKey");
|
|
791
778
|
function GetOrCreateWeakMapTable(target, create) {
|
|
792
779
|
if (!hasOwn.call(target, rootKey)) {
|
|
793
|
-
if (!create)
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
});
|
|
780
|
+
if (!create)
|
|
781
|
+
return void 0;
|
|
782
|
+
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
797
783
|
}
|
|
798
784
|
return target[rootKey];
|
|
799
785
|
}
|
|
800
|
-
__name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
|
|
801
786
|
function FillRandomBytes(buffer, size) {
|
|
802
|
-
for (var i = 0; i < size; ++i)
|
|
787
|
+
for (var i = 0; i < size; ++i)
|
|
788
|
+
buffer[i] = Math.random() * 255 | 0;
|
|
803
789
|
return buffer;
|
|
804
790
|
}
|
|
805
|
-
__name(FillRandomBytes, "FillRandomBytes");
|
|
806
791
|
function GenRandomBytes(size) {
|
|
807
792
|
if (typeof Uint8Array === "function") {
|
|
808
|
-
if (typeof crypto !== "undefined")
|
|
809
|
-
|
|
793
|
+
if (typeof crypto !== "undefined")
|
|
794
|
+
return crypto.getRandomValues(new Uint8Array(size));
|
|
795
|
+
if (typeof msCrypto !== "undefined")
|
|
796
|
+
return msCrypto.getRandomValues(new Uint8Array(size));
|
|
810
797
|
return FillRandomBytes(new Uint8Array(size), size);
|
|
811
798
|
}
|
|
812
799
|
return FillRandomBytes(new Array(size), size);
|
|
813
800
|
}
|
|
814
|
-
__name(GenRandomBytes, "GenRandomBytes");
|
|
815
801
|
function CreateUUID() {
|
|
816
802
|
var data = GenRandomBytes(UUID_SIZE);
|
|
817
803
|
data[6] = data[6] & 79 | 64;
|
|
@@ -819,21 +805,20 @@ var Reflect2;
|
|
|
819
805
|
var result = "";
|
|
820
806
|
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
821
807
|
var byte = data[offset];
|
|
822
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
823
|
-
|
|
808
|
+
if (offset === 4 || offset === 6 || offset === 8)
|
|
809
|
+
result += "-";
|
|
810
|
+
if (byte < 16)
|
|
811
|
+
result += "0";
|
|
824
812
|
result += byte.toString(16).toLowerCase();
|
|
825
813
|
}
|
|
826
814
|
return result;
|
|
827
815
|
}
|
|
828
|
-
__name(CreateUUID, "CreateUUID");
|
|
829
816
|
}
|
|
830
|
-
__name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
|
|
831
817
|
function MakeDictionary(obj) {
|
|
832
818
|
obj.__ = void 0;
|
|
833
819
|
delete obj.__;
|
|
834
820
|
return obj;
|
|
835
821
|
}
|
|
836
|
-
__name(MakeDictionary, "MakeDictionary");
|
|
837
822
|
});
|
|
838
823
|
})(Reflect2 || (Reflect2 = {}));
|
|
839
824
|
|
|
@@ -843,7 +828,6 @@ var import_typedi2 = require("typedi");
|
|
|
843
828
|
function getInstance(service) {
|
|
844
829
|
return import_typedi.Container.get(service);
|
|
845
830
|
}
|
|
846
|
-
__name(getInstance, "getInstance");
|
|
847
831
|
// Annotate the CommonJS export names for ESM import in node:
|
|
848
832
|
0 && (module.exports = {
|
|
849
833
|
Container,
|