@navios/core 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/lib/{index-BJjk2X1S.d.mts → index-6S7veHKD.d.mts} +845 -294
  3. package/lib/index-6S7veHKD.d.mts.map +1 -0
  4. package/lib/{index-DZ6NU03y.d.cts → index-r0i2txmg.d.cts} +845 -294
  5. package/lib/index-r0i2txmg.d.cts.map +1 -0
  6. package/lib/index.cjs +4420 -84
  7. package/lib/index.cjs.map +1 -0
  8. package/lib/index.d.cts +2 -2
  9. package/lib/index.d.mts +2 -2
  10. package/lib/index.mjs +4328 -3
  11. package/lib/index.mjs.map +1 -0
  12. package/lib/legacy-compat/index.cjs +41 -126
  13. package/lib/legacy-compat/index.cjs.map +1 -1
  14. package/lib/legacy-compat/index.d.cts +4 -60
  15. package/lib/legacy-compat/index.d.cts.map +1 -1
  16. package/lib/legacy-compat/index.d.mts +4 -60
  17. package/lib/legacy-compat/index.d.mts.map +1 -1
  18. package/lib/legacy-compat/index.mjs +14 -119
  19. package/lib/legacy-compat/index.mjs.map +1 -1
  20. package/lib/navios.factory-BanZIvtR.cjs +4134 -0
  21. package/lib/navios.factory-BanZIvtR.cjs.map +1 -0
  22. package/lib/navios.factory-C75yZCoD.mjs +3831 -0
  23. package/lib/navios.factory-C75yZCoD.mjs.map +1 -0
  24. package/lib/testing/index.cjs +3 -3
  25. package/lib/testing/index.cjs.map +1 -1
  26. package/lib/testing/index.d.cts +1 -1
  27. package/lib/testing/index.d.mts +1 -1
  28. package/lib/testing/index.mjs +2 -2
  29. package/lib/tokens-4J9sredA.mjs +100 -0
  30. package/lib/tokens-4J9sredA.mjs.map +1 -0
  31. package/lib/tokens-BuXXB01L.cjs +196 -0
  32. package/lib/tokens-BuXXB01L.cjs.map +1 -0
  33. package/lib/{use-guards.decorator-Be_QUx6b.mjs → use-guards.decorator-BecoQSmE.mjs} +3 -70
  34. package/lib/use-guards.decorator-BecoQSmE.mjs.map +1 -0
  35. package/lib/{use-guards.decorator-B6tghdxM.cjs → use-guards.decorator-DgD-kxF5.cjs} +7 -158
  36. package/lib/use-guards.decorator-DgD-kxF5.cjs.map +1 -0
  37. package/package.json +4 -4
  38. package/src/__tests__/attribute.factory.spec.mts +300 -0
  39. package/src/__tests__/console-logger.service.spec.mts +312 -0
  40. package/src/__tests__/guard-runner.service.spec.mts +399 -0
  41. package/src/__tests__/logger.service.spec.mts +147 -0
  42. package/src/__tests__/responders.spec.mts +6 -5
  43. package/src/factories/adapter.factory.mts +20 -0
  44. package/src/factories/endpoint-adapter.factory.mts +1 -1
  45. package/src/factories/http-adapter.factory.mts +1 -1
  46. package/src/factories/index.mts +1 -0
  47. package/src/factories/multipart-adapter.factory.mts +1 -1
  48. package/src/factories/reply.factory.mts +1 -1
  49. package/src/factories/request.factory.mts +1 -1
  50. package/src/factories/stream-adapter.factory.mts +1 -1
  51. package/src/factories/xml-stream-adapter.factory.mts +1 -1
  52. package/src/index.mts +1 -0
  53. package/src/interfaces/abstract-adapter.interface.mts +32 -0
  54. package/src/interfaces/abstract-http-adapter.interface.mts +27 -20
  55. package/src/interfaces/abstract-http-handler-adapter.interface.mts +86 -2
  56. package/src/interfaces/adapter-environment.interface.mts +74 -0
  57. package/src/interfaces/index.mts +2 -0
  58. package/src/interfaces/plugin.interface.mts +50 -16
  59. package/src/legacy-compat/attribute.factory.mts +2 -2
  60. package/src/legacy-compat/decorators/controller.decorator.mts +1 -1
  61. package/src/legacy-compat/decorators/endpoint.decorator.mts +1 -1
  62. package/src/legacy-compat/decorators/header.decorator.mts +2 -1
  63. package/src/legacy-compat/decorators/http-code.decorator.mts +2 -1
  64. package/src/legacy-compat/decorators/index.mts +2 -2
  65. package/src/legacy-compat/decorators/module.decorator.mts +1 -1
  66. package/src/legacy-compat/decorators/multipart.decorator.mts +1 -1
  67. package/src/legacy-compat/decorators/stream.decorator.mts +1 -1
  68. package/src/legacy-compat/decorators/use-guards.decorator.mts +1 -1
  69. package/src/legacy-compat/index.mts +10 -5
  70. package/src/logger/console-logger.service.mts +97 -7
  71. package/src/metadata/module.metadata.mts +43 -0
  72. package/src/navios.application.mts +172 -60
  73. package/src/navios.environment.mts +22 -12
  74. package/src/navios.factory.mts +31 -10
  75. package/src/services/abstract-handler-adapter.service.mts +366 -0
  76. package/src/services/index.mts +1 -0
  77. package/src/services/module-loader.service.mts +1 -0
  78. package/src/tokens/adapter.token.mts +6 -0
  79. package/src/tokens/http-adapter.token.mts +1 -1
  80. package/src/tokens/index.mts +1 -0
  81. package/src/utils/adapter-supports.util.mts +47 -0
  82. package/src/utils/index.mts +1 -0
  83. package/lib/index-BJjk2X1S.d.mts.map +0 -1
  84. package/lib/index-DZ6NU03y.d.cts.map +0 -1
  85. package/lib/src-C46ePe3d.cjs +0 -8022
  86. package/lib/src-C46ePe3d.cjs.map +0 -1
  87. package/lib/src-K2k0riYJ.mjs +0 -7587
  88. package/lib/src-K2k0riYJ.mjs.map +0 -1
  89. package/lib/use-guards.decorator-B6tghdxM.cjs.map +0 -1
  90. package/lib/use-guards.decorator-Be_QUx6b.mjs.map +0 -1
  91. package/src/legacy-compat/context-compat.mts +0 -95
  92. package/src/legacy-compat/decorators/factory.decorator.mts +0 -37
  93. package/src/legacy-compat/decorators/injectable.decorator.mts +0 -41
package/lib/index.cjs CHANGED
@@ -1,204 +1,4540 @@
1
- const require_src = require('./src-C46ePe3d.cjs');
2
- const require_use_guards_decorator = require('./use-guards.decorator-B6tghdxM.cjs');
1
+ const require_navios_factory = require('./navios.factory-BanZIvtR.cjs');
2
+ const require_use_guards_decorator = require('./use-guards.decorator-DgD-kxF5.cjs');
3
+ const require_tokens = require('./tokens-BuXXB01L.cjs');
4
+ let _navios_di = require("@navios/di");
5
+ let node_process = require("node:process");
6
+ let zod_v4 = require("zod/v4");
7
+ let _navios_builder = require("@navios/builder");
3
8
 
