@rpgjs/server 5.0.0-beta.6 → 5.0.0-beta.7
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/Player/Player.d.ts +34 -1
- package/dist/index.js +1596 -925
- package/dist/index.js.map +1 -1
- package/dist/{module-Dy124Jyk.js → module-5HOX9Ovu.js} +90 -698
- package/dist/module-5HOX9Ovu.js.map +1 -0
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +12 -12
- package/src/Player/Player.ts +52 -3
- package/dist/module-Dy124Jyk.js.map +0 -1
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@signe+sync@2.9.0/node_modules/@signe/sync/dist/chunk-7QVYU63E.js
|
|
2
|
-
var __defProp$2 = Object.defineProperty;
|
|
3
|
-
var __name$2 = (target, value) => __defProp$2(target, "name", {
|
|
4
|
-
value,
|
|
5
|
-
configurable: true
|
|
6
|
-
});
|
|
7
|
-
//#endregion
|
|
8
1
|
//#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
9
2
|
/******************************************************************************
|
|
10
3
|
Copyright (c) Microsoft Corporation.
|
|
@@ -254,7 +247,7 @@ function __asyncValues(o) {
|
|
|
254
247
|
}
|
|
255
248
|
//#endregion
|
|
256
249
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isFunction.js
|
|
257
|
-
function isFunction$
|
|
250
|
+
function isFunction$1(value) {
|
|
258
251
|
return typeof value === "function";
|
|
259
252
|
}
|
|
260
253
|
//#endregion
|
|
@@ -320,7 +313,7 @@ var Subscription = function() {
|
|
|
320
313
|
else _parentage.remove(this);
|
|
321
314
|
}
|
|
322
315
|
var initialFinalizer = this.initialTeardown;
|
|
323
|
-
if (isFunction$
|
|
316
|
+
if (isFunction$1(initialFinalizer)) try {
|
|
324
317
|
initialFinalizer();
|
|
325
318
|
} catch (e) {
|
|
326
319
|
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
@@ -390,10 +383,10 @@ var Subscription = function() {
|
|
|
390
383
|
}();
|
|
391
384
|
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
392
385
|
function isSubscription(value) {
|
|
393
|
-
return value instanceof Subscription || value && "closed" in value && isFunction$
|
|
386
|
+
return value instanceof Subscription || value && "closed" in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe);
|
|
394
387
|
}
|
|
395
388
|
function execFinalizer(finalizer) {
|
|
396
|
-
if (isFunction$
|
|
389
|
+
if (isFunction$1(finalizer)) finalizer();
|
|
397
390
|
else finalizer.unsubscribe();
|
|
398
391
|
}
|
|
399
392
|
//#endregion
|
|
@@ -575,7 +568,7 @@ var SafeSubscriber = function(_super) {
|
|
|
575
568
|
function SafeSubscriber(observerOrNext, error, complete) {
|
|
576
569
|
var _this = _super.call(this) || this;
|
|
577
570
|
var partialObserver;
|
|
578
|
-
if (isFunction$
|
|
571
|
+
if (isFunction$1(observerOrNext) || !observerOrNext) partialObserver = {
|
|
579
572
|
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
|
|
580
573
|
error: error !== null && error !== void 0 ? error : void 0,
|
|
581
574
|
complete: complete !== null && complete !== void 0 ? complete : void 0
|
|
@@ -722,7 +715,7 @@ function getPromiseCtor(promiseCtor) {
|
|
|
722
715
|
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
723
716
|
}
|
|
724
717
|
function isObserver(value) {
|
|
725
|
-
return value && isFunction$
|
|
718
|
+
return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
|
|
726
719
|
}
|
|
727
720
|
function isSubscriber(value) {
|
|
728
721
|
return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
|
|
@@ -730,7 +723,7 @@ function isSubscriber(value) {
|
|
|
730
723
|
//#endregion
|
|
731
724
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/lift.js
|
|
732
725
|
function hasLift(source) {
|
|
733
|
-
return isFunction$
|
|
726
|
+
return isFunction$1(source === null || source === void 0 ? void 0 : source.lift);
|
|
734
727
|
}
|
|
735
728
|
function operate(init) {
|
|
736
729
|
return function(source) {
|
|
@@ -973,22 +966,6 @@ var BehaviorSubject = function(_super) {
|
|
|
973
966
|
return BehaviorSubject;
|
|
974
967
|
}(Subject);
|
|
975
968
|
//#endregion
|
|
976
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js
|
|
977
|
-
function isScheduler(value) {
|
|
978
|
-
return value && isFunction$2(value.schedule);
|
|
979
|
-
}
|
|
980
|
-
//#endregion
|
|
981
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/args.js
|
|
982
|
-
function last(arr) {
|
|
983
|
-
return arr[arr.length - 1];
|
|
984
|
-
}
|
|
985
|
-
function popResultSelector(args) {
|
|
986
|
-
return isFunction$2(last(args)) ? args.pop() : void 0;
|
|
987
|
-
}
|
|
988
|
-
function popScheduler(args) {
|
|
989
|
-
return isScheduler(last(args)) ? args.pop() : void 0;
|
|
990
|
-
}
|
|
991
|
-
//#endregion
|
|
992
969
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js
|
|
993
970
|
var isArrayLike = (function(x) {
|
|
994
971
|
return x && typeof x.length === "number" && typeof x !== "function";
|
|
@@ -996,17 +973,17 @@ var isArrayLike = (function(x) {
|
|
|
996
973
|
//#endregion
|
|
997
974
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isPromise.js
|
|
998
975
|
function isPromise(value) {
|
|
999
|
-
return isFunction$
|
|
976
|
+
return isFunction$1(value === null || value === void 0 ? void 0 : value.then);
|
|
1000
977
|
}
|
|
1001
978
|
//#endregion
|
|
1002
979
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js
|
|
1003
980
|
function isInteropObservable(input) {
|
|
1004
|
-
return isFunction$
|
|
981
|
+
return isFunction$1(input[observable]);
|
|
1005
982
|
}
|
|
1006
983
|
//#endregion
|
|
1007
984
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js
|
|
1008
985
|
function isAsyncIterable(obj) {
|
|
1009
|
-
return Symbol.asyncIterator && isFunction$
|
|
986
|
+
return Symbol.asyncIterator && isFunction$1(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
|
|
1010
987
|
}
|
|
1011
988
|
//#endregion
|
|
1012
989
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js
|
|
@@ -1023,7 +1000,7 @@ var iterator = getSymbolIterator();
|
|
|
1023
1000
|
//#endregion
|
|
1024
1001
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isIterable.js
|
|
1025
1002
|
function isIterable(input) {
|
|
1026
|
-
return isFunction$
|
|
1003
|
+
return isFunction$1(input === null || input === void 0 ? void 0 : input[iterator]);
|
|
1027
1004
|
}
|
|
1028
1005
|
//#endregion
|
|
1029
1006
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
|
|
@@ -1064,7 +1041,7 @@ function readableStreamLikeToAsyncGenerator(readableStream) {
|
|
|
1064
1041
|
});
|
|
1065
1042
|
}
|
|
1066
1043
|
function isReadableStreamLike(obj) {
|
|
1067
|
-
return isFunction$
|
|
1044
|
+
return isFunction$1(obj === null || obj === void 0 ? void 0 : obj.getReader);
|
|
1068
1045
|
}
|
|
1069
1046
|
//#endregion
|
|
1070
1047
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js
|
|
@@ -1083,7 +1060,7 @@ function innerFrom(input) {
|
|
|
1083
1060
|
function fromInteropObservable(obj) {
|
|
1084
1061
|
return new Observable(function(subscriber) {
|
|
1085
1062
|
var obs = obj[observable]();
|
|
1086
|
-
if (isFunction$
|
|
1063
|
+
if (isFunction$1(obs.subscribe)) return obs.subscribe(subscriber);
|
|
1087
1064
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
1088
1065
|
});
|
|
1089
1066
|
}
|
|
@@ -1128,7 +1105,7 @@ function fromIterable(iterable) {
|
|
|
1128
1105
|
}
|
|
1129
1106
|
function fromAsyncIterable(asyncIterable) {
|
|
1130
1107
|
return new Observable(function(subscriber) {
|
|
1131
|
-
process
|
|
1108
|
+
process(asyncIterable, subscriber).catch(function(err) {
|
|
1132
1109
|
return subscriber.error(err);
|
|
1133
1110
|
});
|
|
1134
1111
|
});
|
|
@@ -1136,7 +1113,7 @@ function fromAsyncIterable(asyncIterable) {
|
|
|
1136
1113
|
function fromReadableStreamLike(readableStream) {
|
|
1137
1114
|
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
|
|
1138
1115
|
}
|
|
1139
|
-
function process
|
|
1116
|
+
function process(asyncIterable, subscriber) {
|
|
1140
1117
|
var asyncIterable_1, asyncIterable_1_1;
|
|
1141
1118
|
var e_2, _a;
|
|
1142
1119
|
return __awaiter(this, void 0, void 0, function() {
|
|
@@ -1278,7 +1255,7 @@ function scheduleIterable(input, scheduler) {
|
|
|
1278
1255
|
}, 0, true);
|
|
1279
1256
|
});
|
|
1280
1257
|
return function() {
|
|
1281
|
-
return isFunction$
|
|
1258
|
+
return isFunction$1(iterator$1 === null || iterator$1 === void 0 ? void 0 : iterator$1.return) && iterator$1.return();
|
|
1282
1259
|
};
|
|
1283
1260
|
});
|
|
1284
1261
|
}
|
|
@@ -1332,99 +1309,6 @@ function map(project, thisArg) {
|
|
|
1332
1309
|
});
|
|
1333
1310
|
}
|
|
1334
1311
|
//#endregion
|
|
1335
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js
|
|
1336
|
-
var isArray$2 = Array.isArray;
|
|
1337
|
-
function callOrApply(fn, args) {
|
|
1338
|
-
return isArray$2(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);
|
|
1339
|
-
}
|
|
1340
|
-
function mapOneOrManyArgs(fn) {
|
|
1341
|
-
return map(function(args) {
|
|
1342
|
-
return callOrApply(fn, args);
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
//#endregion
|
|
1346
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js
|
|
1347
|
-
var isArray$1 = Array.isArray;
|
|
1348
|
-
var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;
|
|
1349
|
-
function argsArgArrayOrObject(args) {
|
|
1350
|
-
if (args.length === 1) {
|
|
1351
|
-
var first_1 = args[0];
|
|
1352
|
-
if (isArray$1(first_1)) return {
|
|
1353
|
-
args: first_1,
|
|
1354
|
-
keys: null
|
|
1355
|
-
};
|
|
1356
|
-
if (isPOJO(first_1)) {
|
|
1357
|
-
var keys = getKeys(first_1);
|
|
1358
|
-
return {
|
|
1359
|
-
args: keys.map(function(key) {
|
|
1360
|
-
return first_1[key];
|
|
1361
|
-
}),
|
|
1362
|
-
keys
|
|
1363
|
-
};
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
return {
|
|
1367
|
-
args,
|
|
1368
|
-
keys: null
|
|
1369
|
-
};
|
|
1370
|
-
}
|
|
1371
|
-
function isPOJO(obj) {
|
|
1372
|
-
return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto;
|
|
1373
|
-
}
|
|
1374
|
-
//#endregion
|
|
1375
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/createObject.js
|
|
1376
|
-
function createObject(keys, values) {
|
|
1377
|
-
return keys.reduce(function(result, key, i) {
|
|
1378
|
-
return result[key] = values[i], result;
|
|
1379
|
-
}, {});
|
|
1380
|
-
}
|
|
1381
|
-
//#endregion
|
|
1382
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js
|
|
1383
|
-
function combineLatest() {
|
|
1384
|
-
var args = [];
|
|
1385
|
-
for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
|
|
1386
|
-
var scheduler = popScheduler(args);
|
|
1387
|
-
var resultSelector = popResultSelector(args);
|
|
1388
|
-
var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;
|
|
1389
|
-
if (observables.length === 0) return from([], scheduler);
|
|
1390
|
-
var result = new Observable(combineLatestInit(observables, scheduler, keys ? function(values) {
|
|
1391
|
-
return createObject(keys, values);
|
|
1392
|
-
} : identity));
|
|
1393
|
-
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
|
|
1394
|
-
}
|
|
1395
|
-
function combineLatestInit(observables, scheduler, valueTransform) {
|
|
1396
|
-
if (valueTransform === void 0) valueTransform = identity;
|
|
1397
|
-
return function(subscriber) {
|
|
1398
|
-
maybeSchedule(scheduler, function() {
|
|
1399
|
-
var length = observables.length;
|
|
1400
|
-
var values = new Array(length);
|
|
1401
|
-
var active = length;
|
|
1402
|
-
var remainingFirstValues = length;
|
|
1403
|
-
var _loop_1 = function(i) {
|
|
1404
|
-
maybeSchedule(scheduler, function() {
|
|
1405
|
-
var source = from(observables[i], scheduler);
|
|
1406
|
-
var hasFirstValue = false;
|
|
1407
|
-
source.subscribe(createOperatorSubscriber(subscriber, function(value) {
|
|
1408
|
-
values[i] = value;
|
|
1409
|
-
if (!hasFirstValue) {
|
|
1410
|
-
hasFirstValue = true;
|
|
1411
|
-
remainingFirstValues--;
|
|
1412
|
-
}
|
|
1413
|
-
if (!remainingFirstValues) subscriber.next(valueTransform(values.slice()));
|
|
1414
|
-
}, function() {
|
|
1415
|
-
if (!--active) subscriber.complete();
|
|
1416
|
-
}));
|
|
1417
|
-
}, subscriber);
|
|
1418
|
-
};
|
|
1419
|
-
for (var i = 0; i < length; i++) _loop_1(i);
|
|
1420
|
-
}, subscriber);
|
|
1421
|
-
};
|
|
1422
|
-
}
|
|
1423
|
-
function maybeSchedule(scheduler, execute, subscription) {
|
|
1424
|
-
if (scheduler) executeSchedule(subscription, scheduler, execute);
|
|
1425
|
-
else execute();
|
|
1426
|
-
}
|
|
1427
|
-
//#endregion
|
|
1428
1312
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js
|
|
1429
1313
|
function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
|
|
1430
1314
|
var buffer = [];
|
|
@@ -1476,7 +1360,7 @@ function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, e
|
|
|
1476
1360
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js
|
|
1477
1361
|
function mergeMap(project, resultSelector, concurrent) {
|
|
1478
1362
|
if (concurrent === void 0) concurrent = Infinity;
|
|
1479
|
-
if (isFunction$
|
|
1363
|
+
if (isFunction$1(resultSelector)) return mergeMap(function(a, i) {
|
|
1480
1364
|
return map(function(b, ii) {
|
|
1481
1365
|
return resultSelector(a, b, i, ii);
|
|
1482
1366
|
})(innerFrom(project(a, i)));
|
|
@@ -1529,17 +1413,6 @@ function toArray() {
|
|
|
1529
1413
|
});
|
|
1530
1414
|
}
|
|
1531
1415
|
//#endregion
|
|
1532
|
-
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/finalize.js
|
|
1533
|
-
function finalize(callback) {
|
|
1534
|
-
return operate(function(source, subscriber) {
|
|
1535
|
-
try {
|
|
1536
|
-
source.subscribe(subscriber);
|
|
1537
|
-
} finally {
|
|
1538
|
-
subscriber.add(callback);
|
|
1539
|
-
}
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
//#endregion
|
|
1543
1416
|
//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/share.js
|
|
1544
1417
|
function share(options) {
|
|
1545
1418
|
if (options === void 0) options = {};
|
|
@@ -1614,27 +1487,19 @@ function handleReset(reset, on) {
|
|
|
1614
1487
|
return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
|
|
1615
1488
|
}
|
|
1616
1489
|
//#endregion
|
|
1617
|
-
//#region ../../node_modules/.pnpm/@signe+reactive@2.9.
|
|
1618
|
-
var __defProp$1 = Object.defineProperty;
|
|
1619
|
-
var __name$1 = (target, value) => __defProp$1(target, "name", {
|
|
1620
|
-
value,
|
|
1621
|
-
configurable: true
|
|
1622
|
-
});
|
|
1490
|
+
//#region ../../node_modules/.pnpm/@signe+reactive@2.9.2/node_modules/@signe/reactive/dist/index.js
|
|
1623
1491
|
var ArraySubject = class extends BehaviorSubject {
|
|
1624
|
-
static {
|
|
1625
|
-
__name$1(this, "ArraySubject");
|
|
1626
|
-
}
|
|
1627
|
-
_items = [];
|
|
1628
1492
|
constructor(items = []) {
|
|
1629
1493
|
super({
|
|
1630
1494
|
type: "init",
|
|
1631
1495
|
items
|
|
1632
1496
|
});
|
|
1497
|
+
this._items = [];
|
|
1633
1498
|
this.createProxy(items);
|
|
1634
1499
|
}
|
|
1635
1500
|
createProxy(items) {
|
|
1636
1501
|
this._items = new Proxy(items, {
|
|
1637
|
-
get:
|
|
1502
|
+
get: (target, prop, receiver) => {
|
|
1638
1503
|
const origMethod = target[prop];
|
|
1639
1504
|
if (typeof origMethod === "function") return (...args) => {
|
|
1640
1505
|
let changeType = "update";
|
|
@@ -1689,8 +1554,8 @@ var ArraySubject = class extends BehaviorSubject {
|
|
|
1689
1554
|
return result;
|
|
1690
1555
|
};
|
|
1691
1556
|
return Reflect.get(target, prop, receiver);
|
|
1692
|
-
},
|
|
1693
|
-
set:
|
|
1557
|
+
},
|
|
1558
|
+
set: (target, prop, value) => {
|
|
1694
1559
|
const index = !isNaN(Number(prop)) ? Number(prop) : void 0;
|
|
1695
1560
|
target[prop] = value;
|
|
1696
1561
|
this.next({
|
|
@@ -1699,7 +1564,7 @@ var ArraySubject = class extends BehaviorSubject {
|
|
|
1699
1564
|
items: [value]
|
|
1700
1565
|
});
|
|
1701
1566
|
return true;
|
|
1702
|
-
}
|
|
1567
|
+
}
|
|
1703
1568
|
});
|
|
1704
1569
|
}
|
|
1705
1570
|
get items() {
|
|
@@ -1713,14 +1578,10 @@ var ArraySubject = class extends BehaviorSubject {
|
|
|
1713
1578
|
});
|
|
1714
1579
|
}
|
|
1715
1580
|
};
|
|
1716
|
-
var isArraySubject =
|
|
1581
|
+
var isArraySubject = (value) => {
|
|
1717
1582
|
return "_items" in value;
|
|
1718
|
-
}
|
|
1583
|
+
};
|
|
1719
1584
|
var ObjectSubject = class extends BehaviorSubject {
|
|
1720
|
-
static {
|
|
1721
|
-
__name$1(this, "ObjectSubject");
|
|
1722
|
-
}
|
|
1723
|
-
_obj;
|
|
1724
1585
|
constructor(obj = {}) {
|
|
1725
1586
|
super({
|
|
1726
1587
|
type: "init",
|
|
@@ -1730,10 +1591,10 @@ var ObjectSubject = class extends BehaviorSubject {
|
|
|
1730
1591
|
}
|
|
1731
1592
|
createProxy(obj) {
|
|
1732
1593
|
this._obj = new Proxy(obj, {
|
|
1733
|
-
get:
|
|
1594
|
+
get: (target, prop, receiver) => {
|
|
1734
1595
|
return Reflect.get(target, prop, receiver);
|
|
1735
|
-
},
|
|
1736
|
-
set:
|
|
1596
|
+
},
|
|
1597
|
+
set: (target, prop, value, receiver) => {
|
|
1737
1598
|
const key = prop;
|
|
1738
1599
|
const changeType = key in target ? "update" : "add";
|
|
1739
1600
|
target[key] = value;
|
|
@@ -1743,8 +1604,8 @@ var ObjectSubject = class extends BehaviorSubject {
|
|
|
1743
1604
|
value
|
|
1744
1605
|
});
|
|
1745
1606
|
return true;
|
|
1746
|
-
},
|
|
1747
|
-
deleteProperty:
|
|
1607
|
+
},
|
|
1608
|
+
deleteProperty: (target, prop) => {
|
|
1748
1609
|
const key = prop;
|
|
1749
1610
|
if (key in target) {
|
|
1750
1611
|
const value = target[key];
|
|
@@ -1757,7 +1618,7 @@ var ObjectSubject = class extends BehaviorSubject {
|
|
|
1757
1618
|
return true;
|
|
1758
1619
|
}
|
|
1759
1620
|
return false;
|
|
1760
|
-
}
|
|
1621
|
+
}
|
|
1761
1622
|
});
|
|
1762
1623
|
}
|
|
1763
1624
|
get obj() {
|
|
@@ -1771,10 +1632,10 @@ var ObjectSubject = class extends BehaviorSubject {
|
|
|
1771
1632
|
});
|
|
1772
1633
|
}
|
|
1773
1634
|
};
|
|
1774
|
-
var isObjectSubject =
|
|
1635
|
+
var isObjectSubject = (value) => {
|
|
1775
1636
|
return "_obj" in value;
|
|
1776
|
-
}
|
|
1777
|
-
var
|
|
1637
|
+
};
|
|
1638
|
+
var getGlobalReactiveStore = () => {
|
|
1778
1639
|
const globalKey = "__REACTIVE_STORE__";
|
|
1779
1640
|
if (typeof globalThis !== "undefined") {
|
|
1780
1641
|
if (!globalThis[globalKey]) globalThis[globalKey] = {
|
|
@@ -1785,8 +1646,8 @@ var reactiveStore = (/* @__PURE__ */ __name$1(() => {
|
|
|
1785
1646
|
}
|
|
1786
1647
|
let globalObj;
|
|
1787
1648
|
if (typeof window !== "undefined") globalObj = window;
|
|
1788
|
-
else if (typeof process !== "undefined" && process.versions && process.versions.node) globalObj = Function("return this")();
|
|
1789
1649
|
else if (typeof self !== "undefined") globalObj = self;
|
|
1650
|
+
else if (typeof Function !== "undefined") globalObj = Function("return this")();
|
|
1790
1651
|
else {
|
|
1791
1652
|
console.warn("Unable to find global object, using local instance");
|
|
1792
1653
|
return {
|
|
@@ -1799,24 +1660,25 @@ var reactiveStore = (/* @__PURE__ */ __name$1(() => {
|
|
|
1799
1660
|
currentSubscriptionsTracker: null
|
|
1800
1661
|
};
|
|
1801
1662
|
return globalObj[globalKey];
|
|
1802
|
-
}
|
|
1803
|
-
var
|
|
1663
|
+
};
|
|
1664
|
+
var reactiveStore = getGlobalReactiveStore();
|
|
1665
|
+
var trackDependency = (signal2) => {
|
|
1804
1666
|
if (reactiveStore.currentDependencyTracker) reactiveStore.currentDependencyTracker(signal2);
|
|
1805
|
-
}
|
|
1667
|
+
};
|
|
1806
1668
|
function signal(defaultValue, options) {
|
|
1807
1669
|
let subject;
|
|
1808
1670
|
if (Array.isArray(defaultValue)) subject = new ArraySubject(defaultValue);
|
|
1809
1671
|
else if (typeof defaultValue === "object" && defaultValue !== null) subject = new ObjectSubject(defaultValue);
|
|
1810
1672
|
else subject = new BehaviorSubject(defaultValue);
|
|
1811
|
-
const getValue =
|
|
1673
|
+
const getValue = () => {
|
|
1812
1674
|
if (subject instanceof ArraySubject) return subject.items;
|
|
1813
1675
|
else if (subject instanceof ObjectSubject) return subject.obj;
|
|
1814
1676
|
return subject.value;
|
|
1815
|
-
}
|
|
1816
|
-
const fn =
|
|
1677
|
+
};
|
|
1678
|
+
const fn = function() {
|
|
1817
1679
|
trackDependency(fn);
|
|
1818
1680
|
return getValue();
|
|
1819
|
-
}
|
|
1681
|
+
};
|
|
1820
1682
|
fn.set = (value) => {
|
|
1821
1683
|
const currentValue = getValue();
|
|
1822
1684
|
let shouldEmit = true;
|
|
@@ -1853,333 +1715,36 @@ function signal(defaultValue, options) {
|
|
|
1853
1715
|
fn._subject = subject;
|
|
1854
1716
|
return fn;
|
|
1855
1717
|
}
|
|
1856
|
-
__name$1(signal, "signal");
|
|
1857
1718
|
function isSignal(value) {
|
|
1858
1719
|
return !!(value && value.observable);
|
|
1859
1720
|
}
|
|
1860
|
-
__name$1(isSignal, "isSignal");
|
|
1861
1721
|
function isComputed(value) {
|
|
1862
1722
|
return isSignal(value) && !!value.dependencies;
|
|
1863
1723
|
}
|
|
1864
|
-
__name$1(isComputed, "isComputed");
|
|
1865
|
-
function computed(computeFunction, disposableFn) {
|
|
1866
|
-
const dependencies = /* @__PURE__ */ new Set();
|
|
1867
|
-
let init = true;
|
|
1868
|
-
let lastComputedValue;
|
|
1869
|
-
const previousTracker = reactiveStore.currentDependencyTracker;
|
|
1870
|
-
reactiveStore.currentDependencyTracker = (signal2) => {
|
|
1871
|
-
dependencies.add(signal2);
|
|
1872
|
-
};
|
|
1873
|
-
lastComputedValue = computeFunction();
|
|
1874
|
-
if (computeFunction["isEffect"]) disposableFn = lastComputedValue;
|
|
1875
|
-
reactiveStore.currentDependencyTracker = previousTracker;
|
|
1876
|
-
const computedObservable = combineLatest([...dependencies].map((dep) => {
|
|
1877
|
-
if (isComputed(dep) && "dependencies" in dep) {
|
|
1878
|
-
const computedDep = dep;
|
|
1879
|
-
if (computedDep.dependencies.size === 0) return new BehaviorSubject(computedDep()).asObservable();
|
|
1880
|
-
}
|
|
1881
|
-
return dep.observable;
|
|
1882
|
-
})).pipe(filter(() => !init), map(() => computeFunction()), finalize(() => disposableFn?.()));
|
|
1883
|
-
const fn = /* @__PURE__ */ __name$1(function() {
|
|
1884
|
-
trackDependency(fn);
|
|
1885
|
-
return lastComputedValue;
|
|
1886
|
-
}, "fn");
|
|
1887
|
-
fn.observable = computedObservable;
|
|
1888
|
-
fn.subscription = computedObservable.subscribe((value) => {
|
|
1889
|
-
lastComputedValue = value;
|
|
1890
|
-
});
|
|
1891
|
-
fn.dependencies = dependencies;
|
|
1892
|
-
reactiveStore.currentSubscriptionsTracker?.(fn.subscription);
|
|
1893
|
-
init = false;
|
|
1894
|
-
return fn;
|
|
1895
|
-
}
|
|
1896
|
-
__name$1(computed, "computed");
|
|
1897
|
-
function linkedSignal(computationOrOptions, simpleOptions) {
|
|
1898
|
-
const dependencies = /* @__PURE__ */ new Set();
|
|
1899
|
-
let init = true;
|
|
1900
|
-
let lastComputedValue;
|
|
1901
|
-
let computeFunction;
|
|
1902
|
-
let sourceSignal;
|
|
1903
|
-
let computationFn;
|
|
1904
|
-
let equalFn;
|
|
1905
|
-
let previousValue;
|
|
1906
|
-
let isOverridden = false;
|
|
1907
|
-
let overriddenValue;
|
|
1908
|
-
let depVersion = 0;
|
|
1909
|
-
let overrideDepVersion = null;
|
|
1910
|
-
if (typeof computationOrOptions === "function") {
|
|
1911
|
-
computeFunction = computationOrOptions;
|
|
1912
|
-
equalFn = simpleOptions?.equal;
|
|
1913
|
-
} else {
|
|
1914
|
-
const options = computationOrOptions;
|
|
1915
|
-
sourceSignal = options.source;
|
|
1916
|
-
computationFn = options.computation;
|
|
1917
|
-
equalFn = options.equal;
|
|
1918
|
-
if (typeof sourceSignal === "function" && !isSignal(sourceSignal)) {
|
|
1919
|
-
const sourceFn = sourceSignal;
|
|
1920
|
-
computeFunction = /* @__PURE__ */ __name$1(() => {
|
|
1921
|
-
const sourceValue = sourceFn();
|
|
1922
|
-
if (computationFn.length > 1) {
|
|
1923
|
-
const result = computationFn(sourceValue, previousValue);
|
|
1924
|
-
previousValue = {
|
|
1925
|
-
source: sourceValue,
|
|
1926
|
-
value: result
|
|
1927
|
-
};
|
|
1928
|
-
return result;
|
|
1929
|
-
} else {
|
|
1930
|
-
const result = computationFn(sourceValue);
|
|
1931
|
-
previousValue = {
|
|
1932
|
-
source: sourceValue,
|
|
1933
|
-
value: result
|
|
1934
|
-
};
|
|
1935
|
-
return result;
|
|
1936
|
-
}
|
|
1937
|
-
}, "computeFunction");
|
|
1938
|
-
} else {
|
|
1939
|
-
const source = typeof sourceSignal === "function" ? sourceSignal : sourceSignal;
|
|
1940
|
-
computeFunction = /* @__PURE__ */ __name$1(() => {
|
|
1941
|
-
const sourceValue = source();
|
|
1942
|
-
if (computationFn.length > 1) {
|
|
1943
|
-
const result = computationFn(sourceValue, previousValue);
|
|
1944
|
-
previousValue = {
|
|
1945
|
-
source: sourceValue,
|
|
1946
|
-
value: result
|
|
1947
|
-
};
|
|
1948
|
-
return result;
|
|
1949
|
-
} else {
|
|
1950
|
-
const result = computationFn(sourceValue);
|
|
1951
|
-
previousValue = {
|
|
1952
|
-
source: sourceValue,
|
|
1953
|
-
value: result
|
|
1954
|
-
};
|
|
1955
|
-
return result;
|
|
1956
|
-
}
|
|
1957
|
-
}, "computeFunction");
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
const previousTracker = reactiveStore.currentDependencyTracker;
|
|
1961
|
-
reactiveStore.currentDependencyTracker = (signal2) => {
|
|
1962
|
-
dependencies.add(signal2);
|
|
1963
|
-
};
|
|
1964
|
-
if (sourceSignal && typeof sourceSignal === "function" && !isSignal(sourceSignal)) lastComputedValue = computeFunction();
|
|
1965
|
-
else if (sourceSignal && isSignal(sourceSignal)) {
|
|
1966
|
-
dependencies.add(sourceSignal);
|
|
1967
|
-
lastComputedValue = computeFunction();
|
|
1968
|
-
} else lastComputedValue = computeFunction();
|
|
1969
|
-
reactiveStore.currentDependencyTracker = previousTracker;
|
|
1970
|
-
const subject = new BehaviorSubject(lastComputedValue);
|
|
1971
|
-
const observables = [...dependencies].map((dep) => {
|
|
1972
|
-
if (isComputed(dep) && "dependencies" in dep) {
|
|
1973
|
-
const computedDep = dep;
|
|
1974
|
-
if (computedDep.dependencies.size === 0) return new BehaviorSubject(computedDep()).asObservable();
|
|
1975
|
-
}
|
|
1976
|
-
return dep.observable;
|
|
1977
|
-
});
|
|
1978
|
-
let linkedObservable;
|
|
1979
|
-
if (observables.length > 0) linkedObservable = combineLatest(observables).pipe(filter(() => !init), map(() => {
|
|
1980
|
-
const computed2 = computeFunction();
|
|
1981
|
-
if (equalFn) {
|
|
1982
|
-
if (!equalFn(lastComputedValue, computed2)) {
|
|
1983
|
-
lastComputedValue = computed2;
|
|
1984
|
-
isOverridden = false;
|
|
1985
|
-
}
|
|
1986
|
-
} else if (lastComputedValue !== computed2) {
|
|
1987
|
-
lastComputedValue = computed2;
|
|
1988
|
-
isOverridden = false;
|
|
1989
|
-
}
|
|
1990
|
-
return lastComputedValue;
|
|
1991
|
-
}));
|
|
1992
|
-
else linkedObservable = subject.asObservable().pipe(filter(() => !init));
|
|
1993
|
-
const fn = /* @__PURE__ */ __name$1(function() {
|
|
1994
|
-
trackDependency(fn);
|
|
1995
|
-
if (isOverridden && dependencies.size > 0) {
|
|
1996
|
-
if (overrideDepVersion !== depVersion) {
|
|
1997
|
-
const computed2 = computeFunction();
|
|
1998
|
-
isOverridden = false;
|
|
1999
|
-
overriddenValue = void 0;
|
|
2000
|
-
lastComputedValue = computed2;
|
|
2001
|
-
overrideDepVersion = null;
|
|
2002
|
-
return computed2;
|
|
2003
|
-
}
|
|
2004
|
-
return overriddenValue;
|
|
2005
|
-
}
|
|
2006
|
-
if (isOverridden) return overriddenValue;
|
|
2007
|
-
if (dependencies.size === 0) lastComputedValue = computeFunction();
|
|
2008
|
-
return lastComputedValue;
|
|
2009
|
-
}, "fn");
|
|
2010
|
-
fn.observable = new Observable((observer) => {
|
|
2011
|
-
const depSubscription = linkedObservable.subscribe((value) => {
|
|
2012
|
-
if (dependencies.size > 0) {
|
|
2013
|
-
depVersion++;
|
|
2014
|
-
isOverridden = false;
|
|
2015
|
-
overrideDepVersion = null;
|
|
2016
|
-
lastComputedValue = value;
|
|
2017
|
-
} else lastComputedValue = value;
|
|
2018
|
-
observer.next(value);
|
|
2019
|
-
});
|
|
2020
|
-
let subjectSubscription;
|
|
2021
|
-
if (dependencies.size === 0) subjectSubscription = subject.pipe(filter(() => !init)).subscribe((value) => {
|
|
2022
|
-
observer.next(value);
|
|
2023
|
-
});
|
|
2024
|
-
observer.next(lastComputedValue);
|
|
2025
|
-
return () => {
|
|
2026
|
-
depSubscription.unsubscribe();
|
|
2027
|
-
if (subjectSubscription) subjectSubscription.unsubscribe();
|
|
2028
|
-
};
|
|
2029
|
-
});
|
|
2030
|
-
fn.subscription = fn.observable.subscribe(() => {});
|
|
2031
|
-
fn.dependencies = dependencies;
|
|
2032
|
-
fn._subject = subject;
|
|
2033
|
-
fn.set = (value) => {
|
|
2034
|
-
if (!isOverridden) {
|
|
2035
|
-
overrideDepVersion = depVersion;
|
|
2036
|
-
if (computationFn && sourceSignal) previousValue = {
|
|
2037
|
-
source: untracked(() => {
|
|
2038
|
-
if (typeof sourceSignal === "function") {
|
|
2039
|
-
const source = sourceSignal;
|
|
2040
|
-
return isSignal(source) ? source() : sourceSignal();
|
|
2041
|
-
}
|
|
2042
|
-
return sourceSignal();
|
|
2043
|
-
}),
|
|
2044
|
-
value
|
|
2045
|
-
};
|
|
2046
|
-
}
|
|
2047
|
-
isOverridden = true;
|
|
2048
|
-
overriddenValue = value;
|
|
2049
|
-
lastComputedValue = value;
|
|
2050
|
-
subject.next(value);
|
|
2051
|
-
};
|
|
2052
|
-
reactiveStore.currentSubscriptionsTracker?.(fn.subscription);
|
|
2053
|
-
init = false;
|
|
2054
|
-
return fn;
|
|
2055
|
-
}
|
|
2056
|
-
__name$1(linkedSignal, "linkedSignal");
|
|
2057
|
-
function untracked(fn) {
|
|
2058
|
-
const prevDepTracker = reactiveStore.currentDependencyTracker;
|
|
2059
|
-
const prevSubTracker = reactiveStore.currentSubscriptionsTracker;
|
|
2060
|
-
reactiveStore.currentDependencyTracker = null;
|
|
2061
|
-
reactiveStore.currentSubscriptionsTracker = null;
|
|
2062
|
-
try {
|
|
2063
|
-
return fn();
|
|
2064
|
-
} finally {
|
|
2065
|
-
reactiveStore.currentDependencyTracker = prevDepTracker;
|
|
2066
|
-
reactiveStore.currentSubscriptionsTracker = prevSubTracker;
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
__name$1(untracked, "untracked");
|
|
2070
|
-
function effect(fn) {
|
|
2071
|
-
fn["isEffect"] = true;
|
|
2072
|
-
return computed(fn);
|
|
2073
|
-
}
|
|
2074
|
-
__name$1(effect, "effect");
|
|
2075
1724
|
//#endregion
|
|
2076
|
-
//#region ../../node_modules/.pnpm/@signe+sync@2.9.
|
|
2077
|
-
|
|
2078
|
-
return {}.toString.call(val) === "[object Function]";
|
|
2079
|
-
}
|
|
2080
|
-
__name$2(isFunction$1, "isFunction");
|
|
2081
|
-
function isClass(obj) {
|
|
2082
|
-
return typeof obj === "function" && obj.prototype && obj.prototype.constructor === obj;
|
|
2083
|
-
}
|
|
2084
|
-
__name$2(isClass, "isClass");
|
|
2085
|
-
var isObject = /* @__PURE__ */ __name$2((item) => item && typeof item === "object" && !Array.isArray(item) && item !== null, "isObject");
|
|
1725
|
+
//#region ../../node_modules/.pnpm/@signe+sync@2.9.4/node_modules/@signe/sync/dist/index.js
|
|
1726
|
+
var isObject = (item) => item && typeof item === "object" && !Array.isArray(item) && item !== null;
|
|
2086
1727
|
function isInstanceOfClass(value) {
|
|
2087
1728
|
if (value === null || typeof value !== "object" || value === void 0 || Array.isArray(value)) return false;
|
|
2088
1729
|
return Object.getPrototypeOf(value) !== Object.prototype;
|
|
2089
1730
|
}
|
|
2090
|
-
__name$2(isInstanceOfClass, "isInstanceOfClass");
|
|
2091
1731
|
function generateShortUUID() {
|
|
2092
1732
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
1733
|
+
const randomBytes = typeof globalThis.crypto?.getRandomValues === "function" ? globalThis.crypto.getRandomValues(new Uint8Array(8)) : null;
|
|
2093
1734
|
let uuid = "";
|
|
2094
1735
|
for (let i = 0; i < 8; i++) {
|
|
2095
|
-
const
|
|
2096
|
-
uuid += chars[
|
|
1736
|
+
const randomValue = randomBytes?.[i] ?? Math.floor(Math.random() * 256);
|
|
1737
|
+
uuid += chars[randomValue % 62];
|
|
2097
1738
|
}
|
|
2098
1739
|
return uuid;
|
|
2099
1740
|
}
|
|
2100
|
-
__name$2(generateShortUUID, "generateShortUUID");
|
|
2101
1741
|
var DELETE_TOKEN = "$delete";
|
|
2102
|
-
var syncClass = /* @__PURE__ */ __name$2((instance, options = {}) => {
|
|
2103
|
-
const cacheSync = /* @__PURE__ */ new Map();
|
|
2104
|
-
const cachePersist = /* @__PURE__ */ new Map();
|
|
2105
|
-
instance.$valuesChanges = {
|
|
2106
|
-
set: /* @__PURE__ */ __name$2((path, value) => {
|
|
2107
|
-
cacheSync.set(path, value);
|
|
2108
|
-
options.onSync?.(cacheSync);
|
|
2109
|
-
}, "set"),
|
|
2110
|
-
setPersist: /* @__PURE__ */ __name$2((path, value) => {
|
|
2111
|
-
if (path == "") path = ".";
|
|
2112
|
-
cachePersist.set(path, value);
|
|
2113
|
-
options.onPersist?.(cachePersist);
|
|
2114
|
-
}, "setPersist"),
|
|
2115
|
-
has: /* @__PURE__ */ __name$2((path) => {
|
|
2116
|
-
return cacheSync.has(path);
|
|
2117
|
-
}, "has"),
|
|
2118
|
-
get: /* @__PURE__ */ __name$2((path) => {
|
|
2119
|
-
return cacheSync.get(path);
|
|
2120
|
-
}, "get")
|
|
2121
|
-
};
|
|
2122
|
-
createSyncClass(instance);
|
|
2123
|
-
}, "syncClass");
|
|
2124
|
-
function createStatesSnapshot(instance) {
|
|
2125
|
-
let persistObject = {};
|
|
2126
|
-
if (instance?.$snapshot) for (const key of instance.$snapshot.keys()) {
|
|
2127
|
-
const signal = instance.$snapshot.get(key);
|
|
2128
|
-
const persist2 = signal.options.persist ?? true;
|
|
2129
|
-
let value = signal();
|
|
2130
|
-
if (isObject(value) || Array.isArray(value)) continue;
|
|
2131
|
-
if (persist2) persistObject[key] = value;
|
|
2132
|
-
}
|
|
2133
|
-
return persistObject;
|
|
2134
|
-
}
|
|
2135
|
-
__name$2(createStatesSnapshot, "createStatesSnapshot");
|
|
2136
|
-
var SNAPSHOT_SKIP = Symbol("snapshot-skip");
|
|
2137
|
-
var serializeSnapshotDeep = /* @__PURE__ */ __name$2((value, path, options, seen) => {
|
|
2138
|
-
if (isSignal(value)) return serializeSnapshotDeep(value(), path, options, seen);
|
|
2139
|
-
if (value instanceof Map) return SNAPSHOT_SKIP;
|
|
2140
|
-
if (options.filter && !options.filter(value, path)) return SNAPSHOT_SKIP;
|
|
2141
|
-
if (value instanceof Date) return options.dateToString ? options.dateToString(value) : value.toISOString();
|
|
2142
|
-
if (value && typeof value === "object") {
|
|
2143
|
-
if (seen.has(value)) return SNAPSHOT_SKIP;
|
|
2144
|
-
seen.add(value);
|
|
2145
|
-
if (Array.isArray(value)) {
|
|
2146
|
-
const result2 = [];
|
|
2147
|
-
value.forEach((item, index) => {
|
|
2148
|
-
const serialized = serializeSnapshotDeep(item, path ? `${path}.${index}` : String(index), options, seen);
|
|
2149
|
-
if (serialized !== SNAPSHOT_SKIP) result2.push(serialized);
|
|
2150
|
-
});
|
|
2151
|
-
return result2;
|
|
2152
|
-
}
|
|
2153
|
-
const result = {};
|
|
2154
|
-
const idKey = isInstanceOfClass(value) ? value.constructor?._propertyMetadata?.get("id") : void 0;
|
|
2155
|
-
const entries = Object.entries(value).filter(([key]) => isInstanceOfClass(value) ? key.startsWith("__") || (idKey ? key === idKey : false) : true);
|
|
2156
|
-
for (const [key, childValue] of entries) {
|
|
2157
|
-
const normalizedKey = key.startsWith("__") ? key.slice(2) : key;
|
|
2158
|
-
const serialized = serializeSnapshotDeep(childValue, path ? `${path}.${normalizedKey}` : normalizedKey, options, seen);
|
|
2159
|
-
if (serialized !== SNAPSHOT_SKIP) result[normalizedKey] = serialized;
|
|
2160
|
-
}
|
|
2161
|
-
return result;
|
|
2162
|
-
}
|
|
2163
|
-
return value;
|
|
2164
|
-
}, "serializeSnapshotDeep");
|
|
2165
|
-
function createStatesSnapshotDeep(instance, options = {}) {
|
|
2166
|
-
const persistObject = {};
|
|
2167
|
-
if (instance?.$snapshot) for (const key of instance.$snapshot.keys()) {
|
|
2168
|
-
const signal = instance.$snapshot.get(key);
|
|
2169
|
-
if (!(signal.options.persist ?? true)) continue;
|
|
2170
|
-
const serialized = serializeSnapshotDeep(signal(), key, options, /* @__PURE__ */ new WeakSet());
|
|
2171
|
-
if (serialized !== SNAPSHOT_SKIP) persistObject[key] = serialized;
|
|
2172
|
-
}
|
|
2173
|
-
return persistObject;
|
|
2174
|
-
}
|
|
2175
|
-
__name$2(createStatesSnapshotDeep, "createStatesSnapshotDeep");
|
|
2176
1742
|
function setMetadata(target, key, value) {
|
|
2177
1743
|
const propId = target.constructor._propertyMetadata?.get(key);
|
|
2178
1744
|
if (propId) if (isSignal(target[propId])) target[propId].set(value);
|
|
2179
1745
|
else target[propId] = value;
|
|
2180
1746
|
}
|
|
2181
|
-
|
|
2182
|
-
var createSyncClass = /* @__PURE__ */ __name$2((currentClass, parentKey = null, parentClass = null, path = "") => {
|
|
1747
|
+
var createSyncClass = (currentClass, parentKey = null, parentClass = null, path = "") => {
|
|
2183
1748
|
currentClass.$path = path;
|
|
2184
1749
|
if (parentClass) currentClass.$valuesChanges = parentClass.$valuesChanges;
|
|
2185
1750
|
if (parentKey) setMetadata(currentClass, "id", parentKey);
|
|
@@ -2204,11 +1769,11 @@ var createSyncClass = /* @__PURE__ */ __name$2((currentClass, parentKey = null,
|
|
|
2204
1769
|
}
|
|
2205
1770
|
});
|
|
2206
1771
|
}
|
|
2207
|
-
}
|
|
2208
|
-
var type =
|
|
1772
|
+
};
|
|
1773
|
+
var type = (_signal, path, options = {}, currentInstance) => {
|
|
2209
1774
|
const { syncToClient = true, persist: persist2 = true, transform } = options;
|
|
2210
1775
|
let init = true;
|
|
2211
|
-
const handleObjectSubject =
|
|
1776
|
+
const handleObjectSubject = (value, propPath) => {
|
|
2212
1777
|
const newPath = `${propPath}${value.key ? `.${value.key}` : ""}`;
|
|
2213
1778
|
if ([
|
|
2214
1779
|
"add",
|
|
@@ -2218,8 +1783,8 @@ var type = /* @__PURE__ */ __name$2((_signal, path, options = {}, currentInstanc
|
|
|
2218
1783
|
else if (value.type === "update" && (isObject(value.value) || Array.isArray(value.value))) createSyncClass(value.value, value.key, currentInstance, newPath);
|
|
2219
1784
|
else savePath(newPath, value.value);
|
|
2220
1785
|
else if (value.type === "remove") savePath(newPath, DELETE_TOKEN);
|
|
2221
|
-
}
|
|
2222
|
-
const handleArraySubject =
|
|
1786
|
+
};
|
|
1787
|
+
const handleArraySubject = (value, propPath) => {
|
|
2223
1788
|
if (value.type === "reset" && Array.isArray(value.items)) {
|
|
2224
1789
|
value.items.forEach((item, index) => {
|
|
2225
1790
|
const newPath2 = `${propPath}.${index}`;
|
|
@@ -2234,13 +1799,13 @@ var type = /* @__PURE__ */ __name$2((_signal, path, options = {}, currentInstanc
|
|
|
2234
1799
|
else if (value.type === "update" && (isObject(firstItem) || Array.isArray(firstItem))) createSyncClass(firstItem, value.key, currentInstance, newPath);
|
|
2235
1800
|
else savePath(newPath, firstItem);
|
|
2236
1801
|
else if (value.type === "remove") savePath(newPath, DELETE_TOKEN);
|
|
2237
|
-
}
|
|
2238
|
-
const savePath =
|
|
1802
|
+
};
|
|
1803
|
+
const savePath = (propPath, value) => {
|
|
2239
1804
|
const transformedValue = transform && value !== "$delete" ? transform(value) : value;
|
|
2240
1805
|
if (syncToClient) currentInstance.$valuesChanges.set(propPath, transformedValue);
|
|
2241
1806
|
if (persist2 && currentInstance.$path !== void 0) currentInstance.$valuesChanges.setPersist(transformedValue == "$delete" ? propPath : currentInstance.$path, transformedValue);
|
|
2242
|
-
}
|
|
2243
|
-
const setupSubscription =
|
|
1807
|
+
};
|
|
1808
|
+
const setupSubscription = (signal, signalPath) => {
|
|
2244
1809
|
if (!isSignal(signal)) return;
|
|
2245
1810
|
if (syncToClient && currentInstance.$valuesChanges) {
|
|
2246
1811
|
const initialValue = signal();
|
|
@@ -2260,7 +1825,7 @@ var type = /* @__PURE__ */ __name$2((_signal, path, options = {}, currentInstanc
|
|
|
2260
1825
|
});
|
|
2261
1826
|
if (!currentInstance.$snapshot) currentInstance.$snapshot = /* @__PURE__ */ new Map();
|
|
2262
1827
|
currentInstance.$snapshot.set(path, signal);
|
|
2263
|
-
}
|
|
1828
|
+
};
|
|
2264
1829
|
if (!isSignal(_signal)) {
|
|
2265
1830
|
if (_signal && typeof _signal === "object" && !Array.isArray(_signal)) {
|
|
2266
1831
|
for (const key in _signal) if (Object.prototype.hasOwnProperty.call(_signal, key)) {
|
|
@@ -2276,7 +1841,7 @@ var type = /* @__PURE__ */ __name$2((_signal, path, options = {}, currentInstanc
|
|
|
2276
1841
|
setupSubscription(_signal, path);
|
|
2277
1842
|
init = false;
|
|
2278
1843
|
return _signal;
|
|
2279
|
-
}
|
|
1844
|
+
};
|
|
2280
1845
|
function sync(options) {
|
|
2281
1846
|
let classType;
|
|
2282
1847
|
let persist2 = true;
|
|
@@ -2291,46 +1856,31 @@ function sync(options) {
|
|
|
2291
1856
|
}
|
|
2292
1857
|
return function(target, propertyKey) {
|
|
2293
1858
|
const privatePropertyKey = `__${propertyKey}`;
|
|
1859
|
+
const getter = function() {
|
|
1860
|
+
return this[privatePropertyKey];
|
|
1861
|
+
};
|
|
1862
|
+
const setter = function(newVal) {
|
|
1863
|
+
this[privatePropertyKey] = type(newVal, propertyKey, {
|
|
1864
|
+
classType,
|
|
1865
|
+
persist: persist2,
|
|
1866
|
+
syncToClient,
|
|
1867
|
+
transform
|
|
1868
|
+
}, this);
|
|
1869
|
+
};
|
|
2294
1870
|
Object.defineProperty(target, propertyKey, {
|
|
2295
|
-
get:
|
|
2296
|
-
|
|
2297
|
-
}, "getter"),
|
|
2298
|
-
set: /* @__PURE__ */ __name$2(function(newVal) {
|
|
2299
|
-
this[privatePropertyKey] = type(newVal, propertyKey, {
|
|
2300
|
-
classType,
|
|
2301
|
-
persist: persist2,
|
|
2302
|
-
syncToClient,
|
|
2303
|
-
transform
|
|
2304
|
-
}, this);
|
|
2305
|
-
}, "setter"),
|
|
1871
|
+
get: getter,
|
|
1872
|
+
set: setter,
|
|
2306
1873
|
enumerable: true,
|
|
2307
1874
|
configurable: true
|
|
2308
1875
|
});
|
|
2309
1876
|
};
|
|
2310
1877
|
}
|
|
2311
|
-
__name$2(sync, "sync");
|
|
2312
1878
|
function id() {
|
|
2313
1879
|
return function(target, propertyKey) {
|
|
2314
1880
|
if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
|
|
2315
1881
|
target.constructor._propertyMetadata.set("id", propertyKey);
|
|
2316
1882
|
};
|
|
2317
1883
|
}
|
|
2318
|
-
__name$2(id, "id");
|
|
2319
|
-
function users(options) {
|
|
2320
|
-
return function(target, propertyKey) {
|
|
2321
|
-
if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
|
|
2322
|
-
target.constructor._propertyMetadata.set("users", propertyKey);
|
|
2323
|
-
sync(options)(target, propertyKey);
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
__name$2(users, "users");
|
|
2327
|
-
function persist() {
|
|
2328
|
-
return sync({
|
|
2329
|
-
persist: true,
|
|
2330
|
-
syncToClient: false
|
|
2331
|
-
});
|
|
2332
|
-
}
|
|
2333
|
-
__name$2(persist, "persist");
|
|
2334
1884
|
function connected() {
|
|
2335
1885
|
return function(target, propertyKey) {
|
|
2336
1886
|
if (!target.constructor._propertyMetadata) target.constructor._propertyMetadata = /* @__PURE__ */ new Map();
|
|
@@ -2338,67 +1888,13 @@ function connected() {
|
|
|
2338
1888
|
sync({ persist: false })(target, propertyKey);
|
|
2339
1889
|
};
|
|
2340
1890
|
}
|
|
2341
|
-
__name$2(connected, "connected");
|
|
2342
|
-
function load(rootInstance, values, valueIsObject) {
|
|
2343
|
-
if (valueIsObject) loadFromObject(rootInstance, values);
|
|
2344
|
-
else loadFromPaths(rootInstance, values);
|
|
2345
|
-
}
|
|
2346
|
-
__name$2(load, "load");
|
|
2347
|
-
function loadFromPaths(rootInstance, values) {
|
|
2348
|
-
for (const [path, value] of Object.entries(values)) loadValue(rootInstance, path.split("."), value);
|
|
2349
|
-
}
|
|
2350
|
-
__name$2(loadFromPaths, "loadFromPaths");
|
|
2351
|
-
function loadFromObject(rootInstance, values, currentPath = "") {
|
|
2352
|
-
for (let key in values) {
|
|
2353
|
-
const value = values[key];
|
|
2354
|
-
const newPath = currentPath ? `${currentPath}.${key}` : key;
|
|
2355
|
-
if (typeof value === "object" && !Array.isArray(value) && value !== null) loadFromObject(rootInstance, value, newPath);
|
|
2356
|
-
else loadValue(rootInstance, newPath.split("."), value);
|
|
2357
|
-
}
|
|
2358
|
-
}
|
|
2359
|
-
__name$2(loadFromObject, "loadFromObject");
|
|
2360
|
-
function loadValue(rootInstance, parts, value) {
|
|
2361
|
-
let current = rootInstance;
|
|
2362
|
-
for (let i = 0; i < parts.length; i++) {
|
|
2363
|
-
const part = parts[i];
|
|
2364
|
-
if (i === parts.length - 1) if (value == "$delete") {
|
|
2365
|
-
if (isSignal(current)) current = current();
|
|
2366
|
-
Reflect.deleteProperty(current, part);
|
|
2367
|
-
} else if (current[part]?._subject) current[part].set(value);
|
|
2368
|
-
else if (isSignal(current) && Array.isArray(current()) && !isNaN(Number(part))) current()[Number(part)] = value;
|
|
2369
|
-
else current[part] = value;
|
|
2370
|
-
else {
|
|
2371
|
-
if (isSignal(current)) current = current();
|
|
2372
|
-
if (current[part] === void 0) {
|
|
2373
|
-
const classType = getByPath(rootInstance, parts.slice(0, i).join("."))?.options?.classType;
|
|
2374
|
-
if (classType) {
|
|
2375
|
-
current[part] = !isClass(classType) ? classType(part) : new classType();
|
|
2376
|
-
setMetadata(current[part], "id", part);
|
|
2377
|
-
} else current[part] = {};
|
|
2378
|
-
}
|
|
2379
|
-
current = current[part];
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
__name$2(loadValue, "loadValue");
|
|
2384
|
-
function getByPath(root, path) {
|
|
2385
|
-
const parts = path.split(".");
|
|
2386
|
-
let current = root;
|
|
2387
|
-
for (const part of parts) {
|
|
2388
|
-
if (isSignal(current)) current = current();
|
|
2389
|
-
if (current[part]) current = current[part];
|
|
2390
|
-
else return;
|
|
2391
|
-
}
|
|
2392
|
-
return current;
|
|
2393
|
-
}
|
|
2394
|
-
__name$2(getByPath, "getByPath");
|
|
2395
1891
|
//#endregion
|
|
2396
|
-
//#region \0@oxc-project+runtime@0.
|
|
1892
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/decorateMetadata.js
|
|
2397
1893
|
function __decorateMetadata(k, v) {
|
|
2398
1894
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2399
1895
|
}
|
|
2400
1896
|
//#endregion
|
|
2401
|
-
//#region \0@oxc-project+runtime@0.
|
|
1897
|
+
//#region \0@oxc-project+runtime@0.128.0/helpers/decorate.js
|
|
2402
1898
|
function __decorate(decorators, target, key, desc) {
|
|
2403
1899
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2404
1900
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2524,6 +2020,7 @@ var RpgCommonPlayer = class {
|
|
|
2524
2020
|
this.componentsCenter = signal(null);
|
|
2525
2021
|
this.componentsLeft = signal(null);
|
|
2526
2022
|
this.componentsRight = signal(null);
|
|
2023
|
+
this._removeTransition = signal("");
|
|
2527
2024
|
this.isConnected = signal(false);
|
|
2528
2025
|
this._intendedDirection = null;
|
|
2529
2026
|
this._directionFixed = signal(false);
|
|
@@ -2680,6 +2177,7 @@ __decorate([sync(), __decorateMetadata("design:type", Object)], RpgCommonPlayer.
|
|
|
2680
2177
|
__decorate([sync(), __decorateMetadata("design:type", Object)], RpgCommonPlayer.prototype, "componentsCenter", void 0);
|
|
2681
2178
|
__decorate([sync(), __decorateMetadata("design:type", Object)], RpgCommonPlayer.prototype, "componentsLeft", void 0);
|
|
2682
2179
|
__decorate([sync(), __decorateMetadata("design:type", Object)], RpgCommonPlayer.prototype, "componentsRight", void 0);
|
|
2180
|
+
__decorate([sync({ persist: false }), __decorateMetadata("design:type", Object)], RpgCommonPlayer.prototype, "_removeTransition", void 0);
|
|
2683
2181
|
__decorate([connected(), __decorateMetadata("design:type", Object)], RpgCommonPlayer.prototype, "isConnected", void 0);
|
|
2684
2182
|
//#endregion
|
|
2685
2183
|
//#region ../common/src/Shape.ts
|
|
@@ -8982,6 +8480,10 @@ var RpgCommonMap = class {
|
|
|
8982
8480
|
this.removeHitbox(key, event, "npc");
|
|
8983
8481
|
} else if (type === "update") {
|
|
8984
8482
|
event.id = event.id ?? key;
|
|
8483
|
+
if (event._removeTransition?.()) {
|
|
8484
|
+
this.removeHitbox(key, event, "npc");
|
|
8485
|
+
return;
|
|
8486
|
+
}
|
|
8985
8487
|
if (!this.getBody(key)) {
|
|
8986
8488
|
this.createCharacterHitbox(event, "npc", { mass: 100 });
|
|
8987
8489
|
return;
|
|
@@ -10615,25 +10117,17 @@ var AGI = "agi";
|
|
|
10615
10117
|
var INT = "int";
|
|
10616
10118
|
var DEX = "dex";
|
|
10617
10119
|
//#endregion
|
|
10618
|
-
//#region ../../node_modules/.pnpm/@signe+di@2.
|
|
10619
|
-
var __defProp = Object.defineProperty;
|
|
10620
|
-
var __name = (target, value) => __defProp(target, "name", {
|
|
10621
|
-
value,
|
|
10622
|
-
configurable: true
|
|
10623
|
-
});
|
|
10120
|
+
//#region ../../node_modules/.pnpm/@signe+di@2.10.0/node_modules/@signe/di/dist/index.js
|
|
10624
10121
|
var DEFAULT_INSTANCE_KEY = "__default__";
|
|
10625
10122
|
function toTokenName(token) {
|
|
10626
10123
|
return typeof token === "function" ? token.name : token;
|
|
10627
10124
|
}
|
|
10628
|
-
__name(toTokenName, "toTokenName");
|
|
10629
10125
|
function toInstanceKey(name) {
|
|
10630
10126
|
return name ?? DEFAULT_INSTANCE_KEY;
|
|
10631
10127
|
}
|
|
10632
|
-
__name(toInstanceKey, "toInstanceKey");
|
|
10633
10128
|
function getRecord(context, token) {
|
|
10634
10129
|
return context.get("inject:" + toTokenName(token));
|
|
10635
10130
|
}
|
|
10636
|
-
__name(getRecord, "getRecord");
|
|
10637
10131
|
function ensureRecord(context, token) {
|
|
10638
10132
|
const key = "inject:" + toTokenName(token);
|
|
10639
10133
|
let record = context.get(key);
|
|
@@ -10645,7 +10139,6 @@ function ensureRecord(context, token) {
|
|
|
10645
10139
|
context.set(key, record);
|
|
10646
10140
|
return record;
|
|
10647
10141
|
}
|
|
10648
|
-
__name(ensureRecord, "ensureRecord");
|
|
10649
10142
|
function provide(context, token, value, options = {}) {
|
|
10650
10143
|
const record = ensureRecord(context, token);
|
|
10651
10144
|
const instanceKey = toInstanceKey(options.name);
|
|
@@ -10654,41 +10147,17 @@ function provide(context, token, value, options = {}) {
|
|
|
10654
10147
|
record.values.set(instanceKey, value);
|
|
10655
10148
|
return value;
|
|
10656
10149
|
}
|
|
10657
|
-
__name(provide, "provide");
|
|
10658
|
-
function isInjected(context, token, options = {}) {
|
|
10659
|
-
const record = getRecord(context, token);
|
|
10660
|
-
if (!record) return false;
|
|
10661
|
-
if (options.name) return record.injected.has(toInstanceKey(options.name));
|
|
10662
|
-
if (record.multi) return record.injected.size > 0;
|
|
10663
|
-
return record.injected.has(DEFAULT_INSTANCE_KEY);
|
|
10664
|
-
}
|
|
10665
|
-
__name(isInjected, "isInjected");
|
|
10666
|
-
function isProvided(context, token, options = {}) {
|
|
10667
|
-
const record = getRecord(context, token);
|
|
10668
|
-
if (!record) return false;
|
|
10669
|
-
if (options.name) return record.values.has(toInstanceKey(options.name));
|
|
10670
|
-
if (record.multi) return record.values.size > 0;
|
|
10671
|
-
return record.values.has(DEFAULT_INSTANCE_KEY);
|
|
10672
|
-
}
|
|
10673
|
-
__name(isProvided, "isProvided");
|
|
10674
|
-
function hasInstance(context, token, options = {}) {
|
|
10675
|
-
return isProvided(context, token, options);
|
|
10676
|
-
}
|
|
10677
|
-
__name(hasInstance, "hasInstance");
|
|
10678
10150
|
function handleMissingInjection(token, options) {
|
|
10679
10151
|
const name = toTokenName(token);
|
|
10680
10152
|
if (options.name) throw new Error(`Injection provider ${name} with name ${options.name} not found`);
|
|
10681
10153
|
throw new Error(`Injection provider ${name} not found`);
|
|
10682
10154
|
}
|
|
10683
|
-
__name(handleMissingInjection, "handleMissingInjection");
|
|
10684
10155
|
function markInjected(record, key) {
|
|
10685
10156
|
record.injected.add(key);
|
|
10686
10157
|
}
|
|
10687
|
-
__name(markInjected, "markInjected");
|
|
10688
10158
|
function markAllInjected(record) {
|
|
10689
10159
|
for (const key of record.values.keys()) record.injected.add(key);
|
|
10690
10160
|
}
|
|
10691
|
-
__name(markAllInjected, "markAllInjected");
|
|
10692
10161
|
function inject$1(context, token, options = {}) {
|
|
10693
10162
|
const record = getRecord(context, token);
|
|
10694
10163
|
if (!record) {
|
|
@@ -10721,78 +10190,6 @@ function inject$1(context, token, options = {}) {
|
|
|
10721
10190
|
markInjected(record, DEFAULT_INSTANCE_KEY);
|
|
10722
10191
|
return value;
|
|
10723
10192
|
}
|
|
10724
|
-
__name(inject$1, "inject");
|
|
10725
|
-
function override(providers, newProvider, options) {
|
|
10726
|
-
let { upsert = false, key } = options ?? {};
|
|
10727
|
-
if (!key) key = typeof newProvider === "function" ? newProvider.name : newProvider.provide;
|
|
10728
|
-
const flatProviders = providers.flat();
|
|
10729
|
-
const exists = flatProviders.some((provider) => {
|
|
10730
|
-
if (typeof provider === "function") return provider.name === key;
|
|
10731
|
-
else if (typeof provider === "object") return provider.provide === key;
|
|
10732
|
-
return false;
|
|
10733
|
-
});
|
|
10734
|
-
const mappedProviders = flatProviders.map((provider) => {
|
|
10735
|
-
if (typeof provider === "function" && provider.name === key) return newProvider;
|
|
10736
|
-
else if (typeof provider === "object" && provider.provide === key) return newProvider;
|
|
10737
|
-
return provider;
|
|
10738
|
-
});
|
|
10739
|
-
if (upsert && !exists) mappedProviders.push(newProvider);
|
|
10740
|
-
return mappedProviders;
|
|
10741
|
-
}
|
|
10742
|
-
__name(override, "override");
|
|
10743
|
-
function findProviders(providers, name) {
|
|
10744
|
-
const results = [];
|
|
10745
|
-
for (const provider of providers) if (Array.isArray(provider)) results.push(...findProviders(provider, name));
|
|
10746
|
-
else if (findProvider(provider, name)) results.push(provider);
|
|
10747
|
-
return results;
|
|
10748
|
-
}
|
|
10749
|
-
__name(findProviders, "findProviders");
|
|
10750
|
-
function findProvider(providers, name) {
|
|
10751
|
-
if (!Array.isArray(providers)) {
|
|
10752
|
-
if (typeof providers === "object" && "provide" in providers) {
|
|
10753
|
-
const provider = providers;
|
|
10754
|
-
const providerName = typeof provider.provide === "function" ? provider.provide.name : provider.provide;
|
|
10755
|
-
if (name instanceof RegExp) {
|
|
10756
|
-
if (name.test(providerName)) return providers;
|
|
10757
|
-
} else if (providerName === name) return providers;
|
|
10758
|
-
}
|
|
10759
|
-
return null;
|
|
10760
|
-
}
|
|
10761
|
-
for (const provider of providers) {
|
|
10762
|
-
if (Array.isArray(provider)) {
|
|
10763
|
-
const found = findProvider(provider, name);
|
|
10764
|
-
if (found) return found;
|
|
10765
|
-
continue;
|
|
10766
|
-
}
|
|
10767
|
-
if (typeof provider === "object" && "provide" in provider) {
|
|
10768
|
-
const providerName = typeof provider.provide === "function" ? provider.provide.name : provider.provide;
|
|
10769
|
-
if (name instanceof RegExp) {
|
|
10770
|
-
if (name.test(providerName)) return provider;
|
|
10771
|
-
} else if (providerName === name) return provider;
|
|
10772
|
-
}
|
|
10773
|
-
}
|
|
10774
|
-
return null;
|
|
10775
|
-
}
|
|
10776
|
-
__name(findProvider, "findProvider");
|
|
10777
|
-
function processProvider(mergedConfig, baseConfig, provider) {
|
|
10778
|
-
if (Array.isArray(provider)) {
|
|
10779
|
-
for (const nestedProvider of provider) processProvider(mergedConfig, baseConfig, nestedProvider);
|
|
10780
|
-
return;
|
|
10781
|
-
}
|
|
10782
|
-
if (findProvider(baseConfig.providers, provider.provide)) mergedConfig.providers = override(mergedConfig.providers, provider);
|
|
10783
|
-
else mergedConfig.providers.push(provider);
|
|
10784
|
-
}
|
|
10785
|
-
__name(processProvider, "processProvider");
|
|
10786
|
-
function mergeConfig(baseConfig, config) {
|
|
10787
|
-
const mergedConfig = {
|
|
10788
|
-
...baseConfig,
|
|
10789
|
-
...config,
|
|
10790
|
-
providers: [...baseConfig.providers]
|
|
10791
|
-
};
|
|
10792
|
-
for (const provider of config.providers) processProvider(mergedConfig, baseConfig, provider);
|
|
10793
|
-
return mergedConfig;
|
|
10794
|
-
}
|
|
10795
|
-
__name(mergeConfig, "mergeConfig");
|
|
10796
10193
|
function extractProvideOptions(source) {
|
|
10797
10194
|
if (!source) return;
|
|
10798
10195
|
const { multi, name } = source;
|
|
@@ -10802,14 +10199,12 @@ function extractProvideOptions(source) {
|
|
|
10802
10199
|
name
|
|
10803
10200
|
};
|
|
10804
10201
|
}
|
|
10805
|
-
__name(extractProvideOptions, "extractProvideOptions");
|
|
10806
10202
|
function getDeps(provider) {
|
|
10807
10203
|
if (typeof provider === "function") return provider.deps ?? [];
|
|
10808
10204
|
return provider.deps ?? [];
|
|
10809
10205
|
}
|
|
10810
|
-
__name(getDeps, "getDeps");
|
|
10811
10206
|
function sortProviders(providers) {
|
|
10812
|
-
const tokenName =
|
|
10207
|
+
const tokenName = (t) => typeof t === "function" ? t.name : t;
|
|
10813
10208
|
const map = /* @__PURE__ */ new Map();
|
|
10814
10209
|
for (const p of providers) {
|
|
10815
10210
|
const token = tokenName(typeof p === "function" ? p : p.provide);
|
|
@@ -10820,7 +10215,7 @@ function sortProviders(providers) {
|
|
|
10820
10215
|
const result = [];
|
|
10821
10216
|
const visited = /* @__PURE__ */ new Set();
|
|
10822
10217
|
const stack = /* @__PURE__ */ new Set();
|
|
10823
|
-
const visit =
|
|
10218
|
+
const visit = (token) => {
|
|
10824
10219
|
const name = tokenName(token);
|
|
10825
10220
|
if (visited.has(name)) return;
|
|
10826
10221
|
if (stack.has(name)) throw new Error(`Circular dependency detected for provider ${name}`);
|
|
@@ -10834,11 +10229,10 @@ function sortProviders(providers) {
|
|
|
10834
10229
|
visited.add(name);
|
|
10835
10230
|
}
|
|
10836
10231
|
stack.delete(name);
|
|
10837
|
-
}
|
|
10232
|
+
};
|
|
10838
10233
|
for (const p of providers) visit(typeof p === "function" ? p : p.provide);
|
|
10839
10234
|
return result;
|
|
10840
10235
|
}
|
|
10841
|
-
__name(sortProviders, "sortProviders");
|
|
10842
10236
|
async function injector(context, providers) {
|
|
10843
10237
|
providers = providers.flat();
|
|
10844
10238
|
providers = sortProviders(providers);
|
|
@@ -10864,13 +10258,11 @@ async function injector(context, providers) {
|
|
|
10864
10258
|
provide(context, token, instance, options);
|
|
10865
10259
|
}
|
|
10866
10260
|
}
|
|
10867
|
-
__name(injector, "injector");
|
|
10868
10261
|
var Context = class {
|
|
10869
|
-
|
|
10870
|
-
|
|
10262
|
+
constructor() {
|
|
10263
|
+
/** Internal storage for injected values */
|
|
10264
|
+
this.values = {};
|
|
10871
10265
|
}
|
|
10872
|
-
/** Internal storage for injected values */
|
|
10873
|
-
values = {};
|
|
10874
10266
|
/**
|
|
10875
10267
|
* Sets a value in the context
|
|
10876
10268
|
* @param key - Unique identifier for the value
|
|
@@ -11234,6 +10626,6 @@ function provideServerModules(modules) {
|
|
|
11234
10626
|
});
|
|
11235
10627
|
}
|
|
11236
10628
|
//#endregion
|
|
11237
|
-
export { Skill as $, isArray as A, ProjectileMovement as B, SDEF as C,
|
|
10629
|
+
export { Skill as $, isArray as A, ProjectileMovement as B, SDEF as C, arrayFlat as D, PrebuiltGui as E, ModulesToken as F, Knockback as G, PathFollow as H, RpgModule as I, Entity as J, IceMovement as K, WorldMapsManager as L, isInstanceOf as M, isString as N, arrayUniq as O, random as P, RpgCommonPlayer as Q, RpgCommonMap as R, PDEF as S, PerlinNoise2D as T, Oscillate as U, ProjectileType as V, LinearRepulsion as W, RpgShape as X, Vector2 as Y, Direction as Z, ATK as _, isMapUpdateAuthorized as a, map as at, MAXHP as b, updateMap as c, BehaviorSubject as ct, context$1 as d, Observable as dt, Item as et, inject as f, identity as ft, AGI as g, __spreadArray as gt, injector as h, __read as ht, createMapUpdateHeaders as i, filter as it, isFunction as j, capitalize as k, context as l, createOperatorSubscriber as lt, inject$1 as m, isFunction$1 as mt, MAP_UPDATE_TOKEN_ENV as n, __decorateMetadata as nt, readMapUpdateToken as o, from as ot, setInject as p, createErrorClass as pt, Dash as q, MAP_UPDATE_TOKEN_HEADER as r, signal as rt, resolveMapUpdateToken as s, executeSchedule as st, provideServerModules as t, __decorate as tt, clearInject as u, operate as ut, DEX as v, STR as w, MAXSP as x, INT as y, SeekAvoid as z };
|
|
11238
10630
|
|
|
11239
|
-
//# sourceMappingURL=module-
|
|
10631
|
+
//# sourceMappingURL=module-5HOX9Ovu.js.map
|