@quick-threejs/reactive 0.1.20 → 0.1.22
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/common/constants/event.constants.d.ts +2 -0
- package/dist/common/constants/index.d.ts +1 -0
- package/dist/common/enums/camera.enum.d.ts +4 -0
- package/dist/common/enums/index.d.ts +2 -0
- package/dist/common/enums/lifecycle.enum.d.ts +10 -0
- package/dist/common/index.d.ts +5 -0
- package/dist/common/interfaces/canvas.interface.d.ts +6 -0
- package/dist/common/interfaces/core.interface.d.ts +11 -0
- package/dist/common/interfaces/event.interface.d.ts +10 -0
- package/dist/common/interfaces/index.d.ts +5 -0
- package/dist/common/interfaces/module.interface.d.ts +19 -0
- package/dist/common/interfaces/resource.interface.d.ts +14 -0
- package/dist/common/models/app-proxy-event-handler.model.d.ts +32 -0
- package/dist/common/models/index.d.ts +7 -0
- package/dist/common/models/launch-app-props.model.d.ts +8 -0
- package/dist/common/models/proxy-event-handler.model.d.ts +19 -0
- package/dist/common/models/proxy-event-observables.model.d.ts +20 -0
- package/dist/common/models/proxy-event-subjects.models.d.ts +19 -0
- package/dist/common/models/register-props.model.d.ts +75 -0
- package/dist/common/models/register-proxy-event-handler.model.d.ts +17 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/types/object.type.d.ts +13 -0
- package/dist/core/app/app.component.d.ts +7 -0
- package/dist/core/app/app.controller.d.ts +10 -0
- package/dist/core/app/app.module-worker.d.ts +5 -0
- package/dist/core/app/app.module.d.ts +35 -0
- package/dist/core/app/camera/camera.component.d.ts +18 -0
- package/dist/core/app/camera/camera.controller.d.ts +12 -0
- package/dist/core/app/camera/camera.module.d.ts +20 -0
- package/dist/core/app/debug/debug.component.d.ts +28 -0
- package/dist/core/app/debug/debug.controller.d.ts +9 -0
- package/dist/core/app/debug/debug.module.d.ts +17 -0
- package/dist/core/app/renderer/renderer.component.d.ts +19 -0
- package/dist/core/app/renderer/renderer.controller.d.ts +15 -0
- package/dist/core/app/renderer/renderer.module.d.ts +17 -0
- package/dist/core/app/sizes/sizes.component.d.ts +10 -0
- package/dist/core/app/sizes/sizes.controller.d.ts +12 -0
- package/dist/core/app/sizes/sizes.module.d.ts +19 -0
- package/dist/core/app/timer/timer.component.d.ts +8 -0
- package/dist/core/app/timer/timer.controller.d.ts +14 -0
- package/dist/core/app/timer/timer.module.d.ts +19 -0
- package/dist/core/app/world/world.component.d.ts +5 -0
- package/dist/core/app/world/world.controller.d.ts +5 -0
- package/dist/core/app/world/world.module.d.ts +14 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/loader/loader.component.d.ts +25 -0
- package/dist/core/loader/loader.controller.d.ts +9 -0
- package/dist/core/loader/loader.module-worker.d.ts +3 -0
- package/dist/core/loader/loader.module.d.ts +34 -0
- package/dist/core/register/register.component.d.ts +13 -0
- package/dist/core/register/register.controller.d.ts +77 -0
- package/dist/core/register/register.module.d.ts +46 -0
- package/dist/core/register/register.util.d.ts +10 -0
- package/dist/main.d.ts +2 -26
- package/dist/main.js +6537 -3792
- package/dist/main.umd.cjs +68 -0
- package/dist/main.worker.d.ts +1 -12
- package/package.json +16 -11
- package/dist/main.d.mts +0 -26
- package/dist/main.js.map +0 -1
- package/dist/main.mjs +0 -4245
- package/dist/main.mjs.map +0 -1
- package/dist/main.worker-DSzVtnTj.d.mts +0 -728
- package/dist/main.worker-DSzVtnTj.d.ts +0 -728
- package/dist/main.worker.d.mts +0 -12
- package/dist/main.worker.js +0 -3564
- package/dist/main.worker.js.map +0 -1
- package/dist/main.worker.mjs +0 -3550
- package/dist/main.worker.mjs.map +0 -1
package/dist/main.mjs
DELETED
|
@@ -1,4245 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
29
|
-
var require_Reflect = __commonJS({
|
|
30
|
-
"../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js"() {
|
|
31
|
-
"use strict";
|
|
32
|
-
var Reflect2;
|
|
33
|
-
(function(Reflect3) {
|
|
34
|
-
(function(factory) {
|
|
35
|
-
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
36
|
-
var exporter = makeExporter(Reflect3);
|
|
37
|
-
if (typeof root.Reflect !== "undefined") {
|
|
38
|
-
exporter = makeExporter(root.Reflect, exporter);
|
|
39
|
-
}
|
|
40
|
-
factory(exporter, root);
|
|
41
|
-
if (typeof root.Reflect === "undefined") {
|
|
42
|
-
root.Reflect = Reflect3;
|
|
43
|
-
}
|
|
44
|
-
function makeExporter(target, previous) {
|
|
45
|
-
return function(key, value) {
|
|
46
|
-
Object.defineProperty(target, key, {
|
|
47
|
-
configurable: true,
|
|
48
|
-
writable: true,
|
|
49
|
-
value
|
|
50
|
-
});
|
|
51
|
-
if (previous) previous(key, value);
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
__name(makeExporter, "makeExporter");
|
|
55
|
-
function functionThis() {
|
|
56
|
-
try {
|
|
57
|
-
return Function("return this;")();
|
|
58
|
-
} catch (_) {
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
__name(functionThis, "functionThis");
|
|
62
|
-
function indirectEvalThis() {
|
|
63
|
-
try {
|
|
64
|
-
return (0, eval)("(function() { return this; })()");
|
|
65
|
-
} catch (_) {
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
__name(indirectEvalThis, "indirectEvalThis");
|
|
69
|
-
function sloppyModeThis() {
|
|
70
|
-
return functionThis() || indirectEvalThis();
|
|
71
|
-
}
|
|
72
|
-
__name(sloppyModeThis, "sloppyModeThis");
|
|
73
|
-
})(function(exporter, root) {
|
|
74
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
75
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
76
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
77
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
78
|
-
var supportsCreate = typeof Object.create === "function";
|
|
79
|
-
var supportsProto = {
|
|
80
|
-
__proto__: []
|
|
81
|
-
} instanceof Array;
|
|
82
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
83
|
-
var HashMap = {
|
|
84
|
-
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
85
|
-
create: supportsCreate ? function() {
|
|
86
|
-
return MakeDictionary(/* @__PURE__ */ Object.create(null));
|
|
87
|
-
} : supportsProto ? function() {
|
|
88
|
-
return MakeDictionary({
|
|
89
|
-
__proto__: null
|
|
90
|
-
});
|
|
91
|
-
} : function() {
|
|
92
|
-
return MakeDictionary({});
|
|
93
|
-
},
|
|
94
|
-
has: downLevel ? function(map2, key) {
|
|
95
|
-
return hasOwn.call(map2, key);
|
|
96
|
-
} : function(map2, key) {
|
|
97
|
-
return key in map2;
|
|
98
|
-
},
|
|
99
|
-
get: downLevel ? function(map2, key) {
|
|
100
|
-
return hasOwn.call(map2, key) ? map2[key] : void 0;
|
|
101
|
-
} : function(map2, key) {
|
|
102
|
-
return map2[key];
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
106
|
-
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
107
|
-
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
108
|
-
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
109
|
-
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : void 0;
|
|
110
|
-
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
111
|
-
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
112
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
113
|
-
if (!IsUndefined(propertyKey)) {
|
|
114
|
-
if (!IsArray(decorators)) throw new TypeError();
|
|
115
|
-
if (!IsObject(target)) throw new TypeError();
|
|
116
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) throw new TypeError();
|
|
117
|
-
if (IsNull(attributes)) attributes = void 0;
|
|
118
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
119
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
120
|
-
} else {
|
|
121
|
-
if (!IsArray(decorators)) throw new TypeError();
|
|
122
|
-
if (!IsConstructor(target)) throw new TypeError();
|
|
123
|
-
return DecorateConstructor(decorators, target);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
__name(decorate, "decorate");
|
|
127
|
-
exporter("decorate", decorate);
|
|
128
|
-
function metadata(metadataKey, metadataValue) {
|
|
129
|
-
function decorator(target, propertyKey) {
|
|
130
|
-
if (!IsObject(target)) throw new TypeError();
|
|
131
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) throw new TypeError();
|
|
132
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
133
|
-
}
|
|
134
|
-
__name(decorator, "decorator");
|
|
135
|
-
return decorator;
|
|
136
|
-
}
|
|
137
|
-
__name(metadata, "metadata");
|
|
138
|
-
exporter("metadata", metadata);
|
|
139
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
140
|
-
if (!IsObject(target)) throw new TypeError();
|
|
141
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
142
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
143
|
-
}
|
|
144
|
-
__name(defineMetadata, "defineMetadata");
|
|
145
|
-
exporter("defineMetadata", defineMetadata);
|
|
146
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
147
|
-
if (!IsObject(target)) throw new TypeError();
|
|
148
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
149
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
150
|
-
}
|
|
151
|
-
__name(hasMetadata, "hasMetadata");
|
|
152
|
-
exporter("hasMetadata", hasMetadata);
|
|
153
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
154
|
-
if (!IsObject(target)) throw new TypeError();
|
|
155
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
156
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
157
|
-
}
|
|
158
|
-
__name(hasOwnMetadata, "hasOwnMetadata");
|
|
159
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
160
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
161
|
-
if (!IsObject(target)) throw new TypeError();
|
|
162
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
163
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
164
|
-
}
|
|
165
|
-
__name(getMetadata, "getMetadata");
|
|
166
|
-
exporter("getMetadata", getMetadata);
|
|
167
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
168
|
-
if (!IsObject(target)) throw new TypeError();
|
|
169
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
170
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
171
|
-
}
|
|
172
|
-
__name(getOwnMetadata, "getOwnMetadata");
|
|
173
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
174
|
-
function getMetadataKeys(target, propertyKey) {
|
|
175
|
-
if (!IsObject(target)) throw new TypeError();
|
|
176
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
177
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
178
|
-
}
|
|
179
|
-
__name(getMetadataKeys, "getMetadataKeys");
|
|
180
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
181
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
182
|
-
if (!IsObject(target)) throw new TypeError();
|
|
183
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
184
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
185
|
-
}
|
|
186
|
-
__name(getOwnMetadataKeys, "getOwnMetadataKeys");
|
|
187
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
188
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
189
|
-
if (!IsObject(target)) throw new TypeError();
|
|
190
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
191
|
-
if (!IsObject(target)) throw new TypeError();
|
|
192
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
193
|
-
var provider = GetMetadataProvider(
|
|
194
|
-
target,
|
|
195
|
-
propertyKey,
|
|
196
|
-
/*Create*/
|
|
197
|
-
false
|
|
198
|
-
);
|
|
199
|
-
if (IsUndefined(provider)) return false;
|
|
200
|
-
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
201
|
-
}
|
|
202
|
-
__name(deleteMetadata, "deleteMetadata");
|
|
203
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
204
|
-
function DecorateConstructor(decorators, target) {
|
|
205
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
206
|
-
var decorator = decorators[i];
|
|
207
|
-
var decorated = decorator(target);
|
|
208
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
209
|
-
if (!IsConstructor(decorated)) throw new TypeError();
|
|
210
|
-
target = decorated;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return target;
|
|
214
|
-
}
|
|
215
|
-
__name(DecorateConstructor, "DecorateConstructor");
|
|
216
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
217
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
218
|
-
var decorator = decorators[i];
|
|
219
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
220
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
221
|
-
if (!IsObject(decorated)) throw new TypeError();
|
|
222
|
-
descriptor = decorated;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return descriptor;
|
|
226
|
-
}
|
|
227
|
-
__name(DecorateProperty, "DecorateProperty");
|
|
228
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
229
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
230
|
-
if (hasOwn2) return true;
|
|
231
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
232
|
-
if (!IsNull(parent)) return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
__name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
|
|
236
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
237
|
-
var provider = GetMetadataProvider(
|
|
238
|
-
O,
|
|
239
|
-
P,
|
|
240
|
-
/*Create*/
|
|
241
|
-
false
|
|
242
|
-
);
|
|
243
|
-
if (IsUndefined(provider)) return false;
|
|
244
|
-
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
245
|
-
}
|
|
246
|
-
__name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
|
|
247
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
248
|
-
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
249
|
-
if (hasOwn2) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
250
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
251
|
-
if (!IsNull(parent)) return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
252
|
-
return void 0;
|
|
253
|
-
}
|
|
254
|
-
__name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
|
|
255
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
256
|
-
var provider = GetMetadataProvider(
|
|
257
|
-
O,
|
|
258
|
-
P,
|
|
259
|
-
/*Create*/
|
|
260
|
-
false
|
|
261
|
-
);
|
|
262
|
-
if (IsUndefined(provider)) return;
|
|
263
|
-
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
264
|
-
}
|
|
265
|
-
__name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
|
|
266
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
267
|
-
var provider = GetMetadataProvider(
|
|
268
|
-
O,
|
|
269
|
-
P,
|
|
270
|
-
/*Create*/
|
|
271
|
-
true
|
|
272
|
-
);
|
|
273
|
-
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
274
|
-
}
|
|
275
|
-
__name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
|
|
276
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
277
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
278
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
279
|
-
if (parent === null) return ownKeys;
|
|
280
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
281
|
-
if (parentKeys.length <= 0) return ownKeys;
|
|
282
|
-
if (ownKeys.length <= 0) return parentKeys;
|
|
283
|
-
var set = new _Set();
|
|
284
|
-
var keys = [];
|
|
285
|
-
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
286
|
-
var key = ownKeys_1[_i];
|
|
287
|
-
var hasKey = set.has(key);
|
|
288
|
-
if (!hasKey) {
|
|
289
|
-
set.add(key);
|
|
290
|
-
keys.push(key);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
|
|
294
|
-
var key = parentKeys_1[_a];
|
|
295
|
-
var hasKey = set.has(key);
|
|
296
|
-
if (!hasKey) {
|
|
297
|
-
set.add(key);
|
|
298
|
-
keys.push(key);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
return keys;
|
|
302
|
-
}
|
|
303
|
-
__name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
|
|
304
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
305
|
-
var provider = GetMetadataProvider(
|
|
306
|
-
O,
|
|
307
|
-
P,
|
|
308
|
-
/*create*/
|
|
309
|
-
false
|
|
310
|
-
);
|
|
311
|
-
if (!provider) {
|
|
312
|
-
return [];
|
|
313
|
-
}
|
|
314
|
-
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
315
|
-
}
|
|
316
|
-
__name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
|
|
317
|
-
function Type(x) {
|
|
318
|
-
if (x === null) return 1;
|
|
319
|
-
switch (typeof x) {
|
|
320
|
-
case "undefined":
|
|
321
|
-
return 0;
|
|
322
|
-
case "boolean":
|
|
323
|
-
return 2;
|
|
324
|
-
case "string":
|
|
325
|
-
return 3;
|
|
326
|
-
case "symbol":
|
|
327
|
-
return 4;
|
|
328
|
-
case "number":
|
|
329
|
-
return 5;
|
|
330
|
-
case "object":
|
|
331
|
-
return x === null ? 1 : 6;
|
|
332
|
-
default:
|
|
333
|
-
return 6;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
__name(Type, "Type");
|
|
337
|
-
function IsUndefined(x) {
|
|
338
|
-
return x === void 0;
|
|
339
|
-
}
|
|
340
|
-
__name(IsUndefined, "IsUndefined");
|
|
341
|
-
function IsNull(x) {
|
|
342
|
-
return x === null;
|
|
343
|
-
}
|
|
344
|
-
__name(IsNull, "IsNull");
|
|
345
|
-
function IsSymbol(x) {
|
|
346
|
-
return typeof x === "symbol";
|
|
347
|
-
}
|
|
348
|
-
__name(IsSymbol, "IsSymbol");
|
|
349
|
-
function IsObject(x) {
|
|
350
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
351
|
-
}
|
|
352
|
-
__name(IsObject, "IsObject");
|
|
353
|
-
function ToPrimitive(input, PreferredType) {
|
|
354
|
-
switch (Type(input)) {
|
|
355
|
-
case 0:
|
|
356
|
-
return input;
|
|
357
|
-
case 1:
|
|
358
|
-
return input;
|
|
359
|
-
case 2:
|
|
360
|
-
return input;
|
|
361
|
-
case 3:
|
|
362
|
-
return input;
|
|
363
|
-
case 4:
|
|
364
|
-
return input;
|
|
365
|
-
case 5:
|
|
366
|
-
return input;
|
|
367
|
-
}
|
|
368
|
-
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
369
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
370
|
-
if (exoticToPrim !== void 0) {
|
|
371
|
-
var result = exoticToPrim.call(input, hint);
|
|
372
|
-
if (IsObject(result)) throw new TypeError();
|
|
373
|
-
return result;
|
|
374
|
-
}
|
|
375
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
376
|
-
}
|
|
377
|
-
__name(ToPrimitive, "ToPrimitive");
|
|
378
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
379
|
-
if (hint === "string") {
|
|
380
|
-
var toString_1 = O.toString;
|
|
381
|
-
if (IsCallable(toString_1)) {
|
|
382
|
-
var result = toString_1.call(O);
|
|
383
|
-
if (!IsObject(result)) return result;
|
|
384
|
-
}
|
|
385
|
-
var valueOf = O.valueOf;
|
|
386
|
-
if (IsCallable(valueOf)) {
|
|
387
|
-
var result = valueOf.call(O);
|
|
388
|
-
if (!IsObject(result)) return result;
|
|
389
|
-
}
|
|
390
|
-
} else {
|
|
391
|
-
var valueOf = O.valueOf;
|
|
392
|
-
if (IsCallable(valueOf)) {
|
|
393
|
-
var result = valueOf.call(O);
|
|
394
|
-
if (!IsObject(result)) return result;
|
|
395
|
-
}
|
|
396
|
-
var toString_2 = O.toString;
|
|
397
|
-
if (IsCallable(toString_2)) {
|
|
398
|
-
var result = toString_2.call(O);
|
|
399
|
-
if (!IsObject(result)) return result;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
throw new TypeError();
|
|
403
|
-
}
|
|
404
|
-
__name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
|
|
405
|
-
function ToBoolean(argument) {
|
|
406
|
-
return !!argument;
|
|
407
|
-
}
|
|
408
|
-
__name(ToBoolean, "ToBoolean");
|
|
409
|
-
function ToString(argument) {
|
|
410
|
-
return "" + argument;
|
|
411
|
-
}
|
|
412
|
-
__name(ToString, "ToString");
|
|
413
|
-
function ToPropertyKey(argument) {
|
|
414
|
-
var key = ToPrimitive(
|
|
415
|
-
argument,
|
|
416
|
-
3
|
|
417
|
-
/* String */
|
|
418
|
-
);
|
|
419
|
-
if (IsSymbol(key)) return key;
|
|
420
|
-
return ToString(key);
|
|
421
|
-
}
|
|
422
|
-
__name(ToPropertyKey, "ToPropertyKey");
|
|
423
|
-
function IsArray(argument) {
|
|
424
|
-
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
425
|
-
}
|
|
426
|
-
__name(IsArray, "IsArray");
|
|
427
|
-
function IsCallable(argument) {
|
|
428
|
-
return typeof argument === "function";
|
|
429
|
-
}
|
|
430
|
-
__name(IsCallable, "IsCallable");
|
|
431
|
-
function IsConstructor(argument) {
|
|
432
|
-
return typeof argument === "function";
|
|
433
|
-
}
|
|
434
|
-
__name(IsConstructor, "IsConstructor");
|
|
435
|
-
function IsPropertyKey(argument) {
|
|
436
|
-
switch (Type(argument)) {
|
|
437
|
-
case 3:
|
|
438
|
-
return true;
|
|
439
|
-
case 4:
|
|
440
|
-
return true;
|
|
441
|
-
default:
|
|
442
|
-
return false;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
__name(IsPropertyKey, "IsPropertyKey");
|
|
446
|
-
function SameValueZero(x, y) {
|
|
447
|
-
return x === y || x !== x && y !== y;
|
|
448
|
-
}
|
|
449
|
-
__name(SameValueZero, "SameValueZero");
|
|
450
|
-
function GetMethod(V, P) {
|
|
451
|
-
var func = V[P];
|
|
452
|
-
if (func === void 0 || func === null) return void 0;
|
|
453
|
-
if (!IsCallable(func)) throw new TypeError();
|
|
454
|
-
return func;
|
|
455
|
-
}
|
|
456
|
-
__name(GetMethod, "GetMethod");
|
|
457
|
-
function GetIterator(obj) {
|
|
458
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
459
|
-
if (!IsCallable(method)) throw new TypeError();
|
|
460
|
-
var iterator = method.call(obj);
|
|
461
|
-
if (!IsObject(iterator)) throw new TypeError();
|
|
462
|
-
return iterator;
|
|
463
|
-
}
|
|
464
|
-
__name(GetIterator, "GetIterator");
|
|
465
|
-
function IteratorValue(iterResult) {
|
|
466
|
-
return iterResult.value;
|
|
467
|
-
}
|
|
468
|
-
__name(IteratorValue, "IteratorValue");
|
|
469
|
-
function IteratorStep(iterator) {
|
|
470
|
-
var result = iterator.next();
|
|
471
|
-
return result.done ? false : result;
|
|
472
|
-
}
|
|
473
|
-
__name(IteratorStep, "IteratorStep");
|
|
474
|
-
function IteratorClose(iterator) {
|
|
475
|
-
var f = iterator["return"];
|
|
476
|
-
if (f) f.call(iterator);
|
|
477
|
-
}
|
|
478
|
-
__name(IteratorClose, "IteratorClose");
|
|
479
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
480
|
-
var proto = Object.getPrototypeOf(O);
|
|
481
|
-
if (typeof O !== "function" || O === functionPrototype) return proto;
|
|
482
|
-
if (proto !== functionPrototype) return proto;
|
|
483
|
-
var prototype = O.prototype;
|
|
484
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
485
|
-
if (prototypeProto == null || prototypeProto === Object.prototype) return proto;
|
|
486
|
-
var constructor = prototypeProto.constructor;
|
|
487
|
-
if (typeof constructor !== "function") return proto;
|
|
488
|
-
if (constructor === O) return proto;
|
|
489
|
-
return constructor;
|
|
490
|
-
}
|
|
491
|
-
__name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
|
|
492
|
-
function CreateMetadataRegistry() {
|
|
493
|
-
var fallback;
|
|
494
|
-
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
495
|
-
fallback = CreateFallbackProvider(root.Reflect);
|
|
496
|
-
}
|
|
497
|
-
var first;
|
|
498
|
-
var second;
|
|
499
|
-
var rest;
|
|
500
|
-
var targetProviderMap = new _WeakMap();
|
|
501
|
-
var registry = {
|
|
502
|
-
registerProvider,
|
|
503
|
-
getProvider,
|
|
504
|
-
setProvider
|
|
505
|
-
};
|
|
506
|
-
return registry;
|
|
507
|
-
function registerProvider(provider) {
|
|
508
|
-
if (!Object.isExtensible(registry)) {
|
|
509
|
-
throw new Error("Cannot add provider to a frozen registry.");
|
|
510
|
-
}
|
|
511
|
-
switch (true) {
|
|
512
|
-
case fallback === provider:
|
|
513
|
-
break;
|
|
514
|
-
case IsUndefined(first):
|
|
515
|
-
first = provider;
|
|
516
|
-
break;
|
|
517
|
-
case first === provider:
|
|
518
|
-
break;
|
|
519
|
-
case IsUndefined(second):
|
|
520
|
-
second = provider;
|
|
521
|
-
break;
|
|
522
|
-
case second === provider:
|
|
523
|
-
break;
|
|
524
|
-
default:
|
|
525
|
-
if (rest === void 0) rest = new _Set();
|
|
526
|
-
rest.add(provider);
|
|
527
|
-
break;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
__name(registerProvider, "registerProvider");
|
|
531
|
-
function getProviderNoCache(O, P) {
|
|
532
|
-
if (!IsUndefined(first)) {
|
|
533
|
-
if (first.isProviderFor(O, P)) return first;
|
|
534
|
-
if (!IsUndefined(second)) {
|
|
535
|
-
if (second.isProviderFor(O, P)) return first;
|
|
536
|
-
if (!IsUndefined(rest)) {
|
|
537
|
-
var iterator = GetIterator(rest);
|
|
538
|
-
while (true) {
|
|
539
|
-
var next = IteratorStep(iterator);
|
|
540
|
-
if (!next) {
|
|
541
|
-
return void 0;
|
|
542
|
-
}
|
|
543
|
-
var provider = IteratorValue(next);
|
|
544
|
-
if (provider.isProviderFor(O, P)) {
|
|
545
|
-
IteratorClose(iterator);
|
|
546
|
-
return provider;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) {
|
|
553
|
-
return fallback;
|
|
554
|
-
}
|
|
555
|
-
return void 0;
|
|
556
|
-
}
|
|
557
|
-
__name(getProviderNoCache, "getProviderNoCache");
|
|
558
|
-
function getProvider(O, P) {
|
|
559
|
-
var providerMap = targetProviderMap.get(O);
|
|
560
|
-
var provider;
|
|
561
|
-
if (!IsUndefined(providerMap)) {
|
|
562
|
-
provider = providerMap.get(P);
|
|
563
|
-
}
|
|
564
|
-
if (!IsUndefined(provider)) {
|
|
565
|
-
return provider;
|
|
566
|
-
}
|
|
567
|
-
provider = getProviderNoCache(O, P);
|
|
568
|
-
if (!IsUndefined(provider)) {
|
|
569
|
-
if (IsUndefined(providerMap)) {
|
|
570
|
-
providerMap = new _Map();
|
|
571
|
-
targetProviderMap.set(O, providerMap);
|
|
572
|
-
}
|
|
573
|
-
providerMap.set(P, provider);
|
|
574
|
-
}
|
|
575
|
-
return provider;
|
|
576
|
-
}
|
|
577
|
-
__name(getProvider, "getProvider");
|
|
578
|
-
function hasProvider(provider) {
|
|
579
|
-
if (IsUndefined(provider)) throw new TypeError();
|
|
580
|
-
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
581
|
-
}
|
|
582
|
-
__name(hasProvider, "hasProvider");
|
|
583
|
-
function setProvider(O, P, provider) {
|
|
584
|
-
if (!hasProvider(provider)) {
|
|
585
|
-
throw new Error("Metadata provider not registered.");
|
|
586
|
-
}
|
|
587
|
-
var existingProvider = getProvider(O, P);
|
|
588
|
-
if (existingProvider !== provider) {
|
|
589
|
-
if (!IsUndefined(existingProvider)) {
|
|
590
|
-
return false;
|
|
591
|
-
}
|
|
592
|
-
var providerMap = targetProviderMap.get(O);
|
|
593
|
-
if (IsUndefined(providerMap)) {
|
|
594
|
-
providerMap = new _Map();
|
|
595
|
-
targetProviderMap.set(O, providerMap);
|
|
596
|
-
}
|
|
597
|
-
providerMap.set(P, provider);
|
|
598
|
-
}
|
|
599
|
-
return true;
|
|
600
|
-
}
|
|
601
|
-
__name(setProvider, "setProvider");
|
|
602
|
-
}
|
|
603
|
-
__name(CreateMetadataRegistry, "CreateMetadataRegistry");
|
|
604
|
-
function GetOrCreateMetadataRegistry() {
|
|
605
|
-
var metadataRegistry2;
|
|
606
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
607
|
-
metadataRegistry2 = root.Reflect[registrySymbol];
|
|
608
|
-
}
|
|
609
|
-
if (IsUndefined(metadataRegistry2)) {
|
|
610
|
-
metadataRegistry2 = CreateMetadataRegistry();
|
|
611
|
-
}
|
|
612
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
613
|
-
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
614
|
-
enumerable: false,
|
|
615
|
-
configurable: false,
|
|
616
|
-
writable: false,
|
|
617
|
-
value: metadataRegistry2
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
return metadataRegistry2;
|
|
621
|
-
}
|
|
622
|
-
__name(GetOrCreateMetadataRegistry, "GetOrCreateMetadataRegistry");
|
|
623
|
-
function CreateMetadataProvider(registry) {
|
|
624
|
-
var metadata2 = new _WeakMap();
|
|
625
|
-
var provider = {
|
|
626
|
-
isProviderFor: /* @__PURE__ */ __name(function(O, P) {
|
|
627
|
-
var targetMetadata = metadata2.get(O);
|
|
628
|
-
if (IsUndefined(targetMetadata)) return false;
|
|
629
|
-
return targetMetadata.has(P);
|
|
630
|
-
}, "isProviderFor"),
|
|
631
|
-
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
632
|
-
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
633
|
-
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
634
|
-
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
|
|
635
|
-
OrdinaryDeleteMetadata
|
|
636
|
-
};
|
|
637
|
-
metadataRegistry.registerProvider(provider);
|
|
638
|
-
return provider;
|
|
639
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
640
|
-
var targetMetadata = metadata2.get(O);
|
|
641
|
-
var createdTargetMetadata = false;
|
|
642
|
-
if (IsUndefined(targetMetadata)) {
|
|
643
|
-
if (!Create) return void 0;
|
|
644
|
-
targetMetadata = new _Map();
|
|
645
|
-
metadata2.set(O, targetMetadata);
|
|
646
|
-
createdTargetMetadata = true;
|
|
647
|
-
}
|
|
648
|
-
var metadataMap = targetMetadata.get(P);
|
|
649
|
-
if (IsUndefined(metadataMap)) {
|
|
650
|
-
if (!Create) return void 0;
|
|
651
|
-
metadataMap = new _Map();
|
|
652
|
-
targetMetadata.set(P, metadataMap);
|
|
653
|
-
if (!registry.setProvider(O, P, provider)) {
|
|
654
|
-
targetMetadata.delete(P);
|
|
655
|
-
if (createdTargetMetadata) {
|
|
656
|
-
metadata2.delete(O);
|
|
657
|
-
}
|
|
658
|
-
throw new Error("Wrong provider for target.");
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
return metadataMap;
|
|
662
|
-
}
|
|
663
|
-
__name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
|
|
664
|
-
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
665
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
666
|
-
O,
|
|
667
|
-
P,
|
|
668
|
-
/*Create*/
|
|
669
|
-
false
|
|
670
|
-
);
|
|
671
|
-
if (IsUndefined(metadataMap)) return false;
|
|
672
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
673
|
-
}
|
|
674
|
-
__name(OrdinaryHasOwnMetadata2, "OrdinaryHasOwnMetadata");
|
|
675
|
-
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
676
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
677
|
-
O,
|
|
678
|
-
P,
|
|
679
|
-
/*Create*/
|
|
680
|
-
false
|
|
681
|
-
);
|
|
682
|
-
if (IsUndefined(metadataMap)) return void 0;
|
|
683
|
-
return metadataMap.get(MetadataKey);
|
|
684
|
-
}
|
|
685
|
-
__name(OrdinaryGetOwnMetadata2, "OrdinaryGetOwnMetadata");
|
|
686
|
-
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
687
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
688
|
-
O,
|
|
689
|
-
P,
|
|
690
|
-
/*Create*/
|
|
691
|
-
true
|
|
692
|
-
);
|
|
693
|
-
metadataMap.set(MetadataKey, MetadataValue);
|
|
694
|
-
}
|
|
695
|
-
__name(OrdinaryDefineOwnMetadata2, "OrdinaryDefineOwnMetadata");
|
|
696
|
-
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
697
|
-
var keys = [];
|
|
698
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
699
|
-
O,
|
|
700
|
-
P,
|
|
701
|
-
/*Create*/
|
|
702
|
-
false
|
|
703
|
-
);
|
|
704
|
-
if (IsUndefined(metadataMap)) return keys;
|
|
705
|
-
var keysObj = metadataMap.keys();
|
|
706
|
-
var iterator = GetIterator(keysObj);
|
|
707
|
-
var k = 0;
|
|
708
|
-
while (true) {
|
|
709
|
-
var next = IteratorStep(iterator);
|
|
710
|
-
if (!next) {
|
|
711
|
-
keys.length = k;
|
|
712
|
-
return keys;
|
|
713
|
-
}
|
|
714
|
-
var nextValue = IteratorValue(next);
|
|
715
|
-
try {
|
|
716
|
-
keys[k] = nextValue;
|
|
717
|
-
} catch (e) {
|
|
718
|
-
try {
|
|
719
|
-
IteratorClose(iterator);
|
|
720
|
-
} finally {
|
|
721
|
-
throw e;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
k++;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
__name(OrdinaryOwnMetadataKeys2, "OrdinaryOwnMetadataKeys");
|
|
728
|
-
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
729
|
-
var metadataMap = GetOrCreateMetadataMap(
|
|
730
|
-
O,
|
|
731
|
-
P,
|
|
732
|
-
/*Create*/
|
|
733
|
-
false
|
|
734
|
-
);
|
|
735
|
-
if (IsUndefined(metadataMap)) return false;
|
|
736
|
-
if (!metadataMap.delete(MetadataKey)) return false;
|
|
737
|
-
if (metadataMap.size === 0) {
|
|
738
|
-
var targetMetadata = metadata2.get(O);
|
|
739
|
-
if (!IsUndefined(targetMetadata)) {
|
|
740
|
-
targetMetadata.delete(P);
|
|
741
|
-
if (targetMetadata.size === 0) {
|
|
742
|
-
metadata2.delete(targetMetadata);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
return true;
|
|
747
|
-
}
|
|
748
|
-
__name(OrdinaryDeleteMetadata, "OrdinaryDeleteMetadata");
|
|
749
|
-
}
|
|
750
|
-
__name(CreateMetadataProvider, "CreateMetadataProvider");
|
|
751
|
-
function CreateFallbackProvider(reflect) {
|
|
752
|
-
var defineMetadata2 = reflect.defineMetadata, hasOwnMetadata2 = reflect.hasOwnMetadata, getOwnMetadata2 = reflect.getOwnMetadata, getOwnMetadataKeys2 = reflect.getOwnMetadataKeys, deleteMetadata2 = reflect.deleteMetadata;
|
|
753
|
-
var metadataOwner = new _WeakMap();
|
|
754
|
-
var provider = {
|
|
755
|
-
isProviderFor: /* @__PURE__ */ __name(function(O, P) {
|
|
756
|
-
var metadataPropertySet = metadataOwner.get(O);
|
|
757
|
-
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
758
|
-
return true;
|
|
759
|
-
}
|
|
760
|
-
if (getOwnMetadataKeys2(O, P).length) {
|
|
761
|
-
if (IsUndefined(metadataPropertySet)) {
|
|
762
|
-
metadataPropertySet = new _Set();
|
|
763
|
-
metadataOwner.set(O, metadataPropertySet);
|
|
764
|
-
}
|
|
765
|
-
metadataPropertySet.add(P);
|
|
766
|
-
return true;
|
|
767
|
-
}
|
|
768
|
-
return false;
|
|
769
|
-
}, "isProviderFor"),
|
|
770
|
-
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
771
|
-
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
772
|
-
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
773
|
-
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
|
|
774
|
-
OrdinaryDeleteMetadata: deleteMetadata2
|
|
775
|
-
};
|
|
776
|
-
return provider;
|
|
777
|
-
}
|
|
778
|
-
__name(CreateFallbackProvider, "CreateFallbackProvider");
|
|
779
|
-
function GetMetadataProvider(O, P, Create) {
|
|
780
|
-
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
781
|
-
if (!IsUndefined(registeredProvider)) {
|
|
782
|
-
return registeredProvider;
|
|
783
|
-
}
|
|
784
|
-
if (Create) {
|
|
785
|
-
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
786
|
-
return metadataProvider;
|
|
787
|
-
}
|
|
788
|
-
throw new Error("Illegal state.");
|
|
789
|
-
}
|
|
790
|
-
return void 0;
|
|
791
|
-
}
|
|
792
|
-
__name(GetMetadataProvider, "GetMetadataProvider");
|
|
793
|
-
function CreateMapPolyfill() {
|
|
794
|
-
var cacheSentinel = {};
|
|
795
|
-
var arraySentinel = [];
|
|
796
|
-
var MapIterator = (
|
|
797
|
-
/** @class */
|
|
798
|
-
function() {
|
|
799
|
-
function MapIterator2(keys, values, selector) {
|
|
800
|
-
this._index = 0;
|
|
801
|
-
this._keys = keys;
|
|
802
|
-
this._values = values;
|
|
803
|
-
this._selector = selector;
|
|
804
|
-
}
|
|
805
|
-
__name(MapIterator2, "MapIterator");
|
|
806
|
-
MapIterator2.prototype["@@iterator"] = function() {
|
|
807
|
-
return this;
|
|
808
|
-
};
|
|
809
|
-
MapIterator2.prototype[iteratorSymbol] = function() {
|
|
810
|
-
return this;
|
|
811
|
-
};
|
|
812
|
-
MapIterator2.prototype.next = function() {
|
|
813
|
-
var index = this._index;
|
|
814
|
-
if (index >= 0 && index < this._keys.length) {
|
|
815
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
816
|
-
if (index + 1 >= this._keys.length) {
|
|
817
|
-
this._index = -1;
|
|
818
|
-
this._keys = arraySentinel;
|
|
819
|
-
this._values = arraySentinel;
|
|
820
|
-
} else {
|
|
821
|
-
this._index++;
|
|
822
|
-
}
|
|
823
|
-
return {
|
|
824
|
-
value: result,
|
|
825
|
-
done: false
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
return {
|
|
829
|
-
value: void 0,
|
|
830
|
-
done: true
|
|
831
|
-
};
|
|
832
|
-
};
|
|
833
|
-
MapIterator2.prototype.throw = function(error) {
|
|
834
|
-
if (this._index >= 0) {
|
|
835
|
-
this._index = -1;
|
|
836
|
-
this._keys = arraySentinel;
|
|
837
|
-
this._values = arraySentinel;
|
|
838
|
-
}
|
|
839
|
-
throw error;
|
|
840
|
-
};
|
|
841
|
-
MapIterator2.prototype.return = function(value) {
|
|
842
|
-
if (this._index >= 0) {
|
|
843
|
-
this._index = -1;
|
|
844
|
-
this._keys = arraySentinel;
|
|
845
|
-
this._values = arraySentinel;
|
|
846
|
-
}
|
|
847
|
-
return {
|
|
848
|
-
value,
|
|
849
|
-
done: true
|
|
850
|
-
};
|
|
851
|
-
};
|
|
852
|
-
return MapIterator2;
|
|
853
|
-
}()
|
|
854
|
-
);
|
|
855
|
-
var Map1 = (
|
|
856
|
-
/** @class */
|
|
857
|
-
function() {
|
|
858
|
-
function Map12() {
|
|
859
|
-
this._keys = [];
|
|
860
|
-
this._values = [];
|
|
861
|
-
this._cacheKey = cacheSentinel;
|
|
862
|
-
this._cacheIndex = -2;
|
|
863
|
-
}
|
|
864
|
-
__name(Map12, "Map1");
|
|
865
|
-
Object.defineProperty(Map12.prototype, "size", {
|
|
866
|
-
get: /* @__PURE__ */ __name(function() {
|
|
867
|
-
return this._keys.length;
|
|
868
|
-
}, "get"),
|
|
869
|
-
enumerable: true,
|
|
870
|
-
configurable: true
|
|
871
|
-
});
|
|
872
|
-
Map12.prototype.has = function(key) {
|
|
873
|
-
return this._find(
|
|
874
|
-
key,
|
|
875
|
-
/*insert*/
|
|
876
|
-
false
|
|
877
|
-
) >= 0;
|
|
878
|
-
};
|
|
879
|
-
Map12.prototype.get = function(key) {
|
|
880
|
-
var index = this._find(
|
|
881
|
-
key,
|
|
882
|
-
/*insert*/
|
|
883
|
-
false
|
|
884
|
-
);
|
|
885
|
-
return index >= 0 ? this._values[index] : void 0;
|
|
886
|
-
};
|
|
887
|
-
Map12.prototype.set = function(key, value) {
|
|
888
|
-
var index = this._find(
|
|
889
|
-
key,
|
|
890
|
-
/*insert*/
|
|
891
|
-
true
|
|
892
|
-
);
|
|
893
|
-
this._values[index] = value;
|
|
894
|
-
return this;
|
|
895
|
-
};
|
|
896
|
-
Map12.prototype.delete = function(key) {
|
|
897
|
-
var index = this._find(
|
|
898
|
-
key,
|
|
899
|
-
/*insert*/
|
|
900
|
-
false
|
|
901
|
-
);
|
|
902
|
-
if (index >= 0) {
|
|
903
|
-
var size = this._keys.length;
|
|
904
|
-
for (var i = index + 1; i < size; i++) {
|
|
905
|
-
this._keys[i - 1] = this._keys[i];
|
|
906
|
-
this._values[i - 1] = this._values[i];
|
|
907
|
-
}
|
|
908
|
-
this._keys.length--;
|
|
909
|
-
this._values.length--;
|
|
910
|
-
if (SameValueZero(key, this._cacheKey)) {
|
|
911
|
-
this._cacheKey = cacheSentinel;
|
|
912
|
-
this._cacheIndex = -2;
|
|
913
|
-
}
|
|
914
|
-
return true;
|
|
915
|
-
}
|
|
916
|
-
return false;
|
|
917
|
-
};
|
|
918
|
-
Map12.prototype.clear = function() {
|
|
919
|
-
this._keys.length = 0;
|
|
920
|
-
this._values.length = 0;
|
|
921
|
-
this._cacheKey = cacheSentinel;
|
|
922
|
-
this._cacheIndex = -2;
|
|
923
|
-
};
|
|
924
|
-
Map12.prototype.keys = function() {
|
|
925
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
926
|
-
};
|
|
927
|
-
Map12.prototype.values = function() {
|
|
928
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
929
|
-
};
|
|
930
|
-
Map12.prototype.entries = function() {
|
|
931
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
932
|
-
};
|
|
933
|
-
Map12.prototype["@@iterator"] = function() {
|
|
934
|
-
return this.entries();
|
|
935
|
-
};
|
|
936
|
-
Map12.prototype[iteratorSymbol] = function() {
|
|
937
|
-
return this.entries();
|
|
938
|
-
};
|
|
939
|
-
Map12.prototype._find = function(key, insert) {
|
|
940
|
-
if (!SameValueZero(this._cacheKey, key)) {
|
|
941
|
-
this._cacheIndex = -1;
|
|
942
|
-
for (var i = 0; i < this._keys.length; i++) {
|
|
943
|
-
if (SameValueZero(this._keys[i], key)) {
|
|
944
|
-
this._cacheIndex = i;
|
|
945
|
-
break;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
if (this._cacheIndex < 0 && insert) {
|
|
950
|
-
this._cacheIndex = this._keys.length;
|
|
951
|
-
this._keys.push(key);
|
|
952
|
-
this._values.push(void 0);
|
|
953
|
-
}
|
|
954
|
-
return this._cacheIndex;
|
|
955
|
-
};
|
|
956
|
-
return Map12;
|
|
957
|
-
}()
|
|
958
|
-
);
|
|
959
|
-
return Map1;
|
|
960
|
-
function getKey(key, _) {
|
|
961
|
-
return key;
|
|
962
|
-
}
|
|
963
|
-
__name(getKey, "getKey");
|
|
964
|
-
function getValue(_, value) {
|
|
965
|
-
return value;
|
|
966
|
-
}
|
|
967
|
-
__name(getValue, "getValue");
|
|
968
|
-
function getEntry(key, value) {
|
|
969
|
-
return [
|
|
970
|
-
key,
|
|
971
|
-
value
|
|
972
|
-
];
|
|
973
|
-
}
|
|
974
|
-
__name(getEntry, "getEntry");
|
|
975
|
-
}
|
|
976
|
-
__name(CreateMapPolyfill, "CreateMapPolyfill");
|
|
977
|
-
function CreateSetPolyfill() {
|
|
978
|
-
var Set1 = (
|
|
979
|
-
/** @class */
|
|
980
|
-
function() {
|
|
981
|
-
function Set12() {
|
|
982
|
-
this._map = new _Map();
|
|
983
|
-
}
|
|
984
|
-
__name(Set12, "Set1");
|
|
985
|
-
Object.defineProperty(Set12.prototype, "size", {
|
|
986
|
-
get: /* @__PURE__ */ __name(function() {
|
|
987
|
-
return this._map.size;
|
|
988
|
-
}, "get"),
|
|
989
|
-
enumerable: true,
|
|
990
|
-
configurable: true
|
|
991
|
-
});
|
|
992
|
-
Set12.prototype.has = function(value) {
|
|
993
|
-
return this._map.has(value);
|
|
994
|
-
};
|
|
995
|
-
Set12.prototype.add = function(value) {
|
|
996
|
-
return this._map.set(value, value), this;
|
|
997
|
-
};
|
|
998
|
-
Set12.prototype.delete = function(value) {
|
|
999
|
-
return this._map.delete(value);
|
|
1000
|
-
};
|
|
1001
|
-
Set12.prototype.clear = function() {
|
|
1002
|
-
this._map.clear();
|
|
1003
|
-
};
|
|
1004
|
-
Set12.prototype.keys = function() {
|
|
1005
|
-
return this._map.keys();
|
|
1006
|
-
};
|
|
1007
|
-
Set12.prototype.values = function() {
|
|
1008
|
-
return this._map.keys();
|
|
1009
|
-
};
|
|
1010
|
-
Set12.prototype.entries = function() {
|
|
1011
|
-
return this._map.entries();
|
|
1012
|
-
};
|
|
1013
|
-
Set12.prototype["@@iterator"] = function() {
|
|
1014
|
-
return this.keys();
|
|
1015
|
-
};
|
|
1016
|
-
Set12.prototype[iteratorSymbol] = function() {
|
|
1017
|
-
return this.keys();
|
|
1018
|
-
};
|
|
1019
|
-
return Set12;
|
|
1020
|
-
}()
|
|
1021
|
-
);
|
|
1022
|
-
return Set1;
|
|
1023
|
-
}
|
|
1024
|
-
__name(CreateSetPolyfill, "CreateSetPolyfill");
|
|
1025
|
-
function CreateWeakMapPolyfill() {
|
|
1026
|
-
var UUID_SIZE = 16;
|
|
1027
|
-
var keys = HashMap.create();
|
|
1028
|
-
var rootKey = CreateUniqueKey();
|
|
1029
|
-
return (
|
|
1030
|
-
/** @class */
|
|
1031
|
-
function() {
|
|
1032
|
-
function WeakMap1() {
|
|
1033
|
-
this._key = CreateUniqueKey();
|
|
1034
|
-
}
|
|
1035
|
-
__name(WeakMap1, "WeakMap1");
|
|
1036
|
-
WeakMap1.prototype.has = function(target) {
|
|
1037
|
-
var table = GetOrCreateWeakMapTable(
|
|
1038
|
-
target,
|
|
1039
|
-
/*create*/
|
|
1040
|
-
false
|
|
1041
|
-
);
|
|
1042
|
-
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
1043
|
-
};
|
|
1044
|
-
WeakMap1.prototype.get = function(target) {
|
|
1045
|
-
var table = GetOrCreateWeakMapTable(
|
|
1046
|
-
target,
|
|
1047
|
-
/*create*/
|
|
1048
|
-
false
|
|
1049
|
-
);
|
|
1050
|
-
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
1051
|
-
};
|
|
1052
|
-
WeakMap1.prototype.set = function(target, value) {
|
|
1053
|
-
var table = GetOrCreateWeakMapTable(
|
|
1054
|
-
target,
|
|
1055
|
-
/*create*/
|
|
1056
|
-
true
|
|
1057
|
-
);
|
|
1058
|
-
table[this._key] = value;
|
|
1059
|
-
return this;
|
|
1060
|
-
};
|
|
1061
|
-
WeakMap1.prototype.delete = function(target) {
|
|
1062
|
-
var table = GetOrCreateWeakMapTable(
|
|
1063
|
-
target,
|
|
1064
|
-
/*create*/
|
|
1065
|
-
false
|
|
1066
|
-
);
|
|
1067
|
-
return table !== void 0 ? delete table[this._key] : false;
|
|
1068
|
-
};
|
|
1069
|
-
WeakMap1.prototype.clear = function() {
|
|
1070
|
-
this._key = CreateUniqueKey();
|
|
1071
|
-
};
|
|
1072
|
-
return WeakMap1;
|
|
1073
|
-
}()
|
|
1074
|
-
);
|
|
1075
|
-
function CreateUniqueKey() {
|
|
1076
|
-
var key;
|
|
1077
|
-
do
|
|
1078
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
1079
|
-
while (HashMap.has(keys, key));
|
|
1080
|
-
keys[key] = true;
|
|
1081
|
-
return key;
|
|
1082
|
-
}
|
|
1083
|
-
__name(CreateUniqueKey, "CreateUniqueKey");
|
|
1084
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
1085
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
1086
|
-
if (!create) return void 0;
|
|
1087
|
-
Object.defineProperty(target, rootKey, {
|
|
1088
|
-
value: HashMap.create()
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
return target[rootKey];
|
|
1092
|
-
}
|
|
1093
|
-
__name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
|
|
1094
|
-
function FillRandomBytes(buffer, size) {
|
|
1095
|
-
for (var i = 0; i < size; ++i) buffer[i] = Math.random() * 255 | 0;
|
|
1096
|
-
return buffer;
|
|
1097
|
-
}
|
|
1098
|
-
__name(FillRandomBytes, "FillRandomBytes");
|
|
1099
|
-
function GenRandomBytes(size) {
|
|
1100
|
-
if (typeof Uint8Array === "function") {
|
|
1101
|
-
var array = new Uint8Array(size);
|
|
1102
|
-
if (typeof crypto !== "undefined") {
|
|
1103
|
-
crypto.getRandomValues(array);
|
|
1104
|
-
} else if (typeof msCrypto !== "undefined") {
|
|
1105
|
-
msCrypto.getRandomValues(array);
|
|
1106
|
-
} else {
|
|
1107
|
-
FillRandomBytes(array, size);
|
|
1108
|
-
}
|
|
1109
|
-
return array;
|
|
1110
|
-
}
|
|
1111
|
-
return FillRandomBytes(new Array(size), size);
|
|
1112
|
-
}
|
|
1113
|
-
__name(GenRandomBytes, "GenRandomBytes");
|
|
1114
|
-
function CreateUUID() {
|
|
1115
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
1116
|
-
data[6] = data[6] & 79 | 64;
|
|
1117
|
-
data[8] = data[8] & 191 | 128;
|
|
1118
|
-
var result = "";
|
|
1119
|
-
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
1120
|
-
var byte = data[offset];
|
|
1121
|
-
if (offset === 4 || offset === 6 || offset === 8) result += "-";
|
|
1122
|
-
if (byte < 16) result += "0";
|
|
1123
|
-
result += byte.toString(16).toLowerCase();
|
|
1124
|
-
}
|
|
1125
|
-
return result;
|
|
1126
|
-
}
|
|
1127
|
-
__name(CreateUUID, "CreateUUID");
|
|
1128
|
-
}
|
|
1129
|
-
__name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
|
|
1130
|
-
function MakeDictionary(obj) {
|
|
1131
|
-
obj.__ = void 0;
|
|
1132
|
-
delete obj.__;
|
|
1133
|
-
return obj;
|
|
1134
|
-
}
|
|
1135
|
-
__name(MakeDictionary, "MakeDictionary");
|
|
1136
|
-
});
|
|
1137
|
-
})(Reflect2 || (Reflect2 = {}));
|
|
1138
|
-
}
|
|
1139
|
-
});
|
|
1140
|
-
|
|
1141
|
-
// src/core/app/app.module.ts
|
|
1142
|
-
var import_reflect_metadata = __toESM(require_Reflect());
|
|
1143
|
-
|
|
1144
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/types/lifecycle.js
|
|
1145
|
-
var Lifecycle;
|
|
1146
|
-
(function(Lifecycle2) {
|
|
1147
|
-
Lifecycle2[Lifecycle2["Transient"] = 0] = "Transient";
|
|
1148
|
-
Lifecycle2[Lifecycle2["Singleton"] = 1] = "Singleton";
|
|
1149
|
-
Lifecycle2[Lifecycle2["ResolutionScoped"] = 2] = "ResolutionScoped";
|
|
1150
|
-
Lifecycle2[Lifecycle2["ContainerScoped"] = 3] = "ContainerScoped";
|
|
1151
|
-
})(Lifecycle || (Lifecycle = {}));
|
|
1152
|
-
var lifecycle_default = Lifecycle;
|
|
1153
|
-
|
|
1154
|
-
// ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js
|
|
1155
|
-
var extendStatics = /* @__PURE__ */ __name(function(d, b) {
|
|
1156
|
-
extendStatics = Object.setPrototypeOf || {
|
|
1157
|
-
__proto__: []
|
|
1158
|
-
} instanceof Array && function(d2, b2) {
|
|
1159
|
-
d2.__proto__ = b2;
|
|
1160
|
-
} || function(d2, b2) {
|
|
1161
|
-
for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
|
|
1162
|
-
};
|
|
1163
|
-
return extendStatics(d, b);
|
|
1164
|
-
}, "extendStatics");
|
|
1165
|
-
function __extends(d, b) {
|
|
1166
|
-
extendStatics(d, b);
|
|
1167
|
-
function __() {
|
|
1168
|
-
this.constructor = d;
|
|
1169
|
-
}
|
|
1170
|
-
__name(__, "__");
|
|
1171
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1172
|
-
}
|
|
1173
|
-
__name(__extends, "__extends");
|
|
1174
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1175
|
-
function adopt(value) {
|
|
1176
|
-
return value instanceof P ? value : new P(function(resolve) {
|
|
1177
|
-
resolve(value);
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
|
-
__name(adopt, "adopt");
|
|
1181
|
-
return new (P || (P = Promise))(function(resolve, reject) {
|
|
1182
|
-
function fulfilled(value) {
|
|
1183
|
-
try {
|
|
1184
|
-
step(generator.next(value));
|
|
1185
|
-
} catch (e) {
|
|
1186
|
-
reject(e);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
__name(fulfilled, "fulfilled");
|
|
1190
|
-
function rejected(value) {
|
|
1191
|
-
try {
|
|
1192
|
-
step(generator["throw"](value));
|
|
1193
|
-
} catch (e) {
|
|
1194
|
-
reject(e);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
__name(rejected, "rejected");
|
|
1198
|
-
function step(result) {
|
|
1199
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1200
|
-
}
|
|
1201
|
-
__name(step, "step");
|
|
1202
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1203
|
-
});
|
|
1204
|
-
}
|
|
1205
|
-
__name(__awaiter, "__awaiter");
|
|
1206
|
-
function __generator(thisArg, body) {
|
|
1207
|
-
var _ = {
|
|
1208
|
-
label: 0,
|
|
1209
|
-
sent: /* @__PURE__ */ __name(function() {
|
|
1210
|
-
if (t[0] & 1) throw t[1];
|
|
1211
|
-
return t[1];
|
|
1212
|
-
}, "sent"),
|
|
1213
|
-
trys: [],
|
|
1214
|
-
ops: []
|
|
1215
|
-
}, f, y, t, g;
|
|
1216
|
-
return g = {
|
|
1217
|
-
next: verb(0),
|
|
1218
|
-
"throw": verb(1),
|
|
1219
|
-
"return": verb(2)
|
|
1220
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
1221
|
-
return this;
|
|
1222
|
-
}), g;
|
|
1223
|
-
function verb(n) {
|
|
1224
|
-
return function(v) {
|
|
1225
|
-
return step([
|
|
1226
|
-
n,
|
|
1227
|
-
v
|
|
1228
|
-
]);
|
|
1229
|
-
};
|
|
1230
|
-
}
|
|
1231
|
-
__name(verb, "verb");
|
|
1232
|
-
function step(op) {
|
|
1233
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
1234
|
-
while (_) try {
|
|
1235
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1236
|
-
if (y = 0, t) op = [
|
|
1237
|
-
op[0] & 2,
|
|
1238
|
-
t.value
|
|
1239
|
-
];
|
|
1240
|
-
switch (op[0]) {
|
|
1241
|
-
case 0:
|
|
1242
|
-
case 1:
|
|
1243
|
-
t = op;
|
|
1244
|
-
break;
|
|
1245
|
-
case 4:
|
|
1246
|
-
_.label++;
|
|
1247
|
-
return {
|
|
1248
|
-
value: op[1],
|
|
1249
|
-
done: false
|
|
1250
|
-
};
|
|
1251
|
-
case 5:
|
|
1252
|
-
_.label++;
|
|
1253
|
-
y = op[1];
|
|
1254
|
-
op = [
|
|
1255
|
-
0
|
|
1256
|
-
];
|
|
1257
|
-
continue;
|
|
1258
|
-
case 7:
|
|
1259
|
-
op = _.ops.pop();
|
|
1260
|
-
_.trys.pop();
|
|
1261
|
-
continue;
|
|
1262
|
-
default:
|
|
1263
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
1264
|
-
_ = 0;
|
|
1265
|
-
continue;
|
|
1266
|
-
}
|
|
1267
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
1268
|
-
_.label = op[1];
|
|
1269
|
-
break;
|
|
1270
|
-
}
|
|
1271
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
1272
|
-
_.label = t[1];
|
|
1273
|
-
t = op;
|
|
1274
|
-
break;
|
|
1275
|
-
}
|
|
1276
|
-
if (t && _.label < t[2]) {
|
|
1277
|
-
_.label = t[2];
|
|
1278
|
-
_.ops.push(op);
|
|
1279
|
-
break;
|
|
1280
|
-
}
|
|
1281
|
-
if (t[2]) _.ops.pop();
|
|
1282
|
-
_.trys.pop();
|
|
1283
|
-
continue;
|
|
1284
|
-
}
|
|
1285
|
-
op = body.call(thisArg, _);
|
|
1286
|
-
} catch (e) {
|
|
1287
|
-
op = [
|
|
1288
|
-
6,
|
|
1289
|
-
e
|
|
1290
|
-
];
|
|
1291
|
-
y = 0;
|
|
1292
|
-
} finally {
|
|
1293
|
-
f = t = 0;
|
|
1294
|
-
}
|
|
1295
|
-
if (op[0] & 5) throw op[1];
|
|
1296
|
-
return {
|
|
1297
|
-
value: op[0] ? op[1] : void 0,
|
|
1298
|
-
done: true
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
__name(step, "step");
|
|
1302
|
-
}
|
|
1303
|
-
__name(__generator, "__generator");
|
|
1304
|
-
function __values(o) {
|
|
1305
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1306
|
-
if (m) return m.call(o);
|
|
1307
|
-
if (o && typeof o.length === "number") return {
|
|
1308
|
-
next: /* @__PURE__ */ __name(function() {
|
|
1309
|
-
if (o && i >= o.length) o = void 0;
|
|
1310
|
-
return {
|
|
1311
|
-
value: o && o[i++],
|
|
1312
|
-
done: !o
|
|
1313
|
-
};
|
|
1314
|
-
}, "next")
|
|
1315
|
-
};
|
|
1316
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1317
|
-
}
|
|
1318
|
-
__name(__values, "__values");
|
|
1319
|
-
function __read(o, n) {
|
|
1320
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1321
|
-
if (!m) return o;
|
|
1322
|
-
var i = m.call(o), r, ar = [], e;
|
|
1323
|
-
try {
|
|
1324
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1325
|
-
} catch (error) {
|
|
1326
|
-
e = {
|
|
1327
|
-
error
|
|
1328
|
-
};
|
|
1329
|
-
} finally {
|
|
1330
|
-
try {
|
|
1331
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1332
|
-
} finally {
|
|
1333
|
-
if (e) throw e.error;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
return ar;
|
|
1337
|
-
}
|
|
1338
|
-
__name(__read, "__read");
|
|
1339
|
-
function __spread() {
|
|
1340
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
1341
|
-
return ar;
|
|
1342
|
-
}
|
|
1343
|
-
__name(__spread, "__spread");
|
|
1344
|
-
|
|
1345
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/reflection-helpers.js
|
|
1346
|
-
var INJECTION_TOKEN_METADATA_KEY = "injectionTokens";
|
|
1347
|
-
function getParamInfo(target) {
|
|
1348
|
-
var params = Reflect.getMetadata("design:paramtypes", target) || [];
|
|
1349
|
-
var injectionTokens = Reflect.getOwnMetadata(INJECTION_TOKEN_METADATA_KEY, target) || {};
|
|
1350
|
-
Object.keys(injectionTokens).forEach(function(key) {
|
|
1351
|
-
params[+key] = injectionTokens[key];
|
|
1352
|
-
});
|
|
1353
|
-
return params;
|
|
1354
|
-
}
|
|
1355
|
-
__name(getParamInfo, "getParamInfo");
|
|
1356
|
-
function defineInjectionTokenMetadata(data, transform) {
|
|
1357
|
-
return function(target, _propertyKey, parameterIndex) {
|
|
1358
|
-
var descriptors = Reflect.getOwnMetadata(INJECTION_TOKEN_METADATA_KEY, target) || {};
|
|
1359
|
-
descriptors[parameterIndex] = transform ? {
|
|
1360
|
-
token: data,
|
|
1361
|
-
transform: transform.transformToken,
|
|
1362
|
-
transformArgs: transform.args || []
|
|
1363
|
-
} : data;
|
|
1364
|
-
Reflect.defineMetadata(INJECTION_TOKEN_METADATA_KEY, descriptors, target);
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
__name(defineInjectionTokenMetadata, "defineInjectionTokenMetadata");
|
|
1368
|
-
|
|
1369
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/class-provider.js
|
|
1370
|
-
function isClassProvider(provider) {
|
|
1371
|
-
return !!provider.useClass;
|
|
1372
|
-
}
|
|
1373
|
-
__name(isClassProvider, "isClassProvider");
|
|
1374
|
-
|
|
1375
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/factory-provider.js
|
|
1376
|
-
function isFactoryProvider(provider) {
|
|
1377
|
-
return !!provider.useFactory;
|
|
1378
|
-
}
|
|
1379
|
-
__name(isFactoryProvider, "isFactoryProvider");
|
|
1380
|
-
|
|
1381
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/lazy-helpers.js
|
|
1382
|
-
var DelayedConstructor = function() {
|
|
1383
|
-
function DelayedConstructor2(wrap) {
|
|
1384
|
-
this.wrap = wrap;
|
|
1385
|
-
this.reflectMethods = [
|
|
1386
|
-
"get",
|
|
1387
|
-
"getPrototypeOf",
|
|
1388
|
-
"setPrototypeOf",
|
|
1389
|
-
"getOwnPropertyDescriptor",
|
|
1390
|
-
"defineProperty",
|
|
1391
|
-
"has",
|
|
1392
|
-
"set",
|
|
1393
|
-
"deleteProperty",
|
|
1394
|
-
"apply",
|
|
1395
|
-
"construct",
|
|
1396
|
-
"ownKeys"
|
|
1397
|
-
];
|
|
1398
|
-
}
|
|
1399
|
-
__name(DelayedConstructor2, "DelayedConstructor");
|
|
1400
|
-
DelayedConstructor2.prototype.createProxy = function(createObject) {
|
|
1401
|
-
var _this = this;
|
|
1402
|
-
var target = {};
|
|
1403
|
-
var init = false;
|
|
1404
|
-
var value;
|
|
1405
|
-
var delayedObject = /* @__PURE__ */ __name(function() {
|
|
1406
|
-
if (!init) {
|
|
1407
|
-
value = createObject(_this.wrap());
|
|
1408
|
-
init = true;
|
|
1409
|
-
}
|
|
1410
|
-
return value;
|
|
1411
|
-
}, "delayedObject");
|
|
1412
|
-
return new Proxy(target, this.createHandler(delayedObject));
|
|
1413
|
-
};
|
|
1414
|
-
DelayedConstructor2.prototype.createHandler = function(delayedObject) {
|
|
1415
|
-
var handler = {};
|
|
1416
|
-
var install = /* @__PURE__ */ __name(function(name) {
|
|
1417
|
-
handler[name] = function() {
|
|
1418
|
-
var args = [];
|
|
1419
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1420
|
-
args[_i] = arguments[_i];
|
|
1421
|
-
}
|
|
1422
|
-
args[0] = delayedObject();
|
|
1423
|
-
var method = Reflect[name];
|
|
1424
|
-
return method.apply(void 0, __spread(args));
|
|
1425
|
-
};
|
|
1426
|
-
}, "install");
|
|
1427
|
-
this.reflectMethods.forEach(install);
|
|
1428
|
-
return handler;
|
|
1429
|
-
};
|
|
1430
|
-
return DelayedConstructor2;
|
|
1431
|
-
}();
|
|
1432
|
-
|
|
1433
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/injection-token.js
|
|
1434
|
-
function isNormalToken(token) {
|
|
1435
|
-
return typeof token === "string" || typeof token === "symbol";
|
|
1436
|
-
}
|
|
1437
|
-
__name(isNormalToken, "isNormalToken");
|
|
1438
|
-
function isTokenDescriptor(descriptor) {
|
|
1439
|
-
return typeof descriptor === "object" && "token" in descriptor && "multiple" in descriptor;
|
|
1440
|
-
}
|
|
1441
|
-
__name(isTokenDescriptor, "isTokenDescriptor");
|
|
1442
|
-
function isTransformDescriptor(descriptor) {
|
|
1443
|
-
return typeof descriptor === "object" && "token" in descriptor && "transform" in descriptor;
|
|
1444
|
-
}
|
|
1445
|
-
__name(isTransformDescriptor, "isTransformDescriptor");
|
|
1446
|
-
function isConstructorToken(token) {
|
|
1447
|
-
return typeof token === "function" || token instanceof DelayedConstructor;
|
|
1448
|
-
}
|
|
1449
|
-
__name(isConstructorToken, "isConstructorToken");
|
|
1450
|
-
|
|
1451
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/token-provider.js
|
|
1452
|
-
function isTokenProvider(provider) {
|
|
1453
|
-
return !!provider.useToken;
|
|
1454
|
-
}
|
|
1455
|
-
__name(isTokenProvider, "isTokenProvider");
|
|
1456
|
-
|
|
1457
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/value-provider.js
|
|
1458
|
-
function isValueProvider(provider) {
|
|
1459
|
-
return provider.useValue != void 0;
|
|
1460
|
-
}
|
|
1461
|
-
__name(isValueProvider, "isValueProvider");
|
|
1462
|
-
|
|
1463
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/provider.js
|
|
1464
|
-
function isProvider(provider) {
|
|
1465
|
-
return isClassProvider(provider) || isValueProvider(provider) || isTokenProvider(provider) || isFactoryProvider(provider);
|
|
1466
|
-
}
|
|
1467
|
-
__name(isProvider, "isProvider");
|
|
1468
|
-
|
|
1469
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/registry-base.js
|
|
1470
|
-
var RegistryBase = function() {
|
|
1471
|
-
function RegistryBase2() {
|
|
1472
|
-
this._registryMap = /* @__PURE__ */ new Map();
|
|
1473
|
-
}
|
|
1474
|
-
__name(RegistryBase2, "RegistryBase");
|
|
1475
|
-
RegistryBase2.prototype.entries = function() {
|
|
1476
|
-
return this._registryMap.entries();
|
|
1477
|
-
};
|
|
1478
|
-
RegistryBase2.prototype.getAll = function(key) {
|
|
1479
|
-
this.ensure(key);
|
|
1480
|
-
return this._registryMap.get(key);
|
|
1481
|
-
};
|
|
1482
|
-
RegistryBase2.prototype.get = function(key) {
|
|
1483
|
-
this.ensure(key);
|
|
1484
|
-
var value = this._registryMap.get(key);
|
|
1485
|
-
return value[value.length - 1] || null;
|
|
1486
|
-
};
|
|
1487
|
-
RegistryBase2.prototype.set = function(key, value) {
|
|
1488
|
-
this.ensure(key);
|
|
1489
|
-
this._registryMap.get(key).push(value);
|
|
1490
|
-
};
|
|
1491
|
-
RegistryBase2.prototype.setAll = function(key, value) {
|
|
1492
|
-
this._registryMap.set(key, value);
|
|
1493
|
-
};
|
|
1494
|
-
RegistryBase2.prototype.has = function(key) {
|
|
1495
|
-
this.ensure(key);
|
|
1496
|
-
return this._registryMap.get(key).length > 0;
|
|
1497
|
-
};
|
|
1498
|
-
RegistryBase2.prototype.clear = function() {
|
|
1499
|
-
this._registryMap.clear();
|
|
1500
|
-
};
|
|
1501
|
-
RegistryBase2.prototype.ensure = function(key) {
|
|
1502
|
-
if (!this._registryMap.has(key)) {
|
|
1503
|
-
this._registryMap.set(key, []);
|
|
1504
|
-
}
|
|
1505
|
-
};
|
|
1506
|
-
return RegistryBase2;
|
|
1507
|
-
}();
|
|
1508
|
-
var registry_base_default = RegistryBase;
|
|
1509
|
-
|
|
1510
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/registry.js
|
|
1511
|
-
var Registry = function(_super) {
|
|
1512
|
-
__extends(Registry2, _super);
|
|
1513
|
-
function Registry2() {
|
|
1514
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1515
|
-
}
|
|
1516
|
-
__name(Registry2, "Registry");
|
|
1517
|
-
return Registry2;
|
|
1518
|
-
}(registry_base_default);
|
|
1519
|
-
var registry_default = Registry;
|
|
1520
|
-
|
|
1521
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/resolution-context.js
|
|
1522
|
-
var ResolutionContext = /* @__PURE__ */ function() {
|
|
1523
|
-
function ResolutionContext2() {
|
|
1524
|
-
this.scopedResolutions = /* @__PURE__ */ new Map();
|
|
1525
|
-
}
|
|
1526
|
-
__name(ResolutionContext2, "ResolutionContext");
|
|
1527
|
-
return ResolutionContext2;
|
|
1528
|
-
}();
|
|
1529
|
-
var resolution_context_default = ResolutionContext;
|
|
1530
|
-
|
|
1531
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/error-helpers.js
|
|
1532
|
-
function formatDependency(params, idx) {
|
|
1533
|
-
if (params === null) {
|
|
1534
|
-
return "at position #" + idx;
|
|
1535
|
-
}
|
|
1536
|
-
var argName = params.split(",")[idx].trim();
|
|
1537
|
-
return '"' + argName + '" at position #' + idx;
|
|
1538
|
-
}
|
|
1539
|
-
__name(formatDependency, "formatDependency");
|
|
1540
|
-
function composeErrorMessage(msg, e, indent) {
|
|
1541
|
-
if (indent === void 0) {
|
|
1542
|
-
indent = " ";
|
|
1543
|
-
}
|
|
1544
|
-
return __spread([
|
|
1545
|
-
msg
|
|
1546
|
-
], e.message.split("\n").map(function(l) {
|
|
1547
|
-
return indent + l;
|
|
1548
|
-
})).join("\n");
|
|
1549
|
-
}
|
|
1550
|
-
__name(composeErrorMessage, "composeErrorMessage");
|
|
1551
|
-
function formatErrorCtor(ctor, paramIdx, error) {
|
|
1552
|
-
var _a = __read(ctor.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), _b = _a[1], params = _b === void 0 ? null : _b;
|
|
1553
|
-
var dep = formatDependency(params, paramIdx);
|
|
1554
|
-
return composeErrorMessage("Cannot inject the dependency " + dep + ' of "' + ctor.name + '" constructor. Reason:', error);
|
|
1555
|
-
}
|
|
1556
|
-
__name(formatErrorCtor, "formatErrorCtor");
|
|
1557
|
-
|
|
1558
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/types/disposable.js
|
|
1559
|
-
function isDisposable(value) {
|
|
1560
|
-
if (typeof value.dispose !== "function") return false;
|
|
1561
|
-
var disposeFun = value.dispose;
|
|
1562
|
-
if (disposeFun.length > 0) {
|
|
1563
|
-
return false;
|
|
1564
|
-
}
|
|
1565
|
-
return true;
|
|
1566
|
-
}
|
|
1567
|
-
__name(isDisposable, "isDisposable");
|
|
1568
|
-
|
|
1569
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/interceptors.js
|
|
1570
|
-
var PreResolutionInterceptors = function(_super) {
|
|
1571
|
-
__extends(PreResolutionInterceptors2, _super);
|
|
1572
|
-
function PreResolutionInterceptors2() {
|
|
1573
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1574
|
-
}
|
|
1575
|
-
__name(PreResolutionInterceptors2, "PreResolutionInterceptors");
|
|
1576
|
-
return PreResolutionInterceptors2;
|
|
1577
|
-
}(registry_base_default);
|
|
1578
|
-
var PostResolutionInterceptors = function(_super) {
|
|
1579
|
-
__extends(PostResolutionInterceptors2, _super);
|
|
1580
|
-
function PostResolutionInterceptors2() {
|
|
1581
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1582
|
-
}
|
|
1583
|
-
__name(PostResolutionInterceptors2, "PostResolutionInterceptors");
|
|
1584
|
-
return PostResolutionInterceptors2;
|
|
1585
|
-
}(registry_base_default);
|
|
1586
|
-
var Interceptors = /* @__PURE__ */ function() {
|
|
1587
|
-
function Interceptors2() {
|
|
1588
|
-
this.preResolution = new PreResolutionInterceptors();
|
|
1589
|
-
this.postResolution = new PostResolutionInterceptors();
|
|
1590
|
-
}
|
|
1591
|
-
__name(Interceptors2, "Interceptors");
|
|
1592
|
-
return Interceptors2;
|
|
1593
|
-
}();
|
|
1594
|
-
var interceptors_default = Interceptors;
|
|
1595
|
-
|
|
1596
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/dependency-container.js
|
|
1597
|
-
var typeInfo = /* @__PURE__ */ new Map();
|
|
1598
|
-
var InternalDependencyContainer = function() {
|
|
1599
|
-
function InternalDependencyContainer2(parent) {
|
|
1600
|
-
this.parent = parent;
|
|
1601
|
-
this._registry = new registry_default();
|
|
1602
|
-
this.interceptors = new interceptors_default();
|
|
1603
|
-
this.disposed = false;
|
|
1604
|
-
this.disposables = /* @__PURE__ */ new Set();
|
|
1605
|
-
}
|
|
1606
|
-
__name(InternalDependencyContainer2, "InternalDependencyContainer");
|
|
1607
|
-
InternalDependencyContainer2.prototype.register = function(token, providerOrConstructor, options) {
|
|
1608
|
-
if (options === void 0) {
|
|
1609
|
-
options = {
|
|
1610
|
-
lifecycle: lifecycle_default.Transient
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
this.ensureNotDisposed();
|
|
1614
|
-
var provider;
|
|
1615
|
-
if (!isProvider(providerOrConstructor)) {
|
|
1616
|
-
provider = {
|
|
1617
|
-
useClass: providerOrConstructor
|
|
1618
|
-
};
|
|
1619
|
-
} else {
|
|
1620
|
-
provider = providerOrConstructor;
|
|
1621
|
-
}
|
|
1622
|
-
if (isTokenProvider(provider)) {
|
|
1623
|
-
var path = [
|
|
1624
|
-
token
|
|
1625
|
-
];
|
|
1626
|
-
var tokenProvider = provider;
|
|
1627
|
-
while (tokenProvider != null) {
|
|
1628
|
-
var currentToken = tokenProvider.useToken;
|
|
1629
|
-
if (path.includes(currentToken)) {
|
|
1630
|
-
throw new Error("Token registration cycle detected! " + __spread(path, [
|
|
1631
|
-
currentToken
|
|
1632
|
-
]).join(" -> "));
|
|
1633
|
-
}
|
|
1634
|
-
path.push(currentToken);
|
|
1635
|
-
var registration = this._registry.get(currentToken);
|
|
1636
|
-
if (registration && isTokenProvider(registration.provider)) {
|
|
1637
|
-
tokenProvider = registration.provider;
|
|
1638
|
-
} else {
|
|
1639
|
-
tokenProvider = null;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
if (options.lifecycle === lifecycle_default.Singleton || options.lifecycle == lifecycle_default.ContainerScoped || options.lifecycle == lifecycle_default.ResolutionScoped) {
|
|
1644
|
-
if (isValueProvider(provider) || isFactoryProvider(provider)) {
|
|
1645
|
-
throw new Error('Cannot use lifecycle "' + lifecycle_default[options.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
this._registry.set(token, {
|
|
1649
|
-
provider,
|
|
1650
|
-
options
|
|
1651
|
-
});
|
|
1652
|
-
return this;
|
|
1653
|
-
};
|
|
1654
|
-
InternalDependencyContainer2.prototype.registerType = function(from, to) {
|
|
1655
|
-
this.ensureNotDisposed();
|
|
1656
|
-
if (isNormalToken(to)) {
|
|
1657
|
-
return this.register(from, {
|
|
1658
|
-
useToken: to
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
return this.register(from, {
|
|
1662
|
-
useClass: to
|
|
1663
|
-
});
|
|
1664
|
-
};
|
|
1665
|
-
InternalDependencyContainer2.prototype.registerInstance = function(token, instance2) {
|
|
1666
|
-
this.ensureNotDisposed();
|
|
1667
|
-
return this.register(token, {
|
|
1668
|
-
useValue: instance2
|
|
1669
|
-
});
|
|
1670
|
-
};
|
|
1671
|
-
InternalDependencyContainer2.prototype.registerSingleton = function(from, to) {
|
|
1672
|
-
this.ensureNotDisposed();
|
|
1673
|
-
if (isNormalToken(from)) {
|
|
1674
|
-
if (isNormalToken(to)) {
|
|
1675
|
-
return this.register(from, {
|
|
1676
|
-
useToken: to
|
|
1677
|
-
}, {
|
|
1678
|
-
lifecycle: lifecycle_default.Singleton
|
|
1679
|
-
});
|
|
1680
|
-
} else if (to) {
|
|
1681
|
-
return this.register(from, {
|
|
1682
|
-
useClass: to
|
|
1683
|
-
}, {
|
|
1684
|
-
lifecycle: lifecycle_default.Singleton
|
|
1685
|
-
});
|
|
1686
|
-
}
|
|
1687
|
-
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
1688
|
-
}
|
|
1689
|
-
var useClass = from;
|
|
1690
|
-
if (to && !isNormalToken(to)) {
|
|
1691
|
-
useClass = to;
|
|
1692
|
-
}
|
|
1693
|
-
return this.register(from, {
|
|
1694
|
-
useClass
|
|
1695
|
-
}, {
|
|
1696
|
-
lifecycle: lifecycle_default.Singleton
|
|
1697
|
-
});
|
|
1698
|
-
};
|
|
1699
|
-
InternalDependencyContainer2.prototype.resolve = function(token, context) {
|
|
1700
|
-
if (context === void 0) {
|
|
1701
|
-
context = new resolution_context_default();
|
|
1702
|
-
}
|
|
1703
|
-
this.ensureNotDisposed();
|
|
1704
|
-
var registration = this.getRegistration(token);
|
|
1705
|
-
if (!registration && isNormalToken(token)) {
|
|
1706
|
-
throw new Error('Attempted to resolve unregistered dependency token: "' + token.toString() + '"');
|
|
1707
|
-
}
|
|
1708
|
-
this.executePreResolutionInterceptor(token, "Single");
|
|
1709
|
-
if (registration) {
|
|
1710
|
-
var result = this.resolveRegistration(registration, context);
|
|
1711
|
-
this.executePostResolutionInterceptor(token, result, "Single");
|
|
1712
|
-
return result;
|
|
1713
|
-
}
|
|
1714
|
-
if (isConstructorToken(token)) {
|
|
1715
|
-
var result = this.construct(token, context);
|
|
1716
|
-
this.executePostResolutionInterceptor(token, result, "Single");
|
|
1717
|
-
return result;
|
|
1718
|
-
}
|
|
1719
|
-
throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.");
|
|
1720
|
-
};
|
|
1721
|
-
InternalDependencyContainer2.prototype.executePreResolutionInterceptor = function(token, resolutionType) {
|
|
1722
|
-
var e_1, _a;
|
|
1723
|
-
if (this.interceptors.preResolution.has(token)) {
|
|
1724
|
-
var remainingInterceptors = [];
|
|
1725
|
-
try {
|
|
1726
|
-
for (var _b = __values(this.interceptors.preResolution.getAll(token)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1727
|
-
var interceptor = _c.value;
|
|
1728
|
-
if (interceptor.options.frequency != "Once") {
|
|
1729
|
-
remainingInterceptors.push(interceptor);
|
|
1730
|
-
}
|
|
1731
|
-
interceptor.callback(token, resolutionType);
|
|
1732
|
-
}
|
|
1733
|
-
} catch (e_1_1) {
|
|
1734
|
-
e_1 = {
|
|
1735
|
-
error: e_1_1
|
|
1736
|
-
};
|
|
1737
|
-
} finally {
|
|
1738
|
-
try {
|
|
1739
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1740
|
-
} finally {
|
|
1741
|
-
if (e_1) throw e_1.error;
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
this.interceptors.preResolution.setAll(token, remainingInterceptors);
|
|
1745
|
-
}
|
|
1746
|
-
};
|
|
1747
|
-
InternalDependencyContainer2.prototype.executePostResolutionInterceptor = function(token, result, resolutionType) {
|
|
1748
|
-
var e_2, _a;
|
|
1749
|
-
if (this.interceptors.postResolution.has(token)) {
|
|
1750
|
-
var remainingInterceptors = [];
|
|
1751
|
-
try {
|
|
1752
|
-
for (var _b = __values(this.interceptors.postResolution.getAll(token)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1753
|
-
var interceptor = _c.value;
|
|
1754
|
-
if (interceptor.options.frequency != "Once") {
|
|
1755
|
-
remainingInterceptors.push(interceptor);
|
|
1756
|
-
}
|
|
1757
|
-
interceptor.callback(token, result, resolutionType);
|
|
1758
|
-
}
|
|
1759
|
-
} catch (e_2_1) {
|
|
1760
|
-
e_2 = {
|
|
1761
|
-
error: e_2_1
|
|
1762
|
-
};
|
|
1763
|
-
} finally {
|
|
1764
|
-
try {
|
|
1765
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1766
|
-
} finally {
|
|
1767
|
-
if (e_2) throw e_2.error;
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
this.interceptors.postResolution.setAll(token, remainingInterceptors);
|
|
1771
|
-
}
|
|
1772
|
-
};
|
|
1773
|
-
InternalDependencyContainer2.prototype.resolveRegistration = function(registration, context) {
|
|
1774
|
-
this.ensureNotDisposed();
|
|
1775
|
-
if (registration.options.lifecycle === lifecycle_default.ResolutionScoped && context.scopedResolutions.has(registration)) {
|
|
1776
|
-
return context.scopedResolutions.get(registration);
|
|
1777
|
-
}
|
|
1778
|
-
var isSingleton = registration.options.lifecycle === lifecycle_default.Singleton;
|
|
1779
|
-
var isContainerScoped = registration.options.lifecycle === lifecycle_default.ContainerScoped;
|
|
1780
|
-
var returnInstance = isSingleton || isContainerScoped;
|
|
1781
|
-
var resolved;
|
|
1782
|
-
if (isValueProvider(registration.provider)) {
|
|
1783
|
-
resolved = registration.provider.useValue;
|
|
1784
|
-
} else if (isTokenProvider(registration.provider)) {
|
|
1785
|
-
resolved = returnInstance ? registration.instance || (registration.instance = this.resolve(registration.provider.useToken, context)) : this.resolve(registration.provider.useToken, context);
|
|
1786
|
-
} else if (isClassProvider(registration.provider)) {
|
|
1787
|
-
resolved = returnInstance ? registration.instance || (registration.instance = this.construct(registration.provider.useClass, context)) : this.construct(registration.provider.useClass, context);
|
|
1788
|
-
} else if (isFactoryProvider(registration.provider)) {
|
|
1789
|
-
resolved = registration.provider.useFactory(this);
|
|
1790
|
-
} else {
|
|
1791
|
-
resolved = this.construct(registration.provider, context);
|
|
1792
|
-
}
|
|
1793
|
-
if (registration.options.lifecycle === lifecycle_default.ResolutionScoped) {
|
|
1794
|
-
context.scopedResolutions.set(registration, resolved);
|
|
1795
|
-
}
|
|
1796
|
-
return resolved;
|
|
1797
|
-
};
|
|
1798
|
-
InternalDependencyContainer2.prototype.resolveAll = function(token, context) {
|
|
1799
|
-
var _this = this;
|
|
1800
|
-
if (context === void 0) {
|
|
1801
|
-
context = new resolution_context_default();
|
|
1802
|
-
}
|
|
1803
|
-
this.ensureNotDisposed();
|
|
1804
|
-
var registrations = this.getAllRegistrations(token);
|
|
1805
|
-
if (!registrations && isNormalToken(token)) {
|
|
1806
|
-
throw new Error('Attempted to resolve unregistered dependency token: "' + token.toString() + '"');
|
|
1807
|
-
}
|
|
1808
|
-
this.executePreResolutionInterceptor(token, "All");
|
|
1809
|
-
if (registrations) {
|
|
1810
|
-
var result_1 = registrations.map(function(item) {
|
|
1811
|
-
return _this.resolveRegistration(item, context);
|
|
1812
|
-
});
|
|
1813
|
-
this.executePostResolutionInterceptor(token, result_1, "All");
|
|
1814
|
-
return result_1;
|
|
1815
|
-
}
|
|
1816
|
-
var result = [
|
|
1817
|
-
this.construct(token, context)
|
|
1818
|
-
];
|
|
1819
|
-
this.executePostResolutionInterceptor(token, result, "All");
|
|
1820
|
-
return result;
|
|
1821
|
-
};
|
|
1822
|
-
InternalDependencyContainer2.prototype.isRegistered = function(token, recursive) {
|
|
1823
|
-
if (recursive === void 0) {
|
|
1824
|
-
recursive = false;
|
|
1825
|
-
}
|
|
1826
|
-
this.ensureNotDisposed();
|
|
1827
|
-
return this._registry.has(token) || recursive && (this.parent || false) && this.parent.isRegistered(token, true);
|
|
1828
|
-
};
|
|
1829
|
-
InternalDependencyContainer2.prototype.reset = function() {
|
|
1830
|
-
this.ensureNotDisposed();
|
|
1831
|
-
this._registry.clear();
|
|
1832
|
-
this.interceptors.preResolution.clear();
|
|
1833
|
-
this.interceptors.postResolution.clear();
|
|
1834
|
-
};
|
|
1835
|
-
InternalDependencyContainer2.prototype.clearInstances = function() {
|
|
1836
|
-
var e_3, _a;
|
|
1837
|
-
this.ensureNotDisposed();
|
|
1838
|
-
try {
|
|
1839
|
-
for (var _b = __values(this._registry.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1840
|
-
var _d = __read(_c.value, 2), token = _d[0], registrations = _d[1];
|
|
1841
|
-
this._registry.setAll(token, registrations.filter(function(registration) {
|
|
1842
|
-
return !isValueProvider(registration.provider);
|
|
1843
|
-
}).map(function(registration) {
|
|
1844
|
-
registration.instance = void 0;
|
|
1845
|
-
return registration;
|
|
1846
|
-
}));
|
|
1847
|
-
}
|
|
1848
|
-
} catch (e_3_1) {
|
|
1849
|
-
e_3 = {
|
|
1850
|
-
error: e_3_1
|
|
1851
|
-
};
|
|
1852
|
-
} finally {
|
|
1853
|
-
try {
|
|
1854
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1855
|
-
} finally {
|
|
1856
|
-
if (e_3) throw e_3.error;
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
};
|
|
1860
|
-
InternalDependencyContainer2.prototype.createChildContainer = function() {
|
|
1861
|
-
var e_4, _a;
|
|
1862
|
-
this.ensureNotDisposed();
|
|
1863
|
-
var childContainer = new InternalDependencyContainer2(this);
|
|
1864
|
-
try {
|
|
1865
|
-
for (var _b = __values(this._registry.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1866
|
-
var _d = __read(_c.value, 2), token = _d[0], registrations = _d[1];
|
|
1867
|
-
if (registrations.some(function(_a2) {
|
|
1868
|
-
var options = _a2.options;
|
|
1869
|
-
return options.lifecycle === lifecycle_default.ContainerScoped;
|
|
1870
|
-
})) {
|
|
1871
|
-
childContainer._registry.setAll(token, registrations.map(function(registration) {
|
|
1872
|
-
if (registration.options.lifecycle === lifecycle_default.ContainerScoped) {
|
|
1873
|
-
return {
|
|
1874
|
-
provider: registration.provider,
|
|
1875
|
-
options: registration.options
|
|
1876
|
-
};
|
|
1877
|
-
}
|
|
1878
|
-
return registration;
|
|
1879
|
-
}));
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
} catch (e_4_1) {
|
|
1883
|
-
e_4 = {
|
|
1884
|
-
error: e_4_1
|
|
1885
|
-
};
|
|
1886
|
-
} finally {
|
|
1887
|
-
try {
|
|
1888
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1889
|
-
} finally {
|
|
1890
|
-
if (e_4) throw e_4.error;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
return childContainer;
|
|
1894
|
-
};
|
|
1895
|
-
InternalDependencyContainer2.prototype.beforeResolution = function(token, callback, options) {
|
|
1896
|
-
if (options === void 0) {
|
|
1897
|
-
options = {
|
|
1898
|
-
frequency: "Always"
|
|
1899
|
-
};
|
|
1900
|
-
}
|
|
1901
|
-
this.interceptors.preResolution.set(token, {
|
|
1902
|
-
callback,
|
|
1903
|
-
options
|
|
1904
|
-
});
|
|
1905
|
-
};
|
|
1906
|
-
InternalDependencyContainer2.prototype.afterResolution = function(token, callback, options) {
|
|
1907
|
-
if (options === void 0) {
|
|
1908
|
-
options = {
|
|
1909
|
-
frequency: "Always"
|
|
1910
|
-
};
|
|
1911
|
-
}
|
|
1912
|
-
this.interceptors.postResolution.set(token, {
|
|
1913
|
-
callback,
|
|
1914
|
-
options
|
|
1915
|
-
});
|
|
1916
|
-
};
|
|
1917
|
-
InternalDependencyContainer2.prototype.dispose = function() {
|
|
1918
|
-
return __awaiter(this, void 0, void 0, function() {
|
|
1919
|
-
var promises;
|
|
1920
|
-
return __generator(this, function(_a) {
|
|
1921
|
-
switch (_a.label) {
|
|
1922
|
-
case 0:
|
|
1923
|
-
this.disposed = true;
|
|
1924
|
-
promises = [];
|
|
1925
|
-
this.disposables.forEach(function(disposable) {
|
|
1926
|
-
var maybePromise = disposable.dispose();
|
|
1927
|
-
if (maybePromise) {
|
|
1928
|
-
promises.push(maybePromise);
|
|
1929
|
-
}
|
|
1930
|
-
});
|
|
1931
|
-
return [
|
|
1932
|
-
4,
|
|
1933
|
-
Promise.all(promises)
|
|
1934
|
-
];
|
|
1935
|
-
case 1:
|
|
1936
|
-
_a.sent();
|
|
1937
|
-
return [
|
|
1938
|
-
2
|
|
1939
|
-
];
|
|
1940
|
-
}
|
|
1941
|
-
});
|
|
1942
|
-
});
|
|
1943
|
-
};
|
|
1944
|
-
InternalDependencyContainer2.prototype.getRegistration = function(token) {
|
|
1945
|
-
if (this.isRegistered(token)) {
|
|
1946
|
-
return this._registry.get(token);
|
|
1947
|
-
}
|
|
1948
|
-
if (this.parent) {
|
|
1949
|
-
return this.parent.getRegistration(token);
|
|
1950
|
-
}
|
|
1951
|
-
return null;
|
|
1952
|
-
};
|
|
1953
|
-
InternalDependencyContainer2.prototype.getAllRegistrations = function(token) {
|
|
1954
|
-
if (this.isRegistered(token)) {
|
|
1955
|
-
return this._registry.getAll(token);
|
|
1956
|
-
}
|
|
1957
|
-
if (this.parent) {
|
|
1958
|
-
return this.parent.getAllRegistrations(token);
|
|
1959
|
-
}
|
|
1960
|
-
return null;
|
|
1961
|
-
};
|
|
1962
|
-
InternalDependencyContainer2.prototype.construct = function(ctor, context) {
|
|
1963
|
-
var _this = this;
|
|
1964
|
-
if (ctor instanceof DelayedConstructor) {
|
|
1965
|
-
return ctor.createProxy(function(target) {
|
|
1966
|
-
return _this.resolve(target, context);
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
var instance2 = function() {
|
|
1970
|
-
var paramInfo = typeInfo.get(ctor);
|
|
1971
|
-
if (!paramInfo || paramInfo.length === 0) {
|
|
1972
|
-
if (ctor.length === 0) {
|
|
1973
|
-
return new ctor();
|
|
1974
|
-
} else {
|
|
1975
|
-
throw new Error('TypeInfo not known for "' + ctor.name + '"');
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
var params = paramInfo.map(_this.resolveParams(context, ctor));
|
|
1979
|
-
return new (ctor.bind.apply(ctor, __spread([
|
|
1980
|
-
void 0
|
|
1981
|
-
], params)))();
|
|
1982
|
-
}();
|
|
1983
|
-
if (isDisposable(instance2)) {
|
|
1984
|
-
this.disposables.add(instance2);
|
|
1985
|
-
}
|
|
1986
|
-
return instance2;
|
|
1987
|
-
};
|
|
1988
|
-
InternalDependencyContainer2.prototype.resolveParams = function(context, ctor) {
|
|
1989
|
-
var _this = this;
|
|
1990
|
-
return function(param, idx) {
|
|
1991
|
-
var _a, _b, _c;
|
|
1992
|
-
try {
|
|
1993
|
-
if (isTokenDescriptor(param)) {
|
|
1994
|
-
if (isTransformDescriptor(param)) {
|
|
1995
|
-
return param.multiple ? (_a = _this.resolve(param.transform)).transform.apply(_a, __spread([
|
|
1996
|
-
_this.resolveAll(param.token)
|
|
1997
|
-
], param.transformArgs)) : (_b = _this.resolve(param.transform)).transform.apply(_b, __spread([
|
|
1998
|
-
_this.resolve(param.token, context)
|
|
1999
|
-
], param.transformArgs));
|
|
2000
|
-
} else {
|
|
2001
|
-
return param.multiple ? _this.resolveAll(param.token) : _this.resolve(param.token, context);
|
|
2002
|
-
}
|
|
2003
|
-
} else if (isTransformDescriptor(param)) {
|
|
2004
|
-
return (_c = _this.resolve(param.transform, context)).transform.apply(_c, __spread([
|
|
2005
|
-
_this.resolve(param.token, context)
|
|
2006
|
-
], param.transformArgs));
|
|
2007
|
-
}
|
|
2008
|
-
return _this.resolve(param, context);
|
|
2009
|
-
} catch (e) {
|
|
2010
|
-
throw new Error(formatErrorCtor(ctor, idx, e));
|
|
2011
|
-
}
|
|
2012
|
-
};
|
|
2013
|
-
};
|
|
2014
|
-
InternalDependencyContainer2.prototype.ensureNotDisposed = function() {
|
|
2015
|
-
if (this.disposed) {
|
|
2016
|
-
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
2017
|
-
}
|
|
2018
|
-
};
|
|
2019
|
-
return InternalDependencyContainer2;
|
|
2020
|
-
}();
|
|
2021
|
-
var instance = new InternalDependencyContainer();
|
|
2022
|
-
|
|
2023
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/inject.js
|
|
2024
|
-
function inject(token) {
|
|
2025
|
-
return defineInjectionTokenMetadata(token);
|
|
2026
|
-
}
|
|
2027
|
-
__name(inject, "inject");
|
|
2028
|
-
var inject_default = inject;
|
|
2029
|
-
|
|
2030
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/injectable.js
|
|
2031
|
-
function injectable() {
|
|
2032
|
-
return function(target) {
|
|
2033
|
-
typeInfo.set(target, getParamInfo(target));
|
|
2034
|
-
};
|
|
2035
|
-
}
|
|
2036
|
-
__name(injectable, "injectable");
|
|
2037
|
-
var injectable_default = injectable;
|
|
2038
|
-
|
|
2039
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/singleton.js
|
|
2040
|
-
function singleton() {
|
|
2041
|
-
return function(target) {
|
|
2042
|
-
injectable_default()(target);
|
|
2043
|
-
instance.registerSingleton(target);
|
|
2044
|
-
};
|
|
2045
|
-
}
|
|
2046
|
-
__name(singleton, "singleton");
|
|
2047
|
-
var singleton_default = singleton;
|
|
2048
|
-
|
|
2049
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/scoped.js
|
|
2050
|
-
function scoped(lifecycle, token) {
|
|
2051
|
-
return function(target) {
|
|
2052
|
-
injectable_default()(target);
|
|
2053
|
-
instance.register(token || target, target, {
|
|
2054
|
-
lifecycle
|
|
2055
|
-
});
|
|
2056
|
-
};
|
|
2057
|
-
}
|
|
2058
|
-
__name(scoped, "scoped");
|
|
2059
|
-
|
|
2060
|
-
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/index.js
|
|
2061
|
-
if (typeof Reflect === "undefined" || !Reflect.getMetadata) {
|
|
2062
|
-
throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
// src/core/app/app.controller.ts
|
|
2066
|
-
import { Subject } from "rxjs";
|
|
2067
|
-
|
|
2068
|
-
// src/core/app/app.component.ts
|
|
2069
|
-
import { ProxyReceiver } from "@quick-threejs/utils";
|
|
2070
|
-
function _ts_decorate(decorators, target, key, desc) {
|
|
2071
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2072
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2073
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2074
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2075
|
-
}
|
|
2076
|
-
__name(_ts_decorate, "_ts_decorate");
|
|
2077
|
-
var AppComponent = class {
|
|
2078
|
-
static {
|
|
2079
|
-
__name(this, "AppComponent");
|
|
2080
|
-
}
|
|
2081
|
-
proxyReceiver = new ProxyReceiver();
|
|
2082
|
-
initialized = false;
|
|
2083
|
-
canvas;
|
|
2084
|
-
};
|
|
2085
|
-
AppComponent = _ts_decorate([
|
|
2086
|
-
singleton_default()
|
|
2087
|
-
], AppComponent);
|
|
2088
|
-
|
|
2089
|
-
// src/common/models/proxy-event-subjects.models.ts
|
|
2090
|
-
var ProxyEventSubjectsModel = class {
|
|
2091
|
-
static {
|
|
2092
|
-
__name(this, "ProxyEventSubjectsModel");
|
|
2093
|
-
}
|
|
2094
|
-
contextmenu$$;
|
|
2095
|
-
resize$$;
|
|
2096
|
-
mousedown$$;
|
|
2097
|
-
mousemove$$;
|
|
2098
|
-
mouseup$$;
|
|
2099
|
-
pointerdown$$;
|
|
2100
|
-
pointermove$$;
|
|
2101
|
-
pointercancel$$;
|
|
2102
|
-
pointerup$$;
|
|
2103
|
-
touchstart$$;
|
|
2104
|
-
touchmove$$;
|
|
2105
|
-
touchend$$;
|
|
2106
|
-
wheel$$;
|
|
2107
|
-
keydown$$;
|
|
2108
|
-
};
|
|
2109
|
-
|
|
2110
|
-
// src/common/models/proxy-event-observables.model.ts
|
|
2111
|
-
var ProxyEventObservablesModel = class extends ProxyEventSubjectsModel {
|
|
2112
|
-
static {
|
|
2113
|
-
__name(this, "ProxyEventObservablesModel");
|
|
2114
|
-
}
|
|
2115
|
-
contextmenu$;
|
|
2116
|
-
resize$;
|
|
2117
|
-
mousedown$;
|
|
2118
|
-
mousemove$;
|
|
2119
|
-
mouseup$;
|
|
2120
|
-
pointerdown$;
|
|
2121
|
-
pointermove$;
|
|
2122
|
-
pointercancel$;
|
|
2123
|
-
pointerup$;
|
|
2124
|
-
touchstart$;
|
|
2125
|
-
touchmove$;
|
|
2126
|
-
touchend$;
|
|
2127
|
-
wheel$;
|
|
2128
|
-
keydown$;
|
|
2129
|
-
};
|
|
2130
|
-
|
|
2131
|
-
// src/common/models/proxy-event-handler.model.ts
|
|
2132
|
-
var ProxyEventHandlersModel = class extends ProxyEventObservablesModel {
|
|
2133
|
-
static {
|
|
2134
|
-
__name(this, "ProxyEventHandlersModel");
|
|
2135
|
-
}
|
|
2136
|
-
contextmenu;
|
|
2137
|
-
resize;
|
|
2138
|
-
mousedown;
|
|
2139
|
-
mousemove;
|
|
2140
|
-
mouseup;
|
|
2141
|
-
pointerdown;
|
|
2142
|
-
pointermove;
|
|
2143
|
-
pointercancel;
|
|
2144
|
-
pointerup;
|
|
2145
|
-
touchstart;
|
|
2146
|
-
touchmove;
|
|
2147
|
-
touchend;
|
|
2148
|
-
wheel;
|
|
2149
|
-
keydown;
|
|
2150
|
-
};
|
|
2151
|
-
|
|
2152
|
-
// src/common/constants/event.constants.ts
|
|
2153
|
-
var KEYBOARD_EVENT_CODES = [
|
|
2154
|
-
"ArrowUp",
|
|
2155
|
-
"ArrowDown",
|
|
2156
|
-
"ArrowLeft",
|
|
2157
|
-
"ArrowRight"
|
|
2158
|
-
];
|
|
2159
|
-
var PROXY_EVENT_LISTENERS = [
|
|
2160
|
-
"contextmenu",
|
|
2161
|
-
"resize",
|
|
2162
|
-
"mousedown",
|
|
2163
|
-
"mousemove",
|
|
2164
|
-
"mouseup",
|
|
2165
|
-
"pointerdown",
|
|
2166
|
-
"pointermove",
|
|
2167
|
-
"pointercancel",
|
|
2168
|
-
"pointerup",
|
|
2169
|
-
"touchstart",
|
|
2170
|
-
"touchmove",
|
|
2171
|
-
"touchend",
|
|
2172
|
-
"wheel",
|
|
2173
|
-
"keydown"
|
|
2174
|
-
];
|
|
2175
|
-
|
|
2176
|
-
// src/core/app/app.controller.ts
|
|
2177
|
-
function _ts_decorate2(decorators, target, key, desc) {
|
|
2178
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2179
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2180
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2181
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2182
|
-
}
|
|
2183
|
-
__name(_ts_decorate2, "_ts_decorate");
|
|
2184
|
-
function _ts_metadata(k, v) {
|
|
2185
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2186
|
-
}
|
|
2187
|
-
__name(_ts_metadata, "_ts_metadata");
|
|
2188
|
-
function _ts_param(paramIndex, decorator) {
|
|
2189
|
-
return function(target, key) {
|
|
2190
|
-
decorator(target, key, paramIndex);
|
|
2191
|
-
};
|
|
2192
|
-
}
|
|
2193
|
-
__name(_ts_param, "_ts_param");
|
|
2194
|
-
var AppController = class extends ProxyEventHandlersModel {
|
|
2195
|
-
static {
|
|
2196
|
-
__name(this, "AppController");
|
|
2197
|
-
}
|
|
2198
|
-
component;
|
|
2199
|
-
lifecycle$$;
|
|
2200
|
-
lifecycle$;
|
|
2201
|
-
constructor(component) {
|
|
2202
|
-
super(), this.component = component, this.lifecycle$$ = new Subject(), this.lifecycle$ = this.lifecycle$$.pipe();
|
|
2203
|
-
for (const eventType of PROXY_EVENT_LISTENERS) {
|
|
2204
|
-
this[`${eventType}$$`] = new Subject();
|
|
2205
|
-
this[`${eventType}$`] = this[`${eventType}$$`].pipe();
|
|
2206
|
-
this[eventType] = (event) => {
|
|
2207
|
-
this.component.proxyReceiver.handleEvent({
|
|
2208
|
-
...event,
|
|
2209
|
-
type: event.type || eventType
|
|
2210
|
-
});
|
|
2211
|
-
this[`${eventType}$$`].next(event);
|
|
2212
|
-
};
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
};
|
|
2216
|
-
AppController = _ts_decorate2([
|
|
2217
|
-
singleton_default(),
|
|
2218
|
-
_ts_param(0, inject_default(AppComponent)),
|
|
2219
|
-
_ts_metadata("design:type", Function),
|
|
2220
|
-
_ts_metadata("design:paramtypes", [
|
|
2221
|
-
typeof AppComponent === "undefined" ? Object : AppComponent
|
|
2222
|
-
])
|
|
2223
|
-
], AppController);
|
|
2224
|
-
|
|
2225
|
-
// src/core/app/timer/timer.component.ts
|
|
2226
|
-
import { Clock } from "three";
|
|
2227
|
-
function _ts_decorate3(decorators, target, key, desc) {
|
|
2228
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2229
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2230
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2231
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2232
|
-
}
|
|
2233
|
-
__name(_ts_decorate3, "_ts_decorate");
|
|
2234
|
-
var TimerComponent = class {
|
|
2235
|
-
static {
|
|
2236
|
-
__name(this, "TimerComponent");
|
|
2237
|
-
}
|
|
2238
|
-
clock = new Clock();
|
|
2239
|
-
frame = 1e3 / 60;
|
|
2240
|
-
delta = 0;
|
|
2241
|
-
deltaRatio = 0;
|
|
2242
|
-
enabled = false;
|
|
2243
|
-
};
|
|
2244
|
-
TimerComponent = _ts_decorate3([
|
|
2245
|
-
singleton_default()
|
|
2246
|
-
], TimerComponent);
|
|
2247
|
-
|
|
2248
|
-
// src/core/app/renderer/renderer.component.ts
|
|
2249
|
-
import { Camera as Camera3, CineonToneMapping, PCFSoftShadowMap, SRGBColorSpace, WebGLRenderer } from "three";
|
|
2250
|
-
|
|
2251
|
-
// src/core/app/world/world.component.ts
|
|
2252
|
-
import { Scene } from "three";
|
|
2253
|
-
function _ts_decorate4(decorators, target, key, desc) {
|
|
2254
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2255
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2256
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2257
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2258
|
-
}
|
|
2259
|
-
__name(_ts_decorate4, "_ts_decorate");
|
|
2260
|
-
var WorldComponent = class {
|
|
2261
|
-
static {
|
|
2262
|
-
__name(this, "WorldComponent");
|
|
2263
|
-
}
|
|
2264
|
-
scene = new Scene();
|
|
2265
|
-
enabled = true;
|
|
2266
|
-
};
|
|
2267
|
-
WorldComponent = _ts_decorate4([
|
|
2268
|
-
singleton_default()
|
|
2269
|
-
], WorldComponent);
|
|
2270
|
-
|
|
2271
|
-
// src/core/app/camera/camera.component.ts
|
|
2272
|
-
import { Camera, OrthographicCamera, PerspectiveCamera } from "three";
|
|
2273
|
-
|
|
2274
|
-
// src/core/app/sizes/sizes.component.ts
|
|
2275
|
-
function _ts_decorate5(decorators, target, key, desc) {
|
|
2276
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2277
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2278
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2279
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2280
|
-
}
|
|
2281
|
-
__name(_ts_decorate5, "_ts_decorate");
|
|
2282
|
-
var SizesComponent = class {
|
|
2283
|
-
static {
|
|
2284
|
-
__name(this, "SizesComponent");
|
|
2285
|
-
}
|
|
2286
|
-
width = 0;
|
|
2287
|
-
height = 0;
|
|
2288
|
-
aspect = 0;
|
|
2289
|
-
pixelRatio = 0;
|
|
2290
|
-
frustrum = 5;
|
|
2291
|
-
enabled = true;
|
|
2292
|
-
init(canvas, enabled) {
|
|
2293
|
-
this.height = Number(canvas.height ?? this.height);
|
|
2294
|
-
this.width = Number(canvas.width ?? this.width);
|
|
2295
|
-
this.aspect = this.width / this.height;
|
|
2296
|
-
this.enabled = enabled === void 0 ? true : !!enabled;
|
|
2297
|
-
}
|
|
2298
|
-
};
|
|
2299
|
-
SizesComponent = _ts_decorate5([
|
|
2300
|
-
singleton_default()
|
|
2301
|
-
], SizesComponent);
|
|
2302
|
-
|
|
2303
|
-
// src/common/enums/camera.enum.ts
|
|
2304
|
-
var DefaultCameraType = /* @__PURE__ */ function(DefaultCameraType2) {
|
|
2305
|
-
DefaultCameraType2[DefaultCameraType2["PERSPECTIVE"] = 0] = "PERSPECTIVE";
|
|
2306
|
-
DefaultCameraType2[DefaultCameraType2["ORTHOGRAPHIC"] = 1] = "ORTHOGRAPHIC";
|
|
2307
|
-
return DefaultCameraType2;
|
|
2308
|
-
}({});
|
|
2309
|
-
|
|
2310
|
-
// src/core/app/camera/camera.component.ts
|
|
2311
|
-
function _ts_decorate6(decorators, target, key, desc) {
|
|
2312
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2313
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2314
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2315
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2316
|
-
}
|
|
2317
|
-
__name(_ts_decorate6, "_ts_decorate");
|
|
2318
|
-
function _ts_metadata2(k, v) {
|
|
2319
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2320
|
-
}
|
|
2321
|
-
__name(_ts_metadata2, "_ts_metadata");
|
|
2322
|
-
function _ts_param2(paramIndex, decorator) {
|
|
2323
|
-
return function(target, key) {
|
|
2324
|
-
decorator(target, key, paramIndex);
|
|
2325
|
-
};
|
|
2326
|
-
}
|
|
2327
|
-
__name(_ts_param2, "_ts_param");
|
|
2328
|
-
var CameraComponent = class {
|
|
2329
|
-
static {
|
|
2330
|
-
__name(this, "CameraComponent");
|
|
2331
|
-
}
|
|
2332
|
-
sizesComponent;
|
|
2333
|
-
instance;
|
|
2334
|
-
miniCamera;
|
|
2335
|
-
enabled;
|
|
2336
|
-
constructor(sizesComponent) {
|
|
2337
|
-
this.sizesComponent = sizesComponent;
|
|
2338
|
-
this.enabled = true;
|
|
2339
|
-
}
|
|
2340
|
-
set aspectRatio(ratio) {
|
|
2341
|
-
if (this.instance instanceof PerspectiveCamera) this.instance.aspect = ratio;
|
|
2342
|
-
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera) this.instance?.updateProjectionMatrix();
|
|
2343
|
-
}
|
|
2344
|
-
set quaternion(quaternion) {
|
|
2345
|
-
this.instance?.quaternion.copy(quaternion);
|
|
2346
|
-
}
|
|
2347
|
-
set position(position) {
|
|
2348
|
-
this.instance?.position.copy(position);
|
|
2349
|
-
}
|
|
2350
|
-
set rotation(rotation) {
|
|
2351
|
-
this.instance?.rotation.copy(rotation);
|
|
2352
|
-
}
|
|
2353
|
-
initDefaultCamera(cameraType) {
|
|
2354
|
-
this.removeCamera();
|
|
2355
|
-
if (cameraType === DefaultCameraType.PERSPECTIVE || cameraType === void 0) {
|
|
2356
|
-
this.instance = new PerspectiveCamera(70, this.sizesComponent.width / this.sizesComponent.height, 1e-4, 100);
|
|
2357
|
-
this.instance.position.z = 8;
|
|
2358
|
-
return;
|
|
2359
|
-
}
|
|
2360
|
-
if (cameraType === DefaultCameraType.ORTHOGRAPHIC) {
|
|
2361
|
-
this.instance = new OrthographicCamera(-this.sizesComponent.aspect * this.sizesComponent.frustrum / 2, this.sizesComponent.aspect * this.sizesComponent.frustrum / 2, this.sizesComponent.frustrum / 2, -this.sizesComponent.frustrum / 2, -50, 50);
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
setMiniCamera() {
|
|
2365
|
-
this.removeMiniCamera();
|
|
2366
|
-
this.miniCamera = new PerspectiveCamera(75, this.sizesComponent.width / this.sizesComponent.height, 0.1, 500);
|
|
2367
|
-
this.miniCamera.position.z = 10;
|
|
2368
|
-
this.miniCamera.position.x = -5;
|
|
2369
|
-
}
|
|
2370
|
-
removeCamera() {
|
|
2371
|
-
if (!(this.instance instanceof Camera)) return;
|
|
2372
|
-
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera) this.instance.clearViewOffset();
|
|
2373
|
-
this.instance.clear();
|
|
2374
|
-
this.instance = void 0;
|
|
2375
|
-
}
|
|
2376
|
-
removeMiniCamera() {
|
|
2377
|
-
if (!(this.miniCamera instanceof Camera)) return;
|
|
2378
|
-
this.miniCamera.clearViewOffset();
|
|
2379
|
-
this.miniCamera.clear();
|
|
2380
|
-
this.miniCamera = void 0;
|
|
2381
|
-
}
|
|
2382
|
-
};
|
|
2383
|
-
CameraComponent = _ts_decorate6([
|
|
2384
|
-
singleton_default(),
|
|
2385
|
-
_ts_param2(0, inject_default(SizesComponent)),
|
|
2386
|
-
_ts_metadata2("design:type", Function),
|
|
2387
|
-
_ts_metadata2("design:paramtypes", [
|
|
2388
|
-
typeof SizesComponent === "undefined" ? Object : SizesComponent
|
|
2389
|
-
])
|
|
2390
|
-
], CameraComponent);
|
|
2391
|
-
|
|
2392
|
-
// src/core/app/debug/debug.component.ts
|
|
2393
|
-
import { AxesHelper, Camera as Camera2, CameraHelper, GridHelper } from "three";
|
|
2394
|
-
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
|
2395
|
-
function _ts_decorate7(decorators, target, key, desc) {
|
|
2396
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2397
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2398
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2399
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2400
|
-
}
|
|
2401
|
-
__name(_ts_decorate7, "_ts_decorate");
|
|
2402
|
-
function _ts_metadata3(k, v) {
|
|
2403
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2404
|
-
}
|
|
2405
|
-
__name(_ts_metadata3, "_ts_metadata");
|
|
2406
|
-
function _ts_param3(paramIndex, decorator) {
|
|
2407
|
-
return function(target, key) {
|
|
2408
|
-
decorator(target, key, paramIndex);
|
|
2409
|
-
};
|
|
2410
|
-
}
|
|
2411
|
-
__name(_ts_param3, "_ts_param");
|
|
2412
|
-
var DebugComponent = class {
|
|
2413
|
-
static {
|
|
2414
|
-
__name(this, "DebugComponent");
|
|
2415
|
-
}
|
|
2416
|
-
appComponent;
|
|
2417
|
-
cameraComponent;
|
|
2418
|
-
worldComponent;
|
|
2419
|
-
enabled;
|
|
2420
|
-
cameraControls;
|
|
2421
|
-
miniCameraControls;
|
|
2422
|
-
cameraHelper;
|
|
2423
|
-
axesHelper;
|
|
2424
|
-
gridHelper;
|
|
2425
|
-
constructor(appComponent, cameraComponent, worldComponent) {
|
|
2426
|
-
this.appComponent = appComponent;
|
|
2427
|
-
this.cameraComponent = cameraComponent;
|
|
2428
|
-
this.worldComponent = worldComponent;
|
|
2429
|
-
this.enabled = true;
|
|
2430
|
-
}
|
|
2431
|
-
_setCameraOrbitControl() {
|
|
2432
|
-
if (this.cameraControls) {
|
|
2433
|
-
this.cameraControls?.dispose();
|
|
2434
|
-
this.cameraControls = void 0;
|
|
2435
|
-
}
|
|
2436
|
-
if (!this.enabled || !(this.cameraComponent.instance instanceof Camera2)) return;
|
|
2437
|
-
if (this.cameraComponent.instance instanceof Camera2) {
|
|
2438
|
-
this.cameraControls = new OrbitControls(this.cameraComponent.instance, this.appComponent.proxyReceiver);
|
|
2439
|
-
if (this.cameraControls) this.cameraControls.enableDamping = true;
|
|
2440
|
-
}
|
|
2441
|
-
}
|
|
2442
|
-
_setMiniCameraOrbitControls() {
|
|
2443
|
-
if (this.miniCameraControls) {
|
|
2444
|
-
this.miniCameraControls.dispose();
|
|
2445
|
-
this.miniCameraControls = void 0;
|
|
2446
|
-
}
|
|
2447
|
-
if (!this.enabled) return;
|
|
2448
|
-
if (this.cameraComponent.miniCamera) {
|
|
2449
|
-
this.miniCameraControls = new OrbitControls(this.cameraComponent.miniCamera, this.appComponent.proxyReceiver);
|
|
2450
|
-
this.miniCameraControls.enableDamping = true;
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
_setCameraHelper() {
|
|
2454
|
-
if (this.cameraHelper) {
|
|
2455
|
-
this.worldComponent.scene.remove(this.cameraHelper);
|
|
2456
|
-
this.cameraHelper = void 0;
|
|
2457
|
-
}
|
|
2458
|
-
if (!this.enabled) return;
|
|
2459
|
-
if (this.cameraComponent.instance) {
|
|
2460
|
-
this.cameraHelper = new CameraHelper(this.cameraComponent.instance);
|
|
2461
|
-
this.worldComponent.scene.add(this.cameraHelper);
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
_setAxesHelper(axesSizes) {
|
|
2465
|
-
const axesHelper = new AxesHelper(axesSizes);
|
|
2466
|
-
this.worldComponent.scene.add(axesHelper);
|
|
2467
|
-
}
|
|
2468
|
-
_setGridHelper(gridSizes) {
|
|
2469
|
-
const axesHelper = new GridHelper(gridSizes, gridSizes);
|
|
2470
|
-
this.worldComponent.scene.add(axesHelper);
|
|
2471
|
-
}
|
|
2472
|
-
init(props) {
|
|
2473
|
-
this._setCameraOrbitControl();
|
|
2474
|
-
this._setMiniCameraOrbitControls();
|
|
2475
|
-
this._setCameraHelper();
|
|
2476
|
-
if (typeof props?.axesSizes === "number") this._setAxesHelper(props.axesSizes);
|
|
2477
|
-
if (typeof props?.gridSizes === "number") this._setGridHelper(props.gridSizes);
|
|
2478
|
-
}
|
|
2479
|
-
update() {
|
|
2480
|
-
if (!this.enabled) return;
|
|
2481
|
-
this.cameraControls?.update();
|
|
2482
|
-
this.miniCameraControls?.update();
|
|
2483
|
-
}
|
|
2484
|
-
dispose() {
|
|
2485
|
-
if (this.cameraHelper) {
|
|
2486
|
-
this.worldComponent.scene.remove(this.cameraHelper);
|
|
2487
|
-
this.cameraHelper = void 0;
|
|
2488
|
-
}
|
|
2489
|
-
if (this.cameraControls) {
|
|
2490
|
-
this.cameraControls.dispose();
|
|
2491
|
-
this.cameraControls = void 0;
|
|
2492
|
-
}
|
|
2493
|
-
if (this.miniCameraControls) {
|
|
2494
|
-
this.miniCameraControls.dispose();
|
|
2495
|
-
this.miniCameraControls = void 0;
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
};
|
|
2499
|
-
DebugComponent = _ts_decorate7([
|
|
2500
|
-
singleton_default(),
|
|
2501
|
-
_ts_param3(0, inject_default(AppComponent)),
|
|
2502
|
-
_ts_param3(1, inject_default(CameraComponent)),
|
|
2503
|
-
_ts_param3(2, inject_default(WorldComponent)),
|
|
2504
|
-
_ts_metadata3("design:type", Function),
|
|
2505
|
-
_ts_metadata3("design:paramtypes", [
|
|
2506
|
-
typeof AppComponent === "undefined" ? Object : AppComponent,
|
|
2507
|
-
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2508
|
-
typeof WorldComponent === "undefined" ? Object : WorldComponent
|
|
2509
|
-
])
|
|
2510
|
-
], DebugComponent);
|
|
2511
|
-
|
|
2512
|
-
// src/core/app/renderer/renderer.component.ts
|
|
2513
|
-
function _ts_decorate8(decorators, target, key, desc) {
|
|
2514
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2515
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2516
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2517
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2518
|
-
}
|
|
2519
|
-
__name(_ts_decorate8, "_ts_decorate");
|
|
2520
|
-
function _ts_metadata4(k, v) {
|
|
2521
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2522
|
-
}
|
|
2523
|
-
__name(_ts_metadata4, "_ts_metadata");
|
|
2524
|
-
function _ts_param4(paramIndex, decorator) {
|
|
2525
|
-
return function(target, key) {
|
|
2526
|
-
decorator(target, key, paramIndex);
|
|
2527
|
-
};
|
|
2528
|
-
}
|
|
2529
|
-
__name(_ts_param4, "_ts_param");
|
|
2530
|
-
var RendererComponent = class _RendererComponent {
|
|
2531
|
-
static {
|
|
2532
|
-
__name(this, "RendererComponent");
|
|
2533
|
-
}
|
|
2534
|
-
worldComponent;
|
|
2535
|
-
cameraComponent;
|
|
2536
|
-
sizesComponent;
|
|
2537
|
-
debugComponent;
|
|
2538
|
-
static RENDERER_PIXEL_RATIO = 1;
|
|
2539
|
-
enabled;
|
|
2540
|
-
instance;
|
|
2541
|
-
constructor(worldComponent, cameraComponent, sizesComponent, debugComponent) {
|
|
2542
|
-
this.worldComponent = worldComponent;
|
|
2543
|
-
this.cameraComponent = cameraComponent;
|
|
2544
|
-
this.sizesComponent = sizesComponent;
|
|
2545
|
-
this.debugComponent = debugComponent;
|
|
2546
|
-
this.enabled = true;
|
|
2547
|
-
}
|
|
2548
|
-
init(canvas) {
|
|
2549
|
-
this.instance = new WebGLRenderer({
|
|
2550
|
-
canvas,
|
|
2551
|
-
context: canvas.getContext("webgl2", {
|
|
2552
|
-
stencil: true,
|
|
2553
|
-
powerPreference: "high-performance"
|
|
2554
|
-
}),
|
|
2555
|
-
powerPreference: "high-performance",
|
|
2556
|
-
depth: true,
|
|
2557
|
-
antialias: true
|
|
2558
|
-
});
|
|
2559
|
-
this.instance.autoClear = false;
|
|
2560
|
-
this.instance.setPixelRatio(_RendererComponent.RENDERER_PIXEL_RATIO);
|
|
2561
|
-
this.instance.setClearColor(0, 0);
|
|
2562
|
-
this.instance.shadowMap.enabled = true;
|
|
2563
|
-
this.instance.shadowMap.type = PCFSoftShadowMap;
|
|
2564
|
-
this.instance.outputColorSpace = SRGBColorSpace;
|
|
2565
|
-
this.instance.toneMapping = CineonToneMapping;
|
|
2566
|
-
this.instance.toneMappingExposure = 1.75;
|
|
2567
|
-
}
|
|
2568
|
-
setSize(width, height) {
|
|
2569
|
-
this.instance?.setSize(width, height);
|
|
2570
|
-
}
|
|
2571
|
-
render() {
|
|
2572
|
-
if (!(this.enabled && this.cameraComponent.instance instanceof Camera3 && this.instance instanceof WebGLRenderer)) return;
|
|
2573
|
-
this.instance.setViewport(0, 0, this.sizesComponent.width, this.sizesComponent.height);
|
|
2574
|
-
this.instance.render(this.worldComponent.scene, this.cameraComponent.instance);
|
|
2575
|
-
if (this.debugComponent.enabled && this.cameraComponent.miniCamera) {
|
|
2576
|
-
this.instance.setScissorTest(true);
|
|
2577
|
-
this.instance.setViewport(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
2578
|
-
this.instance.setScissor(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
2579
|
-
this.instance.render(this.worldComponent.scene, this.cameraComponent.miniCamera);
|
|
2580
|
-
this.instance.setScissorTest(false);
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
};
|
|
2584
|
-
RendererComponent = _ts_decorate8([
|
|
2585
|
-
singleton_default(),
|
|
2586
|
-
_ts_param4(0, inject_default(WorldComponent)),
|
|
2587
|
-
_ts_param4(1, inject_default(CameraComponent)),
|
|
2588
|
-
_ts_param4(2, inject_default(SizesComponent)),
|
|
2589
|
-
_ts_param4(3, inject_default(DebugComponent)),
|
|
2590
|
-
_ts_metadata4("design:type", Function),
|
|
2591
|
-
_ts_metadata4("design:paramtypes", [
|
|
2592
|
-
typeof WorldComponent === "undefined" ? Object : WorldComponent,
|
|
2593
|
-
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2594
|
-
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
2595
|
-
typeof DebugComponent === "undefined" ? Object : DebugComponent
|
|
2596
|
-
])
|
|
2597
|
-
], RendererComponent);
|
|
2598
|
-
|
|
2599
|
-
// src/core/app/timer/timer.controller.ts
|
|
2600
|
-
import { Subject as Subject2 } from "rxjs";
|
|
2601
|
-
|
|
2602
|
-
// src/common/enums/lifecycle.enum.ts
|
|
2603
|
-
var RegisterLifecycleState = /* @__PURE__ */ function(RegisterLifecycleState2) {
|
|
2604
|
-
RegisterLifecycleState2[RegisterLifecycleState2["INITIALIZED"] = 0] = "INITIALIZED";
|
|
2605
|
-
RegisterLifecycleState2[RegisterLifecycleState2["DISPOSED"] = 1] = "DISPOSED";
|
|
2606
|
-
return RegisterLifecycleState2;
|
|
2607
|
-
}({});
|
|
2608
|
-
var AppLifecycleState = /* @__PURE__ */ function(AppLifecycleState2) {
|
|
2609
|
-
AppLifecycleState2[AppLifecycleState2["INITIALIZED"] = 0] = "INITIALIZED";
|
|
2610
|
-
AppLifecycleState2[AppLifecycleState2["STEP_STARTED"] = 1] = "STEP_STARTED";
|
|
2611
|
-
AppLifecycleState2[AppLifecycleState2["STEP_ENDED"] = 2] = "STEP_ENDED";
|
|
2612
|
-
AppLifecycleState2[AppLifecycleState2["DISPOSED"] = 3] = "DISPOSED";
|
|
2613
|
-
return AppLifecycleState2;
|
|
2614
|
-
}({});
|
|
2615
|
-
|
|
2616
|
-
// src/core/app/timer/timer.controller.ts
|
|
2617
|
-
function _ts_decorate9(decorators, target, key, desc) {
|
|
2618
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2619
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2620
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2621
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2622
|
-
}
|
|
2623
|
-
__name(_ts_decorate9, "_ts_decorate");
|
|
2624
|
-
function _ts_metadata5(k, v) {
|
|
2625
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2626
|
-
}
|
|
2627
|
-
__name(_ts_metadata5, "_ts_metadata");
|
|
2628
|
-
function _ts_param5(paramIndex, decorator) {
|
|
2629
|
-
return function(target, key) {
|
|
2630
|
-
decorator(target, key, paramIndex);
|
|
2631
|
-
};
|
|
2632
|
-
}
|
|
2633
|
-
__name(_ts_param5, "_ts_param");
|
|
2634
|
-
var TimerController = class {
|
|
2635
|
-
static {
|
|
2636
|
-
__name(this, "TimerController");
|
|
2637
|
-
}
|
|
2638
|
-
component;
|
|
2639
|
-
appController;
|
|
2640
|
-
step$$;
|
|
2641
|
-
enable$$;
|
|
2642
|
-
step$;
|
|
2643
|
-
enable$;
|
|
2644
|
-
constructor(component, appController) {
|
|
2645
|
-
this.component = component;
|
|
2646
|
-
this.appController = appController;
|
|
2647
|
-
this.step$$ = new Subject2();
|
|
2648
|
-
this.enable$$ = new Subject2();
|
|
2649
|
-
this.step$ = this.step$$.pipe();
|
|
2650
|
-
this.enable$ = this.enable$$.pipe();
|
|
2651
|
-
}
|
|
2652
|
-
step() {
|
|
2653
|
-
this.appController.lifecycle$$.next(AppLifecycleState.STEP_STARTED);
|
|
2654
|
-
if (this.component.enabled) {
|
|
2655
|
-
this.component.delta = this.component.clock.getDelta() ?? this.component.frame;
|
|
2656
|
-
this.component.deltaRatio = this.component.delta * 1e3 / this.component.frame;
|
|
2657
|
-
this.step$$.next({
|
|
2658
|
-
delta: this.component.delta,
|
|
2659
|
-
deltaRatio: this.component.deltaRatio
|
|
2660
|
-
});
|
|
2661
|
-
}
|
|
2662
|
-
this.appController.lifecycle$$.next(AppLifecycleState.STEP_ENDED);
|
|
2663
|
-
}
|
|
2664
|
-
};
|
|
2665
|
-
TimerController = _ts_decorate9([
|
|
2666
|
-
singleton_default(),
|
|
2667
|
-
_ts_param5(0, inject_default(TimerComponent)),
|
|
2668
|
-
_ts_param5(1, inject_default(AppController)),
|
|
2669
|
-
_ts_metadata5("design:type", Function),
|
|
2670
|
-
_ts_metadata5("design:paramtypes", [
|
|
2671
|
-
typeof TimerComponent === "undefined" ? Object : TimerComponent,
|
|
2672
|
-
typeof AppController === "undefined" ? Object : AppController
|
|
2673
|
-
])
|
|
2674
|
-
], TimerController);
|
|
2675
|
-
|
|
2676
|
-
// src/core/app/timer/timer.module.ts
|
|
2677
|
-
function _ts_decorate10(decorators, target, key, desc) {
|
|
2678
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2679
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2680
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2681
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2682
|
-
}
|
|
2683
|
-
__name(_ts_decorate10, "_ts_decorate");
|
|
2684
|
-
function _ts_metadata6(k, v) {
|
|
2685
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2686
|
-
}
|
|
2687
|
-
__name(_ts_metadata6, "_ts_metadata");
|
|
2688
|
-
function _ts_param6(paramIndex, decorator) {
|
|
2689
|
-
return function(target, key) {
|
|
2690
|
-
decorator(target, key, paramIndex);
|
|
2691
|
-
};
|
|
2692
|
-
}
|
|
2693
|
-
__name(_ts_param6, "_ts_param");
|
|
2694
|
-
var TimerModule = class {
|
|
2695
|
-
static {
|
|
2696
|
-
__name(this, "TimerModule");
|
|
2697
|
-
}
|
|
2698
|
-
component;
|
|
2699
|
-
controller;
|
|
2700
|
-
rendererComponent;
|
|
2701
|
-
constructor(component, controller, rendererComponent) {
|
|
2702
|
-
this.component = component;
|
|
2703
|
-
this.controller = controller;
|
|
2704
|
-
this.rendererComponent = rendererComponent;
|
|
2705
|
-
}
|
|
2706
|
-
init(startTimer) {
|
|
2707
|
-
this.controller.enable$.subscribe((status) => {
|
|
2708
|
-
this.component.enabled = !!status;
|
|
2709
|
-
if (status) this.rendererComponent.instance?.setAnimationLoop(this.controller.step.bind(this.controller));
|
|
2710
|
-
else this.rendererComponent.instance?.setAnimationLoop(null);
|
|
2711
|
-
});
|
|
2712
|
-
if (startTimer) this.enabled(true);
|
|
2713
|
-
}
|
|
2714
|
-
clock() {
|
|
2715
|
-
return this.component.clock;
|
|
2716
|
-
}
|
|
2717
|
-
frame() {
|
|
2718
|
-
return this.component.frame;
|
|
2719
|
-
}
|
|
2720
|
-
delta(value) {
|
|
2721
|
-
if (typeof value === "number") this.component.delta = value;
|
|
2722
|
-
return this.component.delta;
|
|
2723
|
-
}
|
|
2724
|
-
deltaRatio(value) {
|
|
2725
|
-
if (typeof value === "number") this.component.deltaRatio = value;
|
|
2726
|
-
return this.component.deltaRatio;
|
|
2727
|
-
}
|
|
2728
|
-
enabled(value) {
|
|
2729
|
-
if (typeof value === "boolean") this.controller.enable$$.next(value);
|
|
2730
|
-
return this.component.enabled;
|
|
2731
|
-
}
|
|
2732
|
-
dispose() {
|
|
2733
|
-
this.controller.step$$.complete();
|
|
2734
|
-
this.controller.enable$$.complete();
|
|
2735
|
-
}
|
|
2736
|
-
enabled$() {
|
|
2737
|
-
return this.controller.enable$;
|
|
2738
|
-
}
|
|
2739
|
-
step$() {
|
|
2740
|
-
return this.controller.step$;
|
|
2741
|
-
}
|
|
2742
|
-
};
|
|
2743
|
-
TimerModule = _ts_decorate10([
|
|
2744
|
-
singleton_default(),
|
|
2745
|
-
_ts_param6(0, inject_default(TimerComponent)),
|
|
2746
|
-
_ts_param6(1, inject_default(TimerController)),
|
|
2747
|
-
_ts_param6(2, inject_default(RendererComponent)),
|
|
2748
|
-
_ts_metadata6("design:type", Function),
|
|
2749
|
-
_ts_metadata6("design:paramtypes", [
|
|
2750
|
-
typeof TimerComponent === "undefined" ? Object : TimerComponent,
|
|
2751
|
-
typeof TimerController === "undefined" ? Object : TimerController,
|
|
2752
|
-
typeof RendererComponent === "undefined" ? Object : RendererComponent
|
|
2753
|
-
])
|
|
2754
|
-
], TimerModule);
|
|
2755
|
-
|
|
2756
|
-
// src/core/app/camera/camera.module.ts
|
|
2757
|
-
import { OrthographicCamera as OrthographicCamera2, PerspectiveCamera as PerspectiveCamera2 } from "three";
|
|
2758
|
-
|
|
2759
|
-
// src/core/app/camera/camera.controller.ts
|
|
2760
|
-
import { filter, Subject as Subject3 } from "rxjs";
|
|
2761
|
-
function _ts_decorate11(decorators, target, key, desc) {
|
|
2762
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2763
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2764
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2765
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2766
|
-
}
|
|
2767
|
-
__name(_ts_decorate11, "_ts_decorate");
|
|
2768
|
-
function _ts_metadata7(k, v) {
|
|
2769
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2770
|
-
}
|
|
2771
|
-
__name(_ts_metadata7, "_ts_metadata");
|
|
2772
|
-
function _ts_param7(paramIndex, decorator) {
|
|
2773
|
-
return function(target, key) {
|
|
2774
|
-
decorator(target, key, paramIndex);
|
|
2775
|
-
};
|
|
2776
|
-
}
|
|
2777
|
-
__name(_ts_param7, "_ts_param");
|
|
2778
|
-
var CameraController = class {
|
|
2779
|
-
static {
|
|
2780
|
-
__name(this, "CameraController");
|
|
2781
|
-
}
|
|
2782
|
-
component;
|
|
2783
|
-
timerController;
|
|
2784
|
-
enable$$;
|
|
2785
|
-
enable$;
|
|
2786
|
-
step$;
|
|
2787
|
-
constructor(component, timerController) {
|
|
2788
|
-
this.component = component;
|
|
2789
|
-
this.timerController = timerController;
|
|
2790
|
-
this.enable$$ = new Subject3();
|
|
2791
|
-
this.enable$ = this.enable$$.pipe();
|
|
2792
|
-
this.step$ = this.timerController.step$.pipe(filter(() => this.component.enabled));
|
|
2793
|
-
}
|
|
2794
|
-
};
|
|
2795
|
-
CameraController = _ts_decorate11([
|
|
2796
|
-
singleton_default(),
|
|
2797
|
-
_ts_param7(0, inject_default(CameraComponent)),
|
|
2798
|
-
_ts_param7(1, inject_default(TimerController)),
|
|
2799
|
-
_ts_metadata7("design:type", Function),
|
|
2800
|
-
_ts_metadata7("design:paramtypes", [
|
|
2801
|
-
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2802
|
-
typeof TimerController === "undefined" ? Object : TimerController
|
|
2803
|
-
])
|
|
2804
|
-
], CameraController);
|
|
2805
|
-
|
|
2806
|
-
// src/core/app/camera/camera.module.ts
|
|
2807
|
-
function _ts_decorate12(decorators, target, key, desc) {
|
|
2808
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2809
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2810
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2811
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2812
|
-
}
|
|
2813
|
-
__name(_ts_decorate12, "_ts_decorate");
|
|
2814
|
-
function _ts_metadata8(k, v) {
|
|
2815
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2816
|
-
}
|
|
2817
|
-
__name(_ts_metadata8, "_ts_metadata");
|
|
2818
|
-
function _ts_param8(paramIndex, decorator) {
|
|
2819
|
-
return function(target, key) {
|
|
2820
|
-
decorator(target, key, paramIndex);
|
|
2821
|
-
};
|
|
2822
|
-
}
|
|
2823
|
-
__name(_ts_param8, "_ts_param");
|
|
2824
|
-
var CameraModule = class {
|
|
2825
|
-
static {
|
|
2826
|
-
__name(this, "CameraModule");
|
|
2827
|
-
}
|
|
2828
|
-
component;
|
|
2829
|
-
sizesComponent;
|
|
2830
|
-
controller;
|
|
2831
|
-
constructor(component, sizesComponent, controller) {
|
|
2832
|
-
this.component = component;
|
|
2833
|
-
this.sizesComponent = sizesComponent;
|
|
2834
|
-
this.controller = controller;
|
|
2835
|
-
}
|
|
2836
|
-
init(withMiniCamera) {
|
|
2837
|
-
this.component.initDefaultCamera();
|
|
2838
|
-
if (withMiniCamera) this.component.setMiniCamera();
|
|
2839
|
-
this.controller.enable$.subscribe((status) => {
|
|
2840
|
-
this.component.enabled = !!status;
|
|
2841
|
-
});
|
|
2842
|
-
this.controller.step$.subscribe(() => {
|
|
2843
|
-
if (!this.component.enabled) return;
|
|
2844
|
-
this.component.aspectRatio = this.sizesComponent.aspect;
|
|
2845
|
-
if (this.component.instance instanceof PerspectiveCamera2 || this.component.instance instanceof OrthographicCamera2) this.component.instance?.updateProjectionMatrix();
|
|
2846
|
-
this.component.miniCamera?.updateProjectionMatrix();
|
|
2847
|
-
});
|
|
2848
|
-
}
|
|
2849
|
-
dispose() {
|
|
2850
|
-
this.component.removeCamera();
|
|
2851
|
-
this.component.removeMiniCamera();
|
|
2852
|
-
}
|
|
2853
|
-
aspectRatio(value) {
|
|
2854
|
-
if (value) this.component.aspectRatio = value;
|
|
2855
|
-
return this.component.aspectRatio;
|
|
2856
|
-
}
|
|
2857
|
-
enabled(value) {
|
|
2858
|
-
if (typeof value === "boolean") this.controller.enable$$.next(value);
|
|
2859
|
-
return this.component.enabled;
|
|
2860
|
-
}
|
|
2861
|
-
instance(value) {
|
|
2862
|
-
if (value) this.component.instance = value;
|
|
2863
|
-
return this.component.instance;
|
|
2864
|
-
}
|
|
2865
|
-
miniCamera(value) {
|
|
2866
|
-
if (value) this.component.miniCamera = value;
|
|
2867
|
-
return this.component.miniCamera;
|
|
2868
|
-
}
|
|
2869
|
-
position(value) {
|
|
2870
|
-
if (value) this.component.position = value;
|
|
2871
|
-
return this.component.position;
|
|
2872
|
-
}
|
|
2873
|
-
quaternion(value) {
|
|
2874
|
-
if (value) this.component.quaternion = value;
|
|
2875
|
-
return this.component.quaternion;
|
|
2876
|
-
}
|
|
2877
|
-
enabled$() {
|
|
2878
|
-
return this.controller.enable$;
|
|
2879
|
-
}
|
|
2880
|
-
};
|
|
2881
|
-
CameraModule = _ts_decorate12([
|
|
2882
|
-
singleton_default(),
|
|
2883
|
-
_ts_param8(0, inject_default(CameraComponent)),
|
|
2884
|
-
_ts_param8(1, inject_default(SizesComponent)),
|
|
2885
|
-
_ts_param8(2, inject_default(CameraController)),
|
|
2886
|
-
_ts_metadata8("design:type", Function),
|
|
2887
|
-
_ts_metadata8("design:paramtypes", [
|
|
2888
|
-
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2889
|
-
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
2890
|
-
typeof CameraController === "undefined" ? Object : CameraController
|
|
2891
|
-
])
|
|
2892
|
-
], CameraModule);
|
|
2893
|
-
|
|
2894
|
-
// src/core/app/renderer/renderer.controller.ts
|
|
2895
|
-
import { filter as filter3, Subject as Subject5 } from "rxjs";
|
|
2896
|
-
|
|
2897
|
-
// src/core/app/sizes/sizes.controller.ts
|
|
2898
|
-
import { filter as filter2, Subject as Subject4 } from "rxjs";
|
|
2899
|
-
function _ts_decorate13(decorators, target, key, desc) {
|
|
2900
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2901
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2902
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2903
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2904
|
-
}
|
|
2905
|
-
__name(_ts_decorate13, "_ts_decorate");
|
|
2906
|
-
function _ts_metadata9(k, v) {
|
|
2907
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2908
|
-
}
|
|
2909
|
-
__name(_ts_metadata9, "_ts_metadata");
|
|
2910
|
-
function _ts_param9(paramIndex, decorator) {
|
|
2911
|
-
return function(target, key) {
|
|
2912
|
-
decorator(target, key, paramIndex);
|
|
2913
|
-
};
|
|
2914
|
-
}
|
|
2915
|
-
__name(_ts_param9, "_ts_param");
|
|
2916
|
-
var SizesController = class {
|
|
2917
|
-
static {
|
|
2918
|
-
__name(this, "SizesController");
|
|
2919
|
-
}
|
|
2920
|
-
appController;
|
|
2921
|
-
component;
|
|
2922
|
-
enable$$;
|
|
2923
|
-
enable$;
|
|
2924
|
-
resize$;
|
|
2925
|
-
constructor(appController, component) {
|
|
2926
|
-
this.appController = appController;
|
|
2927
|
-
this.component = component;
|
|
2928
|
-
this.enable$$ = new Subject4();
|
|
2929
|
-
this.enable$ = this.enable$$.pipe();
|
|
2930
|
-
this.resize$ = this.appController.resize$$.pipe(filter2(() => this.component.enabled));
|
|
2931
|
-
}
|
|
2932
|
-
};
|
|
2933
|
-
SizesController = _ts_decorate13([
|
|
2934
|
-
singleton_default(),
|
|
2935
|
-
_ts_param9(0, inject_default(AppController)),
|
|
2936
|
-
_ts_param9(1, inject_default(SizesComponent)),
|
|
2937
|
-
_ts_metadata9("design:type", Function),
|
|
2938
|
-
_ts_metadata9("design:paramtypes", [
|
|
2939
|
-
typeof AppController === "undefined" ? Object : AppController,
|
|
2940
|
-
typeof SizesComponent === "undefined" ? Object : SizesComponent
|
|
2941
|
-
])
|
|
2942
|
-
], SizesController);
|
|
2943
|
-
|
|
2944
|
-
// src/core/app/renderer/renderer.controller.ts
|
|
2945
|
-
function _ts_decorate14(decorators, target, key, desc) {
|
|
2946
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2947
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2948
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2949
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2950
|
-
}
|
|
2951
|
-
__name(_ts_decorate14, "_ts_decorate");
|
|
2952
|
-
function _ts_metadata10(k, v) {
|
|
2953
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2954
|
-
}
|
|
2955
|
-
__name(_ts_metadata10, "_ts_metadata");
|
|
2956
|
-
function _ts_param10(paramIndex, decorator) {
|
|
2957
|
-
return function(target, key) {
|
|
2958
|
-
decorator(target, key, paramIndex);
|
|
2959
|
-
};
|
|
2960
|
-
}
|
|
2961
|
-
__name(_ts_param10, "_ts_param");
|
|
2962
|
-
var RendererController = class {
|
|
2963
|
-
static {
|
|
2964
|
-
__name(this, "RendererController");
|
|
2965
|
-
}
|
|
2966
|
-
rendererComponent;
|
|
2967
|
-
timerController;
|
|
2968
|
-
sizesController;
|
|
2969
|
-
enable$$;
|
|
2970
|
-
enable$;
|
|
2971
|
-
step$;
|
|
2972
|
-
resize$;
|
|
2973
|
-
constructor(rendererComponent, timerController, sizesController) {
|
|
2974
|
-
this.rendererComponent = rendererComponent;
|
|
2975
|
-
this.timerController = timerController;
|
|
2976
|
-
this.sizesController = sizesController;
|
|
2977
|
-
this.enable$$ = new Subject5();
|
|
2978
|
-
this.enable$ = this.enable$$.pipe();
|
|
2979
|
-
this.step$ = this.timerController.step$.pipe(filter3(() => this.rendererComponent.enabled));
|
|
2980
|
-
this.resize$ = this.sizesController.resize$.pipe(filter3(() => this.rendererComponent.enabled));
|
|
2981
|
-
}
|
|
2982
|
-
};
|
|
2983
|
-
RendererController = _ts_decorate14([
|
|
2984
|
-
singleton_default(),
|
|
2985
|
-
_ts_param10(0, inject_default(RendererComponent)),
|
|
2986
|
-
_ts_param10(1, inject_default(TimerController)),
|
|
2987
|
-
_ts_param10(2, inject_default(SizesController)),
|
|
2988
|
-
_ts_metadata10("design:type", Function),
|
|
2989
|
-
_ts_metadata10("design:paramtypes", [
|
|
2990
|
-
typeof RendererComponent === "undefined" ? Object : RendererComponent,
|
|
2991
|
-
typeof TimerController === "undefined" ? Object : TimerController,
|
|
2992
|
-
typeof SizesController === "undefined" ? Object : SizesController
|
|
2993
|
-
])
|
|
2994
|
-
], RendererController);
|
|
2995
|
-
|
|
2996
|
-
// src/core/app/renderer/renderer.module.ts
|
|
2997
|
-
function _ts_decorate15(decorators, target, key, desc) {
|
|
2998
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2999
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3000
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3001
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3002
|
-
}
|
|
3003
|
-
__name(_ts_decorate15, "_ts_decorate");
|
|
3004
|
-
function _ts_metadata11(k, v) {
|
|
3005
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3006
|
-
}
|
|
3007
|
-
__name(_ts_metadata11, "_ts_metadata");
|
|
3008
|
-
function _ts_param11(paramIndex, decorator) {
|
|
3009
|
-
return function(target, key) {
|
|
3010
|
-
decorator(target, key, paramIndex);
|
|
3011
|
-
};
|
|
3012
|
-
}
|
|
3013
|
-
__name(_ts_param11, "_ts_param");
|
|
3014
|
-
var RendererModule = class {
|
|
3015
|
-
static {
|
|
3016
|
-
__name(this, "RendererModule");
|
|
3017
|
-
}
|
|
3018
|
-
component;
|
|
3019
|
-
controller;
|
|
3020
|
-
constructor(component, controller) {
|
|
3021
|
-
this.component = component;
|
|
3022
|
-
this.controller = controller;
|
|
3023
|
-
}
|
|
3024
|
-
init(canvas) {
|
|
3025
|
-
this.controller.enable$.subscribe((status) => {
|
|
3026
|
-
this.component.enabled = !!status;
|
|
3027
|
-
});
|
|
3028
|
-
this.controller.step$.subscribe(() => this.component.render());
|
|
3029
|
-
this.controller.resize$.subscribe((size) => this.component.setSize(size.windowWidth, size.windowHeight));
|
|
3030
|
-
this.component.init(canvas);
|
|
3031
|
-
}
|
|
3032
|
-
dispose() {
|
|
3033
|
-
this.controller.enable$$.unsubscribe();
|
|
3034
|
-
}
|
|
3035
|
-
enabled(value) {
|
|
3036
|
-
if (typeof value === "boolean") this.controller.enable$$.next(value);
|
|
3037
|
-
return this.component.enabled;
|
|
3038
|
-
}
|
|
3039
|
-
instance() {
|
|
3040
|
-
return this.component.instance;
|
|
3041
|
-
}
|
|
3042
|
-
setSize(value) {
|
|
3043
|
-
return this.component.setSize(value.x, value.y);
|
|
3044
|
-
}
|
|
3045
|
-
render() {
|
|
3046
|
-
return this.component.render();
|
|
3047
|
-
}
|
|
3048
|
-
enabled$() {
|
|
3049
|
-
return this.controller.enable$;
|
|
3050
|
-
}
|
|
3051
|
-
};
|
|
3052
|
-
RendererModule = _ts_decorate15([
|
|
3053
|
-
singleton_default(),
|
|
3054
|
-
_ts_param11(0, inject_default(RendererComponent)),
|
|
3055
|
-
_ts_param11(1, inject_default(RendererController)),
|
|
3056
|
-
_ts_metadata11("design:type", Function),
|
|
3057
|
-
_ts_metadata11("design:paramtypes", [
|
|
3058
|
-
typeof RendererComponent === "undefined" ? Object : RendererComponent,
|
|
3059
|
-
typeof RendererController === "undefined" ? Object : RendererController
|
|
3060
|
-
])
|
|
3061
|
-
], RendererModule);
|
|
3062
|
-
|
|
3063
|
-
// src/core/app/sizes/sizes.module.ts
|
|
3064
|
-
function _ts_decorate16(decorators, target, key, desc) {
|
|
3065
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3066
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3067
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3068
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3069
|
-
}
|
|
3070
|
-
__name(_ts_decorate16, "_ts_decorate");
|
|
3071
|
-
function _ts_metadata12(k, v) {
|
|
3072
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3073
|
-
}
|
|
3074
|
-
__name(_ts_metadata12, "_ts_metadata");
|
|
3075
|
-
function _ts_param12(paramIndex, decorator) {
|
|
3076
|
-
return function(target, key) {
|
|
3077
|
-
decorator(target, key, paramIndex);
|
|
3078
|
-
};
|
|
3079
|
-
}
|
|
3080
|
-
__name(_ts_param12, "_ts_param");
|
|
3081
|
-
var SizesModule = class {
|
|
3082
|
-
static {
|
|
3083
|
-
__name(this, "SizesModule");
|
|
3084
|
-
}
|
|
3085
|
-
component;
|
|
3086
|
-
controller;
|
|
3087
|
-
constructor(component, controller) {
|
|
3088
|
-
this.component = component;
|
|
3089
|
-
this.controller = controller;
|
|
3090
|
-
}
|
|
3091
|
-
init(canvas) {
|
|
3092
|
-
this.controller.enable$.subscribe((status) => {
|
|
3093
|
-
this.component.enabled = !!status;
|
|
3094
|
-
});
|
|
3095
|
-
this.controller.resize$.subscribe((size) => {
|
|
3096
|
-
this.component.width = size.windowWidth;
|
|
3097
|
-
this.component.height = size.windowHeight;
|
|
3098
|
-
this.component.aspect = size.windowWidth / size.windowHeight;
|
|
3099
|
-
});
|
|
3100
|
-
this.component.init(canvas);
|
|
3101
|
-
}
|
|
3102
|
-
dispose() {
|
|
3103
|
-
}
|
|
3104
|
-
aspect(value) {
|
|
3105
|
-
if (typeof value === "number") this.component.aspect = value;
|
|
3106
|
-
return this.component.aspect;
|
|
3107
|
-
}
|
|
3108
|
-
enabled(value) {
|
|
3109
|
-
if (typeof value === "boolean") this.controller.enable$$.next(value);
|
|
3110
|
-
return this.component.enabled;
|
|
3111
|
-
}
|
|
3112
|
-
frustrum(value) {
|
|
3113
|
-
if (typeof value === "number") this.component.frustrum = value;
|
|
3114
|
-
return this.component.frustrum;
|
|
3115
|
-
}
|
|
3116
|
-
height(value) {
|
|
3117
|
-
if (typeof value === "number") this.component.height = value;
|
|
3118
|
-
return this.component.height;
|
|
3119
|
-
}
|
|
3120
|
-
pixelRatio(value) {
|
|
3121
|
-
if (typeof value === "number") this.component.pixelRatio = value;
|
|
3122
|
-
return this.component.pixelRatio;
|
|
3123
|
-
}
|
|
3124
|
-
width(value) {
|
|
3125
|
-
if (typeof value === "number") this.component.width = value;
|
|
3126
|
-
return this.component.width;
|
|
3127
|
-
}
|
|
3128
|
-
enabled$() {
|
|
3129
|
-
return this.controller.enable$;
|
|
3130
|
-
}
|
|
3131
|
-
resize$() {
|
|
3132
|
-
return this.controller.resize$;
|
|
3133
|
-
}
|
|
3134
|
-
};
|
|
3135
|
-
SizesModule = _ts_decorate16([
|
|
3136
|
-
singleton_default(),
|
|
3137
|
-
_ts_param12(0, inject_default(SizesComponent)),
|
|
3138
|
-
_ts_param12(1, inject_default(SizesController)),
|
|
3139
|
-
_ts_metadata12("design:type", Function),
|
|
3140
|
-
_ts_metadata12("design:paramtypes", [
|
|
3141
|
-
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
3142
|
-
typeof SizesController === "undefined" ? Object : SizesController
|
|
3143
|
-
])
|
|
3144
|
-
], SizesModule);
|
|
3145
|
-
|
|
3146
|
-
// src/core/app/world/world.module.ts
|
|
3147
|
-
import { Scene as Scene2 } from "three";
|
|
3148
|
-
|
|
3149
|
-
// src/core/app/world/world.controller.ts
|
|
3150
|
-
import { Subject as Subject6 } from "rxjs";
|
|
3151
|
-
function _ts_decorate17(decorators, target, key, desc) {
|
|
3152
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3153
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3154
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3155
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3156
|
-
}
|
|
3157
|
-
__name(_ts_decorate17, "_ts_decorate");
|
|
3158
|
-
var WorldController = class {
|
|
3159
|
-
static {
|
|
3160
|
-
__name(this, "WorldController");
|
|
3161
|
-
}
|
|
3162
|
-
enable$$ = new Subject6();
|
|
3163
|
-
enable$ = this.enable$$.pipe();
|
|
3164
|
-
};
|
|
3165
|
-
WorldController = _ts_decorate17([
|
|
3166
|
-
singleton_default()
|
|
3167
|
-
], WorldController);
|
|
3168
|
-
|
|
3169
|
-
// src/core/app/world/world.module.ts
|
|
3170
|
-
function _ts_decorate18(decorators, target, key, desc) {
|
|
3171
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3172
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3173
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3174
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3175
|
-
}
|
|
3176
|
-
__name(_ts_decorate18, "_ts_decorate");
|
|
3177
|
-
function _ts_metadata13(k, v) {
|
|
3178
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3179
|
-
}
|
|
3180
|
-
__name(_ts_metadata13, "_ts_metadata");
|
|
3181
|
-
function _ts_param13(paramIndex, decorator) {
|
|
3182
|
-
return function(target, key) {
|
|
3183
|
-
decorator(target, key, paramIndex);
|
|
3184
|
-
};
|
|
3185
|
-
}
|
|
3186
|
-
__name(_ts_param13, "_ts_param");
|
|
3187
|
-
var WorldModule = class {
|
|
3188
|
-
static {
|
|
3189
|
-
__name(this, "WorldModule");
|
|
3190
|
-
}
|
|
3191
|
-
component;
|
|
3192
|
-
controller;
|
|
3193
|
-
constructor(component, controller) {
|
|
3194
|
-
this.component = component;
|
|
3195
|
-
this.controller = controller;
|
|
3196
|
-
}
|
|
3197
|
-
init() {
|
|
3198
|
-
this.controller.enable$.subscribe((status) => {
|
|
3199
|
-
this.component.enabled = !!status;
|
|
3200
|
-
});
|
|
3201
|
-
}
|
|
3202
|
-
dispose() {
|
|
3203
|
-
}
|
|
3204
|
-
scene(value) {
|
|
3205
|
-
if (value instanceof Scene2) this.component.scene = value;
|
|
3206
|
-
return this.component.scene;
|
|
3207
|
-
}
|
|
3208
|
-
enabled(value) {
|
|
3209
|
-
if (typeof value === "boolean") this.controller.enable$$.next(value);
|
|
3210
|
-
return this.component.enabled;
|
|
3211
|
-
}
|
|
3212
|
-
get enable$() {
|
|
3213
|
-
return this.controller.enable$;
|
|
3214
|
-
}
|
|
3215
|
-
};
|
|
3216
|
-
WorldModule = _ts_decorate18([
|
|
3217
|
-
singleton_default(),
|
|
3218
|
-
_ts_param13(0, inject_default(WorldComponent)),
|
|
3219
|
-
_ts_param13(1, inject_default(WorldController)),
|
|
3220
|
-
_ts_metadata13("design:type", Function),
|
|
3221
|
-
_ts_metadata13("design:paramtypes", [
|
|
3222
|
-
typeof WorldComponent === "undefined" ? Object : WorldComponent,
|
|
3223
|
-
typeof WorldController === "undefined" ? Object : WorldController
|
|
3224
|
-
])
|
|
3225
|
-
], WorldModule);
|
|
3226
|
-
|
|
3227
|
-
// src/core/app/debug/debug.controller.ts
|
|
3228
|
-
import { Subject as Subject7 } from "rxjs";
|
|
3229
|
-
function _ts_decorate19(decorators, target, key, desc) {
|
|
3230
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3231
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3232
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3233
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3234
|
-
}
|
|
3235
|
-
__name(_ts_decorate19, "_ts_decorate");
|
|
3236
|
-
function _ts_metadata14(k, v) {
|
|
3237
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3238
|
-
}
|
|
3239
|
-
__name(_ts_metadata14, "_ts_metadata");
|
|
3240
|
-
function _ts_param14(paramIndex, decorator) {
|
|
3241
|
-
return function(target, key) {
|
|
3242
|
-
decorator(target, key, paramIndex);
|
|
3243
|
-
};
|
|
3244
|
-
}
|
|
3245
|
-
__name(_ts_param14, "_ts_param");
|
|
3246
|
-
var DebugController = class {
|
|
3247
|
-
static {
|
|
3248
|
-
__name(this, "DebugController");
|
|
3249
|
-
}
|
|
3250
|
-
timerController;
|
|
3251
|
-
enable$$;
|
|
3252
|
-
enable$;
|
|
3253
|
-
step$;
|
|
3254
|
-
constructor(timerController) {
|
|
3255
|
-
this.timerController = timerController;
|
|
3256
|
-
this.enable$$ = new Subject7();
|
|
3257
|
-
this.enable$ = this.enable$$.pipe();
|
|
3258
|
-
this.step$ = this.timerController.step$;
|
|
3259
|
-
}
|
|
3260
|
-
};
|
|
3261
|
-
DebugController = _ts_decorate19([
|
|
3262
|
-
singleton_default(),
|
|
3263
|
-
_ts_param14(0, inject_default(TimerController)),
|
|
3264
|
-
_ts_metadata14("design:type", Function),
|
|
3265
|
-
_ts_metadata14("design:paramtypes", [
|
|
3266
|
-
typeof TimerController === "undefined" ? Object : TimerController
|
|
3267
|
-
])
|
|
3268
|
-
], DebugController);
|
|
3269
|
-
|
|
3270
|
-
// src/core/app/debug/debug.module.ts
|
|
3271
|
-
function _ts_decorate20(decorators, target, key, desc) {
|
|
3272
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3273
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3274
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3275
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3276
|
-
}
|
|
3277
|
-
__name(_ts_decorate20, "_ts_decorate");
|
|
3278
|
-
function _ts_metadata15(k, v) {
|
|
3279
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3280
|
-
}
|
|
3281
|
-
__name(_ts_metadata15, "_ts_metadata");
|
|
3282
|
-
function _ts_param15(paramIndex, decorator) {
|
|
3283
|
-
return function(target, key) {
|
|
3284
|
-
decorator(target, key, paramIndex);
|
|
3285
|
-
};
|
|
3286
|
-
}
|
|
3287
|
-
__name(_ts_param15, "_ts_param");
|
|
3288
|
-
var DebugModule = class {
|
|
3289
|
-
static {
|
|
3290
|
-
__name(this, "DebugModule");
|
|
3291
|
-
}
|
|
3292
|
-
component;
|
|
3293
|
-
controller;
|
|
3294
|
-
constructor(component, controller) {
|
|
3295
|
-
this.component = component;
|
|
3296
|
-
this.controller = controller;
|
|
3297
|
-
this.controller.step$.subscribe(() => {
|
|
3298
|
-
this.component.update();
|
|
3299
|
-
});
|
|
3300
|
-
}
|
|
3301
|
-
init(props) {
|
|
3302
|
-
this.component.init(props);
|
|
3303
|
-
}
|
|
3304
|
-
dispose() {
|
|
3305
|
-
this.component.dispose();
|
|
3306
|
-
}
|
|
3307
|
-
axesHelper() {
|
|
3308
|
-
return this.component.axesHelper;
|
|
3309
|
-
}
|
|
3310
|
-
cameraControls() {
|
|
3311
|
-
return this.component.cameraControls;
|
|
3312
|
-
}
|
|
3313
|
-
cameraHelper() {
|
|
3314
|
-
return this.component.cameraHelper;
|
|
3315
|
-
}
|
|
3316
|
-
enabled(value) {
|
|
3317
|
-
if (value) this.component.enabled = value;
|
|
3318
|
-
return this.component.enabled;
|
|
3319
|
-
}
|
|
3320
|
-
gridHelper() {
|
|
3321
|
-
return this.component.gridHelper;
|
|
3322
|
-
}
|
|
3323
|
-
miniCameraControls() {
|
|
3324
|
-
return this.component.miniCameraControls;
|
|
3325
|
-
}
|
|
3326
|
-
enabled$() {
|
|
3327
|
-
return this.controller.enable$;
|
|
3328
|
-
}
|
|
3329
|
-
};
|
|
3330
|
-
DebugModule = _ts_decorate20([
|
|
3331
|
-
singleton_default(),
|
|
3332
|
-
_ts_param15(0, inject_default(DebugComponent)),
|
|
3333
|
-
_ts_param15(1, inject_default(DebugController)),
|
|
3334
|
-
_ts_metadata15("design:type", Function),
|
|
3335
|
-
_ts_metadata15("design:paramtypes", [
|
|
3336
|
-
typeof DebugComponent === "undefined" ? Object : DebugComponent,
|
|
3337
|
-
typeof DebugController === "undefined" ? Object : DebugController
|
|
3338
|
-
])
|
|
3339
|
-
], DebugModule);
|
|
3340
|
-
|
|
3341
|
-
// src/common/models/app-proxy-event-handler.model.ts
|
|
3342
|
-
var AppProxyEventHandlersModel = class {
|
|
3343
|
-
static {
|
|
3344
|
-
__name(this, "AppProxyEventHandlersModel");
|
|
3345
|
-
}
|
|
3346
|
-
contextmenu$;
|
|
3347
|
-
resize$;
|
|
3348
|
-
mousedown$;
|
|
3349
|
-
mousemove$;
|
|
3350
|
-
mouseup$;
|
|
3351
|
-
pointerdown$;
|
|
3352
|
-
pointermove$;
|
|
3353
|
-
pointercancel$;
|
|
3354
|
-
pointerup$;
|
|
3355
|
-
touchstart$;
|
|
3356
|
-
touchmove$;
|
|
3357
|
-
touchend$;
|
|
3358
|
-
wheel$;
|
|
3359
|
-
keydown$;
|
|
3360
|
-
contextmenu;
|
|
3361
|
-
resize;
|
|
3362
|
-
mousedown;
|
|
3363
|
-
mousemove;
|
|
3364
|
-
mouseup;
|
|
3365
|
-
pointerdown;
|
|
3366
|
-
pointermove;
|
|
3367
|
-
pointercancel;
|
|
3368
|
-
pointerup;
|
|
3369
|
-
touchstart;
|
|
3370
|
-
touchmove;
|
|
3371
|
-
touchend;
|
|
3372
|
-
wheel;
|
|
3373
|
-
keydown;
|
|
3374
|
-
};
|
|
3375
|
-
|
|
3376
|
-
// src/core/app/app.module.ts
|
|
3377
|
-
function _ts_decorate21(decorators, target, key, desc) {
|
|
3378
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3379
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3380
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3381
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3382
|
-
}
|
|
3383
|
-
__name(_ts_decorate21, "_ts_decorate");
|
|
3384
|
-
function _ts_metadata16(k, v) {
|
|
3385
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3386
|
-
}
|
|
3387
|
-
__name(_ts_metadata16, "_ts_metadata");
|
|
3388
|
-
function _ts_param16(paramIndex, decorator) {
|
|
3389
|
-
return function(target, key) {
|
|
3390
|
-
decorator(target, key, paramIndex);
|
|
3391
|
-
};
|
|
3392
|
-
}
|
|
3393
|
-
__name(_ts_param16, "_ts_param");
|
|
3394
|
-
var AppModule = class extends AppProxyEventHandlersModel {
|
|
3395
|
-
static {
|
|
3396
|
-
__name(this, "AppModule");
|
|
3397
|
-
}
|
|
3398
|
-
controller;
|
|
3399
|
-
component;
|
|
3400
|
-
timer;
|
|
3401
|
-
sizes;
|
|
3402
|
-
camera;
|
|
3403
|
-
world;
|
|
3404
|
-
renderer;
|
|
3405
|
-
debug;
|
|
3406
|
-
constructor(controller, component, timer, sizes, camera, world, renderer, debug) {
|
|
3407
|
-
super(), this.controller = controller, this.component = component, this.timer = timer, this.sizes = sizes, this.camera = camera, this.world = world, this.renderer = renderer, this.debug = debug;
|
|
3408
|
-
this._initProxyEvents();
|
|
3409
|
-
self.addEventListener("message", this._onMessage.bind(this));
|
|
3410
|
-
}
|
|
3411
|
-
_initProxyEvents() {
|
|
3412
|
-
PROXY_EVENT_LISTENERS.forEach((key) => {
|
|
3413
|
-
this[`${key}$`] = () => this.controller?.[`${key}$`];
|
|
3414
|
-
this[key] = (event) => this.controller?.[key]?.(event);
|
|
3415
|
-
});
|
|
3416
|
-
}
|
|
3417
|
-
_onMessage(event) {
|
|
3418
|
-
if (!event.data?.canvas || this.component.initialized) return;
|
|
3419
|
-
const startTimer = !!event.data?.startTimer;
|
|
3420
|
-
const withMiniCamera = !!event.data?.withMiniCamera;
|
|
3421
|
-
const fullScreen = !!event.data?.fullScreen;
|
|
3422
|
-
this.init({
|
|
3423
|
-
...event.data,
|
|
3424
|
-
startTimer,
|
|
3425
|
-
withMiniCamera,
|
|
3426
|
-
fullScreen
|
|
3427
|
-
});
|
|
3428
|
-
}
|
|
3429
|
-
init(props) {
|
|
3430
|
-
if (!props.canvas || this.component.initialized) return;
|
|
3431
|
-
this.component.initialized = true;
|
|
3432
|
-
props.canvas["style"] = {
|
|
3433
|
-
width: props.canvas.width + "",
|
|
3434
|
-
height: props.canvas.height + ""
|
|
3435
|
-
};
|
|
3436
|
-
const canvas = props.canvas;
|
|
3437
|
-
this.component.canvas = canvas;
|
|
3438
|
-
this.sizes.init(canvas);
|
|
3439
|
-
this.camera.init(props.withMiniCamera);
|
|
3440
|
-
this.world.init();
|
|
3441
|
-
this.renderer.init(canvas);
|
|
3442
|
-
this.timer.init(props.startTimer);
|
|
3443
|
-
this.debug.init(props);
|
|
3444
|
-
this.controller.lifecycle$$.next(AppLifecycleState.INITIALIZED);
|
|
3445
|
-
}
|
|
3446
|
-
get canvas() {
|
|
3447
|
-
return this.component.canvas;
|
|
3448
|
-
}
|
|
3449
|
-
get initialized() {
|
|
3450
|
-
return this.component.initialized;
|
|
3451
|
-
}
|
|
3452
|
-
isInitialized() {
|
|
3453
|
-
return this.component.initialized;
|
|
3454
|
-
}
|
|
3455
|
-
dispose() {
|
|
3456
|
-
this.sizes.dispose();
|
|
3457
|
-
this.camera.dispose();
|
|
3458
|
-
this.world.dispose();
|
|
3459
|
-
this.renderer.dispose();
|
|
3460
|
-
this.timer.dispose();
|
|
3461
|
-
this.debug.dispose();
|
|
3462
|
-
this.controller.lifecycle$$.next(AppLifecycleState.DISPOSED);
|
|
3463
|
-
this.controller.lifecycle$$.complete();
|
|
3464
|
-
self.removeEventListener("message", this._onMessage.bind(this));
|
|
3465
|
-
}
|
|
3466
|
-
lifecycle$() {
|
|
3467
|
-
return this.controller.lifecycle$;
|
|
3468
|
-
}
|
|
3469
|
-
};
|
|
3470
|
-
AppModule = _ts_decorate21([
|
|
3471
|
-
singleton_default(),
|
|
3472
|
-
_ts_param16(0, inject_default(AppController)),
|
|
3473
|
-
_ts_param16(1, inject_default(AppComponent)),
|
|
3474
|
-
_ts_param16(2, inject_default(TimerModule)),
|
|
3475
|
-
_ts_param16(3, inject_default(SizesModule)),
|
|
3476
|
-
_ts_param16(4, inject_default(CameraModule)),
|
|
3477
|
-
_ts_param16(5, inject_default(WorldModule)),
|
|
3478
|
-
_ts_param16(6, inject_default(RendererModule)),
|
|
3479
|
-
_ts_param16(7, inject_default(DebugModule)),
|
|
3480
|
-
_ts_metadata16("design:type", Function),
|
|
3481
|
-
_ts_metadata16("design:paramtypes", [
|
|
3482
|
-
typeof AppController === "undefined" ? Object : AppController,
|
|
3483
|
-
typeof AppComponent === "undefined" ? Object : AppComponent,
|
|
3484
|
-
typeof TimerModule === "undefined" ? Object : TimerModule,
|
|
3485
|
-
typeof SizesModule === "undefined" ? Object : SizesModule,
|
|
3486
|
-
typeof CameraModule === "undefined" ? Object : CameraModule,
|
|
3487
|
-
typeof WorldModule === "undefined" ? Object : WorldModule,
|
|
3488
|
-
typeof RendererModule === "undefined" ? Object : RendererModule,
|
|
3489
|
-
typeof DebugModule === "undefined" ? Object : DebugModule
|
|
3490
|
-
])
|
|
3491
|
-
], AppModule);
|
|
3492
|
-
var appModule = instance.resolve(AppModule);
|
|
3493
|
-
|
|
3494
|
-
// src/core/loader/loader.module.ts
|
|
3495
|
-
var import_reflect_metadata2 = __toESM(require_Reflect());
|
|
3496
|
-
import { CanvasTexture } from "three";
|
|
3497
|
-
import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader";
|
|
3498
|
-
|
|
3499
|
-
// src/core/loader/loader.controller.ts
|
|
3500
|
-
import { Subject as Subject8 } from "rxjs";
|
|
3501
|
-
import { filter as filter4 } from "rxjs";
|
|
3502
|
-
function _ts_decorate22(decorators, target, key, desc) {
|
|
3503
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3504
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3505
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3506
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3507
|
-
}
|
|
3508
|
-
__name(_ts_decorate22, "_ts_decorate");
|
|
3509
|
-
var LoaderController = class {
|
|
3510
|
-
static {
|
|
3511
|
-
__name(this, "LoaderController");
|
|
3512
|
-
}
|
|
3513
|
-
lifecycle$$ = new Subject8();
|
|
3514
|
-
progress$$ = new Subject8();
|
|
3515
|
-
progress$ = this.progress$$.pipe();
|
|
3516
|
-
lifecycle$ = this.lifecycle$$.pipe();
|
|
3517
|
-
progressCompleted$ = this.progress$.pipe(filter4((resource) => resource.toLoad === resource.loaded));
|
|
3518
|
-
};
|
|
3519
|
-
LoaderController = _ts_decorate22([
|
|
3520
|
-
scoped(lifecycle_default.ResolutionScoped)
|
|
3521
|
-
], LoaderController);
|
|
3522
|
-
|
|
3523
|
-
// src/core/loader/loader.component.ts
|
|
3524
|
-
import { AudioLoader, CubeTextureLoader, ImageBitmapLoader, LoadingManager, VideoTexture } from "three";
|
|
3525
|
-
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
3526
|
-
function _ts_decorate23(decorators, target, key, desc) {
|
|
3527
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3528
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3529
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3530
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3531
|
-
}
|
|
3532
|
-
__name(_ts_decorate23, "_ts_decorate");
|
|
3533
|
-
var LoaderComponent = class {
|
|
3534
|
-
static {
|
|
3535
|
-
__name(this, "LoaderComponent");
|
|
3536
|
-
}
|
|
3537
|
-
loadingManager = new LoadingManager();
|
|
3538
|
-
loaders = {};
|
|
3539
|
-
resources = [];
|
|
3540
|
-
items = {};
|
|
3541
|
-
toLoad = 0;
|
|
3542
|
-
loaded = 0;
|
|
3543
|
-
get videoLoader() {
|
|
3544
|
-
return {
|
|
3545
|
-
load: /* @__PURE__ */ __name((url, callback) => {
|
|
3546
|
-
let element = document.createElement("video");
|
|
3547
|
-
element.muted = true;
|
|
3548
|
-
element.loop = true;
|
|
3549
|
-
element.controls = false;
|
|
3550
|
-
element.playsInline = true;
|
|
3551
|
-
element.src = url;
|
|
3552
|
-
element.autoplay = true;
|
|
3553
|
-
const oncanplaythrough = /* @__PURE__ */ __name(() => {
|
|
3554
|
-
if (!element) return;
|
|
3555
|
-
element.play();
|
|
3556
|
-
const texture = new VideoTexture(element);
|
|
3557
|
-
const textureDispose = texture.dispose.bind(texture);
|
|
3558
|
-
texture.dispose = () => {
|
|
3559
|
-
texture.userData.element = void 0;
|
|
3560
|
-
element?.remove();
|
|
3561
|
-
element = void 0;
|
|
3562
|
-
textureDispose();
|
|
3563
|
-
};
|
|
3564
|
-
callback(texture);
|
|
3565
|
-
texture.userData.element = element;
|
|
3566
|
-
element.removeEventListener("canplaythrough", oncanplaythrough);
|
|
3567
|
-
}, "oncanplaythrough");
|
|
3568
|
-
element.addEventListener("canplaythrough", oncanplaythrough);
|
|
3569
|
-
}, "load")
|
|
3570
|
-
};
|
|
3571
|
-
}
|
|
3572
|
-
_setLoaders() {
|
|
3573
|
-
this.loaders.gltfLoader = new GLTFLoader(this.loadingManager);
|
|
3574
|
-
this.loaders.textureLoader = new ImageBitmapLoader(this.loadingManager);
|
|
3575
|
-
this.loaders.cubeTextureLoader = new CubeTextureLoader(this.loadingManager);
|
|
3576
|
-
this.loaders.audioLoader = new AudioLoader(this.loadingManager);
|
|
3577
|
-
this.loaders.videoLoader = this.videoLoader;
|
|
3578
|
-
}
|
|
3579
|
-
setResources(resources) {
|
|
3580
|
-
this.resources = resources;
|
|
3581
|
-
this.toLoad = this.resources.length;
|
|
3582
|
-
this.loaded = 0;
|
|
3583
|
-
}
|
|
3584
|
-
init(resources = []) {
|
|
3585
|
-
this.resources = resources;
|
|
3586
|
-
this._setLoaders();
|
|
3587
|
-
}
|
|
3588
|
-
};
|
|
3589
|
-
LoaderComponent = _ts_decorate23([
|
|
3590
|
-
scoped(lifecycle_default.ResolutionScoped)
|
|
3591
|
-
], LoaderComponent);
|
|
3592
|
-
|
|
3593
|
-
// src/core/loader/loader.module.ts
|
|
3594
|
-
function _ts_decorate24(decorators, target, key, desc) {
|
|
3595
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3596
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3597
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3598
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3599
|
-
}
|
|
3600
|
-
__name(_ts_decorate24, "_ts_decorate");
|
|
3601
|
-
function _ts_metadata17(k, v) {
|
|
3602
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3603
|
-
}
|
|
3604
|
-
__name(_ts_metadata17, "_ts_metadata");
|
|
3605
|
-
function _ts_param17(paramIndex, decorator) {
|
|
3606
|
-
return function(target, key) {
|
|
3607
|
-
decorator(target, key, paramIndex);
|
|
3608
|
-
};
|
|
3609
|
-
}
|
|
3610
|
-
__name(_ts_param17, "_ts_param");
|
|
3611
|
-
var LoaderModule = class {
|
|
3612
|
-
static {
|
|
3613
|
-
__name(this, "LoaderModule");
|
|
3614
|
-
}
|
|
3615
|
-
controller;
|
|
3616
|
-
component;
|
|
3617
|
-
constructor(controller, component) {
|
|
3618
|
-
this.controller = controller;
|
|
3619
|
-
this.component = component;
|
|
3620
|
-
self.onmessage = (event) => {
|
|
3621
|
-
const resources = event?.data?.resources;
|
|
3622
|
-
if (resources) this.init(resources);
|
|
3623
|
-
};
|
|
3624
|
-
}
|
|
3625
|
-
_handleLoadedResource(resource, file) {
|
|
3626
|
-
this.component.items[resource.name] = file;
|
|
3627
|
-
this.component.loaded++;
|
|
3628
|
-
this.controller.progress$$.next({
|
|
3629
|
-
file,
|
|
3630
|
-
resource,
|
|
3631
|
-
loaded: this.component.loaded,
|
|
3632
|
-
toLoad: this.component.toLoad
|
|
3633
|
-
});
|
|
3634
|
-
}
|
|
3635
|
-
setDracoLoader(dracoDecoderPath, linkWithGltfLoader = true) {
|
|
3636
|
-
this.component.loaders.dracoLoader = new DRACOLoader(this.component.loadingManager);
|
|
3637
|
-
this.component.loaders.dracoLoader.setDecoderPath(dracoDecoderPath);
|
|
3638
|
-
if (linkWithGltfLoader && this.component.loaders.gltfLoader) this.component.loaders.gltfLoader.setDRACOLoader(this.component.loaders.dracoLoader);
|
|
3639
|
-
}
|
|
3640
|
-
load() {
|
|
3641
|
-
const firstResource = this.component.resources[0];
|
|
3642
|
-
if (!firstResource) return;
|
|
3643
|
-
this.controller.progress$$.next({
|
|
3644
|
-
resource: firstResource,
|
|
3645
|
-
loaded: this.component.loaded,
|
|
3646
|
-
toLoad: this.component.toLoad
|
|
3647
|
-
});
|
|
3648
|
-
for (const source of this.component.resources) if (!this.component.items[source.name]) {
|
|
3649
|
-
if (source.type === "gltfModel" && typeof source.path === "string") {
|
|
3650
|
-
this.component.loaders.gltfLoader?.load(source.path, (model) => this._handleLoadedResource(source, model));
|
|
3651
|
-
}
|
|
3652
|
-
if (source.type === "texture" && typeof source.path === "string") {
|
|
3653
|
-
this.component.loaders.textureLoader?.load(source.path, (texture) => {
|
|
3654
|
-
this._handleLoadedResource(source, new CanvasTexture(texture));
|
|
3655
|
-
});
|
|
3656
|
-
}
|
|
3657
|
-
if (source.type === "cubeTexture" && typeof source.path === "object") {
|
|
3658
|
-
this.component.loaders.cubeTextureLoader?.load(source.path, (texture) => this._handleLoadedResource(source, texture));
|
|
3659
|
-
}
|
|
3660
|
-
if (source.type === "video" && typeof source.path === "string") {
|
|
3661
|
-
this.component.loaders.videoLoader?.load(source.path, (texture) => this._handleLoadedResource(source, texture));
|
|
3662
|
-
}
|
|
3663
|
-
if (source.type === "audio" && typeof source.path === "string") {
|
|
3664
|
-
this.component.loaders.audioLoader?.load(source.path, (audioBuffer) => {
|
|
3665
|
-
this._handleLoadedResource(source, audioBuffer);
|
|
3666
|
-
});
|
|
3667
|
-
}
|
|
3668
|
-
}
|
|
3669
|
-
}
|
|
3670
|
-
items() {
|
|
3671
|
-
return this.component.items;
|
|
3672
|
-
}
|
|
3673
|
-
loaders() {
|
|
3674
|
-
return this.component.loaders;
|
|
3675
|
-
}
|
|
3676
|
-
resources() {
|
|
3677
|
-
return this.component.resources;
|
|
3678
|
-
}
|
|
3679
|
-
loaded() {
|
|
3680
|
-
return this.component.loaded;
|
|
3681
|
-
}
|
|
3682
|
-
toLoad() {
|
|
3683
|
-
return this.component.toLoad;
|
|
3684
|
-
}
|
|
3685
|
-
init(resources = []) {
|
|
3686
|
-
this.component.init(resources);
|
|
3687
|
-
}
|
|
3688
|
-
dispose() {
|
|
3689
|
-
this.controller.lifecycle$$.complete();
|
|
3690
|
-
this.controller.progress$$.complete();
|
|
3691
|
-
}
|
|
3692
|
-
lifecycle$() {
|
|
3693
|
-
return this.controller.lifecycle$;
|
|
3694
|
-
}
|
|
3695
|
-
progress$() {
|
|
3696
|
-
return this.controller.progress$;
|
|
3697
|
-
}
|
|
3698
|
-
progressCompleted$() {
|
|
3699
|
-
return this.controller.progressCompleted$;
|
|
3700
|
-
}
|
|
3701
|
-
};
|
|
3702
|
-
LoaderModule = _ts_decorate24([
|
|
3703
|
-
scoped(lifecycle_default.ResolutionScoped),
|
|
3704
|
-
_ts_param17(0, inject_default(LoaderController)),
|
|
3705
|
-
_ts_param17(1, inject_default(LoaderComponent)),
|
|
3706
|
-
_ts_metadata17("design:type", Function),
|
|
3707
|
-
_ts_metadata17("design:paramtypes", [
|
|
3708
|
-
typeof LoaderController === "undefined" ? Object : LoaderController,
|
|
3709
|
-
typeof LoaderComponent === "undefined" ? Object : LoaderComponent
|
|
3710
|
-
])
|
|
3711
|
-
], LoaderModule);
|
|
3712
|
-
var loaderModule = instance.resolve(LoaderModule);
|
|
3713
|
-
|
|
3714
|
-
// src/core/register/register.module.ts
|
|
3715
|
-
var import_reflect_metadata3 = __toESM(require_Reflect());
|
|
3716
|
-
import { registerSerializer } from "threads";
|
|
3717
|
-
import { excludeProperties } from "@quick-threejs/utils";
|
|
3718
|
-
|
|
3719
|
-
// src/core/register/register.component.ts
|
|
3720
|
-
import { createWorkerPool } from "@quick-threejs/utils";
|
|
3721
|
-
import GUI from "three/examples/jsm/libs/lil-gui.module.min.js";
|
|
3722
|
-
import Stats from "stats.js";
|
|
3723
|
-
function _ts_decorate25(decorators, target, key, desc) {
|
|
3724
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3725
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3726
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3727
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3728
|
-
}
|
|
3729
|
-
__name(_ts_decorate25, "_ts_decorate");
|
|
3730
|
-
var RegisterComponent = class {
|
|
3731
|
-
static {
|
|
3732
|
-
__name(this, "RegisterComponent");
|
|
3733
|
-
}
|
|
3734
|
-
workerPool = createWorkerPool();
|
|
3735
|
-
canvas;
|
|
3736
|
-
worker;
|
|
3737
|
-
thread;
|
|
3738
|
-
gui;
|
|
3739
|
-
stats;
|
|
3740
|
-
init(app) {
|
|
3741
|
-
this.worker = app.worker;
|
|
3742
|
-
this.thread = app.thread;
|
|
3743
|
-
this.gui = new GUI();
|
|
3744
|
-
this.stats = Stats && new Stats();
|
|
3745
|
-
this.stats.showPanel(0);
|
|
3746
|
-
if (!window) return;
|
|
3747
|
-
window.document.body.appendChild(this.stats.dom);
|
|
3748
|
-
if (window.innerWidth <= 450) this.gui.close();
|
|
3749
|
-
}
|
|
3750
|
-
};
|
|
3751
|
-
RegisterComponent = _ts_decorate25([
|
|
3752
|
-
singleton_default()
|
|
3753
|
-
], RegisterComponent);
|
|
3754
|
-
|
|
3755
|
-
// src/core/register/register.controller.ts
|
|
3756
|
-
import { fromEvent, map, filter as filter5, Subject as Subject9 } from "rxjs";
|
|
3757
|
-
import { copyProperties } from "@quick-threejs/utils";
|
|
3758
|
-
function _ts_decorate26(decorators, target, key, desc) {
|
|
3759
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3760
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3761
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3762
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3763
|
-
}
|
|
3764
|
-
__name(_ts_decorate26, "_ts_decorate");
|
|
3765
|
-
function _ts_metadata18(k, v) {
|
|
3766
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3767
|
-
}
|
|
3768
|
-
__name(_ts_metadata18, "_ts_metadata");
|
|
3769
|
-
function _ts_param18(paramIndex, decorator) {
|
|
3770
|
-
return function(target, key) {
|
|
3771
|
-
decorator(target, key, paramIndex);
|
|
3772
|
-
};
|
|
3773
|
-
}
|
|
3774
|
-
__name(_ts_param18, "_ts_param");
|
|
3775
|
-
var RegisterController = class extends ProxyEventHandlersModel {
|
|
3776
|
-
static {
|
|
3777
|
-
__name(this, "RegisterController");
|
|
3778
|
-
}
|
|
3779
|
-
component;
|
|
3780
|
-
canvas;
|
|
3781
|
-
lifecycle$$;
|
|
3782
|
-
lifecycle$;
|
|
3783
|
-
constructor(component) {
|
|
3784
|
-
super(), this.component = component, this.lifecycle$$ = new Subject9(), this.lifecycle$ = this.lifecycle$$.pipe();
|
|
3785
|
-
}
|
|
3786
|
-
init(canvas) {
|
|
3787
|
-
this.canvas = canvas;
|
|
3788
|
-
for (const key of PROXY_EVENT_LISTENERS) {
|
|
3789
|
-
const eventHandler = key.startsWith("mouse") || key.startsWith("pointer") || key.startsWith("touch") ? this.mouseEventHandler : key.startsWith("key") ? this.keyEventHandler : key === "resize" ? this.uiEventHandler : key === "wheel" ? this.wheelEventHandler : this.preventDefaultHandler;
|
|
3790
|
-
this[`${key}$`] = fromEvent(key === "resize" ? window : canvas, key).pipe(
|
|
3791
|
-
// @ts-ignore
|
|
3792
|
-
map(eventHandler.bind(this)),
|
|
3793
|
-
filter5((e) => key === "keydown" && !e ? false : true)
|
|
3794
|
-
);
|
|
3795
|
-
this[`${key}$`].subscribe((event) => {
|
|
3796
|
-
this.component.thread?.[key]?.(event);
|
|
3797
|
-
});
|
|
3798
|
-
}
|
|
3799
|
-
}
|
|
3800
|
-
preventDefaultHandler(e) {
|
|
3801
|
-
e.preventDefault();
|
|
3802
|
-
return {
|
|
3803
|
-
type: e.type
|
|
3804
|
-
};
|
|
3805
|
-
}
|
|
3806
|
-
getScreenSizes() {
|
|
3807
|
-
return {
|
|
3808
|
-
width: this.canvas.width,
|
|
3809
|
-
height: this.canvas.height,
|
|
3810
|
-
windowWidth: window?.innerWidth ?? 0,
|
|
3811
|
-
windowHeight: window?.innerHeight ?? 0
|
|
3812
|
-
};
|
|
3813
|
-
}
|
|
3814
|
-
uiEventHandler(e) {
|
|
3815
|
-
const rect = this.canvas.getBoundingClientRect();
|
|
3816
|
-
return {
|
|
3817
|
-
...this.getScreenSizes(),
|
|
3818
|
-
type: e.type,
|
|
3819
|
-
top: rect.top,
|
|
3820
|
-
left: rect.left
|
|
3821
|
-
};
|
|
3822
|
-
}
|
|
3823
|
-
mouseEventHandler(e) {
|
|
3824
|
-
return {
|
|
3825
|
-
...this.getScreenSizes(),
|
|
3826
|
-
...copyProperties(e, [
|
|
3827
|
-
"ctrlKey",
|
|
3828
|
-
"metaKey",
|
|
3829
|
-
"shiftKey",
|
|
3830
|
-
"button",
|
|
3831
|
-
"pointerType",
|
|
3832
|
-
"clientX",
|
|
3833
|
-
"clientY",
|
|
3834
|
-
"pageX",
|
|
3835
|
-
"pageY"
|
|
3836
|
-
])
|
|
3837
|
-
};
|
|
3838
|
-
}
|
|
3839
|
-
touchEventHandler(e) {
|
|
3840
|
-
const touches = [];
|
|
3841
|
-
const data = {
|
|
3842
|
-
type: e.type,
|
|
3843
|
-
touches
|
|
3844
|
-
};
|
|
3845
|
-
for (let i = 0; i < e.touches.length; ++i) {
|
|
3846
|
-
const touch = e.touches[i];
|
|
3847
|
-
touches.push({
|
|
3848
|
-
pageX: touch?.pageX ?? 0,
|
|
3849
|
-
pageY: touch?.pageY ?? 0
|
|
3850
|
-
});
|
|
3851
|
-
}
|
|
3852
|
-
return {
|
|
3853
|
-
...this.getScreenSizes(),
|
|
3854
|
-
...data
|
|
3855
|
-
};
|
|
3856
|
-
}
|
|
3857
|
-
wheelEventHandler(e) {
|
|
3858
|
-
e.preventDefault();
|
|
3859
|
-
return {
|
|
3860
|
-
...this.getScreenSizes(),
|
|
3861
|
-
...copyProperties(e, [
|
|
3862
|
-
"deltaX",
|
|
3863
|
-
"deltaY"
|
|
3864
|
-
])
|
|
3865
|
-
};
|
|
3866
|
-
}
|
|
3867
|
-
keyEventHandler(e) {
|
|
3868
|
-
if (!KEYBOARD_EVENT_CODES.includes(e.code)) return void 0;
|
|
3869
|
-
e.preventDefault();
|
|
3870
|
-
return {
|
|
3871
|
-
...this.getScreenSizes(),
|
|
3872
|
-
...copyProperties(e, [
|
|
3873
|
-
"ctrlKey",
|
|
3874
|
-
"metaKey",
|
|
3875
|
-
"shiftKey",
|
|
3876
|
-
"keyCode"
|
|
3877
|
-
])
|
|
3878
|
-
};
|
|
3879
|
-
}
|
|
3880
|
-
};
|
|
3881
|
-
RegisterController = _ts_decorate26([
|
|
3882
|
-
singleton_default(),
|
|
3883
|
-
_ts_param18(0, inject_default(RegisterComponent)),
|
|
3884
|
-
_ts_metadata18("design:type", Function),
|
|
3885
|
-
_ts_metadata18("design:paramtypes", [
|
|
3886
|
-
typeof RegisterComponent === "undefined" ? Object : RegisterComponent
|
|
3887
|
-
])
|
|
3888
|
-
], RegisterController);
|
|
3889
|
-
|
|
3890
|
-
// src/common/serializers/object3d.serializer.ts
|
|
3891
|
-
import { Object3D, ObjectLoader } from "three";
|
|
3892
|
-
import { deserializeJSON, toSerializedJSON } from "@quick-threejs/utils";
|
|
3893
|
-
var objectLoader = new ObjectLoader();
|
|
3894
|
-
var object3DSerializer = {
|
|
3895
|
-
deserialize(message, defaultHandler) {
|
|
3896
|
-
if (message?.isSerialized) return deserializeJSON(message, objectLoader);
|
|
3897
|
-
return defaultHandler(message);
|
|
3898
|
-
},
|
|
3899
|
-
serialize(thing, defaultHandler) {
|
|
3900
|
-
if (thing instanceof Object3D) return toSerializedJSON(thing);
|
|
3901
|
-
return defaultHandler(thing);
|
|
3902
|
-
}
|
|
3903
|
-
};
|
|
3904
|
-
|
|
3905
|
-
// src/common/models/register-props.model.ts
|
|
3906
|
-
var RegisterPropsModel = class {
|
|
3907
|
-
static {
|
|
3908
|
-
__name(this, "RegisterPropsModel");
|
|
3909
|
-
}
|
|
3910
|
-
/**
|
|
3911
|
-
* @description The app worker logic location.
|
|
3912
|
-
*
|
|
3913
|
-
* @required
|
|
3914
|
-
*/
|
|
3915
|
-
location;
|
|
3916
|
-
/**
|
|
3917
|
-
* @description App `canvas` element reference.
|
|
3918
|
-
*
|
|
3919
|
-
* @default undefined
|
|
3920
|
-
*/
|
|
3921
|
-
canvas;
|
|
3922
|
-
/**
|
|
3923
|
-
* @description Set the `canvas` view in fullscreen and auto-resize it.
|
|
3924
|
-
*
|
|
3925
|
-
* @default true
|
|
3926
|
-
*/
|
|
3927
|
-
fullScreen;
|
|
3928
|
-
/**
|
|
3929
|
-
* Default used camera.
|
|
3930
|
-
*
|
|
3931
|
-
* @see {@link DefaultCameraType}
|
|
3932
|
-
*
|
|
3933
|
-
* @default DefaultCameraType.PERSPECTIVE
|
|
3934
|
-
*/
|
|
3935
|
-
defaultCamera;
|
|
3936
|
-
/**
|
|
3937
|
-
* @description Start timer update on launch.
|
|
3938
|
-
*
|
|
3939
|
-
* @default true
|
|
3940
|
-
*/
|
|
3941
|
-
startTimer;
|
|
3942
|
-
/**
|
|
3943
|
-
* Enable the debug mode
|
|
3944
|
-
*
|
|
3945
|
-
* @default undefined
|
|
3946
|
-
*/
|
|
3947
|
-
enableDebug;
|
|
3948
|
-
/**
|
|
3949
|
-
* Define the {@link THREE.AxesHelper} sizes.
|
|
3950
|
-
*
|
|
3951
|
-
* @remark __Deactivated if the value is `0` or `undefined`__
|
|
3952
|
-
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3953
|
-
*
|
|
3954
|
-
* @default undefined
|
|
3955
|
-
*/
|
|
3956
|
-
axesSizes;
|
|
3957
|
-
/**
|
|
3958
|
-
* Define the {@link THREE.GridHelper} sizes.
|
|
3959
|
-
*
|
|
3960
|
-
* @remark __Deactivated if the value is `0` or `undefined`__
|
|
3961
|
-
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3962
|
-
*
|
|
3963
|
-
* @default undefined
|
|
3964
|
-
*/
|
|
3965
|
-
gridSizes;
|
|
3966
|
-
/**
|
|
3967
|
-
* Display a mini perfective camera at the top right corner of the screen.
|
|
3968
|
-
*
|
|
3969
|
-
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3970
|
-
*
|
|
3971
|
-
* @default false
|
|
3972
|
-
*/
|
|
3973
|
-
withMiniCamera;
|
|
3974
|
-
/**
|
|
3975
|
-
* @description Handler called when the app is ready.
|
|
3976
|
-
*
|
|
3977
|
-
* @default undefined
|
|
3978
|
-
*/
|
|
3979
|
-
onReady;
|
|
3980
|
-
};
|
|
3981
|
-
|
|
3982
|
-
// src/common/models/register-proxy-event-handler.model.ts
|
|
3983
|
-
var RegisterProxyEventHandlersModel = class {
|
|
3984
|
-
static {
|
|
3985
|
-
__name(this, "RegisterProxyEventHandlersModel");
|
|
3986
|
-
}
|
|
3987
|
-
contextmenu$;
|
|
3988
|
-
resize$;
|
|
3989
|
-
mousedown$;
|
|
3990
|
-
mousemove$;
|
|
3991
|
-
mouseup$;
|
|
3992
|
-
pointerdown$;
|
|
3993
|
-
pointermove$;
|
|
3994
|
-
pointercancel$;
|
|
3995
|
-
pointerup$;
|
|
3996
|
-
touchstart$;
|
|
3997
|
-
touchmove$;
|
|
3998
|
-
touchend$;
|
|
3999
|
-
wheel$;
|
|
4000
|
-
keydown$;
|
|
4001
|
-
};
|
|
4002
|
-
|
|
4003
|
-
// src/core/register/register.module.ts
|
|
4004
|
-
function _ts_decorate27(decorators, target, key, desc) {
|
|
4005
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4006
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4007
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4008
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4009
|
-
}
|
|
4010
|
-
__name(_ts_decorate27, "_ts_decorate");
|
|
4011
|
-
function _ts_metadata19(k, v) {
|
|
4012
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4013
|
-
}
|
|
4014
|
-
__name(_ts_metadata19, "_ts_metadata");
|
|
4015
|
-
function _ts_param19(paramIndex, decorator) {
|
|
4016
|
-
return function(target, key) {
|
|
4017
|
-
decorator(target, key, paramIndex);
|
|
4018
|
-
};
|
|
4019
|
-
}
|
|
4020
|
-
__name(_ts_param19, "_ts_param");
|
|
4021
|
-
var RegisterModule = class extends RegisterProxyEventHandlersModel {
|
|
4022
|
-
static {
|
|
4023
|
-
__name(this, "RegisterModule");
|
|
4024
|
-
}
|
|
4025
|
-
component;
|
|
4026
|
-
controller;
|
|
4027
|
-
registerProps;
|
|
4028
|
-
constructor(component, controller, registerProps) {
|
|
4029
|
-
super(), this.component = component, this.controller = controller, this.registerProps = registerProps;
|
|
4030
|
-
this.init();
|
|
4031
|
-
}
|
|
4032
|
-
async _initCanvas() {
|
|
4033
|
-
try {
|
|
4034
|
-
this.component.canvas = document.createElement("canvas");
|
|
4035
|
-
if (this.registerProps.canvas instanceof HTMLCanvasElement) this.component.canvas = this.registerProps.canvas;
|
|
4036
|
-
if (typeof this.registerProps.canvas === "string") {
|
|
4037
|
-
const canvas_ = document.querySelector(this.registerProps.canvas);
|
|
4038
|
-
if (canvas_ instanceof HTMLCanvasElement) this.component.canvas = canvas_;
|
|
4039
|
-
}
|
|
4040
|
-
if (!this.component.canvas.parentElement) document.body.appendChild(this.component.canvas);
|
|
4041
|
-
} catch (err) {
|
|
4042
|
-
console.error(`\u{1F6D1} Unable to initialize the canvas:
|
|
4043
|
-
${err?.message ?? "Something went wrong"}`);
|
|
4044
|
-
}
|
|
4045
|
-
}
|
|
4046
|
-
async _initComponent() {
|
|
4047
|
-
this.component.init({
|
|
4048
|
-
worker: this.component.worker,
|
|
4049
|
-
thread: this.component.thread
|
|
4050
|
-
});
|
|
4051
|
-
}
|
|
4052
|
-
async _initController() {
|
|
4053
|
-
this.controller.init(this.component.canvas);
|
|
4054
|
-
if (!this.component.thread || !this.component.worker) return;
|
|
4055
|
-
this.component.thread?.resize?.({
|
|
4056
|
-
...this.controller.uiEventHandler({
|
|
4057
|
-
type: "resize"
|
|
4058
|
-
})
|
|
4059
|
-
});
|
|
4060
|
-
this.component.thread?.lifecycle$().subscribe((state) => {
|
|
4061
|
-
if (state === AppLifecycleState.STEP_STARTED) this.component.stats?.begin();
|
|
4062
|
-
if (state === AppLifecycleState.STEP_ENDED) this.component.stats?.end();
|
|
4063
|
-
});
|
|
4064
|
-
}
|
|
4065
|
-
async _initWorkerThread() {
|
|
4066
|
-
const offscreenCanvas = this.component.canvas.transferControlToOffscreen();
|
|
4067
|
-
offscreenCanvas.width = this.component.canvas.clientWidth;
|
|
4068
|
-
offscreenCanvas.height = this.component.canvas.clientHeight;
|
|
4069
|
-
const app = await this.component.workerPool.run({
|
|
4070
|
-
payload: {
|
|
4071
|
-
path: this.registerProps.location,
|
|
4072
|
-
subject: {
|
|
4073
|
-
...excludeProperties(this.registerProps, [
|
|
4074
|
-
"canvas",
|
|
4075
|
-
"location",
|
|
4076
|
-
"onReady"
|
|
4077
|
-
]),
|
|
4078
|
-
canvas: offscreenCanvas
|
|
4079
|
-
},
|
|
4080
|
-
transferSubject: [
|
|
4081
|
-
offscreenCanvas
|
|
4082
|
-
]
|
|
4083
|
-
}
|
|
4084
|
-
});
|
|
4085
|
-
if (!app.thread || !app.worker) throw new Error("Unable to retrieve app worker info.");
|
|
4086
|
-
this.component.worker = app.worker;
|
|
4087
|
-
this.component.thread = app.thread;
|
|
4088
|
-
}
|
|
4089
|
-
async _initProxyEvents() {
|
|
4090
|
-
PROXY_EVENT_LISTENERS.forEach((key) => this[`${key}$`] = () => this.controller?.[`${key}$`]);
|
|
4091
|
-
}
|
|
4092
|
-
async init() {
|
|
4093
|
-
registerSerializer(object3DSerializer);
|
|
4094
|
-
await this._initCanvas();
|
|
4095
|
-
await this._initWorkerThread();
|
|
4096
|
-
await this._initComponent();
|
|
4097
|
-
await this._initController();
|
|
4098
|
-
await this._initProxyEvents();
|
|
4099
|
-
this.controller.lifecycle$$.next(RegisterLifecycleState.INITIALIZED);
|
|
4100
|
-
this.registerProps.onReady?.(this);
|
|
4101
|
-
}
|
|
4102
|
-
async loadResources(props) {
|
|
4103
|
-
const loaderWorkerThread = await this.component.workerPool.run({
|
|
4104
|
-
payload: {
|
|
4105
|
-
path: "../loader/loader.module-worker.ts",
|
|
4106
|
-
subject: {
|
|
4107
|
-
resources: props.resources
|
|
4108
|
-
}
|
|
4109
|
-
}
|
|
4110
|
-
});
|
|
4111
|
-
loaderWorkerThread.thread?.progress$().subscribe((resource) => {
|
|
4112
|
-
props.onProgress?.(resource);
|
|
4113
|
-
});
|
|
4114
|
-
loaderWorkerThread.thread?.progressCompleted$().subscribe((resource) => {
|
|
4115
|
-
props.onProgressComplete?.(resource);
|
|
4116
|
-
if (props.disposeOnComplete || props.disposeOnComplete === void 0) loaderWorkerThread.thread?.dispose();
|
|
4117
|
-
});
|
|
4118
|
-
if (props.immediateLoad || props.immediateLoad === void 0) await loaderWorkerThread.thread?.load();
|
|
4119
|
-
return {
|
|
4120
|
-
...loaderWorkerThread,
|
|
4121
|
-
load: await loaderWorkerThread.thread?.load,
|
|
4122
|
-
items: await loaderWorkerThread.thread?.items(),
|
|
4123
|
-
loaders: await loaderWorkerThread.thread?.items(),
|
|
4124
|
-
toLoad: await loaderWorkerThread.thread?.toLoad(),
|
|
4125
|
-
loaded: await loaderWorkerThread.thread?.loaded(),
|
|
4126
|
-
resources: await loaderWorkerThread.thread?.resources()
|
|
4127
|
-
};
|
|
4128
|
-
}
|
|
4129
|
-
workerPool() {
|
|
4130
|
-
return this.component.workerPool;
|
|
4131
|
-
}
|
|
4132
|
-
canvas() {
|
|
4133
|
-
return this.component.canvas;
|
|
4134
|
-
}
|
|
4135
|
-
worker() {
|
|
4136
|
-
return this.component.worker;
|
|
4137
|
-
}
|
|
4138
|
-
thread() {
|
|
4139
|
-
return this.component.thread;
|
|
4140
|
-
}
|
|
4141
|
-
gui() {
|
|
4142
|
-
return this.component.gui;
|
|
4143
|
-
}
|
|
4144
|
-
dispose() {
|
|
4145
|
-
this.component.workerPool.terminateAll();
|
|
4146
|
-
this.controller.lifecycle$$.next(RegisterLifecycleState.DISPOSED);
|
|
4147
|
-
}
|
|
4148
|
-
lifecycle$() {
|
|
4149
|
-
return this.controller.lifecycle$;
|
|
4150
|
-
}
|
|
4151
|
-
};
|
|
4152
|
-
RegisterModule = _ts_decorate27([
|
|
4153
|
-
singleton_default(),
|
|
4154
|
-
_ts_param19(0, inject_default(RegisterComponent)),
|
|
4155
|
-
_ts_param19(1, inject_default(RegisterController)),
|
|
4156
|
-
_ts_param19(2, inject_default(RegisterPropsModel)),
|
|
4157
|
-
_ts_metadata19("design:type", Function),
|
|
4158
|
-
_ts_metadata19("design:paramtypes", [
|
|
4159
|
-
typeof RegisterComponent === "undefined" ? Object : RegisterComponent,
|
|
4160
|
-
typeof RegisterController === "undefined" ? Object : RegisterController,
|
|
4161
|
-
typeof RegisterPropsModel === "undefined" ? Object : RegisterPropsModel
|
|
4162
|
-
])
|
|
4163
|
-
], RegisterModule);
|
|
4164
|
-
|
|
4165
|
-
// src/core/register/register.util.ts
|
|
4166
|
-
import { isBoolean, isFunction, isUndefined } from "@quick-threejs/utils";
|
|
4167
|
-
var register = /* @__PURE__ */ __name((props) => {
|
|
4168
|
-
if (typeof props?.location !== "string" && !(props?.location instanceof URL)) throw new Error("Invalid register props detected. location path is required");
|
|
4169
|
-
props.defaultCamera = !(props?.defaultCamera && props.defaultCamera in DefaultCameraType) ? DefaultCameraType.PERSPECTIVE : props.defaultCamera;
|
|
4170
|
-
props.withMiniCamera = isUndefined(props.withMiniCamera) || !isBoolean(props.withMiniCamera) ? false : props.withMiniCamera;
|
|
4171
|
-
props.startTimer = isUndefined(props.startTimer) || !isBoolean(props.startTimer) ? true : props.startTimer;
|
|
4172
|
-
props.fullScreen = isUndefined(props.fullScreen) || !isBoolean(props.fullScreen) ? true : props.fullScreen;
|
|
4173
|
-
props.onReady = !isFunction(props.onReady) ? void 0 : props.onReady;
|
|
4174
|
-
instance.register(RegisterPropsModel, {
|
|
4175
|
-
useValue: props
|
|
4176
|
-
});
|
|
4177
|
-
return instance.resolve(RegisterModule);
|
|
4178
|
-
}, "register");
|
|
4179
|
-
|
|
4180
|
-
// src/common/models/launch-app-props.model.ts
|
|
4181
|
-
var LaunchAppProps = class {
|
|
4182
|
-
static {
|
|
4183
|
-
__name(this, "LaunchAppProps");
|
|
4184
|
-
}
|
|
4185
|
-
/**
|
|
4186
|
-
* @description Handler triggered when the app is ready.
|
|
4187
|
-
*/
|
|
4188
|
-
onReady;
|
|
4189
|
-
};
|
|
4190
|
-
export {
|
|
4191
|
-
AppLifecycleState,
|
|
4192
|
-
AppModule,
|
|
4193
|
-
AppProxyEventHandlersModel,
|
|
4194
|
-
DefaultCameraType,
|
|
4195
|
-
KEYBOARD_EVENT_CODES,
|
|
4196
|
-
LaunchAppProps,
|
|
4197
|
-
LoaderModule,
|
|
4198
|
-
PROXY_EVENT_LISTENERS,
|
|
4199
|
-
ProxyEventHandlersModel,
|
|
4200
|
-
ProxyEventObservablesModel,
|
|
4201
|
-
ProxyEventSubjectsModel,
|
|
4202
|
-
RegisterLifecycleState,
|
|
4203
|
-
RegisterModule,
|
|
4204
|
-
RegisterPropsModel,
|
|
4205
|
-
RegisterProxyEventHandlersModel,
|
|
4206
|
-
appModule,
|
|
4207
|
-
loaderModule,
|
|
4208
|
-
object3DSerializer,
|
|
4209
|
-
register
|
|
4210
|
-
};
|
|
4211
|
-
/*! Bundled license information:
|
|
4212
|
-
|
|
4213
|
-
reflect-metadata/Reflect.js:
|
|
4214
|
-
(*! *****************************************************************************
|
|
4215
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
4216
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4217
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
4218
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4219
|
-
|
|
4220
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4221
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
4222
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
4223
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
4224
|
-
|
|
4225
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
4226
|
-
and limitations under the License.
|
|
4227
|
-
***************************************************************************** *)
|
|
4228
|
-
|
|
4229
|
-
tslib/tslib.es6.js:
|
|
4230
|
-
(*! *****************************************************************************
|
|
4231
|
-
Copyright (c) Microsoft Corporation.
|
|
4232
|
-
|
|
4233
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4234
|
-
purpose with or without fee is hereby granted.
|
|
4235
|
-
|
|
4236
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4237
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4238
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4239
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4240
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4241
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4242
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4243
|
-
***************************************************************************** *)
|
|
4244
|
-
*/
|
|
4245
|
-
//# sourceMappingURL=main.mjs.map
|