4
- exports.AttributeFactory = require_src.AttributeFactory;
5
- exports.BadRequestException = require_src.BadRequestException;
6
- exports.ConfigProviderOptions = require_src.ConfigProviderOptions;
9
+ //#region src/config/utils/helpers.mts
10
+ function envInt(key, defaultValue) {
11
+ const envKey = node_process.env[key] || process.env[key];
12
+ return envKey ? parseInt(envKey, 10) : defaultValue;
13
+ }
14
+ function envString(key, defaultValue) {
15
+ return node_process.env[key] || process.env[key] || defaultValue || void 0;
16
+ }
17
+
18
+ //#endregion
19
+ //#region src/config/config.service.mts
20
+ function applyDecs2203RFactory$12() {
21
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
22
+ return function addInitializer(initializer) {
23
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
24
+ assertCallable(initializer, "An initializer");
25
+ initializers.push(initializer);
26
+ };
27
+ }
28
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
29
+ var kindStr;
30
+ switch (kind) {
31
+ case 1:
32
+ kindStr = "accessor";
33
+ break;
34
+ case 2:
35
+ kindStr = "method";
36
+ break;
37
+ case 3:
38
+ kindStr = "getter";
39
+ break;
40
+ case 4:
41
+ kindStr = "setter";
42
+ break;
43
+ default: kindStr = "field";
44
+ }
45
+ var ctx = {
46
+ kind: kindStr,
47
+ name: isPrivate ? "#" + name : name,
48
+ static: isStatic,
49
+ private: isPrivate,
50
+ metadata
51
+ };
52
+ var decoratorFinishedRef = { v: false };
53
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
54
+ var get, set;
55
+ if (kind === 0) if (isPrivate) {
56
+ get = desc.get;
57
+ set = desc.set;
58
+ } else {
59
+ get = function() {
60
+ return this[name];
61
+ };
62
+ set = function(v) {
63
+ this[name] = v;
64
+ };
65
+ }
66
+ else if (kind === 2) get = function() {
67
+ return desc.value;
68
+ };
69
+ else {
70
+ if (kind === 1 || kind === 3) get = function() {
71
+ return desc.get.call(this);
72
+ };
73
+ if (kind === 1 || kind === 4) set = function(v) {
74
+ desc.set.call(this, v);
75
+ };
76
+ }
77
+ ctx.access = get && set ? {
78
+ get,
79
+ set
80
+ } : get ? { get } : { set };
81
+ try {
82
+ return dec(value, ctx);
83
+ } finally {
84
+ decoratorFinishedRef.v = true;
85
+ }
86
+ }
87
+ function assertNotFinished(decoratorFinishedRef, fnName) {
88
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
89
+ }
90
+ function assertCallable(fn, hint) {
91
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
92
+ }
93
+ function assertValidReturnValue(kind, value) {
94
+ var type = typeof value;
95
+ if (kind === 1) {
96
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
97
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
98
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
99
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
100
+ } else if (type !== "function") {
101
+ var hint;
102
+ if (kind === 0) hint = "field";
103
+ else if (kind === 10) hint = "class";
104
+ else hint = "method";
105
+ throw new TypeError(hint + " decorators must return a function or void 0");
106
+ }
107
+ }
108
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
109
+ var decs = decInfo[0];
110
+ var desc, init, value;
111
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
112
+ get: decInfo[3],
113
+ set: decInfo[4]
114
+ };
115
+ else if (kind === 3) desc = { get: decInfo[3] };
116
+ else if (kind === 4) desc = { set: decInfo[3] };
117
+ else desc = { value: decInfo[3] };
118
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
119
+ if (kind === 1) value = {
120
+ get: desc.get,
121
+ set: desc.set
122
+ };
123
+ else if (kind === 2) value = desc.value;
124
+ else if (kind === 3) value = desc.get;
125
+ else if (kind === 4) value = desc.set;
126
+ var newValue, get, set;
127
+ if (typeof decs === "function") {
128
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
129
+ if (newValue !== void 0) {
130
+ assertValidReturnValue(kind, newValue);
131
+ if (kind === 0) init = newValue;
132
+ else if (kind === 1) {
133
+ init = newValue.init;
134
+ get = newValue.get || value.get;
135
+ set = newValue.set || value.set;
136
+ value = {
137
+ get,
138
+ set
139
+ };
140
+ } else value = newValue;
141
+ }
142
+ } else for (var i = decs.length - 1; i >= 0; i--) {
143
+ var dec = decs[i];
144
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
145
+ if (newValue !== void 0) {
146
+ assertValidReturnValue(kind, newValue);
147
+ var newInit;
148
+ if (kind === 0) newInit = newValue;
149
+ else if (kind === 1) {
150
+ newInit = newValue.init;
151
+ get = newValue.get || value.get;
152
+ set = newValue.set || value.set;
153
+ value = {
154
+ get,
155
+ set
156
+ };
157
+ } else value = newValue;
158
+ if (newInit !== void 0) if (init === void 0) init = newInit;
159
+ else if (typeof init === "function") init = [init, newInit];
160
+ else init.push(newInit);
161
+ }
162
+ }
163
+ if (kind === 0 || kind === 1) {
164
+ if (init === void 0) init = function(instance, init$1) {
165
+ return init$1;
166
+ };
167
+ else if (typeof init !== "function") {
168
+ var ownInitializers = init;
169
+ init = function(instance, init$1) {
170
+ var value$1 = init$1;
171
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
172
+ return value$1;
173
+ };
174
+ } else {
175
+ var originalInitializer = init;
176
+ init = function(instance, init$1) {
177
+ return originalInitializer.call(instance, init$1);
178
+ };
179
+ }
180
+ ret.push(init);
181
+ }
182
+ if (kind !== 0) {
183
+ if (kind === 1) {
184
+ desc.get = value.get;
185
+ desc.set = value.set;
186
+ } else if (kind === 2) desc.value = value;
187
+ else if (kind === 3) desc.get = value;
188
+ else if (kind === 4) desc.set = value;
189
+ if (isPrivate) if (kind === 1) {
190
+ ret.push(function(instance, args) {
191
+ return value.get.call(instance, args);
192
+ });
193
+ ret.push(function(instance, args) {
194
+ return value.set.call(instance, args);
195
+ });
196
+ } else if (kind === 2) ret.push(value);
197
+ else ret.push(function(instance, args) {
198
+ return value.call(instance, args);
199
+ });
200
+ else Object.defineProperty(base, name, desc);
201
+ }
202
+ }
203
+ function applyMemberDecs(Class, decInfos, metadata) {
204
+ var ret = [];
205
+ var protoInitializers;
206
+ var staticInitializers;
207
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
208
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
209
+ for (var i = 0; i < decInfos.length; i++) {
210
+ var decInfo = decInfos[i];
211
+ if (!Array.isArray(decInfo)) continue;
212
+ var kind = decInfo[1];
213
+ var name = decInfo[2];
214
+ var isPrivate = decInfo.length > 3;
215
+ var isStatic = kind >= 5;
216
+ var base;
217
+ var initializers;
218
+ if (isStatic) {
219
+ base = Class;
220
+ kind = kind - 5;
221
+ staticInitializers = staticInitializers || [];
222
+ initializers = staticInitializers;
223
+ } else {
224
+ base = Class.prototype;
225
+ protoInitializers = protoInitializers || [];
226
+ initializers = protoInitializers;
227
+ }
228
+ if (kind !== 0 && !isPrivate) {
229
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
230
+ var existingKind = existingNonFields.get(name) || 0;
231
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
232
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
233
+ else existingNonFields.set(name, true);
234
+ }
235
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
236
+ }
237
+ pushInitializers(ret, protoInitializers);
238
+ pushInitializers(ret, staticInitializers);
239
+ return ret;
240
+ }
241
+ function pushInitializers(ret, initializers) {
242
+ if (initializers) ret.push(function(instance) {
243
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
244
+ return instance;
245
+ });
246
+ }
247
+ function applyClassDecs(targetClass, classDecs, metadata) {
248
+ if (classDecs.length > 0) {
249
+ var initializers = [];
250
+ var newClass = targetClass;
251
+ var name = targetClass.name;
252
+ for (var i = classDecs.length - 1; i >= 0; i--) {
253
+ var decoratorFinishedRef = { v: false };
254
+ try {
255
+ var nextNewClass = classDecs[i](newClass, {
256
+ kind: "class",
257
+ name,
258
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
259
+ metadata
260
+ });
261
+ } finally {
262
+ decoratorFinishedRef.v = true;
263
+ }
264
+ if (nextNewClass !== void 0) {
265
+ assertValidReturnValue(10, nextNewClass);
266
+ newClass = nextNewClass;
267
+ }
268
+ }
269
+ return [defineMetadata(newClass, metadata), function() {
270
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
271
+ }];
272
+ }
273
+ }
274
+ function defineMetadata(Class, metadata) {
275
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
276
+ configurable: true,
277
+ enumerable: true,
278
+ value: metadata
279
+ });
280
+ }
281
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
282
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
283
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
284
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
285
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
286
+ return {
287
+ e,
288
+ get c() {
289
+ return applyClassDecs(targetClass, classDecs, metadata);
290
+ }
291
+ };
292
+ };
293
+ }
294
+ function _apply_decs_2203_r$12(targetClass, memberDecs, classDecs, parentClass) {
295
+ return (_apply_decs_2203_r$12 = applyDecs2203RFactory$12())(targetClass, memberDecs, classDecs, parentClass);
296
+ }
297
+ var _dec$12, _initClass$12;
298
+ /**
299
+ * Schema for validating configuration service options.
300
+ */ const ConfigServiceOptionsSchema = zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown());
301
+ /**
302
+ * Injection token for ConfigService.
303
+ */ const ConfigServiceToken = _navios_di.InjectionToken.create(Symbol.for("ConfigService"), ConfigServiceOptionsSchema);
304
+ let _ConfigService;
305
+ _dec$12 = (0, _navios_di.Injectable)({ token: ConfigServiceToken });
306
+ var ConfigService = class {
307
+ config;
308
+ static {
309
+ ({c: [_ConfigService, _initClass$12]} = _apply_decs_2203_r$12(this, [], [_dec$12]));
310
+ }
311
+ /**
312
+ * Creates a new ConfigService instance.
313
+ *
314
+ * @param config - The configuration object
315
+ */ constructor(config = {}) {
316
+ this.config = config;
317
+ }
318
+ logger = (0, _navios_di.inject)(require_navios_factory.Logger, { context: _ConfigService.name });
319
+ /**
320
+ * Gets the entire configuration object.
321
+ *
322
+ * @returns The complete configuration object
323
+ */ getConfig() {
324
+ return this.config;
325
+ }
326
+ /**
327
+ * Gets a configuration value by key path.
328
+ *
329
+ * Returns `null` if the key is not found or if any part of the path is invalid.
330
+ *
331
+ * @param key - Dot-separated path to the configuration value (e.g., 'database.host')
332
+ * @returns The configuration value or `null` if not found
333
+ *
334
+ * @example
335
+ * ```typescript
336
+ * const host = config.get('database.host') // string | null
337
+ * const port = config.get('database.port') // number | null
338
+ * ```
339
+ */ get(key) {
340
+ try {
341
+ const parts = String(key).split(".");
342
+ let value = this.config;
343
+ for (const part of parts) {
344
+ if (value === null || value === void 0 || typeof value !== "object") return null;
345
+ value = value[part];
346
+ }
347
+ return value ?? null;
348
+ } catch (error) {
349
+ this.logger.debug?.(`Failed to get config value for key ${String(key)}`, error);
350
+ return null;
351
+ }
352
+ }
353
+ /**
354
+ * Gets a configuration value by key path, or returns a default value if not found.
355
+ *
356
+ * @param key - Dot-separated path to the configuration value
357
+ * @param defaultValue - Default value to return if the key is not found
358
+ * @returns The configuration value or the default value
359
+ *
360
+ * @example
361
+ * ```typescript
362
+ * const port = config.getOrDefault('database.port', 5432) // number
363
+ * ```
364
+ */ getOrDefault(key, defaultValue) {
365
+ const value = this.get(key);
366
+ return value !== null ? value : defaultValue;
367
+ }
368
+ /**
369
+ * Gets a configuration value by key path, or throws an error if not found.
370
+ *
371
+ * @param key - Dot-separated path to the configuration value
372
+ * @param errorMessage - Optional custom error message
373
+ * @returns The configuration value
374
+ * @throws Error if the key is not found
375
+ *
376
+ * @example
377
+ * ```typescript
378
+ * const host = config.getOrThrow('database.host') // string (throws if not found)
379
+ * const apiKey = config.getOrThrow('api.key', 'API key is required') // string
380
+ * ```
381
+ */ getOrThrow(key, errorMessage) {
382
+ const value = this.get(key);
383
+ if (value === null) {
384
+ const message = errorMessage || `Configuration value for key "${String(key)}" is not defined`;
385
+ this.logger.error(message);
386
+ throw new _navios_builder.NaviosError(message);
387
+ }
388
+ return value;
389
+ }
390
+ static {
391
+ _initClass$12();
392
+ }
393
+ };
394
+
395
+ //#endregion
396
+ //#region src/config/config.provider.mts
397
+ /**
398
+ * Schema for configuration provider options.
399
+ */ const ConfigProviderOptions = zod_v4.z.object({ load: zod_v4.z.function({ output: ConfigServiceOptionsSchema }) });
400
+ /**
401
+ * Creates a factory injection token for ConfigService that loads configuration asynchronously.
402
+ *
403
+ * Use this when you need to load configuration from a file, database, or other async source.
404
+ *
405
+ * @param options - Configuration provider options
406
+ * @param options.load - Async function that loads and returns the configuration object
407
+ * @returns A factory injection token for ConfigService
408
+ *
409
+ * @example
410
+ * ```typescript
411
+ * const MyConfigService = provideConfig({
412
+ * load: async () => {
413
+ * const config = await loadConfigFromFile('config.json')
414
+ * return config
415
+ * },
416
+ * })
417
+ *
418
+ * // Use in module setup
419
+ * container.bind(ConfigServiceToken).toFactory(configProvider)
420
+ * ```
421
+ */ function provideConfig(options) {
422
+ return _navios_di.InjectionToken.factory(ConfigServiceToken, async () => options.load());
423
+ }
424
+ /**
425
+ * Pre-configured ConfigService provider that uses environment variables.
426
+ *
427
+ * Provides a ConfigService instance bound to `process.env`.
428
+ *
429
+ * @example
430
+ * ```typescript
431
+ * // Use environment variables as configuration
432
+ * container.bind(ConfigServiceToken).toValue(EnvConfigProvider)
433
+ * ```
434
+ */ const EnvConfigProvider = _navios_di.InjectionToken.bound(ConfigServiceToken, { ...node_process.env });
435
+
436
+ //#endregion
437
+ //#region src/exceptions/bad-request.exception.mts
438
+ /**
439
+ * Exception that represents a 400 Bad Request HTTP error.
440
+ *
441
+ * Use this exception when the client's request is malformed or invalid.
442
+ *
443
+ * @example
444
+ * ```typescript
445
+ * @Endpoint(createUserEndpoint)
446
+ * async createUser(request: EndpointParams<typeof createUserEndpoint>) {
447
+ * if (!request.data.email) {
448
+ * throw new BadRequestException('Email is required')
449
+ * }
450
+ * // ...
451
+ * }
452
+ * ```
453
+ */ var BadRequestException = class extends require_navios_factory.HttpException {
454
+ /**
455
+ * Creates a new BadRequestException.
456
+ *
457
+ * @param message - Error message or response object
458
+ */ constructor(message) {
459
+ super(400, message);
460
+ }
461
+ };
462
+
463
+ //#endregion
464
+ //#region src/exceptions/forbidden.exception.mts
465
+ /**
466
+ * Exception that represents a 403 Forbidden HTTP error.
467
+ *
468
+ * Use this exception when the client is authenticated but does not have
469
+ * permission to access the requested resource.
470
+ *
471
+ * @example
472
+ * ```typescript
473
+ * @Endpoint(deleteUserEndpoint)
474
+ * @UseGuards(AuthGuard, RoleGuard)
475
+ * async deleteUser(request: EndpointParams<typeof deleteUserEndpoint>) {
476
+ * if (!this.userService.hasPermission(request.user, 'delete')) {
477
+ * throw new ForbiddenException('Insufficient permissions')
478
+ * }
479
+ * // ...
480
+ * }
481
+ * ```
482
+ */ var ForbiddenException = class extends require_navios_factory.HttpException {
483
+ /**
484
+ * Creates a new ForbiddenException.
485
+ *
486
+ * @param message - Error message
487
+ */ constructor(message) {
488
+ super(403, message);
489
+ }
490
+ };
491
+
492
+ //#endregion
493
+ //#region src/exceptions/internal-server-error.exception.mts
494
+ /**
495
+ * Exception that represents a 500 Internal Server Error HTTP error.
496
+ *
497
+ * Use this exception when an unexpected error occurs on the server.
498
+ * Generally, you should let unhandled errors bubble up rather than catching
499
+ * and rethrowing as InternalServerErrorException, as Navios will handle them appropriately.
500
+ *
501
+ * @example
502
+ * ```typescript
503
+ * @Endpoint(processPaymentEndpoint)
504
+ * async processPayment(request: EndpointParams<typeof processPaymentEndpoint>) {
505
+ * try {
506
+ * return await this.paymentService.process(request.data)
507
+ * } catch (error) {
508
+ * this.logger.error('Payment processing failed', error)
509
+ * throw new InternalServerErrorException('Payment processing failed', error)
510
+ * }
511
+ * }
512
+ * ```
513
+ */ var InternalServerErrorException = class extends require_navios_factory.HttpException {
514
+ /**
515
+ * Creates a new InternalServerErrorException.
516
+ *
517
+ * @param message - Error message or response object
518
+ * @param error - Optional underlying error for logging
519
+ */ constructor(message, error) {
520
+ super(500, message, error);
521
+ }
522
+ };
523
+
524
+ //#endregion
525
+ //#region src/exceptions/not-found.exception.mts
526
+ /**
527
+ * Exception that represents a 404 Not Found HTTP error.
528
+ *
529
+ * Use this exception when the requested resource does not exist.
530
+ *
531
+ * @example
532
+ * ```typescript
533
+ * @Endpoint(getUserEndpoint)
534
+ * async getUser(request: EndpointParams<typeof getUserEndpoint>) {
535
+ * const user = await this.userService.findById(request.urlParams.userId)
536
+ * if (!user) {
537
+ * throw new NotFoundException('User not found')
538
+ * }
539
+ * return user
540
+ * }
541
+ * ```
542
+ */ var NotFoundException = class extends require_navios_factory.HttpException {
543
+ response;
544
+ error;
545
+ /**
546
+ * Creates a new NotFoundException.
547
+ *
548
+ * @param response - Error message or response object
549
+ * @param error - Optional underlying error for logging
550
+ */ constructor(response, error) {
551
+ super(404, response, error), this.response = response, this.error = error;
552
+ }
553
+ };
554
+
555
+ //#endregion
556
+ //#region src/exceptions/unauthorized.exception.mts
557
+ /**
558
+ * Exception that represents a 401 Unauthorized HTTP error.
559
+ *
560
+ * Use this exception when the client is not authenticated or authentication failed.
561
+ *
562
+ * @example
563
+ * ```typescript
564
+ * @Endpoint(getUserEndpoint)
565
+ * @UseGuards(AuthGuard)
566
+ * async getUser(request: EndpointParams<typeof getUserEndpoint>) {
567
+ * if (!request.headers.authorization) {
568
+ * throw new UnauthorizedException('Authentication required')
569
+ * }
570
+ * // ...
571
+ * }
572
+ * ```
573
+ */ var UnauthorizedException = class extends require_navios_factory.HttpException {
574
+ /**
575
+ * Creates a new UnauthorizedException.
576
+ *
577
+ * @param message - Error message or response object
578
+ * @param error - Optional underlying error for logging
579
+ */ constructor(message, error) {
580
+ super(401, message, error);
581
+ }
582
+ };
583
+
584
+ //#endregion
585
+ //#region src/exceptions/conflict.exception.mts
586
+ /**
587
+ * Exception that represents a 409 Conflict HTTP error.
588
+ *
589
+ * Use this exception when the request conflicts with the current state of the resource
590
+ * (e.g., trying to create a resource that already exists).
591
+ *
592
+ * @example
593
+ * ```typescript
594
+ * @Endpoint(createUserEndpoint)
595
+ * async createUser(request: EndpointParams<typeof createUserEndpoint>) {
596
+ * const existing = await this.userService.findByEmail(request.data.email)
597
+ * if (existing) {
598
+ * throw new ConflictException('User with this email already exists')
599
+ * }
600
+ * // ...
601
+ * }
602
+ * ```
603
+ */ var ConflictException = class extends require_navios_factory.HttpException {
604
+ /**
605
+ * Creates a new ConflictException.
606
+ *
607
+ * @param message - Error message or response object
608
+ * @param error - Optional underlying error for logging
609
+ */ constructor(message, error) {
610
+ super(409, message, error);
611
+ }
612
+ };
613
+
614
+ //#endregion
615
+ //#region src/responders/services/forbidden-responder.service.mts
616
+ function applyDecs2203RFactory$11() {
617
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
618
+ return function addInitializer(initializer) {
619
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
620
+ assertCallable(initializer, "An initializer");
621
+ initializers.push(initializer);
622
+ };
623
+ }
624
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
625
+ var kindStr;
626
+ switch (kind) {
627
+ case 1:
628
+ kindStr = "accessor";
629
+ break;
630
+ case 2:
631
+ kindStr = "method";
632
+ break;
633
+ case 3:
634
+ kindStr = "getter";
635
+ break;
636
+ case 4:
637
+ kindStr = "setter";
638
+ break;
639
+ default: kindStr = "field";
640
+ }
641
+ var ctx = {
642
+ kind: kindStr,
643
+ name: isPrivate ? "#" + name : name,
644
+ static: isStatic,
645
+ private: isPrivate,
646
+ metadata
647
+ };
648
+ var decoratorFinishedRef = { v: false };
649
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
650
+ var get, set;
651
+ if (kind === 0) if (isPrivate) {
652
+ get = desc.get;
653
+ set = desc.set;
654
+ } else {
655
+ get = function() {
656
+ return this[name];
657
+ };
658
+ set = function(v) {
659
+ this[name] = v;
660
+ };
661
+ }
662
+ else if (kind === 2) get = function() {
663
+ return desc.value;
664
+ };
665
+ else {
666
+ if (kind === 1 || kind === 3) get = function() {
667
+ return desc.get.call(this);
668
+ };
669
+ if (kind === 1 || kind === 4) set = function(v) {
670
+ desc.set.call(this, v);
671
+ };
672
+ }
673
+ ctx.access = get && set ? {
674
+ get,
675
+ set
676
+ } : get ? { get } : { set };
677
+ try {
678
+ return dec(value, ctx);
679
+ } finally {
680
+ decoratorFinishedRef.v = true;
681
+ }
682
+ }
683
+ function assertNotFinished(decoratorFinishedRef, fnName) {
684
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
685
+ }
686
+ function assertCallable(fn, hint) {
687
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
688
+ }
689
+ function assertValidReturnValue(kind, value) {
690
+ var type = typeof value;
691
+ if (kind === 1) {
692
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
693
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
694
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
695
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
696
+ } else if (type !== "function") {
697
+ var hint;
698
+ if (kind === 0) hint = "field";
699
+ else if (kind === 10) hint = "class";
700
+ else hint = "method";
701
+ throw new TypeError(hint + " decorators must return a function or void 0");
702
+ }
703
+ }
704
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
705
+ var decs = decInfo[0];
706
+ var desc, init, value;
707
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
708
+ get: decInfo[3],
709
+ set: decInfo[4]
710
+ };
711
+ else if (kind === 3) desc = { get: decInfo[3] };
712
+ else if (kind === 4) desc = { set: decInfo[3] };
713
+ else desc = { value: decInfo[3] };
714
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
715
+ if (kind === 1) value = {
716
+ get: desc.get,
717
+ set: desc.set
718
+ };
719
+ else if (kind === 2) value = desc.value;
720
+ else if (kind === 3) value = desc.get;
721
+ else if (kind === 4) value = desc.set;
722
+ var newValue, get, set;
723
+ if (typeof decs === "function") {
724
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
725
+ if (newValue !== void 0) {
726
+ assertValidReturnValue(kind, newValue);
727
+ if (kind === 0) init = newValue;
728
+ else if (kind === 1) {
729
+ init = newValue.init;
730
+ get = newValue.get || value.get;
731
+ set = newValue.set || value.set;
732
+ value = {
733
+ get,
734
+ set
735
+ };
736
+ } else value = newValue;
737
+ }
738
+ } else for (var i = decs.length - 1; i >= 0; i--) {
739
+ var dec = decs[i];
740
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
741
+ if (newValue !== void 0) {
742
+ assertValidReturnValue(kind, newValue);
743
+ var newInit;
744
+ if (kind === 0) newInit = newValue;
745
+ else if (kind === 1) {
746
+ newInit = newValue.init;
747
+ get = newValue.get || value.get;
748
+ set = newValue.set || value.set;
749
+ value = {
750
+ get,
751
+ set
752
+ };
753
+ } else value = newValue;
754
+ if (newInit !== void 0) if (init === void 0) init = newInit;
755
+ else if (typeof init === "function") init = [init, newInit];
756
+ else init.push(newInit);
757
+ }
758
+ }
759
+ if (kind === 0 || kind === 1) {
760
+ if (init === void 0) init = function(instance, init$1) {
761
+ return init$1;
762
+ };
763
+ else if (typeof init !== "function") {
764
+ var ownInitializers = init;
765
+ init = function(instance, init$1) {
766
+ var value$1 = init$1;
767
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
768
+ return value$1;
769
+ };
770
+ } else {
771
+ var originalInitializer = init;
772
+ init = function(instance, init$1) {
773
+ return originalInitializer.call(instance, init$1);
774
+ };
775
+ }
776
+ ret.push(init);
777
+ }
778
+ if (kind !== 0) {
779
+ if (kind === 1) {
780
+ desc.get = value.get;
781
+ desc.set = value.set;
782
+ } else if (kind === 2) desc.value = value;
783
+ else if (kind === 3) desc.get = value;
784
+ else if (kind === 4) desc.set = value;
785
+ if (isPrivate) if (kind === 1) {
786
+ ret.push(function(instance, args) {
787
+ return value.get.call(instance, args);
788
+ });
789
+ ret.push(function(instance, args) {
790
+ return value.set.call(instance, args);
791
+ });
792
+ } else if (kind === 2) ret.push(value);
793
+ else ret.push(function(instance, args) {
794
+ return value.call(instance, args);
795
+ });
796
+ else Object.defineProperty(base, name, desc);
797
+ }
798
+ }
799
+ function applyMemberDecs(Class, decInfos, metadata) {
800
+ var ret = [];
801
+ var protoInitializers;
802
+ var staticInitializers;
803
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
804
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
805
+ for (var i = 0; i < decInfos.length; i++) {
806
+ var decInfo = decInfos[i];
807
+ if (!Array.isArray(decInfo)) continue;
808
+ var kind = decInfo[1];
809
+ var name = decInfo[2];
810
+ var isPrivate = decInfo.length > 3;
811
+ var isStatic = kind >= 5;
812
+ var base;
813
+ var initializers;
814
+ if (isStatic) {
815
+ base = Class;
816
+ kind = kind - 5;
817
+ staticInitializers = staticInitializers || [];
818
+ initializers = staticInitializers;
819
+ } else {
820
+ base = Class.prototype;
821
+ protoInitializers = protoInitializers || [];
822
+ initializers = protoInitializers;
823
+ }
824
+ if (kind !== 0 && !isPrivate) {
825
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
826
+ var existingKind = existingNonFields.get(name) || 0;
827
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
828
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
829
+ else existingNonFields.set(name, true);
830
+ }
831
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
832
+ }
833
+ pushInitializers(ret, protoInitializers);
834
+ pushInitializers(ret, staticInitializers);
835
+ return ret;
836
+ }
837
+ function pushInitializers(ret, initializers) {
838
+ if (initializers) ret.push(function(instance) {
839
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
840
+ return instance;
841
+ });
842
+ }
843
+ function applyClassDecs(targetClass, classDecs, metadata) {
844
+ if (classDecs.length > 0) {
845
+ var initializers = [];
846
+ var newClass = targetClass;
847
+ var name = targetClass.name;
848
+ for (var i = classDecs.length - 1; i >= 0; i--) {
849
+ var decoratorFinishedRef = { v: false };
850
+ try {
851
+ var nextNewClass = classDecs[i](newClass, {
852
+ kind: "class",
853
+ name,
854
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
855
+ metadata
856
+ });
857
+ } finally {
858
+ decoratorFinishedRef.v = true;
859
+ }
860
+ if (nextNewClass !== void 0) {
861
+ assertValidReturnValue(10, nextNewClass);
862
+ newClass = nextNewClass;
863
+ }
864
+ }
865
+ return [defineMetadata(newClass, metadata), function() {
866
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
867
+ }];
868
+ }
869
+ }
870
+ function defineMetadata(Class, metadata) {
871
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
872
+ configurable: true,
873
+ enumerable: true,
874
+ value: metadata
875
+ });
876
+ }
877
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
878
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
879
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
880
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
881
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
882
+ return {
883
+ e,
884
+ get c() {
885
+ return applyClassDecs(targetClass, classDecs, metadata);
886
+ }
887
+ };
888
+ };
889
+ }
890
+ function _apply_decs_2203_r$11(targetClass, memberDecs, classDecs, parentClass) {
891
+ return (_apply_decs_2203_r$11 = applyDecs2203RFactory$11())(targetClass, memberDecs, classDecs, parentClass);
892
+ }
893
+ var _dec$11, _initClass$11;
894
+ let _ForbiddenResponderService;
895
+ _dec$11 = (0, _navios_di.Injectable)({
896
+ token: require_navios_factory.ForbiddenResponderToken,
897
+ priority: -10
898
+ });
899
+ var ForbiddenResponderService = class {
900
+ static {
901
+ ({c: [_ForbiddenResponderService, _initClass$11]} = _apply_decs_2203_r$11(this, [], [_dec$11]));
902
+ }
903
+ getResponse(error, description) {
904
+ if (description) return this.createResponse(description);
905
+ if (error && typeof error === "object" && "response" in error && error.response) {
906
+ if (typeof error.response === "string") return this.createResponse(error.response);
907
+ }
908
+ return this.createResponse("Access to this resource is forbidden");
909
+ }
910
+ createResponse(detail) {
911
+ return {
912
+ statusCode: 403,
913
+ payload: {
914
+ type: "about:blank",
915
+ title: "Forbidden",
916
+ status: 403,
917
+ detail
918
+ },
919
+ headers: { "Content-Type": "application/problem+json" }
920
+ };
921
+ }
922
+ static {
923
+ _initClass$11();
924
+ }
925
+ };
926
+
927
+ //#endregion
928
+ //#region src/responders/services/internal-server-error-responder.service.mts
929
+ function applyDecs2203RFactory$10() {
930
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
931
+ return function addInitializer(initializer) {
932
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
933
+ assertCallable(initializer, "An initializer");
934
+ initializers.push(initializer);
935
+ };
936
+ }
937
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
938
+ var kindStr;
939
+ switch (kind) {
940
+ case 1:
941
+ kindStr = "accessor";
942
+ break;
943
+ case 2:
944
+ kindStr = "method";
945
+ break;
946
+ case 3:
947
+ kindStr = "getter";
948
+ break;
949
+ case 4:
950
+ kindStr = "setter";
951
+ break;
952
+ default: kindStr = "field";
953
+ }
954
+ var ctx = {
955
+ kind: kindStr,
956
+ name: isPrivate ? "#" + name : name,
957
+ static: isStatic,
958
+ private: isPrivate,
959
+ metadata
960
+ };
961
+ var decoratorFinishedRef = { v: false };
962
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
963
+ var get, set;
964
+ if (kind === 0) if (isPrivate) {
965
+ get = desc.get;
966
+ set = desc.set;
967
+ } else {
968
+ get = function() {
969
+ return this[name];
970
+ };
971
+ set = function(v) {
972
+ this[name] = v;
973
+ };
974
+ }
975
+ else if (kind === 2) get = function() {
976
+ return desc.value;
977
+ };
978
+ else {
979
+ if (kind === 1 || kind === 3) get = function() {
980
+ return desc.get.call(this);
981
+ };
982
+ if (kind === 1 || kind === 4) set = function(v) {
983
+ desc.set.call(this, v);
984
+ };
985
+ }
986
+ ctx.access = get && set ? {
987
+ get,
988
+ set
989
+ } : get ? { get } : { set };
990
+ try {
991
+ return dec(value, ctx);
992
+ } finally {
993
+ decoratorFinishedRef.v = true;
994
+ }
995
+ }
996
+ function assertNotFinished(decoratorFinishedRef, fnName) {
997
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
998
+ }
999
+ function assertCallable(fn, hint) {
1000
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
1001
+ }
1002
+ function assertValidReturnValue(kind, value) {
1003
+ var type = typeof value;
1004
+ if (kind === 1) {
1005
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
1006
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
1007
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
1008
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
1009
+ } else if (type !== "function") {
1010
+ var hint;
1011
+ if (kind === 0) hint = "field";
1012
+ else if (kind === 10) hint = "class";
1013
+ else hint = "method";
1014
+ throw new TypeError(hint + " decorators must return a function or void 0");
1015
+ }
1016
+ }
1017
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
1018
+ var decs = decInfo[0];
1019
+ var desc, init, value;
1020
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
1021
+ get: decInfo[3],
1022
+ set: decInfo[4]
1023
+ };
1024
+ else if (kind === 3) desc = { get: decInfo[3] };
1025
+ else if (kind === 4) desc = { set: decInfo[3] };
1026
+ else desc = { value: decInfo[3] };
1027
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
1028
+ if (kind === 1) value = {
1029
+ get: desc.get,
1030
+ set: desc.set
1031
+ };
1032
+ else if (kind === 2) value = desc.value;
1033
+ else if (kind === 3) value = desc.get;
1034
+ else if (kind === 4) value = desc.set;
1035
+ var newValue, get, set;
1036
+ if (typeof decs === "function") {
1037
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1038
+ if (newValue !== void 0) {
1039
+ assertValidReturnValue(kind, newValue);
1040
+ if (kind === 0) init = newValue;
1041
+ else if (kind === 1) {
1042
+ init = newValue.init;
1043
+ get = newValue.get || value.get;
1044
+ set = newValue.set || value.set;
1045
+ value = {
1046
+ get,
1047
+ set
1048
+ };
1049
+ } else value = newValue;
1050
+ }
1051
+ } else for (var i = decs.length - 1; i >= 0; i--) {
1052
+ var dec = decs[i];
1053
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1054
+ if (newValue !== void 0) {
1055
+ assertValidReturnValue(kind, newValue);
1056
+ var newInit;
1057
+ if (kind === 0) newInit = newValue;
1058
+ else if (kind === 1) {
1059
+ newInit = newValue.init;
1060
+ get = newValue.get || value.get;
1061
+ set = newValue.set || value.set;
1062
+ value = {
1063
+ get,
1064
+ set
1065
+ };
1066
+ } else value = newValue;
1067
+ if (newInit !== void 0) if (init === void 0) init = newInit;
1068
+ else if (typeof init === "function") init = [init, newInit];
1069
+ else init.push(newInit);
1070
+ }
1071
+ }
1072
+ if (kind === 0 || kind === 1) {
1073
+ if (init === void 0) init = function(instance, init$1) {
1074
+ return init$1;
1075
+ };
1076
+ else if (typeof init !== "function") {
1077
+ var ownInitializers = init;
1078
+ init = function(instance, init$1) {
1079
+ var value$1 = init$1;
1080
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
1081
+ return value$1;
1082
+ };
1083
+ } else {
1084
+ var originalInitializer = init;
1085
+ init = function(instance, init$1) {
1086
+ return originalInitializer.call(instance, init$1);
1087
+ };
1088
+ }
1089
+ ret.push(init);
1090
+ }
1091
+ if (kind !== 0) {
1092
+ if (kind === 1) {
1093
+ desc.get = value.get;
1094
+ desc.set = value.set;
1095
+ } else if (kind === 2) desc.value = value;
1096
+ else if (kind === 3) desc.get = value;
1097
+ else if (kind === 4) desc.set = value;
1098
+ if (isPrivate) if (kind === 1) {
1099
+ ret.push(function(instance, args) {
1100
+ return value.get.call(instance, args);
1101
+ });
1102
+ ret.push(function(instance, args) {
1103
+ return value.set.call(instance, args);
1104
+ });
1105
+ } else if (kind === 2) ret.push(value);
1106
+ else ret.push(function(instance, args) {
1107
+ return value.call(instance, args);
1108
+ });
1109
+ else Object.defineProperty(base, name, desc);
1110
+ }
1111
+ }
1112
+ function applyMemberDecs(Class, decInfos, metadata) {
1113
+ var ret = [];
1114
+ var protoInitializers;
1115
+ var staticInitializers;
1116
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
1117
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
1118
+ for (var i = 0; i < decInfos.length; i++) {
1119
+ var decInfo = decInfos[i];
1120
+ if (!Array.isArray(decInfo)) continue;
1121
+ var kind = decInfo[1];
1122
+ var name = decInfo[2];
1123
+ var isPrivate = decInfo.length > 3;
1124
+ var isStatic = kind >= 5;
1125
+ var base;
1126
+ var initializers;
1127
+ if (isStatic) {
1128
+ base = Class;
1129
+ kind = kind - 5;
1130
+ staticInitializers = staticInitializers || [];
1131
+ initializers = staticInitializers;
1132
+ } else {
1133
+ base = Class.prototype;
1134
+ protoInitializers = protoInitializers || [];
1135
+ initializers = protoInitializers;
1136
+ }
1137
+ if (kind !== 0 && !isPrivate) {
1138
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
1139
+ var existingKind = existingNonFields.get(name) || 0;
1140
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
1141
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
1142
+ else existingNonFields.set(name, true);
1143
+ }
1144
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
1145
+ }
1146
+ pushInitializers(ret, protoInitializers);
1147
+ pushInitializers(ret, staticInitializers);
1148
+ return ret;
1149
+ }
1150
+ function pushInitializers(ret, initializers) {
1151
+ if (initializers) ret.push(function(instance) {
1152
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
1153
+ return instance;
1154
+ });
1155
+ }
1156
+ function applyClassDecs(targetClass, classDecs, metadata) {
1157
+ if (classDecs.length > 0) {
1158
+ var initializers = [];
1159
+ var newClass = targetClass;
1160
+ var name = targetClass.name;
1161
+ for (var i = classDecs.length - 1; i >= 0; i--) {
1162
+ var decoratorFinishedRef = { v: false };
1163
+ try {
1164
+ var nextNewClass = classDecs[i](newClass, {
1165
+ kind: "class",
1166
+ name,
1167
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
1168
+ metadata
1169
+ });
1170
+ } finally {
1171
+ decoratorFinishedRef.v = true;
1172
+ }
1173
+ if (nextNewClass !== void 0) {
1174
+ assertValidReturnValue(10, nextNewClass);
1175
+ newClass = nextNewClass;
1176
+ }
1177
+ }
1178
+ return [defineMetadata(newClass, metadata), function() {
1179
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
1180
+ }];
1181
+ }
1182
+ }
1183
+ function defineMetadata(Class, metadata) {
1184
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
1185
+ configurable: true,
1186
+ enumerable: true,
1187
+ value: metadata
1188
+ });
1189
+ }
1190
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
1191
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
1192
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
1193
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
1194
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
1195
+ return {
1196
+ e,
1197
+ get c() {
1198
+ return applyClassDecs(targetClass, classDecs, metadata);
1199
+ }
1200
+ };
1201
+ };
1202
+ }
1203
+ function _apply_decs_2203_r$10(targetClass, memberDecs, classDecs, parentClass) {
1204
+ return (_apply_decs_2203_r$10 = applyDecs2203RFactory$10())(targetClass, memberDecs, classDecs, parentClass);
1205
+ }
1206
+ var _dec$10, _initClass$10;
1207
+ let _InternalServerErrorResponderService;
1208
+ _dec$10 = (0, _navios_di.Injectable)({
1209
+ token: require_navios_factory.InternalServerErrorResponderToken,
1210
+ priority: -10
1211
+ });
1212
+ var InternalServerErrorResponderService = class {
1213
+ static {
1214
+ ({c: [_InternalServerErrorResponderService, _initClass$10]} = _apply_decs_2203_r$10(this, [], [_dec$10]));
1215
+ }
1216
+ getResponse(error, description) {
1217
+ const message = error instanceof Error ? error.message : "Internal Server Error";
1218
+ return {
1219
+ statusCode: 500,
1220
+ payload: {
1221
+ type: "about:blank",
1222
+ title: "Internal Server Error",
1223
+ status: 500,
1224
+ detail: description ?? message
1225
+ },
1226
+ headers: { "Content-Type": "application/problem+json" }
1227
+ };
1228
+ }
1229
+ static {
1230
+ _initClass$10();
1231
+ }
1232
+ };
1233
+
1234
+ //#endregion
1235
+ //#region src/responders/services/not-found-responder.service.mts
1236
+ function applyDecs2203RFactory$9() {
1237
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
1238
+ return function addInitializer(initializer) {
1239
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
1240
+ assertCallable(initializer, "An initializer");
1241
+ initializers.push(initializer);
1242
+ };
1243
+ }
1244
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
1245
+ var kindStr;
1246
+ switch (kind) {
1247
+ case 1:
1248
+ kindStr = "accessor";
1249
+ break;
1250
+ case 2:
1251
+ kindStr = "method";
1252
+ break;
1253
+ case 3:
1254
+ kindStr = "getter";
1255
+ break;
1256
+ case 4:
1257
+ kindStr = "setter";
1258
+ break;
1259
+ default: kindStr = "field";
1260
+ }
1261
+ var ctx = {
1262
+ kind: kindStr,
1263
+ name: isPrivate ? "#" + name : name,
1264
+ static: isStatic,
1265
+ private: isPrivate,
1266
+ metadata
1267
+ };
1268
+ var decoratorFinishedRef = { v: false };
1269
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
1270
+ var get, set;
1271
+ if (kind === 0) if (isPrivate) {
1272
+ get = desc.get;
1273
+ set = desc.set;
1274
+ } else {
1275
+ get = function() {
1276
+ return this[name];
1277
+ };
1278
+ set = function(v) {
1279
+ this[name] = v;
1280
+ };
1281
+ }
1282
+ else if (kind === 2) get = function() {
1283
+ return desc.value;
1284
+ };
1285
+ else {
1286
+ if (kind === 1 || kind === 3) get = function() {
1287
+ return desc.get.call(this);
1288
+ };
1289
+ if (kind === 1 || kind === 4) set = function(v) {
1290
+ desc.set.call(this, v);
1291
+ };
1292
+ }
1293
+ ctx.access = get && set ? {
1294
+ get,
1295
+ set
1296
+ } : get ? { get } : { set };
1297
+ try {
1298
+ return dec(value, ctx);
1299
+ } finally {
1300
+ decoratorFinishedRef.v = true;
1301
+ }
1302
+ }
1303
+ function assertNotFinished(decoratorFinishedRef, fnName) {
1304
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
1305
+ }
1306
+ function assertCallable(fn, hint) {
1307
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
1308
+ }
1309
+ function assertValidReturnValue(kind, value) {
1310
+ var type = typeof value;
1311
+ if (kind === 1) {
1312
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
1313
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
1314
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
1315
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
1316
+ } else if (type !== "function") {
1317
+ var hint;
1318
+ if (kind === 0) hint = "field";
1319
+ else if (kind === 10) hint = "class";
1320
+ else hint = "method";
1321
+ throw new TypeError(hint + " decorators must return a function or void 0");
1322
+ }
1323
+ }
1324
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
1325
+ var decs = decInfo[0];
1326
+ var desc, init, value;
1327
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
1328
+ get: decInfo[3],
1329
+ set: decInfo[4]
1330
+ };
1331
+ else if (kind === 3) desc = { get: decInfo[3] };
1332
+ else if (kind === 4) desc = { set: decInfo[3] };
1333
+ else desc = { value: decInfo[3] };
1334
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
1335
+ if (kind === 1) value = {
1336
+ get: desc.get,
1337
+ set: desc.set
1338
+ };
1339
+ else if (kind === 2) value = desc.value;
1340
+ else if (kind === 3) value = desc.get;
1341
+ else if (kind === 4) value = desc.set;
1342
+ var newValue, get, set;
1343
+ if (typeof decs === "function") {
1344
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1345
+ if (newValue !== void 0) {
1346
+ assertValidReturnValue(kind, newValue);
1347
+ if (kind === 0) init = newValue;
1348
+ else if (kind === 1) {
1349
+ init = newValue.init;
1350
+ get = newValue.get || value.get;
1351
+ set = newValue.set || value.set;
1352
+ value = {
1353
+ get,
1354
+ set
1355
+ };
1356
+ } else value = newValue;
1357
+ }
1358
+ } else for (var i = decs.length - 1; i >= 0; i--) {
1359
+ var dec = decs[i];
1360
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1361
+ if (newValue !== void 0) {
1362
+ assertValidReturnValue(kind, newValue);
1363
+ var newInit;
1364
+ if (kind === 0) newInit = newValue;
1365
+ else if (kind === 1) {
1366
+ newInit = newValue.init;
1367
+ get = newValue.get || value.get;
1368
+ set = newValue.set || value.set;
1369
+ value = {
1370
+ get,
1371
+ set
1372
+ };
1373
+ } else value = newValue;
1374
+ if (newInit !== void 0) if (init === void 0) init = newInit;
1375
+ else if (typeof init === "function") init = [init, newInit];
1376
+ else init.push(newInit);
1377
+ }
1378
+ }
1379
+ if (kind === 0 || kind === 1) {
1380
+ if (init === void 0) init = function(instance, init$1) {
1381
+ return init$1;
1382
+ };
1383
+ else if (typeof init !== "function") {
1384
+ var ownInitializers = init;
1385
+ init = function(instance, init$1) {
1386
+ var value$1 = init$1;
1387
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
1388
+ return value$1;
1389
+ };
1390
+ } else {
1391
+ var originalInitializer = init;
1392
+ init = function(instance, init$1) {
1393
+ return originalInitializer.call(instance, init$1);
1394
+ };
1395
+ }
1396
+ ret.push(init);
1397
+ }
1398
+ if (kind !== 0) {
1399
+ if (kind === 1) {
1400
+ desc.get = value.get;
1401
+ desc.set = value.set;
1402
+ } else if (kind === 2) desc.value = value;
1403
+ else if (kind === 3) desc.get = value;
1404
+ else if (kind === 4) desc.set = value;
1405
+ if (isPrivate) if (kind === 1) {
1406
+ ret.push(function(instance, args) {
1407
+ return value.get.call(instance, args);
1408
+ });
1409
+ ret.push(function(instance, args) {
1410
+ return value.set.call(instance, args);
1411
+ });
1412
+ } else if (kind === 2) ret.push(value);
1413
+ else ret.push(function(instance, args) {
1414
+ return value.call(instance, args);
1415
+ });
1416
+ else Object.defineProperty(base, name, desc);
1417
+ }
1418
+ }
1419
+ function applyMemberDecs(Class, decInfos, metadata) {
1420
+ var ret = [];
1421
+ var protoInitializers;
1422
+ var staticInitializers;
1423
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
1424
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
1425
+ for (var i = 0; i < decInfos.length; i++) {
1426
+ var decInfo = decInfos[i];
1427
+ if (!Array.isArray(decInfo)) continue;
1428
+ var kind = decInfo[1];
1429
+ var name = decInfo[2];
1430
+ var isPrivate = decInfo.length > 3;
1431
+ var isStatic = kind >= 5;
1432
+ var base;
1433
+ var initializers;
1434
+ if (isStatic) {
1435
+ base = Class;
1436
+ kind = kind - 5;
1437
+ staticInitializers = staticInitializers || [];
1438
+ initializers = staticInitializers;
1439
+ } else {
1440
+ base = Class.prototype;
1441
+ protoInitializers = protoInitializers || [];
1442
+ initializers = protoInitializers;
1443
+ }
1444
+ if (kind !== 0 && !isPrivate) {
1445
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
1446
+ var existingKind = existingNonFields.get(name) || 0;
1447
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
1448
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
1449
+ else existingNonFields.set(name, true);
1450
+ }
1451
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
1452
+ }
1453
+ pushInitializers(ret, protoInitializers);
1454
+ pushInitializers(ret, staticInitializers);
1455
+ return ret;
1456
+ }
1457
+ function pushInitializers(ret, initializers) {
1458
+ if (initializers) ret.push(function(instance) {
1459
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
1460
+ return instance;
1461
+ });
1462
+ }
1463
+ function applyClassDecs(targetClass, classDecs, metadata) {
1464
+ if (classDecs.length > 0) {
1465
+ var initializers = [];
1466
+ var newClass = targetClass;
1467
+ var name = targetClass.name;
1468
+ for (var i = classDecs.length - 1; i >= 0; i--) {
1469
+ var decoratorFinishedRef = { v: false };
1470
+ try {
1471
+ var nextNewClass = classDecs[i](newClass, {
1472
+ kind: "class",
1473
+ name,
1474
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
1475
+ metadata
1476
+ });
1477
+ } finally {
1478
+ decoratorFinishedRef.v = true;
1479
+ }
1480
+ if (nextNewClass !== void 0) {
1481
+ assertValidReturnValue(10, nextNewClass);
1482
+ newClass = nextNewClass;
1483
+ }
1484
+ }
1485
+ return [defineMetadata(newClass, metadata), function() {
1486
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
1487
+ }];
1488
+ }
1489
+ }
1490
+ function defineMetadata(Class, metadata) {
1491
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
1492
+ configurable: true,
1493
+ enumerable: true,
1494
+ value: metadata
1495
+ });
1496
+ }
1497
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
1498
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
1499
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
1500
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
1501
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
1502
+ return {
1503
+ e,
1504
+ get c() {
1505
+ return applyClassDecs(targetClass, classDecs, metadata);
1506
+ }
1507
+ };
1508
+ };
1509
+ }
1510
+ function _apply_decs_2203_r$9(targetClass, memberDecs, classDecs, parentClass) {
1511
+ return (_apply_decs_2203_r$9 = applyDecs2203RFactory$9())(targetClass, memberDecs, classDecs, parentClass);
1512
+ }
1513
+ var _dec$9, _initClass$9;
1514
+ let _NotFoundResponderService;
1515
+ _dec$9 = (0, _navios_di.Injectable)({
1516
+ token: require_navios_factory.NotFoundResponderToken,
1517
+ priority: -10
1518
+ });
1519
+ var NotFoundResponderService = class {
1520
+ static {
1521
+ ({c: [_NotFoundResponderService, _initClass$9]} = _apply_decs_2203_r$9(this, [], [_dec$9]));
1522
+ }
1523
+ getResponse(error, description) {
1524
+ if (description) return this.createResponse(description);
1525
+ if (error && typeof error === "object" && "response" in error && error.response) {
1526
+ if (typeof error.response === "string") return this.createResponse(error.response);
1527
+ }
1528
+ return this.createResponse("The requested resource was not found");
1529
+ }
1530
+ createResponse(detail) {
1531
+ return {
1532
+ statusCode: 404,
1533
+ payload: {
1534
+ type: "about:blank",
1535
+ title: "Not Found",
1536
+ status: 404,
1537
+ detail
1538
+ },
1539
+ headers: { "Content-Type": "application/problem+json" }
1540
+ };
1541
+ }
1542
+ static {
1543
+ _initClass$9();
1544
+ }
1545
+ };
1546
+
1547
+ //#endregion
1548
+ //#region src/responders/services/validation-error-responder.service.mts
1549
+ function applyDecs2203RFactory$8() {
1550
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
1551
+ return function addInitializer(initializer) {
1552
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
1553
+ assertCallable(initializer, "An initializer");
1554
+ initializers.push(initializer);
1555
+ };
1556
+ }
1557
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
1558
+ var kindStr;
1559
+ switch (kind) {
1560
+ case 1:
1561
+ kindStr = "accessor";
1562
+ break;
1563
+ case 2:
1564
+ kindStr = "method";
1565
+ break;
1566
+ case 3:
1567
+ kindStr = "getter";
1568
+ break;
1569
+ case 4:
1570
+ kindStr = "setter";
1571
+ break;
1572
+ default: kindStr = "field";
1573
+ }
1574
+ var ctx = {
1575
+ kind: kindStr,
1576
+ name: isPrivate ? "#" + name : name,
1577
+ static: isStatic,
1578
+ private: isPrivate,
1579
+ metadata
1580
+ };
1581
+ var decoratorFinishedRef = { v: false };
1582
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
1583
+ var get, set;
1584
+ if (kind === 0) if (isPrivate) {
1585
+ get = desc.get;
1586
+ set = desc.set;
1587
+ } else {
1588
+ get = function() {
1589
+ return this[name];
1590
+ };
1591
+ set = function(v) {
1592
+ this[name] = v;
1593
+ };
1594
+ }
1595
+ else if (kind === 2) get = function() {
1596
+ return desc.value;
1597
+ };
1598
+ else {
1599
+ if (kind === 1 || kind === 3) get = function() {
1600
+ return desc.get.call(this);
1601
+ };
1602
+ if (kind === 1 || kind === 4) set = function(v) {
1603
+ desc.set.call(this, v);
1604
+ };
1605
+ }
1606
+ ctx.access = get && set ? {
1607
+ get,
1608
+ set
1609
+ } : get ? { get } : { set };
1610
+ try {
1611
+ return dec(value, ctx);
1612
+ } finally {
1613
+ decoratorFinishedRef.v = true;
1614
+ }
1615
+ }
1616
+ function assertNotFinished(decoratorFinishedRef, fnName) {
1617
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
1618
+ }
1619
+ function assertCallable(fn, hint) {
1620
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
1621
+ }
1622
+ function assertValidReturnValue(kind, value) {
1623
+ var type = typeof value;
1624
+ if (kind === 1) {
1625
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
1626
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
1627
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
1628
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
1629
+ } else if (type !== "function") {
1630
+ var hint;
1631
+ if (kind === 0) hint = "field";
1632
+ else if (kind === 10) hint = "class";
1633
+ else hint = "method";
1634
+ throw new TypeError(hint + " decorators must return a function or void 0");
1635
+ }
1636
+ }
1637
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
1638
+ var decs = decInfo[0];
1639
+ var desc, init, value;
1640
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
1641
+ get: decInfo[3],
1642
+ set: decInfo[4]
1643
+ };
1644
+ else if (kind === 3) desc = { get: decInfo[3] };
1645
+ else if (kind === 4) desc = { set: decInfo[3] };
1646
+ else desc = { value: decInfo[3] };
1647
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
1648
+ if (kind === 1) value = {
1649
+ get: desc.get,
1650
+ set: desc.set
1651
+ };
1652
+ else if (kind === 2) value = desc.value;
1653
+ else if (kind === 3) value = desc.get;
1654
+ else if (kind === 4) value = desc.set;
1655
+ var newValue, get, set;
1656
+ if (typeof decs === "function") {
1657
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1658
+ if (newValue !== void 0) {
1659
+ assertValidReturnValue(kind, newValue);
1660
+ if (kind === 0) init = newValue;
1661
+ else if (kind === 1) {
1662
+ init = newValue.init;
1663
+ get = newValue.get || value.get;
1664
+ set = newValue.set || value.set;
1665
+ value = {
1666
+ get,
1667
+ set
1668
+ };
1669
+ } else value = newValue;
1670
+ }
1671
+ } else for (var i = decs.length - 1; i >= 0; i--) {
1672
+ var dec = decs[i];
1673
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
1674
+ if (newValue !== void 0) {
1675
+ assertValidReturnValue(kind, newValue);
1676
+ var newInit;
1677
+ if (kind === 0) newInit = newValue;
1678
+ else if (kind === 1) {
1679
+ newInit = newValue.init;
1680
+ get = newValue.get || value.get;
1681
+ set = newValue.set || value.set;
1682
+ value = {
1683
+ get,
1684
+ set
1685
+ };
1686
+ } else value = newValue;
1687
+ if (newInit !== void 0) if (init === void 0) init = newInit;
1688
+ else if (typeof init === "function") init = [init, newInit];
1689
+ else init.push(newInit);
1690
+ }
1691
+ }
1692
+ if (kind === 0 || kind === 1) {
1693
+ if (init === void 0) init = function(instance, init$1) {
1694
+ return init$1;
1695
+ };
1696
+ else if (typeof init !== "function") {
1697
+ var ownInitializers = init;
1698
+ init = function(instance, init$1) {
1699
+ var value$1 = init$1;
1700
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
1701
+ return value$1;
1702
+ };
1703
+ } else {
1704
+ var originalInitializer = init;
1705
+ init = function(instance, init$1) {
1706
+ return originalInitializer.call(instance, init$1);
1707
+ };
1708
+ }
1709
+ ret.push(init);
1710
+ }
1711
+ if (kind !== 0) {
1712
+ if (kind === 1) {
1713
+ desc.get = value.get;
1714
+ desc.set = value.set;
1715
+ } else if (kind === 2) desc.value = value;
1716
+ else if (kind === 3) desc.get = value;
1717
+ else if (kind === 4) desc.set = value;
1718
+ if (isPrivate) if (kind === 1) {
1719
+ ret.push(function(instance, args) {
1720
+ return value.get.call(instance, args);
1721
+ });
1722
+ ret.push(function(instance, args) {
1723
+ return value.set.call(instance, args);
1724
+ });
1725
+ } else if (kind === 2) ret.push(value);
1726
+ else ret.push(function(instance, args) {
1727
+ return value.call(instance, args);
1728
+ });
1729
+ else Object.defineProperty(base, name, desc);
1730
+ }
1731
+ }
1732
+ function applyMemberDecs(Class, decInfos, metadata) {
1733
+ var ret = [];
1734
+ var protoInitializers;
1735
+ var staticInitializers;
1736
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
1737
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
1738
+ for (var i = 0; i < decInfos.length; i++) {
1739
+ var decInfo = decInfos[i];
1740
+ if (!Array.isArray(decInfo)) continue;
1741
+ var kind = decInfo[1];
1742
+ var name = decInfo[2];
1743
+ var isPrivate = decInfo.length > 3;
1744
+ var isStatic = kind >= 5;
1745
+ var base;
1746
+ var initializers;
1747
+ if (isStatic) {
1748
+ base = Class;
1749
+ kind = kind - 5;
1750
+ staticInitializers = staticInitializers || [];
1751
+ initializers = staticInitializers;
1752
+ } else {
1753
+ base = Class.prototype;
1754
+ protoInitializers = protoInitializers || [];
1755
+ initializers = protoInitializers;
1756
+ }
1757
+ if (kind !== 0 && !isPrivate) {
1758
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
1759
+ var existingKind = existingNonFields.get(name) || 0;
1760
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
1761
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
1762
+ else existingNonFields.set(name, true);
1763
+ }
1764
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
1765
+ }
1766
+ pushInitializers(ret, protoInitializers);
1767
+ pushInitializers(ret, staticInitializers);
1768
+ return ret;
1769
+ }
1770
+ function pushInitializers(ret, initializers) {
1771
+ if (initializers) ret.push(function(instance) {
1772
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
1773
+ return instance;
1774
+ });
1775
+ }
1776
+ function applyClassDecs(targetClass, classDecs, metadata) {
1777
+ if (classDecs.length > 0) {
1778
+ var initializers = [];
1779
+ var newClass = targetClass;
1780
+ var name = targetClass.name;
1781
+ for (var i = classDecs.length - 1; i >= 0; i--) {
1782
+ var decoratorFinishedRef = { v: false };
1783
+ try {
1784
+ var nextNewClass = classDecs[i](newClass, {
1785
+ kind: "class",
1786
+ name,
1787
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
1788
+ metadata
1789
+ });
1790
+ } finally {
1791
+ decoratorFinishedRef.v = true;
1792
+ }
1793
+ if (nextNewClass !== void 0) {
1794
+ assertValidReturnValue(10, nextNewClass);
1795
+ newClass = nextNewClass;
1796
+ }
1797
+ }
1798
+ return [defineMetadata(newClass, metadata), function() {
1799
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
1800
+ }];
1801
+ }
1802
+ }
1803
+ function defineMetadata(Class, metadata) {
1804
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
1805
+ configurable: true,
1806
+ enumerable: true,
1807
+ value: metadata
1808
+ });
1809
+ }
1810
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
1811
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
1812
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
1813
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
1814
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
1815
+ return {
1816
+ e,
1817
+ get c() {
1818
+ return applyClassDecs(targetClass, classDecs, metadata);
1819
+ }
1820
+ };
1821
+ };
1822
+ }
1823
+ function _apply_decs_2203_r$8(targetClass, memberDecs, classDecs, parentClass) {
1824
+ return (_apply_decs_2203_r$8 = applyDecs2203RFactory$8())(targetClass, memberDecs, classDecs, parentClass);
1825
+ }
1826
+ var _dec$8, _initClass$8;
1827
+ let _ValidationErrorResponderService;
1828
+ _dec$8 = (0, _navios_di.Injectable)({
1829
+ token: require_navios_factory.ValidationErrorResponderToken,
1830
+ priority: -10
1831
+ });
1832
+ var ValidationErrorResponderService = class {
1833
+ static {
1834
+ ({c: [_ValidationErrorResponderService, _initClass$8]} = _apply_decs_2203_r$8(this, [], [_dec$8]));
1835
+ }
1836
+ getResponse(error, description) {
1837
+ if (error instanceof zod_v4.ZodError) return {
1838
+ statusCode: 400,
1839
+ payload: {
1840
+ type: "about:blank",
1841
+ title: "Validation Error",
1842
+ status: 400,
1843
+ detail: description ?? "Request validation failed",
1844
+ errors: (0, zod_v4.treeifyError)(error)
1845
+ },
1846
+ headers: { "Content-Type": "application/problem+json" }
1847
+ };
1848
+ return {
1849
+ statusCode: 400,
1850
+ payload: {
1851
+ type: "about:blank",
1852
+ title: "Validation Error",
1853
+ status: 400,
1854
+ detail: description ?? (error instanceof Error ? error.message : "Validation failed")
1855
+ },
1856
+ headers: { "Content-Type": "application/problem+json" }
1857
+ };
1858
+ }
1859
+ static {
1860
+ _initClass$8();
1861
+ }
1862
+ };
1863
+
1864
+ //#endregion
1865
+ //#region src/attribute.factory.mts
1866
+ /**
1867
+ * Factory for creating custom attribute decorators.
1868
+ *
1869
+ * Attributes allow you to add custom metadata to modules, controllers, and endpoints.
1870
+ * This is useful for cross-cutting concerns like rate limiting, caching, API versioning, etc.
1871
+ *
1872
+ * @example
1873
+ * ```typescript
1874
+ * // Create a simple boolean attribute
1875
+ * const Public = AttributeFactory.createAttribute(Symbol.for('Public'))
1876
+ *
1877
+ * // Use it as a decorator
1878
+ * @Controller()
1879
+ * @Public()
1880
+ * export class PublicController { }
1881
+ *
1882
+ * // Check if attribute exists
1883
+ * if (AttributeFactory.has(Public, controllerMetadata)) {
1884
+ * // Skip authentication
1885
+ * }
1886
+ * ```
1887
+ *
1888
+ * @example
1889
+ * ```typescript
1890
+ * // Create an attribute with a validated value
1891
+ * const RateLimit = AttributeFactory.createAttribute(
1892
+ * Symbol.for('RateLimit'),
1893
+ * z.object({ requests: z.number(), window: z.number() })
1894
+ * )
1895
+ *
1896
+ * // Use it with a value
1897
+ * @Endpoint(apiEndpoint)
1898
+ * @RateLimit({ requests: 100, window: 60000 })
1899
+ * async handler() { }
1900
+ *
1901
+ * // Get the value
1902
+ * const limit = AttributeFactory.get(RateLimit, endpointMetadata)
1903
+ * // limit is typed as { requests: number, window: number } | null
1904
+ * ```
1905
+ */ var AttributeFactory = class {
1906
+ static createAttribute(token, schema) {
1907
+ const res = (value) => (target, context) => {
1908
+ if (context.kind !== "class" && context.kind !== "method") throw new Error("[Navios] Attribute can only be applied to classes or methods");
1909
+ const isController = context.kind === "class" && require_use_guards_decorator.hasControllerMetadata(target);
1910
+ const isModule = context.kind === "class" && require_tokens.hasModuleMetadata(target);
1911
+ const isManaged = context.kind === "class" && require_use_guards_decorator.hasManagedMetadata(target);
1912
+ if (context.kind === "class" && !isController && !isModule && !isManaged) throw new Error("[Navios] Attribute can only be applied to classes with @Controller, @Module, or other Navios-managed decorators");
1913
+ let metadata = context.kind === "class" ? isController ? require_use_guards_decorator.getControllerMetadata(target, context) : isModule ? require_tokens.getModuleMetadata(target, context) : isManaged ? require_use_guards_decorator.getManagedMetadata(target) : null : require_use_guards_decorator.getEndpointMetadata(target, context);
1914
+ if (!metadata) throw new Error("[Navios] Could not determine metadata for attribute target");
1915
+ if (schema) {
1916
+ const validatedValue = schema.safeParse(value);
1917
+ if (!validatedValue.success) throw new Error(`[Navios] Invalid value for attribute ${token.toString()}: ${validatedValue.error}`);
1918
+ metadata.customAttributes.set(token, validatedValue.data);
1919
+ } else metadata.customAttributes.set(token, true);
1920
+ return target;
1921
+ };
1922
+ res.token = token;
1923
+ if (schema) res.schema = schema;
1924
+ return res;
1925
+ }
1926
+ static get(attribute, target) {
1927
+ return target.customAttributes.get(attribute.token) ?? null;
1928
+ }
1929
+ static getAll(attribute, target) {
1930
+ const values = Array.from(target.customAttributes.entries()).filter(([key]) => key === attribute.token).map(([, value]) => value);
1931
+ return values.length > 0 ? values : null;
1932
+ }
1933
+ static getLast(attribute, target) {
1934
+ for (let i = target.length - 1; i >= 0; i--) {
1935
+ const value = target[i].customAttributes.get(attribute.token);
1936
+ if (value) return value;
1937
+ }
1938
+ return null;
1939
+ }
1940
+ static has(attribute, target) {
1941
+ return target.customAttributes.has(attribute.token);
1942
+ }
1943
+ };
1944
+
1945
+ //#endregion
1946
+ //#region src/factories/adapter.factory.mts
1947
+ function applyDecs2203RFactory$7() {
1948
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
1949
+ return function addInitializer(initializer) {
1950
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
1951
+ assertCallable(initializer, "An initializer");
1952
+ initializers.push(initializer);
1953
+ };
1954
+ }
1955
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
1956
+ var kindStr;
1957
+ switch (kind) {
1958
+ case 1:
1959
+ kindStr = "accessor";
1960
+ break;
1961
+ case 2:
1962
+ kindStr = "method";
1963
+ break;
1964
+ case 3:
1965
+ kindStr = "getter";
1966
+ break;
1967
+ case 4:
1968
+ kindStr = "setter";
1969
+ break;
1970
+ default: kindStr = "field";
1971
+ }
1972
+ var ctx = {
1973
+ kind: kindStr,
1974
+ name: isPrivate ? "#" + name : name,
1975
+ static: isStatic,
1976
+ private: isPrivate,
1977
+ metadata
1978
+ };
1979
+ var decoratorFinishedRef = { v: false };
1980
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
1981
+ var get, set;
1982
+ if (kind === 0) if (isPrivate) {
1983
+ get = desc.get;
1984
+ set = desc.set;
1985
+ } else {
1986
+ get = function() {
1987
+ return this[name];
1988
+ };
1989
+ set = function(v) {
1990
+ this[name] = v;
1991
+ };
1992
+ }
1993
+ else if (kind === 2) get = function() {
1994
+ return desc.value;
1995
+ };
1996
+ else {
1997
+ if (kind === 1 || kind === 3) get = function() {
1998
+ return desc.get.call(this);
1999
+ };
2000
+ if (kind === 1 || kind === 4) set = function(v) {
2001
+ desc.set.call(this, v);
2002
+ };
2003
+ }
2004
+ ctx.access = get && set ? {
2005
+ get,
2006
+ set
2007
+ } : get ? { get } : { set };
2008
+ try {
2009
+ return dec(value, ctx);
2010
+ } finally {
2011
+ decoratorFinishedRef.v = true;
2012
+ }
2013
+ }
2014
+ function assertNotFinished(decoratorFinishedRef, fnName) {
2015
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
2016
+ }
2017
+ function assertCallable(fn, hint) {
2018
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
2019
+ }
2020
+ function assertValidReturnValue(kind, value) {
2021
+ var type = typeof value;
2022
+ if (kind === 1) {
2023
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
2024
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
2025
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
2026
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
2027
+ } else if (type !== "function") {
2028
+ var hint;
2029
+ if (kind === 0) hint = "field";
2030
+ else if (kind === 10) hint = "class";
2031
+ else hint = "method";
2032
+ throw new TypeError(hint + " decorators must return a function or void 0");
2033
+ }
2034
+ }
2035
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
2036
+ var decs = decInfo[0];
2037
+ var desc, init, value;
2038
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
2039
+ get: decInfo[3],
2040
+ set: decInfo[4]
2041
+ };
2042
+ else if (kind === 3) desc = { get: decInfo[3] };
2043
+ else if (kind === 4) desc = { set: decInfo[3] };
2044
+ else desc = { value: decInfo[3] };
2045
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
2046
+ if (kind === 1) value = {
2047
+ get: desc.get,
2048
+ set: desc.set
2049
+ };
2050
+ else if (kind === 2) value = desc.value;
2051
+ else if (kind === 3) value = desc.get;
2052
+ else if (kind === 4) value = desc.set;
2053
+ var newValue, get, set;
2054
+ if (typeof decs === "function") {
2055
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2056
+ if (newValue !== void 0) {
2057
+ assertValidReturnValue(kind, newValue);
2058
+ if (kind === 0) init = newValue;
2059
+ else if (kind === 1) {
2060
+ init = newValue.init;
2061
+ get = newValue.get || value.get;
2062
+ set = newValue.set || value.set;
2063
+ value = {
2064
+ get,
2065
+ set
2066
+ };
2067
+ } else value = newValue;
2068
+ }
2069
+ } else for (var i = decs.length - 1; i >= 0; i--) {
2070
+ var dec = decs[i];
2071
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2072
+ if (newValue !== void 0) {
2073
+ assertValidReturnValue(kind, newValue);
2074
+ var newInit;
2075
+ if (kind === 0) newInit = newValue;
2076
+ else if (kind === 1) {
2077
+ newInit = newValue.init;
2078
+ get = newValue.get || value.get;
2079
+ set = newValue.set || value.set;
2080
+ value = {
2081
+ get,
2082
+ set
2083
+ };
2084
+ } else value = newValue;
2085
+ if (newInit !== void 0) if (init === void 0) init = newInit;
2086
+ else if (typeof init === "function") init = [init, newInit];
2087
+ else init.push(newInit);
2088
+ }
2089
+ }
2090
+ if (kind === 0 || kind === 1) {
2091
+ if (init === void 0) init = function(instance, init$1) {
2092
+ return init$1;
2093
+ };
2094
+ else if (typeof init !== "function") {
2095
+ var ownInitializers = init;
2096
+ init = function(instance, init$1) {
2097
+ var value$1 = init$1;
2098
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
2099
+ return value$1;
2100
+ };
2101
+ } else {
2102
+ var originalInitializer = init;
2103
+ init = function(instance, init$1) {
2104
+ return originalInitializer.call(instance, init$1);
2105
+ };
2106
+ }
2107
+ ret.push(init);
2108
+ }
2109
+ if (kind !== 0) {
2110
+ if (kind === 1) {
2111
+ desc.get = value.get;
2112
+ desc.set = value.set;
2113
+ } else if (kind === 2) desc.value = value;
2114
+ else if (kind === 3) desc.get = value;
2115
+ else if (kind === 4) desc.set = value;
2116
+ if (isPrivate) if (kind === 1) {
2117
+ ret.push(function(instance, args) {
2118
+ return value.get.call(instance, args);
2119
+ });
2120
+ ret.push(function(instance, args) {
2121
+ return value.set.call(instance, args);
2122
+ });
2123
+ } else if (kind === 2) ret.push(value);
2124
+ else ret.push(function(instance, args) {
2125
+ return value.call(instance, args);
2126
+ });
2127
+ else Object.defineProperty(base, name, desc);
2128
+ }
2129
+ }
2130
+ function applyMemberDecs(Class, decInfos, metadata) {
2131
+ var ret = [];
2132
+ var protoInitializers;
2133
+ var staticInitializers;
2134
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
2135
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
2136
+ for (var i = 0; i < decInfos.length; i++) {
2137
+ var decInfo = decInfos[i];
2138
+ if (!Array.isArray(decInfo)) continue;
2139
+ var kind = decInfo[1];
2140
+ var name = decInfo[2];
2141
+ var isPrivate = decInfo.length > 3;
2142
+ var isStatic = kind >= 5;
2143
+ var base;
2144
+ var initializers;
2145
+ if (isStatic) {
2146
+ base = Class;
2147
+ kind = kind - 5;
2148
+ staticInitializers = staticInitializers || [];
2149
+ initializers = staticInitializers;
2150
+ } else {
2151
+ base = Class.prototype;
2152
+ protoInitializers = protoInitializers || [];
2153
+ initializers = protoInitializers;
2154
+ }
2155
+ if (kind !== 0 && !isPrivate) {
2156
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
2157
+ var existingKind = existingNonFields.get(name) || 0;
2158
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
2159
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
2160
+ else existingNonFields.set(name, true);
2161
+ }
2162
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
2163
+ }
2164
+ pushInitializers(ret, protoInitializers);
2165
+ pushInitializers(ret, staticInitializers);
2166
+ return ret;
2167
+ }
2168
+ function pushInitializers(ret, initializers) {
2169
+ if (initializers) ret.push(function(instance) {
2170
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
2171
+ return instance;
2172
+ });
2173
+ }
2174
+ function applyClassDecs(targetClass, classDecs, metadata) {
2175
+ if (classDecs.length > 0) {
2176
+ var initializers = [];
2177
+ var newClass = targetClass;
2178
+ var name = targetClass.name;
2179
+ for (var i = classDecs.length - 1; i >= 0; i--) {
2180
+ var decoratorFinishedRef = { v: false };
2181
+ try {
2182
+ var nextNewClass = classDecs[i](newClass, {
2183
+ kind: "class",
2184
+ name,
2185
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
2186
+ metadata
2187
+ });
2188
+ } finally {
2189
+ decoratorFinishedRef.v = true;
2190
+ }
2191
+ if (nextNewClass !== void 0) {
2192
+ assertValidReturnValue(10, nextNewClass);
2193
+ newClass = nextNewClass;
2194
+ }
2195
+ }
2196
+ return [defineMetadata(newClass, metadata), function() {
2197
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
2198
+ }];
2199
+ }
2200
+ }
2201
+ function defineMetadata(Class, metadata) {
2202
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
2203
+ configurable: true,
2204
+ enumerable: true,
2205
+ value: metadata
2206
+ });
2207
+ }
2208
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
2209
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
2210
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
2211
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
2212
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
2213
+ return {
2214
+ e,
2215
+ get c() {
2216
+ return applyClassDecs(targetClass, classDecs, metadata);
2217
+ }
2218
+ };
2219
+ };
2220
+ }
2221
+ function _apply_decs_2203_r$7(targetClass, memberDecs, classDecs, parentClass) {
2222
+ return (_apply_decs_2203_r$7 = applyDecs2203RFactory$7())(targetClass, memberDecs, classDecs, parentClass);
2223
+ }
2224
+ var _dec$7, _initClass$7;
2225
+ let _AdapterFactory;
2226
+ _dec$7 = (0, _navios_di.Factory)({ token: require_tokens.AdapterToken });
2227
+ var AdapterFactory = class {
2228
+ static {
2229
+ ({c: [_AdapterFactory, _initClass$7]} = _apply_decs_2203_r$7(this, [], [_dec$7]));
2230
+ }
2231
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
2232
+ create(ctx) {
2233
+ const service = this.environment.getToken(require_tokens.AdapterToken);
2234
+ if (!service) throw new Error("AdapterToken service not found in environment");
2235
+ return ctx.inject(service);
2236
+ }
2237
+ static {
2238
+ _initClass$7();
2239
+ }
2240
+ };
2241
+
2242
+ //#endregion
2243
+ //#region src/factories/endpoint-adapter.factory.mts
2244
+ function applyDecs2203RFactory$6() {
2245
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
2246
+ return function addInitializer(initializer) {
2247
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
2248
+ assertCallable(initializer, "An initializer");
2249
+ initializers.push(initializer);
2250
+ };
2251
+ }
2252
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
2253
+ var kindStr;
2254
+ switch (kind) {
2255
+ case 1:
2256
+ kindStr = "accessor";
2257
+ break;
2258
+ case 2:
2259
+ kindStr = "method";
2260
+ break;
2261
+ case 3:
2262
+ kindStr = "getter";
2263
+ break;
2264
+ case 4:
2265
+ kindStr = "setter";
2266
+ break;
2267
+ default: kindStr = "field";
2268
+ }
2269
+ var ctx = {
2270
+ kind: kindStr,
2271
+ name: isPrivate ? "#" + name : name,
2272
+ static: isStatic,
2273
+ private: isPrivate,
2274
+ metadata
2275
+ };
2276
+ var decoratorFinishedRef = { v: false };
2277
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
2278
+ var get, set;
2279
+ if (kind === 0) if (isPrivate) {
2280
+ get = desc.get;
2281
+ set = desc.set;
2282
+ } else {
2283
+ get = function() {
2284
+ return this[name];
2285
+ };
2286
+ set = function(v) {
2287
+ this[name] = v;
2288
+ };
2289
+ }
2290
+ else if (kind === 2) get = function() {
2291
+ return desc.value;
2292
+ };
2293
+ else {
2294
+ if (kind === 1 || kind === 3) get = function() {
2295
+ return desc.get.call(this);
2296
+ };
2297
+ if (kind === 1 || kind === 4) set = function(v) {
2298
+ desc.set.call(this, v);
2299
+ };
2300
+ }
2301
+ ctx.access = get && set ? {
2302
+ get,
2303
+ set
2304
+ } : get ? { get } : { set };
2305
+ try {
2306
+ return dec(value, ctx);
2307
+ } finally {
2308
+ decoratorFinishedRef.v = true;
2309
+ }
2310
+ }
2311
+ function assertNotFinished(decoratorFinishedRef, fnName) {
2312
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
2313
+ }
2314
+ function assertCallable(fn, hint) {
2315
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
2316
+ }
2317
+ function assertValidReturnValue(kind, value) {
2318
+ var type = typeof value;
2319
+ if (kind === 1) {
2320
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
2321
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
2322
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
2323
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
2324
+ } else if (type !== "function") {
2325
+ var hint;
2326
+ if (kind === 0) hint = "field";
2327
+ else if (kind === 10) hint = "class";
2328
+ else hint = "method";
2329
+ throw new TypeError(hint + " decorators must return a function or void 0");
2330
+ }
2331
+ }
2332
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
2333
+ var decs = decInfo[0];
2334
+ var desc, init, value;
2335
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
2336
+ get: decInfo[3],
2337
+ set: decInfo[4]
2338
+ };
2339
+ else if (kind === 3) desc = { get: decInfo[3] };
2340
+ else if (kind === 4) desc = { set: decInfo[3] };
2341
+ else desc = { value: decInfo[3] };
2342
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
2343
+ if (kind === 1) value = {
2344
+ get: desc.get,
2345
+ set: desc.set
2346
+ };
2347
+ else if (kind === 2) value = desc.value;
2348
+ else if (kind === 3) value = desc.get;
2349
+ else if (kind === 4) value = desc.set;
2350
+ var newValue, get, set;
2351
+ if (typeof decs === "function") {
2352
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2353
+ if (newValue !== void 0) {
2354
+ assertValidReturnValue(kind, newValue);
2355
+ if (kind === 0) init = newValue;
2356
+ else if (kind === 1) {
2357
+ init = newValue.init;
2358
+ get = newValue.get || value.get;
2359
+ set = newValue.set || value.set;
2360
+ value = {
2361
+ get,
2362
+ set
2363
+ };
2364
+ } else value = newValue;
2365
+ }
2366
+ } else for (var i = decs.length - 1; i >= 0; i--) {
2367
+ var dec = decs[i];
2368
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2369
+ if (newValue !== void 0) {
2370
+ assertValidReturnValue(kind, newValue);
2371
+ var newInit;
2372
+ if (kind === 0) newInit = newValue;
2373
+ else if (kind === 1) {
2374
+ newInit = newValue.init;
2375
+ get = newValue.get || value.get;
2376
+ set = newValue.set || value.set;
2377
+ value = {
2378
+ get,
2379
+ set
2380
+ };
2381
+ } else value = newValue;
2382
+ if (newInit !== void 0) if (init === void 0) init = newInit;
2383
+ else if (typeof init === "function") init = [init, newInit];
2384
+ else init.push(newInit);
2385
+ }
2386
+ }
2387
+ if (kind === 0 || kind === 1) {
2388
+ if (init === void 0) init = function(instance, init$1) {
2389
+ return init$1;
2390
+ };
2391
+ else if (typeof init !== "function") {
2392
+ var ownInitializers = init;
2393
+ init = function(instance, init$1) {
2394
+ var value$1 = init$1;
2395
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
2396
+ return value$1;
2397
+ };
2398
+ } else {
2399
+ var originalInitializer = init;
2400
+ init = function(instance, init$1) {
2401
+ return originalInitializer.call(instance, init$1);
2402
+ };
2403
+ }
2404
+ ret.push(init);
2405
+ }
2406
+ if (kind !== 0) {
2407
+ if (kind === 1) {
2408
+ desc.get = value.get;
2409
+ desc.set = value.set;
2410
+ } else if (kind === 2) desc.value = value;
2411
+ else if (kind === 3) desc.get = value;
2412
+ else if (kind === 4) desc.set = value;
2413
+ if (isPrivate) if (kind === 1) {
2414
+ ret.push(function(instance, args) {
2415
+ return value.get.call(instance, args);
2416
+ });
2417
+ ret.push(function(instance, args) {
2418
+ return value.set.call(instance, args);
2419
+ });
2420
+ } else if (kind === 2) ret.push(value);
2421
+ else ret.push(function(instance, args) {
2422
+ return value.call(instance, args);
2423
+ });
2424
+ else Object.defineProperty(base, name, desc);
2425
+ }
2426
+ }
2427
+ function applyMemberDecs(Class, decInfos, metadata) {
2428
+ var ret = [];
2429
+ var protoInitializers;
2430
+ var staticInitializers;
2431
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
2432
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
2433
+ for (var i = 0; i < decInfos.length; i++) {
2434
+ var decInfo = decInfos[i];
2435
+ if (!Array.isArray(decInfo)) continue;
2436
+ var kind = decInfo[1];
2437
+ var name = decInfo[2];
2438
+ var isPrivate = decInfo.length > 3;
2439
+ var isStatic = kind >= 5;
2440
+ var base;
2441
+ var initializers;
2442
+ if (isStatic) {
2443
+ base = Class;
2444
+ kind = kind - 5;
2445
+ staticInitializers = staticInitializers || [];
2446
+ initializers = staticInitializers;
2447
+ } else {
2448
+ base = Class.prototype;
2449
+ protoInitializers = protoInitializers || [];
2450
+ initializers = protoInitializers;
2451
+ }
2452
+ if (kind !== 0 && !isPrivate) {
2453
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
2454
+ var existingKind = existingNonFields.get(name) || 0;
2455
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
2456
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
2457
+ else existingNonFields.set(name, true);
2458
+ }
2459
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
2460
+ }
2461
+ pushInitializers(ret, protoInitializers);
2462
+ pushInitializers(ret, staticInitializers);
2463
+ return ret;
2464
+ }
2465
+ function pushInitializers(ret, initializers) {
2466
+ if (initializers) ret.push(function(instance) {
2467
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
2468
+ return instance;
2469
+ });
2470
+ }
2471
+ function applyClassDecs(targetClass, classDecs, metadata) {
2472
+ if (classDecs.length > 0) {
2473
+ var initializers = [];
2474
+ var newClass = targetClass;
2475
+ var name = targetClass.name;
2476
+ for (var i = classDecs.length - 1; i >= 0; i--) {
2477
+ var decoratorFinishedRef = { v: false };
2478
+ try {
2479
+ var nextNewClass = classDecs[i](newClass, {
2480
+ kind: "class",
2481
+ name,
2482
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
2483
+ metadata
2484
+ });
2485
+ } finally {
2486
+ decoratorFinishedRef.v = true;
2487
+ }
2488
+ if (nextNewClass !== void 0) {
2489
+ assertValidReturnValue(10, nextNewClass);
2490
+ newClass = nextNewClass;
2491
+ }
2492
+ }
2493
+ return [defineMetadata(newClass, metadata), function() {
2494
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
2495
+ }];
2496
+ }
2497
+ }
2498
+ function defineMetadata(Class, metadata) {
2499
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
2500
+ configurable: true,
2501
+ enumerable: true,
2502
+ value: metadata
2503
+ });
2504
+ }
2505
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
2506
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
2507
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
2508
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
2509
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
2510
+ return {
2511
+ e,
2512
+ get c() {
2513
+ return applyClassDecs(targetClass, classDecs, metadata);
2514
+ }
2515
+ };
2516
+ };
2517
+ }
2518
+ function _apply_decs_2203_r$6(targetClass, memberDecs, classDecs, parentClass) {
2519
+ return (_apply_decs_2203_r$6 = applyDecs2203RFactory$6())(targetClass, memberDecs, classDecs, parentClass);
2520
+ }
2521
+ var _dec$6, _initClass$6;
2522
+ let _EndpointAdapterFactory;
2523
+ _dec$6 = (0, _navios_di.Factory)({ token: require_tokens.EndpointAdapterToken });
2524
+ var EndpointAdapterFactory = class {
2525
+ static {
2526
+ ({c: [_EndpointAdapterFactory, _initClass$6]} = _apply_decs_2203_r$6(this, [], [_dec$6]));
2527
+ }
2528
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
2529
+ create(ctx) {
2530
+ const service = this.environment.getToken(require_tokens.EndpointAdapterToken);
2531
+ if (!service) throw new Error("EndpointAdapterToken service not found in environment");
2532
+ return ctx.inject(service);
2533
+ }
2534
+ static {
2535
+ _initClass$6();
2536
+ }
2537
+ };
2538
+
2539
+ //#endregion
2540
+ //#region src/factories/http-adapter.factory.mts
2541
+ function applyDecs2203RFactory$5() {
2542
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
2543
+ return function addInitializer(initializer) {
2544
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
2545
+ assertCallable(initializer, "An initializer");
2546
+ initializers.push(initializer);
2547
+ };
2548
+ }
2549
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
2550
+ var kindStr;
2551
+ switch (kind) {
2552
+ case 1:
2553
+ kindStr = "accessor";
2554
+ break;
2555
+ case 2:
2556
+ kindStr = "method";
2557
+ break;
2558
+ case 3:
2559
+ kindStr = "getter";
2560
+ break;
2561
+ case 4:
2562
+ kindStr = "setter";
2563
+ break;
2564
+ default: kindStr = "field";
2565
+ }
2566
+ var ctx = {
2567
+ kind: kindStr,
2568
+ name: isPrivate ? "#" + name : name,
2569
+ static: isStatic,
2570
+ private: isPrivate,
2571
+ metadata
2572
+ };
2573
+ var decoratorFinishedRef = { v: false };
2574
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
2575
+ var get, set;
2576
+ if (kind === 0) if (isPrivate) {
2577
+ get = desc.get;
2578
+ set = desc.set;
2579
+ } else {
2580
+ get = function() {
2581
+ return this[name];
2582
+ };
2583
+ set = function(v) {
2584
+ this[name] = v;
2585
+ };
2586
+ }
2587
+ else if (kind === 2) get = function() {
2588
+ return desc.value;
2589
+ };
2590
+ else {
2591
+ if (kind === 1 || kind === 3) get = function() {
2592
+ return desc.get.call(this);
2593
+ };
2594
+ if (kind === 1 || kind === 4) set = function(v) {
2595
+ desc.set.call(this, v);
2596
+ };
2597
+ }
2598
+ ctx.access = get && set ? {
2599
+ get,
2600
+ set
2601
+ } : get ? { get } : { set };
2602
+ try {
2603
+ return dec(value, ctx);
2604
+ } finally {
2605
+ decoratorFinishedRef.v = true;
2606
+ }
2607
+ }
2608
+ function assertNotFinished(decoratorFinishedRef, fnName) {
2609
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
2610
+ }
2611
+ function assertCallable(fn, hint) {
2612
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
2613
+ }
2614
+ function assertValidReturnValue(kind, value) {
2615
+ var type = typeof value;
2616
+ if (kind === 1) {
2617
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
2618
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
2619
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
2620
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
2621
+ } else if (type !== "function") {
2622
+ var hint;
2623
+ if (kind === 0) hint = "field";
2624
+ else if (kind === 10) hint = "class";
2625
+ else hint = "method";
2626
+ throw new TypeError(hint + " decorators must return a function or void 0");
2627
+ }
2628
+ }
2629
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
2630
+ var decs = decInfo[0];
2631
+ var desc, init, value;
2632
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
2633
+ get: decInfo[3],
2634
+ set: decInfo[4]
2635
+ };
2636
+ else if (kind === 3) desc = { get: decInfo[3] };
2637
+ else if (kind === 4) desc = { set: decInfo[3] };
2638
+ else desc = { value: decInfo[3] };
2639
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
2640
+ if (kind === 1) value = {
2641
+ get: desc.get,
2642
+ set: desc.set
2643
+ };
2644
+ else if (kind === 2) value = desc.value;
2645
+ else if (kind === 3) value = desc.get;
2646
+ else if (kind === 4) value = desc.set;
2647
+ var newValue, get, set;
2648
+ if (typeof decs === "function") {
2649
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2650
+ if (newValue !== void 0) {
2651
+ assertValidReturnValue(kind, newValue);
2652
+ if (kind === 0) init = newValue;
2653
+ else if (kind === 1) {
2654
+ init = newValue.init;
2655
+ get = newValue.get || value.get;
2656
+ set = newValue.set || value.set;
2657
+ value = {
2658
+ get,
2659
+ set
2660
+ };
2661
+ } else value = newValue;
2662
+ }
2663
+ } else for (var i = decs.length - 1; i >= 0; i--) {
2664
+ var dec = decs[i];
2665
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2666
+ if (newValue !== void 0) {
2667
+ assertValidReturnValue(kind, newValue);
2668
+ var newInit;
2669
+ if (kind === 0) newInit = newValue;
2670
+ else if (kind === 1) {
2671
+ newInit = newValue.init;
2672
+ get = newValue.get || value.get;
2673
+ set = newValue.set || value.set;
2674
+ value = {
2675
+ get,
2676
+ set
2677
+ };
2678
+ } else value = newValue;
2679
+ if (newInit !== void 0) if (init === void 0) init = newInit;
2680
+ else if (typeof init === "function") init = [init, newInit];
2681
+ else init.push(newInit);
2682
+ }
2683
+ }
2684
+ if (kind === 0 || kind === 1) {
2685
+ if (init === void 0) init = function(instance, init$1) {
2686
+ return init$1;
2687
+ };
2688
+ else if (typeof init !== "function") {
2689
+ var ownInitializers = init;
2690
+ init = function(instance, init$1) {
2691
+ var value$1 = init$1;
2692
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
2693
+ return value$1;
2694
+ };
2695
+ } else {
2696
+ var originalInitializer = init;
2697
+ init = function(instance, init$1) {
2698
+ return originalInitializer.call(instance, init$1);
2699
+ };
2700
+ }
2701
+ ret.push(init);
2702
+ }
2703
+ if (kind !== 0) {
2704
+ if (kind === 1) {
2705
+ desc.get = value.get;
2706
+ desc.set = value.set;
2707
+ } else if (kind === 2) desc.value = value;
2708
+ else if (kind === 3) desc.get = value;
2709
+ else if (kind === 4) desc.set = value;
2710
+ if (isPrivate) if (kind === 1) {
2711
+ ret.push(function(instance, args) {
2712
+ return value.get.call(instance, args);
2713
+ });
2714
+ ret.push(function(instance, args) {
2715
+ return value.set.call(instance, args);
2716
+ });
2717
+ } else if (kind === 2) ret.push(value);
2718
+ else ret.push(function(instance, args) {
2719
+ return value.call(instance, args);
2720
+ });
2721
+ else Object.defineProperty(base, name, desc);
2722
+ }
2723
+ }
2724
+ function applyMemberDecs(Class, decInfos, metadata) {
2725
+ var ret = [];
2726
+ var protoInitializers;
2727
+ var staticInitializers;
2728
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
2729
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
2730
+ for (var i = 0; i < decInfos.length; i++) {
2731
+ var decInfo = decInfos[i];
2732
+ if (!Array.isArray(decInfo)) continue;
2733
+ var kind = decInfo[1];
2734
+ var name = decInfo[2];
2735
+ var isPrivate = decInfo.length > 3;
2736
+ var isStatic = kind >= 5;
2737
+ var base;
2738
+ var initializers;
2739
+ if (isStatic) {
2740
+ base = Class;
2741
+ kind = kind - 5;
2742
+ staticInitializers = staticInitializers || [];
2743
+ initializers = staticInitializers;
2744
+ } else {
2745
+ base = Class.prototype;
2746
+ protoInitializers = protoInitializers || [];
2747
+ initializers = protoInitializers;
2748
+ }
2749
+ if (kind !== 0 && !isPrivate) {
2750
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
2751
+ var existingKind = existingNonFields.get(name) || 0;
2752
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
2753
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
2754
+ else existingNonFields.set(name, true);
2755
+ }
2756
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
2757
+ }
2758
+ pushInitializers(ret, protoInitializers);
2759
+ pushInitializers(ret, staticInitializers);
2760
+ return ret;
2761
+ }
2762
+ function pushInitializers(ret, initializers) {
2763
+ if (initializers) ret.push(function(instance) {
2764
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
2765
+ return instance;
2766
+ });
2767
+ }
2768
+ function applyClassDecs(targetClass, classDecs, metadata) {
2769
+ if (classDecs.length > 0) {
2770
+ var initializers = [];
2771
+ var newClass = targetClass;
2772
+ var name = targetClass.name;
2773
+ for (var i = classDecs.length - 1; i >= 0; i--) {
2774
+ var decoratorFinishedRef = { v: false };
2775
+ try {
2776
+ var nextNewClass = classDecs[i](newClass, {
2777
+ kind: "class",
2778
+ name,
2779
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
2780
+ metadata
2781
+ });
2782
+ } finally {
2783
+ decoratorFinishedRef.v = true;
2784
+ }
2785
+ if (nextNewClass !== void 0) {
2786
+ assertValidReturnValue(10, nextNewClass);
2787
+ newClass = nextNewClass;
2788
+ }
2789
+ }
2790
+ return [defineMetadata(newClass, metadata), function() {
2791
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
2792
+ }];
2793
+ }
2794
+ }
2795
+ function defineMetadata(Class, metadata) {
2796
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
2797
+ configurable: true,
2798
+ enumerable: true,
2799
+ value: metadata
2800
+ });
2801
+ }
2802
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
2803
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
2804
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
2805
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
2806
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
2807
+ return {
2808
+ e,
2809
+ get c() {
2810
+ return applyClassDecs(targetClass, classDecs, metadata);
2811
+ }
2812
+ };
2813
+ };
2814
+ }
2815
+ function _apply_decs_2203_r$5(targetClass, memberDecs, classDecs, parentClass) {
2816
+ return (_apply_decs_2203_r$5 = applyDecs2203RFactory$5())(targetClass, memberDecs, classDecs, parentClass);
2817
+ }
2818
+ var _dec$5, _initClass$5;
2819
+ let _HttpAdapterFactory;
2820
+ _dec$5 = (0, _navios_di.Factory)({ token: require_tokens.HttpAdapterToken });
2821
+ var HttpAdapterFactory = class {
2822
+ static {
2823
+ ({c: [_HttpAdapterFactory, _initClass$5]} = _apply_decs_2203_r$5(this, [], [_dec$5]));
2824
+ }
2825
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
2826
+ create(ctx) {
2827
+ const service = this.environment.getToken(require_tokens.HttpAdapterToken);
2828
+ if (!service) throw new Error("HttpAdapterToken service not found in environment");
2829
+ return ctx.inject(service);
2830
+ }
2831
+ static {
2832
+ _initClass$5();
2833
+ }
2834
+ };
2835
+
2836
+ //#endregion
2837
+ //#region src/factories/multipart-adapter.factory.mts
2838
+ function applyDecs2203RFactory$4() {
2839
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
2840
+ return function addInitializer(initializer) {
2841
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
2842
+ assertCallable(initializer, "An initializer");
2843
+ initializers.push(initializer);
2844
+ };
2845
+ }
2846
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
2847
+ var kindStr;
2848
+ switch (kind) {
2849
+ case 1:
2850
+ kindStr = "accessor";
2851
+ break;
2852
+ case 2:
2853
+ kindStr = "method";
2854
+ break;
2855
+ case 3:
2856
+ kindStr = "getter";
2857
+ break;
2858
+ case 4:
2859
+ kindStr = "setter";
2860
+ break;
2861
+ default: kindStr = "field";
2862
+ }
2863
+ var ctx = {
2864
+ kind: kindStr,
2865
+ name: isPrivate ? "#" + name : name,
2866
+ static: isStatic,
2867
+ private: isPrivate,
2868
+ metadata
2869
+ };
2870
+ var decoratorFinishedRef = { v: false };
2871
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
2872
+ var get, set;
2873
+ if (kind === 0) if (isPrivate) {
2874
+ get = desc.get;
2875
+ set = desc.set;
2876
+ } else {
2877
+ get = function() {
2878
+ return this[name];
2879
+ };
2880
+ set = function(v) {
2881
+ this[name] = v;
2882
+ };
2883
+ }
2884
+ else if (kind === 2) get = function() {
2885
+ return desc.value;
2886
+ };
2887
+ else {
2888
+ if (kind === 1 || kind === 3) get = function() {
2889
+ return desc.get.call(this);
2890
+ };
2891
+ if (kind === 1 || kind === 4) set = function(v) {
2892
+ desc.set.call(this, v);
2893
+ };
2894
+ }
2895
+ ctx.access = get && set ? {
2896
+ get,
2897
+ set
2898
+ } : get ? { get } : { set };
2899
+ try {
2900
+ return dec(value, ctx);
2901
+ } finally {
2902
+ decoratorFinishedRef.v = true;
2903
+ }
2904
+ }
2905
+ function assertNotFinished(decoratorFinishedRef, fnName) {
2906
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
2907
+ }
2908
+ function assertCallable(fn, hint) {
2909
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
2910
+ }
2911
+ function assertValidReturnValue(kind, value) {
2912
+ var type = typeof value;
2913
+ if (kind === 1) {
2914
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
2915
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
2916
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
2917
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
2918
+ } else if (type !== "function") {
2919
+ var hint;
2920
+ if (kind === 0) hint = "field";
2921
+ else if (kind === 10) hint = "class";
2922
+ else hint = "method";
2923
+ throw new TypeError(hint + " decorators must return a function or void 0");
2924
+ }
2925
+ }
2926
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
2927
+ var decs = decInfo[0];
2928
+ var desc, init, value;
2929
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
2930
+ get: decInfo[3],
2931
+ set: decInfo[4]
2932
+ };
2933
+ else if (kind === 3) desc = { get: decInfo[3] };
2934
+ else if (kind === 4) desc = { set: decInfo[3] };
2935
+ else desc = { value: decInfo[3] };
2936
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
2937
+ if (kind === 1) value = {
2938
+ get: desc.get,
2939
+ set: desc.set
2940
+ };
2941
+ else if (kind === 2) value = desc.value;
2942
+ else if (kind === 3) value = desc.get;
2943
+ else if (kind === 4) value = desc.set;
2944
+ var newValue, get, set;
2945
+ if (typeof decs === "function") {
2946
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2947
+ if (newValue !== void 0) {
2948
+ assertValidReturnValue(kind, newValue);
2949
+ if (kind === 0) init = newValue;
2950
+ else if (kind === 1) {
2951
+ init = newValue.init;
2952
+ get = newValue.get || value.get;
2953
+ set = newValue.set || value.set;
2954
+ value = {
2955
+ get,
2956
+ set
2957
+ };
2958
+ } else value = newValue;
2959
+ }
2960
+ } else for (var i = decs.length - 1; i >= 0; i--) {
2961
+ var dec = decs[i];
2962
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
2963
+ if (newValue !== void 0) {
2964
+ assertValidReturnValue(kind, newValue);
2965
+ var newInit;
2966
+ if (kind === 0) newInit = newValue;
2967
+ else if (kind === 1) {
2968
+ newInit = newValue.init;
2969
+ get = newValue.get || value.get;
2970
+ set = newValue.set || value.set;
2971
+ value = {
2972
+ get,
2973
+ set
2974
+ };
2975
+ } else value = newValue;
2976
+ if (newInit !== void 0) if (init === void 0) init = newInit;
2977
+ else if (typeof init === "function") init = [init, newInit];
2978
+ else init.push(newInit);
2979
+ }
2980
+ }
2981
+ if (kind === 0 || kind === 1) {
2982
+ if (init === void 0) init = function(instance, init$1) {
2983
+ return init$1;
2984
+ };
2985
+ else if (typeof init !== "function") {
2986
+ var ownInitializers = init;
2987
+ init = function(instance, init$1) {
2988
+ var value$1 = init$1;
2989
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
2990
+ return value$1;
2991
+ };
2992
+ } else {
2993
+ var originalInitializer = init;
2994
+ init = function(instance, init$1) {
2995
+ return originalInitializer.call(instance, init$1);
2996
+ };
2997
+ }
2998
+ ret.push(init);
2999
+ }
3000
+ if (kind !== 0) {
3001
+ if (kind === 1) {
3002
+ desc.get = value.get;
3003
+ desc.set = value.set;
3004
+ } else if (kind === 2) desc.value = value;
3005
+ else if (kind === 3) desc.get = value;
3006
+ else if (kind === 4) desc.set = value;
3007
+ if (isPrivate) if (kind === 1) {
3008
+ ret.push(function(instance, args) {
3009
+ return value.get.call(instance, args);
3010
+ });
3011
+ ret.push(function(instance, args) {
3012
+ return value.set.call(instance, args);
3013
+ });
3014
+ } else if (kind === 2) ret.push(value);
3015
+ else ret.push(function(instance, args) {
3016
+ return value.call(instance, args);
3017
+ });
3018
+ else Object.defineProperty(base, name, desc);
3019
+ }
3020
+ }
3021
+ function applyMemberDecs(Class, decInfos, metadata) {
3022
+ var ret = [];
3023
+ var protoInitializers;
3024
+ var staticInitializers;
3025
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
3026
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
3027
+ for (var i = 0; i < decInfos.length; i++) {
3028
+ var decInfo = decInfos[i];
3029
+ if (!Array.isArray(decInfo)) continue;
3030
+ var kind = decInfo[1];
3031
+ var name = decInfo[2];
3032
+ var isPrivate = decInfo.length > 3;
3033
+ var isStatic = kind >= 5;
3034
+ var base;
3035
+ var initializers;
3036
+ if (isStatic) {
3037
+ base = Class;
3038
+ kind = kind - 5;
3039
+ staticInitializers = staticInitializers || [];
3040
+ initializers = staticInitializers;
3041
+ } else {
3042
+ base = Class.prototype;
3043
+ protoInitializers = protoInitializers || [];
3044
+ initializers = protoInitializers;
3045
+ }
3046
+ if (kind !== 0 && !isPrivate) {
3047
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
3048
+ var existingKind = existingNonFields.get(name) || 0;
3049
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
3050
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
3051
+ else existingNonFields.set(name, true);
3052
+ }
3053
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
3054
+ }
3055
+ pushInitializers(ret, protoInitializers);
3056
+ pushInitializers(ret, staticInitializers);
3057
+ return ret;
3058
+ }
3059
+ function pushInitializers(ret, initializers) {
3060
+ if (initializers) ret.push(function(instance) {
3061
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
3062
+ return instance;
3063
+ });
3064
+ }
3065
+ function applyClassDecs(targetClass, classDecs, metadata) {
3066
+ if (classDecs.length > 0) {
3067
+ var initializers = [];
3068
+ var newClass = targetClass;
3069
+ var name = targetClass.name;
3070
+ for (var i = classDecs.length - 1; i >= 0; i--) {
3071
+ var decoratorFinishedRef = { v: false };
3072
+ try {
3073
+ var nextNewClass = classDecs[i](newClass, {
3074
+ kind: "class",
3075
+ name,
3076
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
3077
+ metadata
3078
+ });
3079
+ } finally {
3080
+ decoratorFinishedRef.v = true;
3081
+ }
3082
+ if (nextNewClass !== void 0) {
3083
+ assertValidReturnValue(10, nextNewClass);
3084
+ newClass = nextNewClass;
3085
+ }
3086
+ }
3087
+ return [defineMetadata(newClass, metadata), function() {
3088
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
3089
+ }];
3090
+ }
3091
+ }
3092
+ function defineMetadata(Class, metadata) {
3093
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
3094
+ configurable: true,
3095
+ enumerable: true,
3096
+ value: metadata
3097
+ });
3098
+ }
3099
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
3100
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
3101
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
3102
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
3103
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
3104
+ return {
3105
+ e,
3106
+ get c() {
3107
+ return applyClassDecs(targetClass, classDecs, metadata);
3108
+ }
3109
+ };
3110
+ };
3111
+ }
3112
+ function _apply_decs_2203_r$4(targetClass, memberDecs, classDecs, parentClass) {
3113
+ return (_apply_decs_2203_r$4 = applyDecs2203RFactory$4())(targetClass, memberDecs, classDecs, parentClass);
3114
+ }
3115
+ var _dec$4, _initClass$4;
3116
+ let _MultipartAdapterFactory;
3117
+ _dec$4 = (0, _navios_di.Factory)({ token: require_tokens.MultipartAdapterToken });
3118
+ var MultipartAdapterFactory = class {
3119
+ static {
3120
+ ({c: [_MultipartAdapterFactory, _initClass$4]} = _apply_decs_2203_r$4(this, [], [_dec$4]));
3121
+ }
3122
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
3123
+ create(ctx) {
3124
+ const service = this.environment.getToken(require_tokens.MultipartAdapterToken);
3125
+ if (!service) throw new Error("MultipartAdapterToken service not found in environment");
3126
+ return ctx.inject(service);
3127
+ }
3128
+ static {
3129
+ _initClass$4();
3130
+ }
3131
+ };
3132
+
3133
+ //#endregion
3134
+ //#region src/factories/request.factory.mts
3135
+ function applyDecs2203RFactory$3() {
3136
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
3137
+ return function addInitializer(initializer) {
3138
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
3139
+ assertCallable(initializer, "An initializer");
3140
+ initializers.push(initializer);
3141
+ };
3142
+ }
3143
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
3144
+ var kindStr;
3145
+ switch (kind) {
3146
+ case 1:
3147
+ kindStr = "accessor";
3148
+ break;
3149
+ case 2:
3150
+ kindStr = "method";
3151
+ break;
3152
+ case 3:
3153
+ kindStr = "getter";
3154
+ break;
3155
+ case 4:
3156
+ kindStr = "setter";
3157
+ break;
3158
+ default: kindStr = "field";
3159
+ }
3160
+ var ctx = {
3161
+ kind: kindStr,
3162
+ name: isPrivate ? "#" + name : name,
3163
+ static: isStatic,
3164
+ private: isPrivate,
3165
+ metadata
3166
+ };
3167
+ var decoratorFinishedRef = { v: false };
3168
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
3169
+ var get, set;
3170
+ if (kind === 0) if (isPrivate) {
3171
+ get = desc.get;
3172
+ set = desc.set;
3173
+ } else {
3174
+ get = function() {
3175
+ return this[name];
3176
+ };
3177
+ set = function(v) {
3178
+ this[name] = v;
3179
+ };
3180
+ }
3181
+ else if (kind === 2) get = function() {
3182
+ return desc.value;
3183
+ };
3184
+ else {
3185
+ if (kind === 1 || kind === 3) get = function() {
3186
+ return desc.get.call(this);
3187
+ };
3188
+ if (kind === 1 || kind === 4) set = function(v) {
3189
+ desc.set.call(this, v);
3190
+ };
3191
+ }
3192
+ ctx.access = get && set ? {
3193
+ get,
3194
+ set
3195
+ } : get ? { get } : { set };
3196
+ try {
3197
+ return dec(value, ctx);
3198
+ } finally {
3199
+ decoratorFinishedRef.v = true;
3200
+ }
3201
+ }
3202
+ function assertNotFinished(decoratorFinishedRef, fnName) {
3203
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
3204
+ }
3205
+ function assertCallable(fn, hint) {
3206
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
3207
+ }
3208
+ function assertValidReturnValue(kind, value) {
3209
+ var type = typeof value;
3210
+ if (kind === 1) {
3211
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
3212
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
3213
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
3214
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
3215
+ } else if (type !== "function") {
3216
+ var hint;
3217
+ if (kind === 0) hint = "field";
3218
+ else if (kind === 10) hint = "class";
3219
+ else hint = "method";
3220
+ throw new TypeError(hint + " decorators must return a function or void 0");
3221
+ }
3222
+ }
3223
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
3224
+ var decs = decInfo[0];
3225
+ var desc, init, value;
3226
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
3227
+ get: decInfo[3],
3228
+ set: decInfo[4]
3229
+ };
3230
+ else if (kind === 3) desc = { get: decInfo[3] };
3231
+ else if (kind === 4) desc = { set: decInfo[3] };
3232
+ else desc = { value: decInfo[3] };
3233
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
3234
+ if (kind === 1) value = {
3235
+ get: desc.get,
3236
+ set: desc.set
3237
+ };
3238
+ else if (kind === 2) value = desc.value;
3239
+ else if (kind === 3) value = desc.get;
3240
+ else if (kind === 4) value = desc.set;
3241
+ var newValue, get, set;
3242
+ if (typeof decs === "function") {
3243
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3244
+ if (newValue !== void 0) {
3245
+ assertValidReturnValue(kind, newValue);
3246
+ if (kind === 0) init = newValue;
3247
+ else if (kind === 1) {
3248
+ init = newValue.init;
3249
+ get = newValue.get || value.get;
3250
+ set = newValue.set || value.set;
3251
+ value = {
3252
+ get,
3253
+ set
3254
+ };
3255
+ } else value = newValue;
3256
+ }
3257
+ } else for (var i = decs.length - 1; i >= 0; i--) {
3258
+ var dec = decs[i];
3259
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3260
+ if (newValue !== void 0) {
3261
+ assertValidReturnValue(kind, newValue);
3262
+ var newInit;
3263
+ if (kind === 0) newInit = newValue;
3264
+ else if (kind === 1) {
3265
+ newInit = newValue.init;
3266
+ get = newValue.get || value.get;
3267
+ set = newValue.set || value.set;
3268
+ value = {
3269
+ get,
3270
+ set
3271
+ };
3272
+ } else value = newValue;
3273
+ if (newInit !== void 0) if (init === void 0) init = newInit;
3274
+ else if (typeof init === "function") init = [init, newInit];
3275
+ else init.push(newInit);
3276
+ }
3277
+ }
3278
+ if (kind === 0 || kind === 1) {
3279
+ if (init === void 0) init = function(instance, init$1) {
3280
+ return init$1;
3281
+ };
3282
+ else if (typeof init !== "function") {
3283
+ var ownInitializers = init;
3284
+ init = function(instance, init$1) {
3285
+ var value$1 = init$1;
3286
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
3287
+ return value$1;
3288
+ };
3289
+ } else {
3290
+ var originalInitializer = init;
3291
+ init = function(instance, init$1) {
3292
+ return originalInitializer.call(instance, init$1);
3293
+ };
3294
+ }
3295
+ ret.push(init);
3296
+ }
3297
+ if (kind !== 0) {
3298
+ if (kind === 1) {
3299
+ desc.get = value.get;
3300
+ desc.set = value.set;
3301
+ } else if (kind === 2) desc.value = value;
3302
+ else if (kind === 3) desc.get = value;
3303
+ else if (kind === 4) desc.set = value;
3304
+ if (isPrivate) if (kind === 1) {
3305
+ ret.push(function(instance, args) {
3306
+ return value.get.call(instance, args);
3307
+ });
3308
+ ret.push(function(instance, args) {
3309
+ return value.set.call(instance, args);
3310
+ });
3311
+ } else if (kind === 2) ret.push(value);
3312
+ else ret.push(function(instance, args) {
3313
+ return value.call(instance, args);
3314
+ });
3315
+ else Object.defineProperty(base, name, desc);
3316
+ }
3317
+ }
3318
+ function applyMemberDecs(Class, decInfos, metadata) {
3319
+ var ret = [];
3320
+ var protoInitializers;
3321
+ var staticInitializers;
3322
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
3323
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
3324
+ for (var i = 0; i < decInfos.length; i++) {
3325
+ var decInfo = decInfos[i];
3326
+ if (!Array.isArray(decInfo)) continue;
3327
+ var kind = decInfo[1];
3328
+ var name = decInfo[2];
3329
+ var isPrivate = decInfo.length > 3;
3330
+ var isStatic = kind >= 5;
3331
+ var base;
3332
+ var initializers;
3333
+ if (isStatic) {
3334
+ base = Class;
3335
+ kind = kind - 5;
3336
+ staticInitializers = staticInitializers || [];
3337
+ initializers = staticInitializers;
3338
+ } else {
3339
+ base = Class.prototype;
3340
+ protoInitializers = protoInitializers || [];
3341
+ initializers = protoInitializers;
3342
+ }
3343
+ if (kind !== 0 && !isPrivate) {
3344
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
3345
+ var existingKind = existingNonFields.get(name) || 0;
3346
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
3347
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
3348
+ else existingNonFields.set(name, true);
3349
+ }
3350
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
3351
+ }
3352
+ pushInitializers(ret, protoInitializers);
3353
+ pushInitializers(ret, staticInitializers);
3354
+ return ret;
3355
+ }
3356
+ function pushInitializers(ret, initializers) {
3357
+ if (initializers) ret.push(function(instance) {
3358
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
3359
+ return instance;
3360
+ });
3361
+ }
3362
+ function applyClassDecs(targetClass, classDecs, metadata) {
3363
+ if (classDecs.length > 0) {
3364
+ var initializers = [];
3365
+ var newClass = targetClass;
3366
+ var name = targetClass.name;
3367
+ for (var i = classDecs.length - 1; i >= 0; i--) {
3368
+ var decoratorFinishedRef = { v: false };
3369
+ try {
3370
+ var nextNewClass = classDecs[i](newClass, {
3371
+ kind: "class",
3372
+ name,
3373
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
3374
+ metadata
3375
+ });
3376
+ } finally {
3377
+ decoratorFinishedRef.v = true;
3378
+ }
3379
+ if (nextNewClass !== void 0) {
3380
+ assertValidReturnValue(10, nextNewClass);
3381
+ newClass = nextNewClass;
3382
+ }
3383
+ }
3384
+ return [defineMetadata(newClass, metadata), function() {
3385
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
3386
+ }];
3387
+ }
3388
+ }
3389
+ function defineMetadata(Class, metadata) {
3390
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
3391
+ configurable: true,
3392
+ enumerable: true,
3393
+ value: metadata
3394
+ });
3395
+ }
3396
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
3397
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
3398
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
3399
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
3400
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
3401
+ return {
3402
+ e,
3403
+ get c() {
3404
+ return applyClassDecs(targetClass, classDecs, metadata);
3405
+ }
3406
+ };
3407
+ };
3408
+ }
3409
+ function _apply_decs_2203_r$3(targetClass, memberDecs, classDecs, parentClass) {
3410
+ return (_apply_decs_2203_r$3 = applyDecs2203RFactory$3())(targetClass, memberDecs, classDecs, parentClass);
3411
+ }
3412
+ var _dec$3, _initClass$3;
3413
+ let _RequestFactory;
3414
+ _dec$3 = (0, _navios_di.Factory)({
3415
+ token: require_tokens.Request,
3416
+ scope: _navios_di.InjectableScope.Request
3417
+ });
3418
+ var RequestFactory = class {
3419
+ static {
3420
+ ({c: [_RequestFactory, _initClass$3]} = _apply_decs_2203_r$3(this, [], [_dec$3]));
3421
+ }
3422
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
3423
+ create(ctx) {
3424
+ const service = this.environment.getToken(require_tokens.Request);
3425
+ if (!service) throw new Error("RequestToken service not found in environment");
3426
+ return ctx.inject(service);
3427
+ }
3428
+ static {
3429
+ _initClass$3();
3430
+ }
3431
+ };
3432
+
3433
+ //#endregion
3434
+ //#region src/factories/reply.factory.mts
3435
+ function applyDecs2203RFactory$2() {
3436
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
3437
+ return function addInitializer(initializer) {
3438
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
3439
+ assertCallable(initializer, "An initializer");
3440
+ initializers.push(initializer);
3441
+ };
3442
+ }
3443
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
3444
+ var kindStr;
3445
+ switch (kind) {
3446
+ case 1:
3447
+ kindStr = "accessor";
3448
+ break;
3449
+ case 2:
3450
+ kindStr = "method";
3451
+ break;
3452
+ case 3:
3453
+ kindStr = "getter";
3454
+ break;
3455
+ case 4:
3456
+ kindStr = "setter";
3457
+ break;
3458
+ default: kindStr = "field";
3459
+ }
3460
+ var ctx = {
3461
+ kind: kindStr,
3462
+ name: isPrivate ? "#" + name : name,
3463
+ static: isStatic,
3464
+ private: isPrivate,
3465
+ metadata
3466
+ };
3467
+ var decoratorFinishedRef = { v: false };
3468
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
3469
+ var get, set;
3470
+ if (kind === 0) if (isPrivate) {
3471
+ get = desc.get;
3472
+ set = desc.set;
3473
+ } else {
3474
+ get = function() {
3475
+ return this[name];
3476
+ };
3477
+ set = function(v) {
3478
+ this[name] = v;
3479
+ };
3480
+ }
3481
+ else if (kind === 2) get = function() {
3482
+ return desc.value;
3483
+ };
3484
+ else {
3485
+ if (kind === 1 || kind === 3) get = function() {
3486
+ return desc.get.call(this);
3487
+ };
3488
+ if (kind === 1 || kind === 4) set = function(v) {
3489
+ desc.set.call(this, v);
3490
+ };
3491
+ }
3492
+ ctx.access = get && set ? {
3493
+ get,
3494
+ set
3495
+ } : get ? { get } : { set };
3496
+ try {
3497
+ return dec(value, ctx);
3498
+ } finally {
3499
+ decoratorFinishedRef.v = true;
3500
+ }
3501
+ }
3502
+ function assertNotFinished(decoratorFinishedRef, fnName) {
3503
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
3504
+ }
3505
+ function assertCallable(fn, hint) {
3506
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
3507
+ }
3508
+ function assertValidReturnValue(kind, value) {
3509
+ var type = typeof value;
3510
+ if (kind === 1) {
3511
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
3512
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
3513
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
3514
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
3515
+ } else if (type !== "function") {
3516
+ var hint;
3517
+ if (kind === 0) hint = "field";
3518
+ else if (kind === 10) hint = "class";
3519
+ else hint = "method";
3520
+ throw new TypeError(hint + " decorators must return a function or void 0");
3521
+ }
3522
+ }
3523
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
3524
+ var decs = decInfo[0];
3525
+ var desc, init, value;
3526
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
3527
+ get: decInfo[3],
3528
+ set: decInfo[4]
3529
+ };
3530
+ else if (kind === 3) desc = { get: decInfo[3] };
3531
+ else if (kind === 4) desc = { set: decInfo[3] };
3532
+ else desc = { value: decInfo[3] };
3533
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
3534
+ if (kind === 1) value = {
3535
+ get: desc.get,
3536
+ set: desc.set
3537
+ };
3538
+ else if (kind === 2) value = desc.value;
3539
+ else if (kind === 3) value = desc.get;
3540
+ else if (kind === 4) value = desc.set;
3541
+ var newValue, get, set;
3542
+ if (typeof decs === "function") {
3543
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3544
+ if (newValue !== void 0) {
3545
+ assertValidReturnValue(kind, newValue);
3546
+ if (kind === 0) init = newValue;
3547
+ else if (kind === 1) {
3548
+ init = newValue.init;
3549
+ get = newValue.get || value.get;
3550
+ set = newValue.set || value.set;
3551
+ value = {
3552
+ get,
3553
+ set
3554
+ };
3555
+ } else value = newValue;
3556
+ }
3557
+ } else for (var i = decs.length - 1; i >= 0; i--) {
3558
+ var dec = decs[i];
3559
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3560
+ if (newValue !== void 0) {
3561
+ assertValidReturnValue(kind, newValue);
3562
+ var newInit;
3563
+ if (kind === 0) newInit = newValue;
3564
+ else if (kind === 1) {
3565
+ newInit = newValue.init;
3566
+ get = newValue.get || value.get;
3567
+ set = newValue.set || value.set;
3568
+ value = {
3569
+ get,
3570
+ set
3571
+ };
3572
+ } else value = newValue;
3573
+ if (newInit !== void 0) if (init === void 0) init = newInit;
3574
+ else if (typeof init === "function") init = [init, newInit];
3575
+ else init.push(newInit);
3576
+ }
3577
+ }
3578
+ if (kind === 0 || kind === 1) {
3579
+ if (init === void 0) init = function(instance, init$1) {
3580
+ return init$1;
3581
+ };
3582
+ else if (typeof init !== "function") {
3583
+ var ownInitializers = init;
3584
+ init = function(instance, init$1) {
3585
+ var value$1 = init$1;
3586
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
3587
+ return value$1;
3588
+ };
3589
+ } else {
3590
+ var originalInitializer = init;
3591
+ init = function(instance, init$1) {
3592
+ return originalInitializer.call(instance, init$1);
3593
+ };
3594
+ }
3595
+ ret.push(init);
3596
+ }
3597
+ if (kind !== 0) {
3598
+ if (kind === 1) {
3599
+ desc.get = value.get;
3600
+ desc.set = value.set;
3601
+ } else if (kind === 2) desc.value = value;
3602
+ else if (kind === 3) desc.get = value;
3603
+ else if (kind === 4) desc.set = value;
3604
+ if (isPrivate) if (kind === 1) {
3605
+ ret.push(function(instance, args) {
3606
+ return value.get.call(instance, args);
3607
+ });
3608
+ ret.push(function(instance, args) {
3609
+ return value.set.call(instance, args);
3610
+ });
3611
+ } else if (kind === 2) ret.push(value);
3612
+ else ret.push(function(instance, args) {
3613
+ return value.call(instance, args);
3614
+ });
3615
+ else Object.defineProperty(base, name, desc);
3616
+ }
3617
+ }
3618
+ function applyMemberDecs(Class, decInfos, metadata) {
3619
+ var ret = [];
3620
+ var protoInitializers;
3621
+ var staticInitializers;
3622
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
3623
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
3624
+ for (var i = 0; i < decInfos.length; i++) {
3625
+ var decInfo = decInfos[i];
3626
+ if (!Array.isArray(decInfo)) continue;
3627
+ var kind = decInfo[1];
3628
+ var name = decInfo[2];
3629
+ var isPrivate = decInfo.length > 3;
3630
+ var isStatic = kind >= 5;
3631
+ var base;
3632
+ var initializers;
3633
+ if (isStatic) {
3634
+ base = Class;
3635
+ kind = kind - 5;
3636
+ staticInitializers = staticInitializers || [];
3637
+ initializers = staticInitializers;
3638
+ } else {
3639
+ base = Class.prototype;
3640
+ protoInitializers = protoInitializers || [];
3641
+ initializers = protoInitializers;
3642
+ }
3643
+ if (kind !== 0 && !isPrivate) {
3644
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
3645
+ var existingKind = existingNonFields.get(name) || 0;
3646
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
3647
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
3648
+ else existingNonFields.set(name, true);
3649
+ }
3650
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
3651
+ }
3652
+ pushInitializers(ret, protoInitializers);
3653
+ pushInitializers(ret, staticInitializers);
3654
+ return ret;
3655
+ }
3656
+ function pushInitializers(ret, initializers) {
3657
+ if (initializers) ret.push(function(instance) {
3658
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
3659
+ return instance;
3660
+ });
3661
+ }
3662
+ function applyClassDecs(targetClass, classDecs, metadata) {
3663
+ if (classDecs.length > 0) {
3664
+ var initializers = [];
3665
+ var newClass = targetClass;
3666
+ var name = targetClass.name;
3667
+ for (var i = classDecs.length - 1; i >= 0; i--) {
3668
+ var decoratorFinishedRef = { v: false };
3669
+ try {
3670
+ var nextNewClass = classDecs[i](newClass, {
3671
+ kind: "class",
3672
+ name,
3673
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
3674
+ metadata
3675
+ });
3676
+ } finally {
3677
+ decoratorFinishedRef.v = true;
3678
+ }
3679
+ if (nextNewClass !== void 0) {
3680
+ assertValidReturnValue(10, nextNewClass);
3681
+ newClass = nextNewClass;
3682
+ }
3683
+ }
3684
+ return [defineMetadata(newClass, metadata), function() {
3685
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
3686
+ }];
3687
+ }
3688
+ }
3689
+ function defineMetadata(Class, metadata) {
3690
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
3691
+ configurable: true,
3692
+ enumerable: true,
3693
+ value: metadata
3694
+ });
3695
+ }
3696
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
3697
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
3698
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
3699
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
3700
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
3701
+ return {
3702
+ e,
3703
+ get c() {
3704
+ return applyClassDecs(targetClass, classDecs, metadata);
3705
+ }
3706
+ };
3707
+ };
3708
+ }
3709
+ function _apply_decs_2203_r$2(targetClass, memberDecs, classDecs, parentClass) {
3710
+ return (_apply_decs_2203_r$2 = applyDecs2203RFactory$2())(targetClass, memberDecs, classDecs, parentClass);
3711
+ }
3712
+ var _dec$2, _initClass$2;
3713
+ let _ReplyFactory;
3714
+ _dec$2 = (0, _navios_di.Factory)({
3715
+ token: require_tokens.Reply,
3716
+ scope: _navios_di.InjectableScope.Request
3717
+ });
3718
+ var ReplyFactory = class {
3719
+ static {
3720
+ ({c: [_ReplyFactory, _initClass$2]} = _apply_decs_2203_r$2(this, [], [_dec$2]));
3721
+ }
3722
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
3723
+ create(ctx) {
3724
+ const service = this.environment.getToken(require_tokens.Reply);
3725
+ if (!service) throw new Error("ReplyToken service not found in environment");
3726
+ return ctx.inject(service);
3727
+ }
3728
+ static {
3729
+ _initClass$2();
3730
+ }
3731
+ };
3732
+
3733
+ //#endregion
3734
+ //#region src/factories/stream-adapter.factory.mts
3735
+ function applyDecs2203RFactory$1() {
3736
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
3737
+ return function addInitializer(initializer) {
3738
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
3739
+ assertCallable(initializer, "An initializer");
3740
+ initializers.push(initializer);
3741
+ };
3742
+ }
3743
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
3744
+ var kindStr;
3745
+ switch (kind) {
3746
+ case 1:
3747
+ kindStr = "accessor";
3748
+ break;
3749
+ case 2:
3750
+ kindStr = "method";
3751
+ break;
3752
+ case 3:
3753
+ kindStr = "getter";
3754
+ break;
3755
+ case 4:
3756
+ kindStr = "setter";
3757
+ break;
3758
+ default: kindStr = "field";
3759
+ }
3760
+ var ctx = {
3761
+ kind: kindStr,
3762
+ name: isPrivate ? "#" + name : name,
3763
+ static: isStatic,
3764
+ private: isPrivate,
3765
+ metadata
3766
+ };
3767
+ var decoratorFinishedRef = { v: false };
3768
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
3769
+ var get, set;
3770
+ if (kind === 0) if (isPrivate) {
3771
+ get = desc.get;
3772
+ set = desc.set;
3773
+ } else {
3774
+ get = function() {
3775
+ return this[name];
3776
+ };
3777
+ set = function(v) {
3778
+ this[name] = v;
3779
+ };
3780
+ }
3781
+ else if (kind === 2) get = function() {
3782
+ return desc.value;
3783
+ };
3784
+ else {
3785
+ if (kind === 1 || kind === 3) get = function() {
3786
+ return desc.get.call(this);
3787
+ };
3788
+ if (kind === 1 || kind === 4) set = function(v) {
3789
+ desc.set.call(this, v);
3790
+ };
3791
+ }
3792
+ ctx.access = get && set ? {
3793
+ get,
3794
+ set
3795
+ } : get ? { get } : { set };
3796
+ try {
3797
+ return dec(value, ctx);
3798
+ } finally {
3799
+ decoratorFinishedRef.v = true;
3800
+ }
3801
+ }
3802
+ function assertNotFinished(decoratorFinishedRef, fnName) {
3803
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
3804
+ }
3805
+ function assertCallable(fn, hint) {
3806
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
3807
+ }
3808
+ function assertValidReturnValue(kind, value) {
3809
+ var type = typeof value;
3810
+ if (kind === 1) {
3811
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
3812
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
3813
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
3814
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
3815
+ } else if (type !== "function") {
3816
+ var hint;
3817
+ if (kind === 0) hint = "field";
3818
+ else if (kind === 10) hint = "class";
3819
+ else hint = "method";
3820
+ throw new TypeError(hint + " decorators must return a function or void 0");
3821
+ }
3822
+ }
3823
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
3824
+ var decs = decInfo[0];
3825
+ var desc, init, value;
3826
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
3827
+ get: decInfo[3],
3828
+ set: decInfo[4]
3829
+ };
3830
+ else if (kind === 3) desc = { get: decInfo[3] };
3831
+ else if (kind === 4) desc = { set: decInfo[3] };
3832
+ else desc = { value: decInfo[3] };
3833
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
3834
+ if (kind === 1) value = {
3835
+ get: desc.get,
3836
+ set: desc.set
3837
+ };
3838
+ else if (kind === 2) value = desc.value;
3839
+ else if (kind === 3) value = desc.get;
3840
+ else if (kind === 4) value = desc.set;
3841
+ var newValue, get, set;
3842
+ if (typeof decs === "function") {
3843
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3844
+ if (newValue !== void 0) {
3845
+ assertValidReturnValue(kind, newValue);
3846
+ if (kind === 0) init = newValue;
3847
+ else if (kind === 1) {
3848
+ init = newValue.init;
3849
+ get = newValue.get || value.get;
3850
+ set = newValue.set || value.set;
3851
+ value = {
3852
+ get,
3853
+ set
3854
+ };
3855
+ } else value = newValue;
3856
+ }
3857
+ } else for (var i = decs.length - 1; i >= 0; i--) {
3858
+ var dec = decs[i];
3859
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
3860
+ if (newValue !== void 0) {
3861
+ assertValidReturnValue(kind, newValue);
3862
+ var newInit;
3863
+ if (kind === 0) newInit = newValue;
3864
+ else if (kind === 1) {
3865
+ newInit = newValue.init;
3866
+ get = newValue.get || value.get;
3867
+ set = newValue.set || value.set;
3868
+ value = {
3869
+ get,
3870
+ set
3871
+ };
3872
+ } else value = newValue;
3873
+ if (newInit !== void 0) if (init === void 0) init = newInit;
3874
+ else if (typeof init === "function") init = [init, newInit];
3875
+ else init.push(newInit);
3876
+ }
3877
+ }
3878
+ if (kind === 0 || kind === 1) {
3879
+ if (init === void 0) init = function(instance, init$1) {
3880
+ return init$1;
3881
+ };
3882
+ else if (typeof init !== "function") {
3883
+ var ownInitializers = init;
3884
+ init = function(instance, init$1) {
3885
+ var value$1 = init$1;
3886
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
3887
+ return value$1;
3888
+ };
3889
+ } else {
3890
+ var originalInitializer = init;
3891
+ init = function(instance, init$1) {
3892
+ return originalInitializer.call(instance, init$1);
3893
+ };
3894
+ }
3895
+ ret.push(init);
3896
+ }
3897
+ if (kind !== 0) {
3898
+ if (kind === 1) {
3899
+ desc.get = value.get;
3900
+ desc.set = value.set;
3901
+ } else if (kind === 2) desc.value = value;
3902
+ else if (kind === 3) desc.get = value;
3903
+ else if (kind === 4) desc.set = value;
3904
+ if (isPrivate) if (kind === 1) {
3905
+ ret.push(function(instance, args) {
3906
+ return value.get.call(instance, args);
3907
+ });
3908
+ ret.push(function(instance, args) {
3909
+ return value.set.call(instance, args);
3910
+ });
3911
+ } else if (kind === 2) ret.push(value);
3912
+ else ret.push(function(instance, args) {
3913
+ return value.call(instance, args);
3914
+ });
3915
+ else Object.defineProperty(base, name, desc);
3916
+ }
3917
+ }
3918
+ function applyMemberDecs(Class, decInfos, metadata) {
3919
+ var ret = [];
3920
+ var protoInitializers;
3921
+ var staticInitializers;
3922
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
3923
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
3924
+ for (var i = 0; i < decInfos.length; i++) {
3925
+ var decInfo = decInfos[i];
3926
+ if (!Array.isArray(decInfo)) continue;
3927
+ var kind = decInfo[1];
3928
+ var name = decInfo[2];
3929
+ var isPrivate = decInfo.length > 3;
3930
+ var isStatic = kind >= 5;
3931
+ var base;
3932
+ var initializers;
3933
+ if (isStatic) {
3934
+ base = Class;
3935
+ kind = kind - 5;
3936
+ staticInitializers = staticInitializers || [];
3937
+ initializers = staticInitializers;
3938
+ } else {
3939
+ base = Class.prototype;
3940
+ protoInitializers = protoInitializers || [];
3941
+ initializers = protoInitializers;
3942
+ }
3943
+ if (kind !== 0 && !isPrivate) {
3944
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
3945
+ var existingKind = existingNonFields.get(name) || 0;
3946
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
3947
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
3948
+ else existingNonFields.set(name, true);
3949
+ }
3950
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
3951
+ }
3952
+ pushInitializers(ret, protoInitializers);
3953
+ pushInitializers(ret, staticInitializers);
3954
+ return ret;
3955
+ }
3956
+ function pushInitializers(ret, initializers) {
3957
+ if (initializers) ret.push(function(instance) {
3958
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
3959
+ return instance;
3960
+ });
3961
+ }
3962
+ function applyClassDecs(targetClass, classDecs, metadata) {
3963
+ if (classDecs.length > 0) {
3964
+ var initializers = [];
3965
+ var newClass = targetClass;
3966
+ var name = targetClass.name;
3967
+ for (var i = classDecs.length - 1; i >= 0; i--) {
3968
+ var decoratorFinishedRef = { v: false };
3969
+ try {
3970
+ var nextNewClass = classDecs[i](newClass, {
3971
+ kind: "class",
3972
+ name,
3973
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
3974
+ metadata
3975
+ });
3976
+ } finally {
3977
+ decoratorFinishedRef.v = true;
3978
+ }
3979
+ if (nextNewClass !== void 0) {
3980
+ assertValidReturnValue(10, nextNewClass);
3981
+ newClass = nextNewClass;
3982
+ }
3983
+ }
3984
+ return [defineMetadata(newClass, metadata), function() {
3985
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
3986
+ }];
3987
+ }
3988
+ }
3989
+ function defineMetadata(Class, metadata) {
3990
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
3991
+ configurable: true,
3992
+ enumerable: true,
3993
+ value: metadata
3994
+ });
3995
+ }
3996
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
3997
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
3998
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
3999
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
4000
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
4001
+ return {
4002
+ e,
4003
+ get c() {
4004
+ return applyClassDecs(targetClass, classDecs, metadata);
4005
+ }
4006
+ };
4007
+ };
4008
+ }
4009
+ function _apply_decs_2203_r$1(targetClass, memberDecs, classDecs, parentClass) {
4010
+ return (_apply_decs_2203_r$1 = applyDecs2203RFactory$1())(targetClass, memberDecs, classDecs, parentClass);
4011
+ }
4012
+ var _dec$1, _initClass$1;
4013
+ let _StreamAdapterFactory;
4014
+ _dec$1 = (0, _navios_di.Factory)({ token: require_tokens.StreamAdapterToken });
4015
+ var StreamAdapterFactory = class {
4016
+ static {
4017
+ ({c: [_StreamAdapterFactory, _initClass$1]} = _apply_decs_2203_r$1(this, [], [_dec$1]));
4018
+ }
4019
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
4020
+ create(ctx) {
4021
+ const service = this.environment.getToken(require_tokens.StreamAdapterToken);
4022
+ if (!service) throw new Error("StreamAdapterToken service not found in environment");
4023
+ return ctx.inject(service);
4024
+ }
4025
+ static {
4026
+ _initClass$1();
4027
+ }
4028
+ };
4029
+
4030
+ //#endregion
4031
+ //#region src/factories/xml-stream-adapter.factory.mts
4032
+ function applyDecs2203RFactory() {
4033
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
4034
+ return function addInitializer(initializer) {
4035
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
4036
+ assertCallable(initializer, "An initializer");
4037
+ initializers.push(initializer);
4038
+ };
4039
+ }
4040
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
4041
+ var kindStr;
4042
+ switch (kind) {
4043
+ case 1:
4044
+ kindStr = "accessor";
4045
+ break;
4046
+ case 2:
4047
+ kindStr = "method";
4048
+ break;
4049
+ case 3:
4050
+ kindStr = "getter";
4051
+ break;
4052
+ case 4:
4053
+ kindStr = "setter";
4054
+ break;
4055
+ default: kindStr = "field";
4056
+ }
4057
+ var ctx = {
4058
+ kind: kindStr,
4059
+ name: isPrivate ? "#" + name : name,
4060
+ static: isStatic,
4061
+ private: isPrivate,
4062
+ metadata
4063
+ };
4064
+ var decoratorFinishedRef = { v: false };
4065
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
4066
+ var get, set;
4067
+ if (kind === 0) if (isPrivate) {
4068
+ get = desc.get;
4069
+ set = desc.set;
4070
+ } else {
4071
+ get = function() {
4072
+ return this[name];
4073
+ };
4074
+ set = function(v) {
4075
+ this[name] = v;
4076
+ };
4077
+ }
4078
+ else if (kind === 2) get = function() {
4079
+ return desc.value;
4080
+ };
4081
+ else {
4082
+ if (kind === 1 || kind === 3) get = function() {
4083
+ return desc.get.call(this);
4084
+ };
4085
+ if (kind === 1 || kind === 4) set = function(v) {
4086
+ desc.set.call(this, v);
4087
+ };
4088
+ }
4089
+ ctx.access = get && set ? {
4090
+ get,
4091
+ set
4092
+ } : get ? { get } : { set };
4093
+ try {
4094
+ return dec(value, ctx);
4095
+ } finally {
4096
+ decoratorFinishedRef.v = true;
4097
+ }
4098
+ }
4099
+ function assertNotFinished(decoratorFinishedRef, fnName) {
4100
+ if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
4101
+ }
4102
+ function assertCallable(fn, hint) {
4103
+ if (typeof fn !== "function") throw new TypeError(hint + " must be a function");
4104
+ }
4105
+ function assertValidReturnValue(kind, value) {
4106
+ var type = typeof value;
4107
+ if (kind === 1) {
4108
+ if (type !== "object" || value === null) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
4109
+ if (value.get !== void 0) assertCallable(value.get, "accessor.get");
4110
+ if (value.set !== void 0) assertCallable(value.set, "accessor.set");
4111
+ if (value.init !== void 0) assertCallable(value.init, "accessor.init");
4112
+ } else if (type !== "function") {
4113
+ var hint;
4114
+ if (kind === 0) hint = "field";
4115
+ else if (kind === 10) hint = "class";
4116
+ else hint = "method";
4117
+ throw new TypeError(hint + " decorators must return a function or void 0");
4118
+ }
4119
+ }
4120
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
4121
+ var decs = decInfo[0];
4122
+ var desc, init, value;
4123
+ if (isPrivate) if (kind === 0 || kind === 1) desc = {
4124
+ get: decInfo[3],
4125
+ set: decInfo[4]
4126
+ };
4127
+ else if (kind === 3) desc = { get: decInfo[3] };
4128
+ else if (kind === 4) desc = { set: decInfo[3] };
4129
+ else desc = { value: decInfo[3] };
4130
+ else if (kind !== 0) desc = Object.getOwnPropertyDescriptor(base, name);
4131
+ if (kind === 1) value = {
4132
+ get: desc.get,
4133
+ set: desc.set
4134
+ };
4135
+ else if (kind === 2) value = desc.value;
4136
+ else if (kind === 3) value = desc.get;
4137
+ else if (kind === 4) value = desc.set;
4138
+ var newValue, get, set;
4139
+ if (typeof decs === "function") {
4140
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
4141
+ if (newValue !== void 0) {
4142
+ assertValidReturnValue(kind, newValue);
4143
+ if (kind === 0) init = newValue;
4144
+ else if (kind === 1) {
4145
+ init = newValue.init;
4146
+ get = newValue.get || value.get;
4147
+ set = newValue.set || value.set;
4148
+ value = {
4149
+ get,
4150
+ set
4151
+ };
4152
+ } else value = newValue;
4153
+ }
4154
+ } else for (var i = decs.length - 1; i >= 0; i--) {
4155
+ var dec = decs[i];
4156
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
4157
+ if (newValue !== void 0) {
4158
+ assertValidReturnValue(kind, newValue);
4159
+ var newInit;
4160
+ if (kind === 0) newInit = newValue;
4161
+ else if (kind === 1) {
4162
+ newInit = newValue.init;
4163
+ get = newValue.get || value.get;
4164
+ set = newValue.set || value.set;
4165
+ value = {
4166
+ get,
4167
+ set
4168
+ };
4169
+ } else value = newValue;
4170
+ if (newInit !== void 0) if (init === void 0) init = newInit;
4171
+ else if (typeof init === "function") init = [init, newInit];
4172
+ else init.push(newInit);
4173
+ }
4174
+ }
4175
+ if (kind === 0 || kind === 1) {
4176
+ if (init === void 0) init = function(instance, init$1) {
4177
+ return init$1;
4178
+ };
4179
+ else if (typeof init !== "function") {
4180
+ var ownInitializers = init;
4181
+ init = function(instance, init$1) {
4182
+ var value$1 = init$1;
4183
+ for (var i$1 = 0; i$1 < ownInitializers.length; i$1++) value$1 = ownInitializers[i$1].call(instance, value$1);
4184
+ return value$1;
4185
+ };
4186
+ } else {
4187
+ var originalInitializer = init;
4188
+ init = function(instance, init$1) {
4189
+ return originalInitializer.call(instance, init$1);
4190
+ };
4191
+ }
4192
+ ret.push(init);
4193
+ }
4194
+ if (kind !== 0) {
4195
+ if (kind === 1) {
4196
+ desc.get = value.get;
4197
+ desc.set = value.set;
4198
+ } else if (kind === 2) desc.value = value;
4199
+ else if (kind === 3) desc.get = value;
4200
+ else if (kind === 4) desc.set = value;
4201
+ if (isPrivate) if (kind === 1) {
4202
+ ret.push(function(instance, args) {
4203
+ return value.get.call(instance, args);
4204
+ });
4205
+ ret.push(function(instance, args) {
4206
+ return value.set.call(instance, args);
4207
+ });
4208
+ } else if (kind === 2) ret.push(value);
4209
+ else ret.push(function(instance, args) {
4210
+ return value.call(instance, args);
4211
+ });
4212
+ else Object.defineProperty(base, name, desc);
4213
+ }
4214
+ }
4215
+ function applyMemberDecs(Class, decInfos, metadata) {
4216
+ var ret = [];
4217
+ var protoInitializers;
4218
+ var staticInitializers;
4219
+ var existingProtoNonFields = /* @__PURE__ */ new Map();
4220
+ var existingStaticNonFields = /* @__PURE__ */ new Map();
4221
+ for (var i = 0; i < decInfos.length; i++) {
4222
+ var decInfo = decInfos[i];
4223
+ if (!Array.isArray(decInfo)) continue;
4224
+ var kind = decInfo[1];
4225
+ var name = decInfo[2];
4226
+ var isPrivate = decInfo.length > 3;
4227
+ var isStatic = kind >= 5;
4228
+ var base;
4229
+ var initializers;
4230
+ if (isStatic) {
4231
+ base = Class;
4232
+ kind = kind - 5;
4233
+ staticInitializers = staticInitializers || [];
4234
+ initializers = staticInitializers;
4235
+ } else {
4236
+ base = Class.prototype;
4237
+ protoInitializers = protoInitializers || [];
4238
+ initializers = protoInitializers;
4239
+ }
4240
+ if (kind !== 0 && !isPrivate) {
4241
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
4242
+ var existingKind = existingNonFields.get(name) || 0;
4243
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
4244
+ else if (!existingKind && kind > 2) existingNonFields.set(name, kind);
4245
+ else existingNonFields.set(name, true);
4246
+ }
4247
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
4248
+ }
4249
+ pushInitializers(ret, protoInitializers);
4250
+ pushInitializers(ret, staticInitializers);
4251
+ return ret;
4252
+ }
4253
+ function pushInitializers(ret, initializers) {
4254
+ if (initializers) ret.push(function(instance) {
4255
+ for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
4256
+ return instance;
4257
+ });
4258
+ }
4259
+ function applyClassDecs(targetClass, classDecs, metadata) {
4260
+ if (classDecs.length > 0) {
4261
+ var initializers = [];
4262
+ var newClass = targetClass;
4263
+ var name = targetClass.name;
4264
+ for (var i = classDecs.length - 1; i >= 0; i--) {
4265
+ var decoratorFinishedRef = { v: false };
4266
+ try {
4267
+ var nextNewClass = classDecs[i](newClass, {
4268
+ kind: "class",
4269
+ name,
4270
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
4271
+ metadata
4272
+ });
4273
+ } finally {
4274
+ decoratorFinishedRef.v = true;
4275
+ }
4276
+ if (nextNewClass !== void 0) {
4277
+ assertValidReturnValue(10, nextNewClass);
4278
+ newClass = nextNewClass;
4279
+ }
4280
+ }
4281
+ return [defineMetadata(newClass, metadata), function() {
4282
+ for (var i$1 = 0; i$1 < initializers.length; i$1++) initializers[i$1].call(newClass);
4283
+ }];
4284
+ }
4285
+ }
4286
+ function defineMetadata(Class, metadata) {
4287
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
4288
+ configurable: true,
4289
+ enumerable: true,
4290
+ value: metadata
4291
+ });
4292
+ }
4293
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
4294
+ if (parentClass !== void 0) var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
4295
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
4296
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
4297
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
4298
+ return {
4299
+ e,
4300
+ get c() {
4301
+ return applyClassDecs(targetClass, classDecs, metadata);
4302
+ }
4303
+ };
4304
+ };
4305
+ }
4306
+ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
4307
+ return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
4308
+ }
4309
+ var _dec, _initClass;
4310
+ let _XmlStreamAdapterFactory;
4311
+ _dec = (0, _navios_di.Factory)({ token: require_tokens.XmlStreamAdapterToken });
4312
+ var XmlStreamAdapterFactory = class {
4313
+ static {
4314
+ ({c: [_XmlStreamAdapterFactory, _initClass]} = _apply_decs_2203_r(this, [], [_dec]));
4315
+ }
4316
+ environment = (0, _navios_di.inject)(require_navios_factory._NaviosEnvironment);
4317
+ create(ctx) {
4318
+ const service = this.environment.getToken(require_tokens.XmlStreamAdapterToken);
4319
+ if (!service) throw new Error("XmlStreamAdapterToken service not found in environment");
4320
+ return ctx.inject(service);
4321
+ }
4322
+ static {
4323
+ _initClass();
4324
+ }
4325
+ };
4326
+
4327
+ //#endregion
4328
+ exports.AbstractHandlerAdapterService = require_navios_factory.AbstractHandlerAdapterService;
4329
+ Object.defineProperty(exports, 'AdapterFactory', {
4330
+ enumerable: true,
4331
+ get: function () {
4332
+ return _AdapterFactory;
4333
+ }
4334
+ });
4335
+ exports.AdapterToken = require_tokens.AdapterToken;
4336
+ exports.AttributeFactory = AttributeFactory;
4337
+ exports.BadRequestException = BadRequestException;
4338
+ exports.ConfigProviderOptions = ConfigProviderOptions;
7
4339
  Object.defineProperty(exports, 'ConfigService', {
8
4340
  enumerable: true,
9
4341
  get: function () {
10
- return require_src._ConfigService;
4342
+ return _ConfigService;
11
4343
  }
12
4344
  });
