@kinotic-ai/core 1.1.0 → 1.2.1
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/dist/index.cjs +7 -1000
- package/dist/index.d.cts +41 -5
- package/dist/index.d.ts +41 -5
- package/dist/index.js +7 -1030
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,6 @@ var __toCommonJS = (from) => {
|
|
|
47
47
|
return entry;
|
|
48
48
|
};
|
|
49
49
|
var __moduleCache;
|
|
50
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
51
50
|
var __returnValue = (v) => v;
|
|
52
51
|
function __exportSetter(name, newValue) {
|
|
53
52
|
this[name] = __returnValue.bind(null, newValue);
|
|
@@ -62,1002 +61,6 @@ var __export = (target, all) => {
|
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
// node_modules/.bun/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
66
|
-
var require_Reflect = __commonJS(() => {
|
|
67
|
-
/*! *****************************************************************************
|
|
68
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
69
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
70
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
71
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
72
|
-
|
|
73
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
74
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
75
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
76
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
77
|
-
|
|
78
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
79
|
-
and limitations under the License.
|
|
80
|
-
***************************************************************************** */
|
|
81
|
-
var Reflect2;
|
|
82
|
-
(function(Reflect3) {
|
|
83
|
-
(function(factory) {
|
|
84
|
-
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
85
|
-
var exporter = makeExporter(Reflect3);
|
|
86
|
-
if (typeof root.Reflect !== "undefined") {
|
|
87
|
-
exporter = makeExporter(root.Reflect, exporter);
|
|
88
|
-
}
|
|
89
|
-
factory(exporter, root);
|
|
90
|
-
if (typeof root.Reflect === "undefined") {
|
|
91
|
-
root.Reflect = Reflect3;
|
|
92
|
-
}
|
|
93
|
-
function makeExporter(target, previous) {
|
|
94
|
-
return function(key, value) {
|
|
95
|
-
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
96
|
-
if (previous)
|
|
97
|
-
previous(key, value);
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function functionThis() {
|
|
101
|
-
try {
|
|
102
|
-
return Function("return this;")();
|
|
103
|
-
} catch (_) {}
|
|
104
|
-
}
|
|
105
|
-
function indirectEvalThis() {
|
|
106
|
-
try {
|
|
107
|
-
return (undefined, eval)("(function() { return this; })()");
|
|
108
|
-
} catch (_) {}
|
|
109
|
-
}
|
|
110
|
-
function sloppyModeThis() {
|
|
111
|
-
return functionThis() || indirectEvalThis();
|
|
112
|
-
}
|
|
113
|
-
})(function(exporter, root) {
|
|
114
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
115
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
116
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
117
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
118
|
-
var supportsCreate = typeof Object.create === "function";
|
|
119
|
-
var supportsProto = { __proto__: [] } instanceof Array;
|
|
120
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
121
|
-
var HashMap = {
|
|
122
|
-
create: supportsCreate ? function() {
|
|
123
|
-
return MakeDictionary(Object.create(null));
|
|
124
|
-
} : supportsProto ? function() {
|
|
125
|
-
return MakeDictionary({ __proto__: null });
|
|
126
|
-
} : function() {
|
|
127
|
-
return MakeDictionary({});
|
|
128
|
-
},
|
|
129
|
-
has: downLevel ? function(map2, key) {
|
|
130
|
-
return hasOwn.call(map2, key);
|
|
131
|
-
} : function(map2, key) {
|
|
132
|
-
return key in map2;
|
|
133
|
-
},
|
|
134
|
-
get: downLevel ? function(map2, key) {
|
|
135
|
-
return hasOwn.call(map2, key) ? map2[key] : undefined;
|
|
136
|
-
} : function(map2, key) {
|
|
137
|
-
return map2[key];
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
141
|
-
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
142
|
-
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
143
|
-
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
144
|
-
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : undefined;
|
|
145
|
-
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
146
|
-
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
147
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
148
|
-
if (!IsUndefined(propertyKey)) {
|
|
149
|
-
if (!IsArray(decorators))
|
|
150
|
-
throw new TypeError;
|
|
151
|
-
if (!IsObject(target))
|
|
152
|
-
throw new TypeError;
|
|
153
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
154
|
-
throw new TypeError;
|
|
155
|
-
if (IsNull(attributes))
|
|
156
|
-
attributes = undefined;
|
|
157
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
158
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
159
|
-
} else {
|
|
160
|
-
if (!IsArray(decorators))
|
|
161
|
-
throw new TypeError;
|
|
162
|
-
if (!IsConstructor(target))
|
|
163
|
-
throw new TypeError;
|
|
164
|
-
return DecorateConstructor(decorators, target);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
exporter("decorate", decorate);
|
|
168
|
-
function metadata(metadataKey, metadataValue) {
|
|
169
|
-
function decorator(target, propertyKey) {
|
|
170
|
-
if (!IsObject(target))
|
|
171
|
-
throw new TypeError;
|
|
172
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
173
|
-
throw new TypeError;
|
|
174
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
175
|
-
}
|
|
176
|
-
return decorator;
|
|
177
|
-
}
|
|
178
|
-
exporter("metadata", metadata);
|
|
179
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
180
|
-
if (!IsObject(target))
|
|
181
|
-
throw new TypeError;
|
|
182
|
-
if (!IsUndefined(propertyKey))
|
|
183
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
184
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
185
|
-
}
|
|
186
|
-
exporter("defineMetadata", defineMetadata);
|
|
187
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
188
|
-
if (!IsObject(target))
|
|
189
|
-
throw new TypeError;
|
|
190
|
-
if (!IsUndefined(propertyKey))
|
|
191
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
192
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
193
|
-
}
|
|
194
|
-
exporter("hasMetadata", hasMetadata);
|
|
195
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
196
|
-
if (!IsObject(target))
|
|
197
|
-
throw new TypeError;
|
|
198
|
-
if (!IsUndefined(propertyKey))
|
|
199
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
200
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
201
|
-
}
|
|
202
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
203
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
204
|
-
if (!IsObject(target))
|
|
205
|
-
throw new TypeError;
|
|
206
|
-
if (!IsUndefined(propertyKey))
|
|
207
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
208
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
209
|
-
}
|
|
210
|
-
exporter("getMetadata", getMetadata);
|
|
211
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
212
|
-
if (!IsObject(target))
|
|
213
|
-
throw new TypeError;
|
|
214
|
-
if (!IsUndefined(propertyKey))
|
|
215
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
216
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
217
|
-
}
|
|
218
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
219
|
-
function getMetadataKeys(target, propertyKey) {
|
|
220
|
-
if (!IsObject(target))
|
|
221
|
-
throw new TypeError;
|
|
222
|
-
if (!IsUndefined(propertyKey))
|
|
223
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
224
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
225
|
-
}
|
|
226
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
227
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
228
|
-
if (!IsObject(target))
|
|
229
|
-
throw new TypeError;
|
|
230
|
-
if (!IsUndefined(propertyKey))
|
|
231
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
232
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
233
|
-
}
|
|
234
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
235
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
236
|
-
if (!IsObject(target))
|
|
237
|
-
throw new TypeError;
|
|
238
|
-
if (!IsUndefined(propertyKey))
|
|
239
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
240
|
-
if (!IsObject(target))
|
|
241
|
-
throw new TypeError;
|
|
242
|
-
if (!IsUndefined(propertyKey))
|
|
243
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
244
|
-
var provider = GetMetadataProvider(target, propertyKey, false);
|
|
245
|
-
if (IsUndefined(provider))
|
|
246
|
-
return false;
|
|
247
|
-
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
248
|
-
}
|
|
249
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
250
|
-
function DecorateConstructor(decorators, target) {
|
|
251
|
-
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
252
|
-
var decorator = decorators[i];
|
|
253
|
-
var decorated = decorator(target);
|
|
254
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
255
|
-
if (!IsConstructor(decorated))
|
|
256
|
-
throw new TypeError;
|
|
257
|
-
target = decorated;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return target;
|
|
261
|
-
}
|
|
262
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
263
|
-
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
264
|
-
var decorator = decorators[i];
|
|
265
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
266
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
267
|
-
if (!IsObject(decorated))
|
|
268
|
-
throw new TypeError;
|
|
269
|
-
descriptor = decorated;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return descriptor;
|
|
273
|
-
}
|
|
274
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
275
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
276
|
-
if (hasOwn2)
|
|
277
|
-
return true;
|
|
278
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
279
|
-
if (!IsNull(parent))
|
|
280
|
-
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
281
|
-
return false;
|
|
282
|
-
}
|
|
283
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
284
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
285
|
-
if (IsUndefined(provider))
|
|
286
|
-
return false;
|
|
287
|
-
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
288
|
-
}
|
|
289
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
290
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
291
|
-
if (hasOwn2)
|
|
292
|
-
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
293
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
294
|
-
if (!IsNull(parent))
|
|
295
|
-
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
299
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
300
|
-
if (IsUndefined(provider))
|
|
301
|
-
return;
|
|
302
|
-
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
303
|
-
}
|
|
304
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
305
|
-
var provider = GetMetadataProvider(O, P, true);
|
|
306
|
-
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
307
|
-
}
|
|
308
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
309
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
310
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
311
|
-
if (parent === null)
|
|
312
|
-
return ownKeys;
|
|
313
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
314
|
-
if (parentKeys.length <= 0)
|
|
315
|
-
return ownKeys;
|
|
316
|
-
if (ownKeys.length <= 0)
|
|
317
|
-
return parentKeys;
|
|
318
|
-
var set = new _Set;
|
|
319
|
-
var keys = [];
|
|
320
|
-
for (var _i = 0, ownKeys_1 = ownKeys;_i < ownKeys_1.length; _i++) {
|
|
321
|
-
var key = ownKeys_1[_i];
|
|
322
|
-
var hasKey = set.has(key);
|
|
323
|
-
if (!hasKey) {
|
|
324
|
-
set.add(key);
|
|
325
|
-
keys.push(key);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
for (var _a = 0, parentKeys_1 = parentKeys;_a < parentKeys_1.length; _a++) {
|
|
329
|
-
var key = parentKeys_1[_a];
|
|
330
|
-
var hasKey = set.has(key);
|
|
331
|
-
if (!hasKey) {
|
|
332
|
-
set.add(key);
|
|
333
|
-
keys.push(key);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
return keys;
|
|
337
|
-
}
|
|
338
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
339
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
340
|
-
if (!provider) {
|
|
341
|
-
return [];
|
|
342
|
-
}
|
|
343
|
-
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
344
|
-
}
|
|
345
|
-
function Type(x) {
|
|
346
|
-
if (x === null)
|
|
347
|
-
return 1;
|
|
348
|
-
switch (typeof x) {
|
|
349
|
-
case "undefined":
|
|
350
|
-
return 0;
|
|
351
|
-
case "boolean":
|
|
352
|
-
return 2;
|
|
353
|
-
case "string":
|
|
354
|
-
return 3;
|
|
355
|
-
case "symbol":
|
|
356
|
-
return 4;
|
|
357
|
-
case "number":
|
|
358
|
-
return 5;
|
|
359
|
-
case "object":
|
|
360
|
-
return x === null ? 1 : 6;
|
|
361
|
-
default:
|
|
362
|
-
return 6;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function IsUndefined(x) {
|
|
366
|
-
return x === undefined;
|
|
367
|
-
}
|
|
368
|
-
function IsNull(x) {
|
|
369
|
-
return x === null;
|
|
370
|
-
}
|
|
371
|
-
function IsSymbol(x) {
|
|
372
|
-
return typeof x === "symbol";
|
|
373
|
-
}
|
|
374
|
-
function IsObject(x) {
|
|
375
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
376
|
-
}
|
|
377
|
-
function ToPrimitive(input, PreferredType) {
|
|
378
|
-
switch (Type(input)) {
|
|
379
|
-
case 0:
|
|
380
|
-
return input;
|
|
381
|
-
case 1:
|
|
382
|
-
return input;
|
|
383
|
-
case 2:
|
|
384
|
-
return input;
|
|
385
|
-
case 3:
|
|
386
|
-
return input;
|
|
387
|
-
case 4:
|
|
388
|
-
return input;
|
|
389
|
-
case 5:
|
|
390
|
-
return input;
|
|
391
|
-
}
|
|
392
|
-
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
393
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
394
|
-
if (exoticToPrim !== undefined) {
|
|
395
|
-
var result = exoticToPrim.call(input, hint);
|
|
396
|
-
if (IsObject(result))
|
|
397
|
-
throw new TypeError;
|
|
398
|
-
return result;
|
|
399
|
-
}
|
|
400
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
401
|
-
}
|
|
402
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
403
|
-
if (hint === "string") {
|
|
404
|
-
var toString_1 = O.toString;
|
|
405
|
-
if (IsCallable(toString_1)) {
|
|
406
|
-
var result = toString_1.call(O);
|
|
407
|
-
if (!IsObject(result))
|
|
408
|
-
return result;
|
|
409
|
-
}
|
|
410
|
-
var valueOf = O.valueOf;
|
|
411
|
-
if (IsCallable(valueOf)) {
|
|
412
|
-
var result = valueOf.call(O);
|
|
413
|
-
if (!IsObject(result))
|
|
414
|
-
return result;
|
|
415
|
-
}
|
|
416
|
-
} else {
|
|
417
|
-
var valueOf = O.valueOf;
|
|
418
|
-
if (IsCallable(valueOf)) {
|
|
419
|
-
var result = valueOf.call(O);
|
|
420
|
-
if (!IsObject(result))
|
|
421
|
-
return result;
|
|
422
|
-
}
|
|
423
|
-
var toString_2 = O.toString;
|
|
424
|
-
if (IsCallable(toString_2)) {
|
|
425
|
-
var result = toString_2.call(O);
|
|
426
|
-
if (!IsObject(result))
|
|
427
|
-
return result;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
throw new TypeError;
|
|
431
|
-
}
|
|
432
|
-
function ToBoolean(argument) {
|
|
433
|
-
return !!argument;
|
|
434
|
-
}
|
|
435
|
-
function ToString(argument) {
|
|
436
|
-
return "" + argument;
|
|
437
|
-
}
|
|
438
|
-
function ToPropertyKey(argument) {
|
|
439
|
-
var key = ToPrimitive(argument, 3);
|
|
440
|
-
if (IsSymbol(key))
|
|
441
|
-
return key;
|
|
442
|
-
return ToString(key);
|
|
443
|
-
}
|
|
444
|
-
function IsArray(argument) {
|
|
445
|
-
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
446
|
-
}
|
|
447
|
-
function IsCallable(argument) {
|
|
448
|
-
return typeof argument === "function";
|
|
449
|
-
}
|
|
450
|
-
function IsConstructor(argument) {
|
|
451
|
-
return typeof argument === "function";
|
|
452
|
-
}
|
|
453
|
-
function IsPropertyKey(argument) {
|
|
454
|
-
switch (Type(argument)) {
|
|
455
|
-
case 3:
|
|
456
|
-
return true;
|
|
457
|
-
case 4:
|
|
458
|
-
return true;
|
|
459
|
-
default:
|
|
460
|
-
return false;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
function SameValueZero(x, y) {
|
|
464
|
-
return x === y || x !== x && y !== y;
|
|
465
|
-
}
|
|
466
|
-
function GetMethod(V, P) {
|
|
467
|
-
var func = V[P];
|
|
468
|
-
if (func === undefined || func === null)
|
|
469
|
-
return;
|
|
470
|
-
if (!IsCallable(func))
|
|
471
|
-
throw new TypeError;
|
|
472
|
-
return func;
|
|
473
|
-
}
|
|
474
|
-
function GetIterator(obj) {
|
|
475
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
476
|
-
if (!IsCallable(method))
|
|
477
|
-
throw new TypeError;
|
|
478
|
-
var iterator = method.call(obj);
|
|
479
|
-
if (!IsObject(iterator))
|
|
480
|
-
throw new TypeError;
|
|
481
|
-
return iterator;
|
|
482
|
-
}
|
|
483
|
-
function IteratorValue(iterResult) {
|
|
484
|
-
return iterResult.value;
|
|
485
|
-
}
|
|
486
|
-
function IteratorStep(iterator) {
|
|
487
|
-
var result = iterator.next();
|
|
488
|
-
return result.done ? false : result;
|
|
489
|
-
}
|
|
490
|
-
function IteratorClose(iterator) {
|
|
491
|
-
var f = iterator["return"];
|
|
492
|
-
if (f)
|
|
493
|
-
f.call(iterator);
|
|
494
|
-
}
|
|
495
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
496
|
-
var proto = Object.getPrototypeOf(O);
|
|
497
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
498
|
-
return proto;
|
|
499
|
-
if (proto !== functionPrototype)
|
|
500
|
-
return proto;
|
|
501
|
-
var prototype = O.prototype;
|
|
502
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
503
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
504
|
-
return proto;
|
|
505
|
-
var constructor = prototypeProto.constructor;
|
|
506
|
-
if (typeof constructor !== "function")
|
|
507
|
-
return proto;
|
|
508
|
-
if (constructor === O)
|
|
509
|
-
return proto;
|
|
510
|
-
return constructor;
|
|
511
|
-
}
|
|
512
|
-
function CreateMetadataRegistry() {
|
|
513
|
-
var fallback;
|
|
514
|
-
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
515
|
-
fallback = CreateFallbackProvider(root.Reflect);
|
|
516
|
-
}
|
|
517
|
-
var first;
|
|
518
|
-
var second;
|
|
519
|
-
var rest;
|
|
520
|
-
var targetProviderMap = new _WeakMap;
|
|
521
|
-
var registry = {
|
|
522
|
-
registerProvider,
|
|
523
|
-
getProvider,
|
|
524
|
-
setProvider
|
|
525
|
-
};
|
|
526
|
-
return registry;
|
|
527
|
-
function registerProvider(provider) {
|
|
528
|
-
if (!Object.isExtensible(registry)) {
|
|
529
|
-
throw new Error("Cannot add provider to a frozen registry.");
|
|
530
|
-
}
|
|
531
|
-
switch (true) {
|
|
532
|
-
case fallback === provider:
|
|
533
|
-
break;
|
|
534
|
-
case IsUndefined(first):
|
|
535
|
-
first = provider;
|
|
536
|
-
break;
|
|
537
|
-
case first === provider:
|
|
538
|
-
break;
|
|
539
|
-
case IsUndefined(second):
|
|
540
|
-
second = provider;
|
|
541
|
-
break;
|
|
542
|
-
case second === provider:
|
|
543
|
-
break;
|
|
544
|
-
default:
|
|
545
|
-
if (rest === undefined)
|
|
546
|
-
rest = new _Set;
|
|
547
|
-
rest.add(provider);
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
function getProviderNoCache(O, P) {
|
|
552
|
-
if (!IsUndefined(first)) {
|
|
553
|
-
if (first.isProviderFor(O, P))
|
|
554
|
-
return first;
|
|
555
|
-
if (!IsUndefined(second)) {
|
|
556
|
-
if (second.isProviderFor(O, P))
|
|
557
|
-
return first;
|
|
558
|
-
if (!IsUndefined(rest)) {
|
|
559
|
-
var iterator = GetIterator(rest);
|
|
560
|
-
while (true) {
|
|
561
|
-
var next = IteratorStep(iterator);
|
|
562
|
-
if (!next) {
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
var provider = IteratorValue(next);
|
|
566
|
-
if (provider.isProviderFor(O, P)) {
|
|
567
|
-
IteratorClose(iterator);
|
|
568
|
-
return provider;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) {
|
|
575
|
-
return fallback;
|
|
576
|
-
}
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
function getProvider(O, P) {
|
|
580
|
-
var providerMap = targetProviderMap.get(O);
|
|
581
|
-
var provider;
|
|
582
|
-
if (!IsUndefined(providerMap)) {
|
|
583
|
-
provider = providerMap.get(P);
|
|
584
|
-
}
|
|
585
|
-
if (!IsUndefined(provider)) {
|
|
586
|
-
return provider;
|
|
587
|
-
}
|
|
588
|
-
provider = getProviderNoCache(O, P);
|
|
589
|
-
if (!IsUndefined(provider)) {
|
|
590
|
-
if (IsUndefined(providerMap)) {
|
|
591
|
-
providerMap = new _Map;
|
|
592
|
-
targetProviderMap.set(O, providerMap);
|
|
593
|
-
}
|
|
594
|
-
providerMap.set(P, provider);
|
|
595
|
-
}
|
|
596
|
-
return provider;
|
|
597
|
-
}
|
|
598
|
-
function hasProvider(provider) {
|
|
599
|
-
if (IsUndefined(provider))
|
|
600
|
-
throw new TypeError;
|
|
601
|
-
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
602
|
-
}
|
|
603
|
-
function setProvider(O, P, provider) {
|
|
604
|
-
if (!hasProvider(provider)) {
|
|
605
|
-
throw new Error("Metadata provider not registered.");
|
|
606
|
-
}
|
|
607
|
-
var existingProvider = getProvider(O, P);
|
|
608
|
-
if (existingProvider !== provider) {
|
|
609
|
-
if (!IsUndefined(existingProvider)) {
|
|
610
|
-
return false;
|
|
611
|
-
}
|
|
612
|
-
var providerMap = targetProviderMap.get(O);
|
|
613
|
-
if (IsUndefined(providerMap)) {
|
|
614
|
-
providerMap = new _Map;
|
|
615
|
-
targetProviderMap.set(O, providerMap);
|
|
616
|
-
}
|
|
617
|
-
providerMap.set(P, provider);
|
|
618
|
-
}
|
|
619
|
-
return true;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function GetOrCreateMetadataRegistry() {
|
|
623
|
-
var metadataRegistry2;
|
|
624
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
625
|
-
metadataRegistry2 = root.Reflect[registrySymbol];
|
|
626
|
-
}
|
|
627
|
-
if (IsUndefined(metadataRegistry2)) {
|
|
628
|
-
metadataRegistry2 = CreateMetadataRegistry();
|
|
629
|
-
}
|
|
630
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
631
|
-
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
632
|
-
enumerable: false,
|
|
633
|
-
configurable: false,
|
|
634
|
-
writable: false,
|
|
635
|
-
value: metadataRegistry2
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
return metadataRegistry2;
|
|
639
|
-
}
|
|
640
|
-
function CreateMetadataProvider(registry) {
|
|
641
|
-
var metadata2 = new _WeakMap;
|
|
642
|
-
var provider = {
|
|
643
|
-
isProviderFor: function(O, P) {
|
|
644
|
-
var targetMetadata = metadata2.get(O);
|
|
645
|
-
if (IsUndefined(targetMetadata))
|
|
646
|
-
return false;
|
|
647
|
-
return targetMetadata.has(P);
|
|
648
|
-
},
|
|
649
|
-
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
650
|
-
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
651
|
-
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
652
|
-
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
|
|
653
|
-
OrdinaryDeleteMetadata
|
|
654
|
-
};
|
|
655
|
-
metadataRegistry.registerProvider(provider);
|
|
656
|
-
return provider;
|
|
657
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
658
|
-
var targetMetadata = metadata2.get(O);
|
|
659
|
-
var createdTargetMetadata = false;
|
|
660
|
-
if (IsUndefined(targetMetadata)) {
|
|
661
|
-
if (!Create)
|
|
662
|
-
return;
|
|
663
|
-
targetMetadata = new _Map;
|
|
664
|
-
metadata2.set(O, targetMetadata);
|
|
665
|
-
createdTargetMetadata = true;
|
|
666
|
-
}
|
|
667
|
-
var metadataMap = targetMetadata.get(P);
|
|
668
|
-
if (IsUndefined(metadataMap)) {
|
|
669
|
-
if (!Create)
|
|
670
|
-
return;
|
|
671
|
-
metadataMap = new _Map;
|
|
672
|
-
targetMetadata.set(P, metadataMap);
|
|
673
|
-
if (!registry.setProvider(O, P, provider)) {
|
|
674
|
-
targetMetadata.delete(P);
|
|
675
|
-
if (createdTargetMetadata) {
|
|
676
|
-
metadata2.delete(O);
|
|
677
|
-
}
|
|
678
|
-
throw new Error("Wrong provider for target.");
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return metadataMap;
|
|
682
|
-
}
|
|
683
|
-
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
684
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
685
|
-
if (IsUndefined(metadataMap))
|
|
686
|
-
return false;
|
|
687
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
688
|
-
}
|
|
689
|
-
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
690
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
691
|
-
if (IsUndefined(metadataMap))
|
|
692
|
-
return;
|
|
693
|
-
return metadataMap.get(MetadataKey);
|
|
694
|
-
}
|
|
695
|
-
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
696
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, true);
|
|
697
|
-
metadataMap.set(MetadataKey, MetadataValue);
|
|
698
|
-
}
|
|
699
|
-
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
700
|
-
var keys = [];
|
|
701
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
702
|
-
if (IsUndefined(metadataMap))
|
|
703
|
-
return keys;
|
|
704
|
-
var keysObj = metadataMap.keys();
|
|
705
|
-
var iterator = GetIterator(keysObj);
|
|
706
|
-
var k = 0;
|
|
707
|
-
while (true) {
|
|
708
|
-
var next = IteratorStep(iterator);
|
|
709
|
-
if (!next) {
|
|
710
|
-
keys.length = k;
|
|
711
|
-
return keys;
|
|
712
|
-
}
|
|
713
|
-
var nextValue = IteratorValue(next);
|
|
714
|
-
try {
|
|
715
|
-
keys[k] = nextValue;
|
|
716
|
-
} catch (e) {
|
|
717
|
-
try {
|
|
718
|
-
IteratorClose(iterator);
|
|
719
|
-
} finally {
|
|
720
|
-
throw e;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
k++;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
727
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
728
|
-
if (IsUndefined(metadataMap))
|
|
729
|
-
return false;
|
|
730
|
-
if (!metadataMap.delete(MetadataKey))
|
|
731
|
-
return false;
|
|
732
|
-
if (metadataMap.size === 0) {
|
|
733
|
-
var targetMetadata = metadata2.get(O);
|
|
734
|
-
if (!IsUndefined(targetMetadata)) {
|
|
735
|
-
targetMetadata.delete(P);
|
|
736
|
-
if (targetMetadata.size === 0) {
|
|
737
|
-
metadata2.delete(targetMetadata);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
return true;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
function CreateFallbackProvider(reflect) {
|
|
745
|
-
var { defineMetadata: defineMetadata2, hasOwnMetadata: hasOwnMetadata2, getOwnMetadata: getOwnMetadata2, getOwnMetadataKeys: getOwnMetadataKeys2, deleteMetadata: deleteMetadata2 } = reflect;
|
|
746
|
-
var metadataOwner = new _WeakMap;
|
|
747
|
-
var provider = {
|
|
748
|
-
isProviderFor: function(O, P) {
|
|
749
|
-
var metadataPropertySet = metadataOwner.get(O);
|
|
750
|
-
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
751
|
-
return true;
|
|
752
|
-
}
|
|
753
|
-
if (getOwnMetadataKeys2(O, P).length) {
|
|
754
|
-
if (IsUndefined(metadataPropertySet)) {
|
|
755
|
-
metadataPropertySet = new _Set;
|
|
756
|
-
metadataOwner.set(O, metadataPropertySet);
|
|
757
|
-
}
|
|
758
|
-
metadataPropertySet.add(P);
|
|
759
|
-
return true;
|
|
760
|
-
}
|
|
761
|
-
return false;
|
|
762
|
-
},
|
|
763
|
-
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
764
|
-
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
765
|
-
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
766
|
-
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
|
|
767
|
-
OrdinaryDeleteMetadata: deleteMetadata2
|
|
768
|
-
};
|
|
769
|
-
return provider;
|
|
770
|
-
}
|
|
771
|
-
function GetMetadataProvider(O, P, Create) {
|
|
772
|
-
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
773
|
-
if (!IsUndefined(registeredProvider)) {
|
|
774
|
-
return registeredProvider;
|
|
775
|
-
}
|
|
776
|
-
if (Create) {
|
|
777
|
-
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
778
|
-
return metadataProvider;
|
|
779
|
-
}
|
|
780
|
-
throw new Error("Illegal state.");
|
|
781
|
-
}
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
function CreateMapPolyfill() {
|
|
785
|
-
var cacheSentinel = {};
|
|
786
|
-
var arraySentinel = [];
|
|
787
|
-
var MapIterator = function() {
|
|
788
|
-
function MapIterator2(keys, values, selector) {
|
|
789
|
-
this._index = 0;
|
|
790
|
-
this._keys = keys;
|
|
791
|
-
this._values = values;
|
|
792
|
-
this._selector = selector;
|
|
793
|
-
}
|
|
794
|
-
MapIterator2.prototype["@@iterator"] = function() {
|
|
795
|
-
return this;
|
|
796
|
-
};
|
|
797
|
-
MapIterator2.prototype[iteratorSymbol] = function() {
|
|
798
|
-
return this;
|
|
799
|
-
};
|
|
800
|
-
MapIterator2.prototype.next = function() {
|
|
801
|
-
var index = this._index;
|
|
802
|
-
if (index >= 0 && index < this._keys.length) {
|
|
803
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
804
|
-
if (index + 1 >= this._keys.length) {
|
|
805
|
-
this._index = -1;
|
|
806
|
-
this._keys = arraySentinel;
|
|
807
|
-
this._values = arraySentinel;
|
|
808
|
-
} else {
|
|
809
|
-
this._index++;
|
|
810
|
-
}
|
|
811
|
-
return { value: result, done: false };
|
|
812
|
-
}
|
|
813
|
-
return { value: undefined, done: true };
|
|
814
|
-
};
|
|
815
|
-
MapIterator2.prototype.throw = function(error) {
|
|
816
|
-
if (this._index >= 0) {
|
|
817
|
-
this._index = -1;
|
|
818
|
-
this._keys = arraySentinel;
|
|
819
|
-
this._values = arraySentinel;
|
|
820
|
-
}
|
|
821
|
-
throw error;
|
|
822
|
-
};
|
|
823
|
-
MapIterator2.prototype.return = function(value) {
|
|
824
|
-
if (this._index >= 0) {
|
|
825
|
-
this._index = -1;
|
|
826
|
-
this._keys = arraySentinel;
|
|
827
|
-
this._values = arraySentinel;
|
|
828
|
-
}
|
|
829
|
-
return { value, done: true };
|
|
830
|
-
};
|
|
831
|
-
return MapIterator2;
|
|
832
|
-
}();
|
|
833
|
-
var Map2 = function() {
|
|
834
|
-
function Map3() {
|
|
835
|
-
this._keys = [];
|
|
836
|
-
this._values = [];
|
|
837
|
-
this._cacheKey = cacheSentinel;
|
|
838
|
-
this._cacheIndex = -2;
|
|
839
|
-
}
|
|
840
|
-
Object.defineProperty(Map3.prototype, "size", {
|
|
841
|
-
get: function() {
|
|
842
|
-
return this._keys.length;
|
|
843
|
-
},
|
|
844
|
-
enumerable: true,
|
|
845
|
-
configurable: true
|
|
846
|
-
});
|
|
847
|
-
Map3.prototype.has = function(key) {
|
|
848
|
-
return this._find(key, false) >= 0;
|
|
849
|
-
};
|
|
850
|
-
Map3.prototype.get = function(key) {
|
|
851
|
-
var index = this._find(key, false);
|
|
852
|
-
return index >= 0 ? this._values[index] : undefined;
|
|
853
|
-
};
|
|
854
|
-
Map3.prototype.set = function(key, value) {
|
|
855
|
-
var index = this._find(key, true);
|
|
856
|
-
this._values[index] = value;
|
|
857
|
-
return this;
|
|
858
|
-
};
|
|
859
|
-
Map3.prototype.delete = function(key) {
|
|
860
|
-
var index = this._find(key, false);
|
|
861
|
-
if (index >= 0) {
|
|
862
|
-
var size = this._keys.length;
|
|
863
|
-
for (var i = index + 1;i < size; i++) {
|
|
864
|
-
this._keys[i - 1] = this._keys[i];
|
|
865
|
-
this._values[i - 1] = this._values[i];
|
|
866
|
-
}
|
|
867
|
-
this._keys.length--;
|
|
868
|
-
this._values.length--;
|
|
869
|
-
if (SameValueZero(key, this._cacheKey)) {
|
|
870
|
-
this._cacheKey = cacheSentinel;
|
|
871
|
-
this._cacheIndex = -2;
|
|
872
|
-
}
|
|
873
|
-
return true;
|
|
874
|
-
}
|
|
875
|
-
return false;
|
|
876
|
-
};
|
|
877
|
-
Map3.prototype.clear = function() {
|
|
878
|
-
this._keys.length = 0;
|
|
879
|
-
this._values.length = 0;
|
|
880
|
-
this._cacheKey = cacheSentinel;
|
|
881
|
-
this._cacheIndex = -2;
|
|
882
|
-
};
|
|
883
|
-
Map3.prototype.keys = function() {
|
|
884
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
885
|
-
};
|
|
886
|
-
Map3.prototype.values = function() {
|
|
887
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
888
|
-
};
|
|
889
|
-
Map3.prototype.entries = function() {
|
|
890
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
891
|
-
};
|
|
892
|
-
Map3.prototype["@@iterator"] = function() {
|
|
893
|
-
return this.entries();
|
|
894
|
-
};
|
|
895
|
-
Map3.prototype[iteratorSymbol] = function() {
|
|
896
|
-
return this.entries();
|
|
897
|
-
};
|
|
898
|
-
Map3.prototype._find = function(key, insert) {
|
|
899
|
-
if (!SameValueZero(this._cacheKey, key)) {
|
|
900
|
-
this._cacheIndex = -1;
|
|
901
|
-
for (var i = 0;i < this._keys.length; i++) {
|
|
902
|
-
if (SameValueZero(this._keys[i], key)) {
|
|
903
|
-
this._cacheIndex = i;
|
|
904
|
-
break;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
if (this._cacheIndex < 0 && insert) {
|
|
909
|
-
this._cacheIndex = this._keys.length;
|
|
910
|
-
this._keys.push(key);
|
|
911
|
-
this._values.push(undefined);
|
|
912
|
-
}
|
|
913
|
-
return this._cacheIndex;
|
|
914
|
-
};
|
|
915
|
-
return Map3;
|
|
916
|
-
}();
|
|
917
|
-
return Map2;
|
|
918
|
-
function getKey(key, _) {
|
|
919
|
-
return key;
|
|
920
|
-
}
|
|
921
|
-
function getValue(_, value) {
|
|
922
|
-
return value;
|
|
923
|
-
}
|
|
924
|
-
function getEntry(key, value) {
|
|
925
|
-
return [key, value];
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
function CreateSetPolyfill() {
|
|
929
|
-
var Set2 = function() {
|
|
930
|
-
function Set3() {
|
|
931
|
-
this._map = new _Map;
|
|
932
|
-
}
|
|
933
|
-
Object.defineProperty(Set3.prototype, "size", {
|
|
934
|
-
get: function() {
|
|
935
|
-
return this._map.size;
|
|
936
|
-
},
|
|
937
|
-
enumerable: true,
|
|
938
|
-
configurable: true
|
|
939
|
-
});
|
|
940
|
-
Set3.prototype.has = function(value) {
|
|
941
|
-
return this._map.has(value);
|
|
942
|
-
};
|
|
943
|
-
Set3.prototype.add = function(value) {
|
|
944
|
-
return this._map.set(value, value), this;
|
|
945
|
-
};
|
|
946
|
-
Set3.prototype.delete = function(value) {
|
|
947
|
-
return this._map.delete(value);
|
|
948
|
-
};
|
|
949
|
-
Set3.prototype.clear = function() {
|
|
950
|
-
this._map.clear();
|
|
951
|
-
};
|
|
952
|
-
Set3.prototype.keys = function() {
|
|
953
|
-
return this._map.keys();
|
|
954
|
-
};
|
|
955
|
-
Set3.prototype.values = function() {
|
|
956
|
-
return this._map.keys();
|
|
957
|
-
};
|
|
958
|
-
Set3.prototype.entries = function() {
|
|
959
|
-
return this._map.entries();
|
|
960
|
-
};
|
|
961
|
-
Set3.prototype["@@iterator"] = function() {
|
|
962
|
-
return this.keys();
|
|
963
|
-
};
|
|
964
|
-
Set3.prototype[iteratorSymbol] = function() {
|
|
965
|
-
return this.keys();
|
|
966
|
-
};
|
|
967
|
-
return Set3;
|
|
968
|
-
}();
|
|
969
|
-
return Set2;
|
|
970
|
-
}
|
|
971
|
-
function CreateWeakMapPolyfill() {
|
|
972
|
-
var UUID_SIZE = 16;
|
|
973
|
-
var keys = HashMap.create();
|
|
974
|
-
var rootKey = CreateUniqueKey();
|
|
975
|
-
return function() {
|
|
976
|
-
function WeakMap2() {
|
|
977
|
-
this._key = CreateUniqueKey();
|
|
978
|
-
}
|
|
979
|
-
WeakMap2.prototype.has = function(target) {
|
|
980
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
981
|
-
return table !== undefined ? HashMap.has(table, this._key) : false;
|
|
982
|
-
};
|
|
983
|
-
WeakMap2.prototype.get = function(target) {
|
|
984
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
985
|
-
return table !== undefined ? HashMap.get(table, this._key) : undefined;
|
|
986
|
-
};
|
|
987
|
-
WeakMap2.prototype.set = function(target, value) {
|
|
988
|
-
var table = GetOrCreateWeakMapTable(target, true);
|
|
989
|
-
table[this._key] = value;
|
|
990
|
-
return this;
|
|
991
|
-
};
|
|
992
|
-
WeakMap2.prototype.delete = function(target) {
|
|
993
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
994
|
-
return table !== undefined ? delete table[this._key] : false;
|
|
995
|
-
};
|
|
996
|
-
WeakMap2.prototype.clear = function() {
|
|
997
|
-
this._key = CreateUniqueKey();
|
|
998
|
-
};
|
|
999
|
-
return WeakMap2;
|
|
1000
|
-
}();
|
|
1001
|
-
function CreateUniqueKey() {
|
|
1002
|
-
var key;
|
|
1003
|
-
do
|
|
1004
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
1005
|
-
while (HashMap.has(keys, key));
|
|
1006
|
-
keys[key] = true;
|
|
1007
|
-
return key;
|
|
1008
|
-
}
|
|
1009
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
1010
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
1011
|
-
if (!create)
|
|
1012
|
-
return;
|
|
1013
|
-
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
1014
|
-
}
|
|
1015
|
-
return target[rootKey];
|
|
1016
|
-
}
|
|
1017
|
-
function FillRandomBytes(buffer, size) {
|
|
1018
|
-
for (var i = 0;i < size; ++i)
|
|
1019
|
-
buffer[i] = Math.random() * 255 | 0;
|
|
1020
|
-
return buffer;
|
|
1021
|
-
}
|
|
1022
|
-
function GenRandomBytes(size) {
|
|
1023
|
-
if (typeof Uint8Array === "function") {
|
|
1024
|
-
var array = new Uint8Array(size);
|
|
1025
|
-
if (typeof crypto !== "undefined") {
|
|
1026
|
-
crypto.getRandomValues(array);
|
|
1027
|
-
} else if (typeof msCrypto !== "undefined") {
|
|
1028
|
-
msCrypto.getRandomValues(array);
|
|
1029
|
-
} else {
|
|
1030
|
-
FillRandomBytes(array, size);
|
|
1031
|
-
}
|
|
1032
|
-
return array;
|
|
1033
|
-
}
|
|
1034
|
-
return FillRandomBytes(new Array(size), size);
|
|
1035
|
-
}
|
|
1036
|
-
function CreateUUID() {
|
|
1037
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
1038
|
-
data[6] = data[6] & 79 | 64;
|
|
1039
|
-
data[8] = data[8] & 191 | 128;
|
|
1040
|
-
var result = "";
|
|
1041
|
-
for (var offset = 0;offset < UUID_SIZE; ++offset) {
|
|
1042
|
-
var byte = data[offset];
|
|
1043
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
1044
|
-
result += "-";
|
|
1045
|
-
if (byte < 16)
|
|
1046
|
-
result += "0";
|
|
1047
|
-
result += byte.toString(16).toLowerCase();
|
|
1048
|
-
}
|
|
1049
|
-
return result;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
function MakeDictionary(obj) {
|
|
1053
|
-
obj.__ = undefined;
|
|
1054
|
-
delete obj.__;
|
|
1055
|
-
return obj;
|
|
1056
|
-
}
|
|
1057
|
-
});
|
|
1058
|
-
})(Reflect2 || (Reflect2 = {}));
|
|
1059
|
-
});
|
|
1060
|
-
|
|
1061
64
|
// packages/core/src/index.ts
|
|
1062
65
|
var exports_src = {};
|
|
1063
66
|
__export(exports_src, {
|
|
@@ -1735,7 +738,7 @@ function createDebugLogger(namespace) {
|
|
|
1735
738
|
}
|
|
1736
739
|
|
|
1737
740
|
// packages/core/src/api/KinoticDecorators.ts
|
|
1738
|
-
var import_reflect_metadata =
|
|
741
|
+
var import_reflect_metadata = require("reflect-metadata");
|
|
1739
742
|
|
|
1740
743
|
// packages/core/src/api/ServiceIdentifier.ts
|
|
1741
744
|
class ServiceIdentifier {
|
|
@@ -1991,7 +994,7 @@ var import_operators2 = require("rxjs/operators");
|
|
|
1991
994
|
// packages/core/package.json
|
|
1992
995
|
var package_default = {
|
|
1993
996
|
name: "@kinotic-ai/core",
|
|
1994
|
-
version: "1.
|
|
997
|
+
version: "1.2.1",
|
|
1995
998
|
type: "module",
|
|
1996
999
|
files: [
|
|
1997
1000
|
"dist"
|
|
@@ -2053,9 +1056,10 @@ var package_default = {
|
|
|
2053
1056
|
"@types/debug": "^4.1.12",
|
|
2054
1057
|
debug: "^4.4.3",
|
|
2055
1058
|
"p-tap": "^4.0.0",
|
|
1059
|
+
"reflect-metadata": "^0.2.2",
|
|
2056
1060
|
rxjs: "^7.8.2",
|
|
2057
1061
|
"typescript-optional": "3.0.0-alpha.3",
|
|
2058
|
-
uuid: "^
|
|
1062
|
+
uuid: "^11.0.0"
|
|
2059
1063
|
},
|
|
2060
1064
|
peerDependenciesMeta: {
|
|
2061
1065
|
typescript: {
|
|
@@ -2366,6 +1370,9 @@ class CrudServiceProxy {
|
|
|
2366
1370
|
save(entity) {
|
|
2367
1371
|
return this.serviceProxy.invoke("save", [entity]);
|
|
2368
1372
|
}
|
|
1373
|
+
saveSync(entity) {
|
|
1374
|
+
return this.serviceProxy.invoke("saveSync", [entity]);
|
|
1375
|
+
}
|
|
2369
1376
|
findByIdNotIn(ids, page) {
|
|
2370
1377
|
return this.serviceProxy.invoke("findByIdNotIn", [ids, page]);
|
|
2371
1378
|
}
|