13
- exports.ConfigServiceOptionsSchema = require_src.ConfigServiceOptionsSchema;
14
- exports.ConfigServiceToken = require_src.ConfigServiceToken;
15
- exports.ConflictException = require_src.ConflictException;
4345
+ exports.ConfigServiceOptionsSchema = ConfigServiceOptionsSchema;
4346
+ exports.ConfigServiceToken = ConfigServiceToken;
4347
+ exports.ConflictException = ConflictException;
16
4348
  Object.defineProperty(exports, 'ConsoleLogger', {
17
4349
  enumerable: true,
18
4350
  get: function () {
19
- return require_src._ConsoleLogger;
4351
+ return require_navios_factory._ConsoleLogger;
20
4352
  }
21
4353
  });
22
4354
  exports.Controller = require_use_guards_decorator.Controller;
23
4355
  exports.ControllerMetadataKey = require_use_guards_decorator.ControllerMetadataKey;
24
- exports.ControllerResolverService = require_src.ControllerResolverService;
4356
+ exports.ControllerResolverService = require_navios_factory.ControllerResolverService;
25
4357
  exports.Endpoint = require_use_guards_decorator.Endpoint;
26
4358
  Object.defineProperty(exports, 'EndpointAdapterFactory', {
27
4359
  enumerable: true,
28
4360
  get: function () {
29
- return require_src._EndpointAdapterFactory;
4361
+ return _EndpointAdapterFactory;
30
4362
  }
31
4363
  });
32
- exports.EndpointAdapterToken = require_use_guards_decorator.EndpointAdapterToken;
4364
+ exports.EndpointAdapterToken = require_tokens.EndpointAdapterToken;
33
4365
  exports.EndpointMetadataKey = require_use_guards_decorator.EndpointMetadataKey;
34
- exports.EnvConfigProvider = require_src.EnvConfigProvider;
4366
+ exports.EnvConfigProvider = EnvConfigProvider;
35
4367
  Object.defineProperty(exports, 'ErrorResponseProducerService', {
36
4368
  enumerable: true,
37
4369
  get: function () {
38
- return require_src._ErrorResponseProducerService;
4370
+ return require_navios_factory._ErrorResponseProducerService;
39
4371
  }
40
4372
  });
41
- exports.ExecutionContext = require_use_guards_decorator.ExecutionContext;
42
- exports.ExecutionContextInjectionToken = require_use_guards_decorator.ExecutionContextInjectionToken;
43
- exports.ForbiddenException = require_src.ForbiddenException;
4373
+ exports.ExecutionContext = require_tokens.ExecutionContext;
4374
+ exports.ExecutionContextInjectionToken = require_tokens.ExecutionContextInjectionToken;
4375
+ exports.ForbiddenException = ForbiddenException;
44
4376
  Object.defineProperty(exports, 'ForbiddenResponderService', {
45
4377
  enumerable: true,
46
4378
  get: function () {
47
- return require_src._ForbiddenResponderService;
4379
+ return _ForbiddenResponderService;
48
4380
  }
49
4381
  });
50
- exports.ForbiddenResponderToken = require_src.ForbiddenResponderToken;
51
- exports.FrameworkError = require_src.FrameworkError;
4382
+ exports.ForbiddenResponderToken = require_navios_factory.ForbiddenResponderToken;
4383
+ exports.FrameworkError = require_navios_factory.FrameworkError;
52
4384
  Object.defineProperty(exports, 'GuardRunnerService', {
53
4385
  enumerable: true,
54
4386
  get: function () {
55
- return require_src._GuardRunnerService;
4387
+ return require_navios_factory._GuardRunnerService;
56
4388
  }
57
4389
  });
58
4390
  exports.Header = require_use_guards_decorator.Header;
59
4391
  Object.defineProperty(exports, 'HttpAdapterFactory', {
60
4392
  enumerable: true,
61
4393
  get: function () {
62
- return require_src._HttpAdapterFactory;
4394
+ return _HttpAdapterFactory;
63
4395
  }
64
4396
  });
65
- exports.HttpAdapterToken = require_use_guards_decorator.HttpAdapterToken;
4397
+ exports.HttpAdapterToken = require_tokens.HttpAdapterToken;
66
4398
  exports.HttpCode = require_use_guards_decorator.HttpCode;
67
- exports.HttpException = require_src.HttpException;
4399
+ exports.HttpException = require_navios_factory.HttpException;
68
4400
  Object.defineProperty(exports, 'InstanceResolverService', {
69
4401
  enumerable: true,
70
4402
  get: function () {
71
- return require_src._InstanceResolverService;
4403
+ return require_navios_factory._InstanceResolverService;
72
4404
  }
73
4405
  });
74
- exports.InternalServerErrorException = require_src.InternalServerErrorException;
4406
+ exports.InternalServerErrorException = InternalServerErrorException;
75
4407
  Object.defineProperty(exports, 'InternalServerErrorResponderService', {
76
4408
  enumerable: true,
77
4409
  get: function () {
78
- return require_src._InternalServerErrorResponderService;
4410
+ return _InternalServerErrorResponderService;
79
4411
  }
80
4412
  });
81
- exports.InternalServerErrorResponderToken = require_src.InternalServerErrorResponderToken;
82
- exports.LOG_LEVELS = require_src.LOG_LEVELS;
83
- exports.Logger = require_src.Logger;
4413
+ exports.InternalServerErrorResponderToken = require_navios_factory.InternalServerErrorResponderToken;
4414
+ exports.LOG_LEVELS = require_navios_factory.LOG_LEVELS;
4415
+ exports.Logger = require_navios_factory.Logger;
84
4416
  Object.defineProperty(exports, 'LoggerInstance', {
85
4417
  enumerable: true,
86
4418
  get: function () {
87
- return require_src._LoggerInstance;
4419
+ return require_navios_factory._LoggerInstance;
88
4420
  }
89
4421
  });
90
- exports.LoggerOutput = require_src.LoggerOutput;
4422
+ exports.LoggerOutput = require_navios_factory.LoggerOutput;
91
4423
  exports.Module = require_use_guards_decorator.Module;
92
4424
  Object.defineProperty(exports, 'ModuleLoaderService', {
93
4425
  enumerable: true,
94
4426
  get: function () {
95
- return require_src._ModuleLoaderService;
4427
+ return require_navios_factory._ModuleLoaderService;
96
4428
  }
97
4429
  });
98
- exports.ModuleMetadataKey = require_use_guards_decorator.ModuleMetadataKey;
4430
+ exports.ModuleMetadataKey = require_tokens.ModuleMetadataKey;
99
4431
  exports.Multipart = require_use_guards_decorator.Multipart;
100
4432
  Object.defineProperty(exports, 'MultipartAdapterFactory', {
101
4433
  enumerable: true,
102
4434
  get: function () {
103
- return require_src._MultipartAdapterFactory;
4435
+ return _MultipartAdapterFactory;
104
4436
  }
105
4437
  });
106
- exports.MultipartAdapterToken = require_use_guards_decorator.MultipartAdapterToken;
4438
+ exports.MultipartAdapterToken = require_tokens.MultipartAdapterToken;
107
4439
  Object.defineProperty(exports, 'NaviosApplication', {
108
4440
  enumerable: true,
109
4441
  get: function () {
110
- return require_src._NaviosApplication;
4442
+ return require_navios_factory._NaviosApplication;
111
4443
  }
112
4444
  });
113
- exports.NaviosFactory = require_src.NaviosFactory;
4445
+ exports.NaviosFactory = require_navios_factory.NaviosFactory;
114
4446
  exports.NaviosManagedMetadataKey = require_use_guards_decorator.NaviosManagedMetadataKey;
115
- exports.NaviosOptionsToken = require_use_guards_decorator.NaviosOptionsToken;
116
- exports.NotFoundException = require_src.NotFoundException;
4447
+ exports.NaviosOptionsToken = require_tokens.NaviosOptionsToken;
4448
+ exports.NotFoundException = NotFoundException;
117
4449
  Object.defineProperty(exports, 'NotFoundResponderService', {
118
4450
  enumerable: true,
119
4451
  get: function () {
120
- return require_src._NotFoundResponderService;
4452
+ return _NotFoundResponderService;
121
4453
  }
122
4454
  });
123
- exports.NotFoundResponderToken = require_src.NotFoundResponderToken;
124
- exports.Reply = require_use_guards_decorator.Reply;
4455
+ exports.NotFoundResponderToken = require_navios_factory.NotFoundResponderToken;
4456
+ exports.Reply = require_tokens.Reply;
125
4457
  Object.defineProperty(exports, 'ReplyFactory', {
126
4458
  enumerable: true,
127
4459
  get: function () {
128
- return require_src._ReplyFactory;
4460
+ return _ReplyFactory;
129
4461
  }
130
4462
  });
131
- exports.Request = require_use_guards_decorator.Request;
4463
+ exports.Request = require_tokens.Request;
132
4464
  Object.defineProperty(exports, 'RequestFactory', {
133
4465
  enumerable: true,
134
4466
  get: function () {
135
- return require_src._RequestFactory;
4467
+ return _RequestFactory;
136
4468
  }
137
4469
  });
138
4470
  exports.Stream = require_use_guards_decorator.Stream;
139
4471
  Object.defineProperty(exports, 'StreamAdapterFactory', {
140
4472
  enumerable: true,
141
4473
  get: function () {
142
- return require_src._StreamAdapterFactory;
4474
+ return _StreamAdapterFactory;
143
4475
  }
144
4476
  });
145
- exports.StreamAdapterToken = require_use_guards_decorator.StreamAdapterToken;
146
- exports.UnauthorizedException = require_src.UnauthorizedException;
4477
+ exports.StreamAdapterToken = require_tokens.StreamAdapterToken;
4478
+ exports.UnauthorizedException = UnauthorizedException;
147
4479
  exports.UseGuards = require_use_guards_decorator.UseGuards;
148
4480
  Object.defineProperty(exports, 'ValidationErrorResponderService', {
149
4481
  enumerable: true,
150
4482
  get: function () {
151
- return require_src._ValidationErrorResponderService;
4483
+ return _ValidationErrorResponderService;
152
4484
  }
153
4485
  });
154
- exports.ValidationErrorResponderToken = require_src.ValidationErrorResponderToken;
4486
+ exports.ValidationErrorResponderToken = require_navios_factory.ValidationErrorResponderToken;
155
4487
  Object.defineProperty(exports, 'XmlStreamAdapterFactory', {
156
4488
  enumerable: true,
157
4489
  get: function () {
158
- return require_src._XmlStreamAdapterFactory;
4490
+ return _XmlStreamAdapterFactory;
159
4491
  }
160
4492
  });
161
- exports.XmlStreamAdapterToken = require_use_guards_decorator.XmlStreamAdapterToken;
162
- exports.addLeadingSlash = require_src.addLeadingSlash;
163
- exports.clc = require_src.clc;
164
- exports.envInt = require_src.envInt;
165
- exports.envString = require_src.envString;
4493
+ exports.XmlStreamAdapterToken = require_tokens.XmlStreamAdapterToken;
4494
+ exports.adapterSupports = require_navios_factory.adapterSupports;
4495
+ exports.addLeadingSlash = require_navios_factory.addLeadingSlash;
4496
+ exports.assertAdapterSupports = require_navios_factory.assertAdapterSupports;
4497
+ exports.clc = require_navios_factory.clc;
4498
+ exports.envInt = envInt;
4499
+ exports.envString = envString;
166
4500
  exports.extractControllerMetadata = require_use_guards_decorator.extractControllerMetadata;
167
- exports.extractModuleMetadata = require_use_guards_decorator.extractModuleMetadata;
168
- exports.filterLogLevels = require_src.filterLogLevels;
169
- exports.generateRequestId = require_src.generateRequestId;
4501
+ exports.extractModuleMetadata = require_tokens.extractModuleMetadata;
4502
+ exports.filterLogLevels = require_navios_factory.filterLogLevels;
4503
+ exports.generateRequestId = require_navios_factory.generateRequestId;
170
4504
  exports.getAllEndpointMetadata = require_use_guards_decorator.getAllEndpointMetadata;
171
4505
  exports.getControllerMetadata = require_use_guards_decorator.getControllerMetadata;
172
4506
  exports.getEndpointMetadata = require_use_guards_decorator.getEndpointMetadata;
173
4507
  exports.getManagedMetadata = require_use_guards_decorator.getManagedMetadata;
174
- exports.getModuleMetadata = require_use_guards_decorator.getModuleMetadata;
175
- exports.getRequestId = require_src.getRequestId;
4508
+ exports.getModuleCustomEntry = require_tokens.getModuleCustomEntry;
4509
+ exports.getModuleMetadata = require_tokens.getModuleMetadata;
4510
+ exports.getRequestId = require_navios_factory.getRequestId;
176
4511
  exports.hasControllerMetadata = require_use_guards_decorator.hasControllerMetadata;
177
4512
  exports.hasManagedMetadata = require_use_guards_decorator.hasManagedMetadata;
178
- exports.hasModuleMetadata = require_use_guards_decorator.hasModuleMetadata;
179
- exports.isConstructor = require_src.isConstructor;
180
- exports.isEmpty = require_src.isEmpty;
181
- exports.isFunction = require_src.isFunction;
182
- exports.isLogLevel = require_src.isLogLevel;
183
- exports.isLogLevelEnabled = require_src.isLogLevelEnabled;
184
- exports.isNil = require_src.isNil;
185
- exports.isNumber = require_src.isNumber;
186
- exports.isObject = require_src.isObject;
187
- exports.isPlainObject = require_src.isPlainObject;
188
- exports.isString = require_src.isString;
189
- exports.isSymbol = require_src.isSymbol;
190
- exports.isUndefined = require_src.isUndefined;
191
- exports.loggerOptionsSchema = require_src.loggerOptionsSchema;
192
- exports.normalizePath = require_src.normalizePath;
193
- exports.provideConfig = require_src.provideConfig;
194
- exports.runWithRequestId = require_src.runWithRequestId;
195
- exports.setRequestIdEnabled = require_src.setRequestIdEnabled;
196
- exports.stripEndSlash = require_src.stripEndSlash;
197
- exports.yellow = require_src.yellow;
198
- var _navios_di = require("@navios/di");
4513
+ exports.hasModuleMetadata = require_tokens.hasModuleMetadata;
4514
+ exports.isConstructor = require_navios_factory.isConstructor;
4515
+ exports.isEmpty = require_navios_factory.isEmpty;
4516
+ exports.isFunction = require_navios_factory.isFunction;
4517
+ exports.isLogLevel = require_navios_factory.isLogLevel;
4518
+ exports.isLogLevelEnabled = require_navios_factory.isLogLevelEnabled;
4519
+ exports.isNil = require_navios_factory.isNil;
4520
+ exports.isNumber = require_navios_factory.isNumber;
4521
+ exports.isObject = require_navios_factory.isObject;
4522
+ exports.isPlainObject = require_navios_factory.isPlainObject;
4523
+ exports.isString = require_navios_factory.isString;
4524
+ exports.isSymbol = require_navios_factory.isSymbol;
4525
+ exports.isUndefined = require_navios_factory.isUndefined;
4526
+ exports.loggerOptionsSchema = require_navios_factory.loggerOptionsSchema;
4527
+ exports.normalizePath = require_navios_factory.normalizePath;
4528
+ exports.provideConfig = provideConfig;
4529
+ exports.runWithRequestId = require_navios_factory.runWithRequestId;
4530
+ exports.setRequestIdEnabled = require_navios_factory.setRequestIdEnabled;
4531
+ exports.stripEndSlash = require_navios_factory.stripEndSlash;
4532
+ exports.yellow = require_navios_factory.yellow;
199
4533
  Object.keys(_navios_di).forEach(function (k) {
200
4534
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
201
4535
  enumerable: true,
202
4536
  get: function () { return _navios_di[k]; }
203
4537
  });
204
4538
  });
4539
+
4540
+ //# sourceMappingURL=index.cjs.map