blackmistcode commited on
Commit
8213656
·
verified ·
1 Parent(s): 2d3b506

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. backend/node_modules/effect/dist/cjs/Arbitrary.js +813 -0
  2. backend/node_modules/effect/dist/cjs/Array.js +2695 -0
  3. backend/node_modules/effect/dist/cjs/BigDecimal.js +1116 -0
  4. backend/node_modules/effect/dist/cjs/BigDecimal.js.map +1 -0
  5. backend/node_modules/effect/dist/cjs/BigInt.js +567 -0
  6. backend/node_modules/effect/dist/cjs/BigInt.js.map +1 -0
  7. backend/node_modules/effect/dist/cjs/Boolean.js +251 -0
  8. backend/node_modules/effect/dist/cjs/Boolean.js.map +1 -0
  9. backend/node_modules/effect/dist/cjs/Brand.js.map +1 -0
  10. backend/node_modules/effect/dist/cjs/Cache.js +50 -0
  11. backend/node_modules/effect/dist/cjs/Cache.js.map +1 -0
  12. backend/node_modules/effect/dist/cjs/Cause.js +1011 -0
  13. backend/node_modules/effect/dist/cjs/Cause.js.map +1 -0
  14. backend/node_modules/effect/dist/cjs/Channel.js +889 -0
  15. backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js +72 -0
  16. backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js.map +1 -0
  17. backend/node_modules/effect/dist/cjs/Chunk.js +1114 -0
  18. backend/node_modules/effect/dist/cjs/Clock.js +45 -0
  19. backend/node_modules/effect/dist/cjs/Clock.js.map +1 -0
  20. backend/node_modules/effect/dist/cjs/Config.js +328 -0
  21. backend/node_modules/effect/dist/cjs/Config.js.map +1 -0
  22. backend/node_modules/effect/dist/cjs/ConfigError.js +114 -0
  23. backend/node_modules/effect/dist/cjs/ConfigError.js.map +1 -0
  24. backend/node_modules/effect/dist/cjs/ConfigProvider.js.map +1 -0
  25. backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js +38 -0
  26. backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js.map +1 -0
  27. backend/node_modules/effect/dist/cjs/Console.js +125 -0
  28. backend/node_modules/effect/dist/cjs/Console.js.map +1 -0
  29. backend/node_modules/effect/dist/cjs/Cron.js +679 -0
  30. backend/node_modules/effect/dist/cjs/Cron.js.map +1 -0
  31. backend/node_modules/effect/dist/cjs/Data.js +291 -0
  32. backend/node_modules/effect/dist/cjs/Data.js.map +1 -0
  33. backend/node_modules/effect/dist/cjs/DateTime.js +1084 -0
  34. backend/node_modules/effect/dist/cjs/DateTime.js.map +1 -0
  35. backend/node_modules/effect/dist/cjs/Deferred.js.map +1 -0
  36. backend/node_modules/effect/dist/cjs/Differ.js +140 -0
  37. backend/node_modules/effect/dist/cjs/Duration.js +737 -0
  38. backend/node_modules/effect/dist/cjs/Duration.js.map +1 -0
  39. backend/node_modules/effect/dist/cjs/Effect.js +0 -0
  40. backend/node_modules/effect/dist/cjs/Effect.js.map +1 -0
  41. backend/node_modules/effect/dist/cjs/Effectable.js +58 -0
  42. backend/node_modules/effect/dist/cjs/Effectable.js.map +1 -0
  43. backend/node_modules/effect/dist/cjs/Either.js +654 -0
  44. backend/node_modules/effect/dist/cjs/Encoding.js +155 -0
  45. backend/node_modules/effect/dist/cjs/Encoding.js.map +1 -0
  46. backend/node_modules/effect/dist/cjs/Equal.js +84 -0
  47. backend/node_modules/effect/dist/cjs/Equal.js.map +1 -0
  48. backend/node_modules/effect/dist/cjs/Equivalence.js +181 -0
  49. backend/node_modules/effect/dist/cjs/ExecutionPlan.js.map +1 -0
  50. backend/node_modules/effect/dist/cjs/ExecutionStrategy.js +62 -0
backend/node_modules/effect/dist/cjs/Arbitrary.js ADDED
@@ -0,0 +1,813 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.makeStringConstraints = exports.makeNumberConstraints = exports.makeLazy = exports.makeDateConstraints = exports.makeBigIntConstraints = exports.makeArrayConstraints = exports.make = exports.getDescription = void 0;
7
+ var Arr = _interopRequireWildcard(require("./Array.js"));
8
+ var FastCheck = _interopRequireWildcard(require("./FastCheck.js"));
9
+ var _GlobalValue = require("./GlobalValue.js");
10
+ var errors_ = _interopRequireWildcard(require("./internal/schema/errors.js"));
11
+ var schemaId_ = _interopRequireWildcard(require("./internal/schema/schemaId.js"));
12
+ var util_ = _interopRequireWildcard(require("./internal/schema/util.js"));
13
+ var Option = _interopRequireWildcard(require("./Option.js"));
14
+ var Predicate = _interopRequireWildcard(require("./Predicate.js"));
15
+ var SchemaAST = _interopRequireWildcard(require("./SchemaAST.js"));
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
+ /**
18
+ * @since 3.10.0
19
+ */
20
+
21
+ /**
22
+ * Returns a LazyArbitrary for the `A` type of the provided schema.
23
+ *
24
+ * @category arbitrary
25
+ * @since 3.10.0
26
+ */
27
+ const makeLazy = schema => {
28
+ const description = getDescription(schema.ast, []);
29
+ return go(description, {
30
+ maxDepth: 2
31
+ });
32
+ };
33
+ /**
34
+ * Returns a fast-check Arbitrary for the `A` type of the provided schema.
35
+ *
36
+ * @category arbitrary
37
+ * @since 3.10.0
38
+ */
39
+ exports.makeLazy = makeLazy;
40
+ const make = schema => makeLazy(schema)(FastCheck);
41
+ /** @internal */
42
+ exports.make = make;
43
+ const makeStringConstraints = options => {
44
+ const out = {
45
+ _tag: "StringConstraints",
46
+ constraints: {}
47
+ };
48
+ if (Predicate.isNumber(options.minLength)) {
49
+ out.constraints.minLength = options.minLength;
50
+ }
51
+ if (Predicate.isNumber(options.maxLength)) {
52
+ out.constraints.maxLength = options.maxLength;
53
+ }
54
+ if (Predicate.isString(options.pattern)) {
55
+ out.pattern = options.pattern;
56
+ }
57
+ return out;
58
+ };
59
+ /** @internal */
60
+ exports.makeStringConstraints = makeStringConstraints;
61
+ const makeNumberConstraints = options => {
62
+ const out = {
63
+ _tag: "NumberConstraints",
64
+ constraints: {},
65
+ isInteger: options.isInteger ?? false
66
+ };
67
+ if (Predicate.isNumber(options.min)) {
68
+ out.constraints.min = Math.fround(options.min);
69
+ }
70
+ if (Predicate.isBoolean(options.minExcluded)) {
71
+ out.constraints.minExcluded = options.minExcluded;
72
+ }
73
+ if (Predicate.isNumber(options.max)) {
74
+ out.constraints.max = Math.fround(options.max);
75
+ }
76
+ if (Predicate.isBoolean(options.maxExcluded)) {
77
+ out.constraints.maxExcluded = options.maxExcluded;
78
+ }
79
+ if (Predicate.isBoolean(options.noNaN)) {
80
+ out.constraints.noNaN = options.noNaN;
81
+ }
82
+ if (Predicate.isBoolean(options.noDefaultInfinity)) {
83
+ out.constraints.noDefaultInfinity = options.noDefaultInfinity;
84
+ }
85
+ return out;
86
+ };
87
+ /** @internal */
88
+ exports.makeNumberConstraints = makeNumberConstraints;
89
+ const makeBigIntConstraints = options => {
90
+ const out = {
91
+ _tag: "BigIntConstraints",
92
+ constraints: {}
93
+ };
94
+ if (Predicate.isBigInt(options.min)) {
95
+ out.constraints.min = options.min;
96
+ }
97
+ if (Predicate.isBigInt(options.max)) {
98
+ out.constraints.max = options.max;
99
+ }
100
+ return out;
101
+ };
102
+ /** @internal */
103
+ exports.makeBigIntConstraints = makeBigIntConstraints;
104
+ const makeArrayConstraints = options => {
105
+ const out = {
106
+ _tag: "ArrayConstraints",
107
+ constraints: {}
108
+ };
109
+ if (Predicate.isNumber(options.minLength)) {
110
+ out.constraints.minLength = options.minLength;
111
+ }
112
+ if (Predicate.isNumber(options.maxLength)) {
113
+ out.constraints.maxLength = options.maxLength;
114
+ }
115
+ return out;
116
+ };
117
+ /** @internal */
118
+ exports.makeArrayConstraints = makeArrayConstraints;
119
+ const makeDateConstraints = options => {
120
+ const out = {
121
+ _tag: "DateConstraints",
122
+ constraints: {}
123
+ };
124
+ if (Predicate.isDate(options.min)) {
125
+ out.constraints.min = options.min;
126
+ }
127
+ if (Predicate.isDate(options.max)) {
128
+ out.constraints.max = options.max;
129
+ }
130
+ if (Predicate.isBoolean(options.noInvalidDate)) {
131
+ out.constraints.noInvalidDate = options.noInvalidDate;
132
+ }
133
+ return out;
134
+ };
135
+ exports.makeDateConstraints = makeDateConstraints;
136
+ const getArbitraryAnnotation = /*#__PURE__*/SchemaAST.getAnnotation(SchemaAST.ArbitraryAnnotationId);
137
+ const getASTConstraints = ast => {
138
+ const TypeAnnotationId = ast.annotations[SchemaAST.SchemaIdAnnotationId];
139
+ if (Predicate.isPropertyKey(TypeAnnotationId)) {
140
+ const out = ast.annotations[TypeAnnotationId];
141
+ if (Predicate.isReadonlyRecord(out)) {
142
+ return out;
143
+ }
144
+ }
145
+ };
146
+ const idMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Arbitrary/IdMemoMap"), () => new Map());
147
+ let counter = 0;
148
+ function wrapGetDescription(f, g) {
149
+ return (ast, path) => f(ast, g(ast, path));
150
+ }
151
+ function parseMeta(ast) {
152
+ const jsonSchema = SchemaAST.getJSONSchemaAnnotation(ast).pipe(Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined);
153
+ const schemaId = Option.getOrElse(SchemaAST.getSchemaIdAnnotation(ast), () => undefined);
154
+ const schemaParams = Option.fromNullable(schemaId).pipe(Option.map(id => ast.annotations[id]), Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined);
155
+ return [schemaId, {
156
+ ...schemaParams,
157
+ ...jsonSchema
158
+ }];
159
+ }
160
+ /** @internal */
161
+ const getDescription = exports.getDescription = /*#__PURE__*/wrapGetDescription((ast, description) => {
162
+ const annotation = getArbitraryAnnotation(ast);
163
+ if (Option.isSome(annotation)) {
164
+ return {
165
+ ...description,
166
+ annotations: [...description.annotations, annotation.value]
167
+ };
168
+ }
169
+ return description;
170
+ }, (ast, path) => {
171
+ const [schemaId, meta] = parseMeta(ast);
172
+ switch (ast._tag) {
173
+ case "Refinement":
174
+ {
175
+ const from = getDescription(ast.from, path);
176
+ switch (from._tag) {
177
+ case "StringKeyword":
178
+ return {
179
+ ...from,
180
+ constraints: [...from.constraints, makeStringConstraints(meta)],
181
+ refinements: [...from.refinements, ast]
182
+ };
183
+ case "NumberKeyword":
184
+ {
185
+ const c = schemaId === schemaId_.NonNaNSchemaId ? makeNumberConstraints({
186
+ noNaN: true
187
+ }) : schemaId === schemaId_.FiniteSchemaId || schemaId === schemaId_.JsonNumberSchemaId ? makeNumberConstraints({
188
+ noDefaultInfinity: true,
189
+ noNaN: true
190
+ }) : makeNumberConstraints({
191
+ isInteger: "type" in meta && meta.type === "integer",
192
+ noNaN: undefined,
193
+ noDefaultInfinity: undefined,
194
+ min: meta.exclusiveMinimum ?? meta.minimum,
195
+ minExcluded: "exclusiveMinimum" in meta ? true : undefined,
196
+ max: meta.exclusiveMaximum ?? meta.maximum,
197
+ maxExcluded: "exclusiveMaximum" in meta ? true : undefined
198
+ });
199
+ return {
200
+ ...from,
201
+ constraints: [...from.constraints, c],
202
+ refinements: [...from.refinements, ast]
203
+ };
204
+ }
205
+ case "BigIntKeyword":
206
+ {
207
+ const c = getASTConstraints(ast);
208
+ return {
209
+ ...from,
210
+ constraints: c !== undefined ? [...from.constraints, makeBigIntConstraints(c)] : from.constraints,
211
+ refinements: [...from.refinements, ast]
212
+ };
213
+ }
214
+ case "TupleType":
215
+ return {
216
+ ...from,
217
+ constraints: [...from.constraints, makeArrayConstraints({
218
+ minLength: meta.minItems,
219
+ maxLength: meta.maxItems
220
+ })],
221
+ refinements: [...from.refinements, ast]
222
+ };
223
+ case "DateFromSelf":
224
+ return {
225
+ ...from,
226
+ constraints: [...from.constraints, makeDateConstraints(meta)],
227
+ refinements: [...from.refinements, ast]
228
+ };
229
+ default:
230
+ return {
231
+ ...from,
232
+ refinements: [...from.refinements, ast]
233
+ };
234
+ }
235
+ }
236
+ case "Declaration":
237
+ {
238
+ if (schemaId === schemaId_.DateFromSelfSchemaId) {
239
+ return {
240
+ _tag: "DateFromSelf",
241
+ constraints: [makeDateConstraints(meta)],
242
+ path,
243
+ refinements: [],
244
+ annotations: []
245
+ };
246
+ }
247
+ return {
248
+ _tag: "Declaration",
249
+ typeParameters: ast.typeParameters.map(ast => getDescription(ast, path)),
250
+ path,
251
+ refinements: [],
252
+ annotations: [],
253
+ ast
254
+ };
255
+ }
256
+ case "Literal":
257
+ {
258
+ return {
259
+ _tag: "Literal",
260
+ literal: ast.literal,
261
+ path,
262
+ refinements: [],
263
+ annotations: []
264
+ };
265
+ }
266
+ case "UniqueSymbol":
267
+ {
268
+ return {
269
+ _tag: "UniqueSymbol",
270
+ symbol: ast.symbol,
271
+ path,
272
+ refinements: [],
273
+ annotations: []
274
+ };
275
+ }
276
+ case "Enums":
277
+ {
278
+ return {
279
+ _tag: "Enums",
280
+ enums: ast.enums,
281
+ path,
282
+ refinements: [],
283
+ annotations: [],
284
+ ast
285
+ };
286
+ }
287
+ case "TemplateLiteral":
288
+ {
289
+ return {
290
+ _tag: "TemplateLiteral",
291
+ head: ast.head,
292
+ spans: ast.spans.map(span => ({
293
+ description: getDescription(span.type, path),
294
+ literal: span.literal
295
+ })),
296
+ path,
297
+ refinements: [],
298
+ annotations: []
299
+ };
300
+ }
301
+ case "StringKeyword":
302
+ return {
303
+ _tag: "StringKeyword",
304
+ constraints: [],
305
+ path,
306
+ refinements: [],
307
+ annotations: []
308
+ };
309
+ case "NumberKeyword":
310
+ return {
311
+ _tag: "NumberKeyword",
312
+ constraints: [],
313
+ path,
314
+ refinements: [],
315
+ annotations: []
316
+ };
317
+ case "BigIntKeyword":
318
+ return {
319
+ _tag: "BigIntKeyword",
320
+ constraints: [],
321
+ path,
322
+ refinements: [],
323
+ annotations: []
324
+ };
325
+ case "TupleType":
326
+ return {
327
+ _tag: "TupleType",
328
+ constraints: [],
329
+ elements: ast.elements.map((element, i) => ({
330
+ isOptional: element.isOptional,
331
+ description: getDescription(element.type, [...path, i])
332
+ })),
333
+ rest: ast.rest.map((element, i) => getDescription(element.type, [...path, i])),
334
+ path,
335
+ refinements: [],
336
+ annotations: []
337
+ };
338
+ case "TypeLiteral":
339
+ return {
340
+ _tag: "TypeLiteral",
341
+ propertySignatures: ast.propertySignatures.map(ps => ({
342
+ isOptional: ps.isOptional,
343
+ name: ps.name,
344
+ value: getDescription(ps.type, [...path, ps.name])
345
+ })),
346
+ indexSignatures: ast.indexSignatures.map(is => ({
347
+ parameter: getDescription(is.parameter, path),
348
+ value: getDescription(is.type, path)
349
+ })),
350
+ path,
351
+ refinements: [],
352
+ annotations: []
353
+ };
354
+ case "Union":
355
+ return {
356
+ _tag: "Union",
357
+ members: ast.types.map((member, i) => getDescription(member, [...path, i])),
358
+ path,
359
+ refinements: [],
360
+ annotations: []
361
+ };
362
+ case "Suspend":
363
+ {
364
+ const memoId = idMemoMap.get(ast);
365
+ if (memoId !== undefined) {
366
+ return {
367
+ _tag: "Ref",
368
+ id: memoId,
369
+ ast,
370
+ path,
371
+ refinements: [],
372
+ annotations: []
373
+ };
374
+ }
375
+ counter++;
376
+ const id = `__id-${counter}__`;
377
+ idMemoMap.set(ast, id);
378
+ return {
379
+ _tag: "Suspend",
380
+ id,
381
+ ast,
382
+ description: () => getDescription(ast.f(), path),
383
+ path,
384
+ refinements: [],
385
+ annotations: []
386
+ };
387
+ }
388
+ case "Transformation":
389
+ return getDescription(ast.to, path);
390
+ case "NeverKeyword":
391
+ return {
392
+ _tag: "NeverKeyword",
393
+ path,
394
+ refinements: [],
395
+ annotations: [],
396
+ ast
397
+ };
398
+ default:
399
+ {
400
+ return {
401
+ _tag: "Keyword",
402
+ value: ast._tag,
403
+ path,
404
+ refinements: [],
405
+ annotations: []
406
+ };
407
+ }
408
+ }
409
+ });
410
+ function getMax(n1, n2) {
411
+ return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n2 : n1;
412
+ }
413
+ function getMin(n1, n2) {
414
+ return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n1 : n2;
415
+ }
416
+ const getOr = (a, b) => {
417
+ return a === undefined ? b : b === undefined ? a : a || b;
418
+ };
419
+ function mergePattern(pattern1, pattern2) {
420
+ if (pattern1 === undefined) {
421
+ return pattern2;
422
+ }
423
+ if (pattern2 === undefined) {
424
+ return pattern1;
425
+ }
426
+ return `(?:${pattern1})|(?:${pattern2})`;
427
+ }
428
+ function mergeStringConstraints(c1, c2) {
429
+ return makeStringConstraints({
430
+ minLength: getMax(c1.constraints.minLength, c2.constraints.minLength),
431
+ maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength),
432
+ pattern: mergePattern(c1.pattern, c2.pattern)
433
+ });
434
+ }
435
+ function buildStringConstraints(description) {
436
+ return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeStringConstraints);
437
+ }
438
+ function mergeNumberConstraints(c1, c2) {
439
+ return makeNumberConstraints({
440
+ isInteger: c1.isInteger || c2.isInteger,
441
+ min: getMax(c1.constraints.min, c2.constraints.min),
442
+ minExcluded: getOr(c1.constraints.minExcluded, c2.constraints.minExcluded),
443
+ max: getMin(c1.constraints.max, c2.constraints.max),
444
+ maxExcluded: getOr(c1.constraints.maxExcluded, c2.constraints.maxExcluded),
445
+ noNaN: getOr(c1.constraints.noNaN, c2.constraints.noNaN),
446
+ noDefaultInfinity: getOr(c1.constraints.noDefaultInfinity, c2.constraints.noDefaultInfinity)
447
+ });
448
+ }
449
+ function buildNumberConstraints(description) {
450
+ return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeNumberConstraints);
451
+ }
452
+ function mergeBigIntConstraints(c1, c2) {
453
+ return makeBigIntConstraints({
454
+ min: getMax(c1.constraints.min, c2.constraints.min),
455
+ max: getMin(c1.constraints.max, c2.constraints.max)
456
+ });
457
+ }
458
+ function buildBigIntConstraints(description) {
459
+ return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeBigIntConstraints);
460
+ }
461
+ function mergeDateConstraints(c1, c2) {
462
+ return makeDateConstraints({
463
+ min: getMax(c1.constraints.min, c2.constraints.min),
464
+ max: getMin(c1.constraints.max, c2.constraints.max),
465
+ noInvalidDate: getOr(c1.constraints.noInvalidDate, c2.constraints.noInvalidDate)
466
+ });
467
+ }
468
+ function buildDateConstraints(description) {
469
+ return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeDateConstraints);
470
+ }
471
+ const constArrayConstraints = /*#__PURE__*/makeArrayConstraints({});
472
+ function mergeArrayConstraints(c1, c2) {
473
+ return makeArrayConstraints({
474
+ minLength: getMax(c1.constraints.minLength, c2.constraints.minLength),
475
+ maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength)
476
+ });
477
+ }
478
+ function buildArrayConstraints(description) {
479
+ return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeArrayConstraints);
480
+ }
481
+ const arbitraryMemoMap = /*#__PURE__*/(0, _GlobalValue.globalValue)(/*#__PURE__*/Symbol.for("effect/Arbitrary/arbitraryMemoMap"), () => new WeakMap());
482
+ function applyFilters(filters, arb) {
483
+ return fc => filters.reduce((arb, filter) => arb.filter(filter), arb(fc));
484
+ }
485
+ function absurd(message) {
486
+ return () => {
487
+ throw new Error(message);
488
+ };
489
+ }
490
+ function getContextConstraints(description) {
491
+ switch (description._tag) {
492
+ case "StringKeyword":
493
+ return buildStringConstraints(description);
494
+ case "NumberKeyword":
495
+ return buildNumberConstraints(description);
496
+ case "BigIntKeyword":
497
+ return buildBigIntConstraints(description);
498
+ case "DateFromSelf":
499
+ return buildDateConstraints(description);
500
+ case "TupleType":
501
+ return buildArrayConstraints(description);
502
+ }
503
+ }
504
+ function wrapGo(f, g) {
505
+ return (description, ctx) => f(description, ctx, g(description, ctx));
506
+ }
507
+ const go = /*#__PURE__*/wrapGo((description, ctx, lazyArb) => {
508
+ const annotation = description.annotations[description.annotations.length - 1];
509
+ // error handling
510
+ if (annotation === undefined) {
511
+ switch (description._tag) {
512
+ case "Declaration":
513
+ case "NeverKeyword":
514
+ throw new Error(errors_.getArbitraryMissingAnnotationErrorMessage(description.path, description.ast));
515
+ case "Enums":
516
+ if (description.enums.length === 0) {
517
+ throw new Error(errors_.getArbitraryEmptyEnumErrorMessage(description.path));
518
+ }
519
+ }
520
+ }
521
+ const filters = description.refinements.map(ast => a => Option.isNone(ast.filter(a, SchemaAST.defaultParseOption, ast)));
522
+ if (annotation === undefined) {
523
+ return applyFilters(filters, lazyArb);
524
+ }
525
+ const constraints = getContextConstraints(description);
526
+ if (constraints !== undefined) {
527
+ ctx = {
528
+ ...ctx,
529
+ constraints
530
+ };
531
+ }
532
+ if (description._tag === "Declaration") {
533
+ return applyFilters(filters, annotation(...description.typeParameters.map(p => go(p, ctx)), ctx));
534
+ }
535
+ if (description.refinements.length > 0) {
536
+ // TODO(4.0): remove the `lazyArb` parameter
537
+ return applyFilters(filters, annotation(lazyArb, ctx));
538
+ }
539
+ return annotation(ctx);
540
+ }, (description, ctx) => {
541
+ switch (description._tag) {
542
+ case "DateFromSelf":
543
+ {
544
+ const constraints = buildDateConstraints(description);
545
+ return fc => fc.date(constraints?.constraints);
546
+ }
547
+ case "Declaration":
548
+ case "NeverKeyword":
549
+ return absurd(`BUG: cannot generate an arbitrary for ${description._tag}`);
550
+ case "Literal":
551
+ return fc => fc.constant(description.literal);
552
+ case "UniqueSymbol":
553
+ return fc => fc.constant(description.symbol);
554
+ case "Keyword":
555
+ {
556
+ switch (description.value) {
557
+ case "UndefinedKeyword":
558
+ return fc => fc.constant(undefined);
559
+ case "VoidKeyword":
560
+ case "UnknownKeyword":
561
+ case "AnyKeyword":
562
+ return fc => fc.anything();
563
+ case "BooleanKeyword":
564
+ return fc => fc.boolean();
565
+ case "SymbolKeyword":
566
+ return fc => fc.string().map(s => Symbol.for(s));
567
+ case "ObjectKeyword":
568
+ return fc => fc.oneof(fc.object(), fc.array(fc.anything()));
569
+ }
570
+ }
571
+ case "Enums":
572
+ return fc => fc.oneof(...description.enums.map(([_, value]) => fc.constant(value)));
573
+ case "TemplateLiteral":
574
+ {
575
+ return fc => {
576
+ const string = fc.string({
577
+ maxLength: 5
578
+ });
579
+ const number = fc.float({
580
+ noDefaultInfinity: true,
581
+ noNaN: true
582
+ });
583
+ const getTemplateLiteralArb = description => {
584
+ const components = description.head !== "" ? [fc.constant(description.head)] : [];
585
+ const getTemplateLiteralSpanTypeArb = description => {
586
+ switch (description._tag) {
587
+ case "StringKeyword":
588
+ return string;
589
+ case "NumberKeyword":
590
+ return number;
591
+ case "Literal":
592
+ return fc.constant(String(description.literal));
593
+ case "Union":
594
+ return fc.oneof(...description.members.map(getTemplateLiteralSpanTypeArb));
595
+ case "TemplateLiteral":
596
+ return getTemplateLiteralArb(description);
597
+ default:
598
+ return fc.constant("");
599
+ }
600
+ };
601
+ description.spans.forEach(span => {
602
+ components.push(getTemplateLiteralSpanTypeArb(span.description));
603
+ if (span.literal !== "") {
604
+ components.push(fc.constant(span.literal));
605
+ }
606
+ });
607
+ return fc.tuple(...components).map(spans => spans.join(""));
608
+ };
609
+ return getTemplateLiteralArb(description);
610
+ };
611
+ }
612
+ case "StringKeyword":
613
+ {
614
+ const constraints = buildStringConstraints(description);
615
+ const pattern = constraints?.pattern;
616
+ return pattern !== undefined ? fc => fc.stringMatching(new RegExp(pattern)) : fc => fc.string(constraints?.constraints);
617
+ }
618
+ case "NumberKeyword":
619
+ {
620
+ const constraints = buildNumberConstraints(description);
621
+ return constraints?.isInteger ? fc => fc.integer(constraints.constraints) : fc => fc.float(constraints?.constraints);
622
+ }
623
+ case "BigIntKeyword":
624
+ {
625
+ const constraints = buildBigIntConstraints(description);
626
+ return fc => fc.bigInt(constraints?.constraints ?? {});
627
+ }
628
+ case "TupleType":
629
+ {
630
+ const elements = [];
631
+ let hasOptionals = false;
632
+ for (const element of description.elements) {
633
+ elements.push(go(element.description, ctx));
634
+ if (element.isOptional) {
635
+ hasOptionals = true;
636
+ }
637
+ }
638
+ const rest = description.rest.map(d => go(d, ctx));
639
+ return fc => {
640
+ // ---------------------------------------------
641
+ // handle elements
642
+ // ---------------------------------------------
643
+ let output = fc.tuple(...elements.map(arb => arb(fc)));
644
+ if (hasOptionals) {
645
+ const indexes = fc.tuple(...description.elements.map(element => element.isOptional ? fc.boolean() : fc.constant(true)));
646
+ output = output.chain(tuple => indexes.map(booleans => {
647
+ for (const [i, b] of booleans.reverse().entries()) {
648
+ if (!b) {
649
+ tuple.splice(booleans.length - i, 1);
650
+ }
651
+ }
652
+ return tuple;
653
+ }));
654
+ }
655
+ // ---------------------------------------------
656
+ // handle rest element
657
+ // ---------------------------------------------
658
+ if (Arr.isNonEmptyReadonlyArray(rest)) {
659
+ const constraints = buildArrayConstraints(description) ?? constArrayConstraints;
660
+ const [head, ...tail] = rest;
661
+ const item = head(fc);
662
+ output = output.chain(as => {
663
+ const len = as.length;
664
+ // We must adjust the constraints for the rest element
665
+ // because the elements might have generated some values
666
+ const restArrayConstraints = subtractElementsLength(constraints.constraints, len);
667
+ if (restArrayConstraints.maxLength === 0) {
668
+ return fc.constant(as);
669
+ }
670
+ /*
671
+ `getSuspendedArray` is used to generate less values in
672
+ the context of a recursive schema. Without it, the following schema
673
+ would generate an big amount of values possibly leading to a stack
674
+ overflow:
675
+ ```ts
676
+ type A = ReadonlyArray<A | null>
677
+ const schema = S.Array(
678
+ S.NullOr(S.suspend((): S.Schema<A> => schema))
679
+ )
680
+ ```
681
+ */
682
+ const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, restArrayConstraints) : fc.array(item, restArrayConstraints);
683
+ if (len === 0) {
684
+ return arr;
685
+ }
686
+ return arr.map(rest => [...as, ...rest]);
687
+ });
688
+ // ---------------------------------------------
689
+ // handle post rest elements
690
+ // ---------------------------------------------
691
+ for (let j = 0; j < tail.length; j++) {
692
+ output = output.chain(as => tail[j](fc).map(a => [...as, a]));
693
+ }
694
+ }
695
+ return output;
696
+ };
697
+ }
698
+ case "TypeLiteral":
699
+ {
700
+ const propertySignatures = [];
701
+ const requiredKeys = [];
702
+ for (const ps of description.propertySignatures) {
703
+ if (!ps.isOptional) {
704
+ requiredKeys.push(ps.name);
705
+ }
706
+ propertySignatures.push(go(ps.value, ctx));
707
+ }
708
+ const indexSignatures = description.indexSignatures.map(is => [go(is.parameter, ctx), go(is.value, ctx)]);
709
+ return fc => {
710
+ const pps = {};
711
+ for (let i = 0; i < propertySignatures.length; i++) {
712
+ const ps = description.propertySignatures[i];
713
+ pps[ps.name] = propertySignatures[i](fc);
714
+ }
715
+ let output = fc.record(pps, {
716
+ requiredKeys
717
+ });
718
+ // ---------------------------------------------
719
+ // handle index signatures
720
+ // ---------------------------------------------
721
+ for (let i = 0; i < indexSignatures.length; i++) {
722
+ const key = indexSignatures[i][0](fc);
723
+ const value = indexSignatures[i][1](fc);
724
+ output = output.chain(o => {
725
+ const item = fc.tuple(key, value);
726
+ /*
727
+ `getSuspendedArray` is used to generate less key/value pairs in
728
+ the context of a recursive schema. Without it, the following schema
729
+ would generate an big amount of values possibly leading to a stack
730
+ overflow:
731
+ ```ts
732
+ type A = { [_: string]: A }
733
+ const schema = S.Record({ key: S.String, value: S.suspend((): S.Schema<A> => schema) })
734
+ ```
735
+ */
736
+ const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, {
737
+ maxLength: 2
738
+ }) : fc.array(item);
739
+ return arr.map(tuples => ({
740
+ ...Object.fromEntries(tuples),
741
+ ...o
742
+ }));
743
+ });
744
+ }
745
+ return output;
746
+ };
747
+ }
748
+ case "Union":
749
+ {
750
+ const members = description.members.map(member => go(member, ctx));
751
+ return fc => fc.oneof(...members.map(arb => arb(fc)));
752
+ }
753
+ case "Suspend":
754
+ {
755
+ const memo = arbitraryMemoMap.get(description.ast);
756
+ if (memo) {
757
+ return memo;
758
+ }
759
+ if (ctx.depthIdentifier === undefined) {
760
+ ctx = {
761
+ ...ctx,
762
+ depthIdentifier: description.id
763
+ };
764
+ }
765
+ const get = util_.memoizeThunk(() => {
766
+ return go(description.description(), ctx);
767
+ });
768
+ const out = fc => fc.constant(null).chain(() => get()(fc));
769
+ arbitraryMemoMap.set(description.ast, out);
770
+ return out;
771
+ }
772
+ case "Ref":
773
+ {
774
+ const memo = arbitraryMemoMap.get(description.ast);
775
+ if (memo) {
776
+ return memo;
777
+ }
778
+ throw new Error(`BUG: Ref ${JSON.stringify(description.id)} not found`);
779
+ }
780
+ }
781
+ });
782
+ function subtractElementsLength(constraints, len) {
783
+ if (len === 0 || constraints.minLength === undefined && constraints.maxLength === undefined) {
784
+ return constraints;
785
+ }
786
+ const out = {
787
+ ...constraints
788
+ };
789
+ if (out.minLength !== undefined) {
790
+ out.minLength = Math.max(out.minLength - len, 0);
791
+ }
792
+ if (out.maxLength !== undefined) {
793
+ out.maxLength = Math.max(out.maxLength - len, 0);
794
+ }
795
+ return out;
796
+ }
797
+ const getSuspendedArray = (fc, depthIdentifier, maxDepth, item, constraints) => {
798
+ // In the context of a recursive schema, we don't want a `maxLength` greater than 2.
799
+ // The only exception is when `minLength` is also set, in which case we set
800
+ // `maxLength` to the minimum value, which is `minLength`.
801
+ const maxLengthLimit = Math.max(2, constraints.minLength ?? 0);
802
+ if (constraints.maxLength !== undefined && constraints.maxLength > maxLengthLimit) {
803
+ constraints = {
804
+ ...constraints,
805
+ maxLength: maxLengthLimit
806
+ };
807
+ }
808
+ return fc.oneof({
809
+ maxDepth,
810
+ depthIdentifier
811
+ }, fc.constant([]), fc.array(item, constraints));
812
+ };
813
+ //# sourceMappingURL=Arbitrary.js.map
backend/node_modules/effect/dist/cjs/Array.js ADDED
@@ -0,0 +1,2695 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.replaceOption = exports.replace = exports.removeOption = exports.remove = exports.reduceRight = exports.reduce = exports.range = exports.prependAll = exports.prepend = exports.partitionMap = exports.partition = exports.pad = exports.of = exports.modifyOption = exports.modifyNonEmptyLast = exports.modifyNonEmptyHead = exports.modify = exports.min = exports.max = exports.matchRight = exports.matchLeft = exports.match = exports.mapAccum = exports.map = exports.makeBy = exports.make = exports.liftPredicate = exports.liftOption = exports.liftNullable = exports.liftEither = exports.let = exports.length = exports.lastNonEmpty = exports.last = exports.join = exports.isNonEmptyReadonlyArray = exports.isNonEmptyArray = exports.isEmptyReadonlyArray = exports.isEmptyArray = exports.isArray = exports.intersperse = exports.intersectionWith = exports.intersection = exports.insertAt = exports.initNonEmpty = exports.init = exports.headNonEmpty = exports.head = exports.groupWith = exports.groupBy = exports.group = exports.getSomes = exports.getRights = exports.getOrder = exports.getLefts = exports.getEquivalence = exports.get = exports.fromRecord = exports.fromOption = exports.fromNullable = exports.fromIterable = exports.forEach = exports.flatten = exports.flatMapNullable = exports.flatMap = exports.findLastIndex = exports.findLast = exports.findFirstWithIndex = exports.findFirstIndex = exports.findFirst = exports.filterMapWhile = exports.filterMap = exports.filter = exports.extend = exports.every = exports.ensure = exports.empty = exports.dropWhile = exports.dropRight = exports.drop = exports.differenceWith = exports.difference = exports.dedupeWith = exports.dedupeAdjacentWith = exports.dedupeAdjacent = exports.dedupe = exports.countBy = exports.copy = exports.containsWith = exports.contains = exports.chunksOf = exports.chop = exports.cartesianWith = exports.cartesian = exports.bindTo = exports.bind = exports.appendAll = exports.append = exports.allocate = exports.Do = void 0;
7
+ exports.zipWith = exports.zip = exports.window = exports.unzip = exports.unsafeGet = exports.unprepend = exports.unionWith = exports.union = exports.unfold = exports.unappend = exports.takeWhile = exports.takeRight = exports.take = exports.tailNonEmpty = exports.tail = exports.splitWhere = exports.splitNonEmptyAt = exports.splitAt = exports.split = exports.span = exports.sortWith = exports.sortBy = exports.sort = exports.some = exports.setNonEmptyLast = exports.setNonEmptyHead = exports.separate = exports.scanRight = exports.scan = exports.rotate = exports.reverse = exports.replicate = void 0;
8
+ var Either = _interopRequireWildcard(require("./Either.js"));
9
+ var Equal = _interopRequireWildcard(require("./Equal.js"));
10
+ var Equivalence = _interopRequireWildcard(require("./Equivalence.js"));
11
+ var _Function = require("./Function.js");
12
+ var internalArray = _interopRequireWildcard(require("./internal/array.js"));
13
+ var internalDoNotation = _interopRequireWildcard(require("./internal/doNotation.js"));
14
+ var moduleIterable = _interopRequireWildcard(require("./Iterable.js"));
15
+ var Option = _interopRequireWildcard(require("./Option.js"));
16
+ var Order = _interopRequireWildcard(require("./Order.js"));
17
+ var Predicate = _interopRequireWildcard(require("./Predicate.js"));
18
+ var Record = _interopRequireWildcard(require("./Record.js"));
19
+ var Tuple = _interopRequireWildcard(require("./Tuple.js"));
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
+ /**
22
+ * This module provides utility functions for working with arrays in TypeScript.
23
+ *
24
+ * @since 2.0.0
25
+ */
26
+
27
+ /**
28
+ * Builds a `NonEmptyArray` from an non-empty collection of elements.
29
+ *
30
+ * **Example**
31
+ *
32
+ * ```ts
33
+ * import { Array } from "effect"
34
+ *
35
+ * const result = Array.make(1, 2, 3)
36
+ * console.log(result) // [1, 2, 3]
37
+ * ```
38
+ *
39
+ * @category constructors
40
+ * @since 2.0.0
41
+ */
42
+ const make = (...elements) => elements;
43
+ /**
44
+ * Creates a new `Array` of the specified length.
45
+ *
46
+ * **Example**
47
+ *
48
+ * ```ts
49
+ * import { Array } from "effect"
50
+ *
51
+ * const result = Array.allocate<number>(3)
52
+ * console.log(result) // [ <3 empty items> ]
53
+ * ```
54
+ *
55
+ * @category constructors
56
+ * @since 2.0.0
57
+ */
58
+ exports.make = make;
59
+ const allocate = n => new Array(n);
60
+ /**
61
+ * Return a `NonEmptyArray` of length `n` with element `i` initialized with `f(i)`.
62
+ *
63
+ * **Note**. `n` is normalized to an integer >= 1.
64
+ *
65
+ * **Example**
66
+ *
67
+ * ```ts
68
+ * import { makeBy } from "effect/Array"
69
+ *
70
+ * const result = makeBy(5, n => n * 2)
71
+ * console.log(result) // [0, 2, 4, 6, 8]
72
+ * ```
73
+ *
74
+ * @category constructors
75
+ * @since 2.0.0
76
+ */
77
+ exports.allocate = allocate;
78
+ const makeBy = exports.makeBy = /*#__PURE__*/(0, _Function.dual)(2, (n, f) => {
79
+ const max = Math.max(1, Math.floor(n));
80
+ const out = new Array(max);
81
+ for (let i = 0; i < max; i++) {
82
+ out[i] = f(i);
83
+ }
84
+ return out;
85
+ });
86
+ /**
87
+ * Return a `NonEmptyArray` containing a range of integers, including both endpoints.
88
+ *
89
+ * **Example**
90
+ *
91
+ * ```ts
92
+ * import { range } from "effect/Array"
93
+ *
94
+ * const result = range(1, 3)
95
+ * console.log(result) // [1, 2, 3]
96
+ * ```
97
+ *
98
+ * @category constructors
99
+ * @since 2.0.0
100
+ */
101
+ const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : [start];
102
+ /**
103
+ * Return a `NonEmptyArray` containing a value repeated the specified number of times.
104
+ *
105
+ * **Note**. `n` is normalized to an integer >= 1.
106
+ *
107
+ * **Example**
108
+ *
109
+ * ```ts
110
+ * import { Array } from "effect"
111
+ *
112
+ * const result = Array.replicate("a", 3)
113
+ * console.log(result) // ["a", "a", "a"]
114
+ * ```
115
+ *
116
+ * @category constructors
117
+ * @since 2.0.0
118
+ */
119
+ exports.range = range;
120
+ const replicate = exports.replicate = /*#__PURE__*/(0, _Function.dual)(2, (a, n) => makeBy(n, () => a));
121
+ /**
122
+ * Creates a new `Array` from an iterable collection of values.
123
+ * If the input is already an array, it returns the input as-is.
124
+ * Otherwise, it converts the iterable collection to an array.
125
+ *
126
+ * **Example**
127
+ *
128
+ * ```ts
129
+ * import { Array } from "effect"
130
+ *
131
+ * const result = Array.fromIterable(new Set([1, 2, 3]))
132
+ * console.log(result) // [1, 2, 3]
133
+ * ```
134
+ *
135
+ * @category constructors
136
+ * @since 2.0.0
137
+ */
138
+ const fromIterable = collection => Array.isArray(collection) ? collection : Array.from(collection);
139
+ /**
140
+ * Creates a new `Array` from a value that might not be an iterable.
141
+ *
142
+ * **Example**
143
+ *
144
+ * ```ts
145
+ * import { Array } from "effect"
146
+ *
147
+ * console.log(Array.ensure("a")) // ["a"]
148
+ * console.log(Array.ensure(["a"])) // ["a"]
149
+ * console.log(Array.ensure(["a", "b", "c"])) // ["a", "b", "c"]
150
+ * ```
151
+ *
152
+ * @category constructors
153
+ * @since 3.3.0
154
+ */
155
+ exports.fromIterable = fromIterable;
156
+ const ensure = self => Array.isArray(self) ? self : [self];
157
+ /**
158
+ * Takes a record and returns an array of tuples containing its keys and values.
159
+ *
160
+ * **Example**
161
+ *
162
+ * ```ts
163
+ * import { Array } from "effect"
164
+ *
165
+ * const result = Array.fromRecord({ a: 1, b: 2, c: 3 })
166
+ * console.log(result) // [["a", 1], ["b", 2], ["c", 3]]
167
+ * ```
168
+ *
169
+ * @category conversions
170
+ * @since 2.0.0
171
+ */
172
+ exports.ensure = ensure;
173
+ const fromRecord = exports.fromRecord = Record.toEntries;
174
+ /**
175
+ * Converts an `Option` to an array.
176
+ *
177
+ * **Example**
178
+ *
179
+ * ```ts
180
+ * import { Array, Option } from "effect"
181
+ *
182
+ * console.log(Array.fromOption(Option.some(1))) // [1]
183
+ * console.log(Array.fromOption(Option.none())) // []
184
+ * ```
185
+ *
186
+ * @category conversions
187
+ * @since 2.0.0
188
+ */
189
+ const fromOption = exports.fromOption = Option.toArray;
190
+ /**
191
+ * Matches the elements of an array, applying functions to cases of empty and non-empty arrays.
192
+ *
193
+ * **Example**
194
+ *
195
+ * ```ts
196
+ * import { Array } from "effect"
197
+ *
198
+ * const match = Array.match({
199
+ * onEmpty: () => "empty",
200
+ * onNonEmpty: ([head, ...tail]) => `head: ${head}, tail: ${tail.length}`
201
+ * })
202
+ * console.log(match([])) // "empty"
203
+ * console.log(match([1, 2, 3])) // "head: 1, tail: 2"
204
+ * ```
205
+ *
206
+ * @category pattern matching
207
+ * @since 2.0.0
208
+ */
209
+ const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, {
210
+ onEmpty,
211
+ onNonEmpty
212
+ }) => isNonEmptyReadonlyArray(self) ? onNonEmpty(self) : onEmpty());
213
+ /**
214
+ * Matches the elements of an array from the left, applying functions to cases of empty and non-empty arrays.
215
+ *
216
+ * **Example**
217
+ *
218
+ * ```ts
219
+ * import { Array } from "effect"
220
+ *
221
+ * const matchLeft = Array.matchLeft({
222
+ * onEmpty: () => "empty",
223
+ * onNonEmpty: (head, tail) => `head: ${head}, tail: ${tail.length}`
224
+ * })
225
+ * console.log(matchLeft([])) // "empty"
226
+ * console.log(matchLeft([1, 2, 3])) // "head: 1, tail: 2"
227
+ * ```
228
+ *
229
+ * @category pattern matching
230
+ * @since 2.0.0
231
+ */
232
+ const matchLeft = exports.matchLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, {
233
+ onEmpty,
234
+ onNonEmpty
235
+ }) => isNonEmptyReadonlyArray(self) ? onNonEmpty(headNonEmpty(self), tailNonEmpty(self)) : onEmpty());
236
+ /**
237
+ * Matches the elements of an array from the right, applying functions to cases of empty and non-empty arrays.
238
+ *
239
+ * **Example**
240
+ *
241
+ * ```ts
242
+ * import { Array } from "effect"
243
+ *
244
+ * const matchRight = Array.matchRight({
245
+ * onEmpty: () => "empty",
246
+ * onNonEmpty: (init, last) => `init: ${init.length}, last: ${last}`
247
+ * })
248
+ * console.log(matchRight([])) // "empty"
249
+ * console.log(matchRight([1, 2, 3])) // "init: 2, last: 3"
250
+ * ```
251
+ *
252
+ * @category pattern matching
253
+ * @since 2.0.0
254
+ */
255
+ const matchRight = exports.matchRight = /*#__PURE__*/(0, _Function.dual)(2, (self, {
256
+ onEmpty,
257
+ onNonEmpty
258
+ }) => isNonEmptyReadonlyArray(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
259
+ /**
260
+ * Prepend an element to the front of an `Iterable`, creating a new `NonEmptyArray`.
261
+ *
262
+ * **Example**
263
+ *
264
+ * ```ts
265
+ * import { Array } from "effect"
266
+ *
267
+ * const result = Array.prepend([2, 3, 4], 1)
268
+ * console.log(result) // [1, 2, 3, 4]
269
+ * ```
270
+ *
271
+ * @category concatenating
272
+ * @since 2.0.0
273
+ */
274
+ const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, head) => [head, ...self]);
275
+ /**
276
+ * Prepends the specified prefix array (or iterable) to the beginning of the specified array (or iterable).
277
+ * If either array is non-empty, the result is also a non-empty array.
278
+ *
279
+ * **Example**
280
+ *
281
+ * ```ts
282
+ * import { Array } from "effect"
283
+ *
284
+ * const result = Array.prependAll([2, 3], [0, 1])
285
+ * console.log(result) // [0, 1, 2, 3]
286
+ * ```
287
+ *
288
+ * @category concatenating
289
+ * @since 2.0.0
290
+ */
291
+ const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => fromIterable(that).concat(fromIterable(self)));
292
+ /**
293
+ * Append an element to the end of an `Iterable`, creating a new `NonEmptyArray`.
294
+ *
295
+ * **Example**
296
+ *
297
+ * ```ts
298
+ * import { Array } from "effect"
299
+ *
300
+ * const result = Array.append([1, 2, 3], 4);
301
+ * console.log(result) // [1, 2, 3, 4]
302
+ * ```
303
+ *
304
+ * @category concatenating
305
+ * @since 2.0.0
306
+ */
307
+ const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, last) => [...self, last]);
308
+ /**
309
+ * Concatenates two arrays (or iterables), combining their elements.
310
+ * If either array is non-empty, the result is also a non-empty array.
311
+ *
312
+ * @category concatenating
313
+ * @since 2.0.0
314
+ */
315
+ const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
316
+ /**
317
+ * Accumulates values from an `Iterable` starting from the left, storing
318
+ * each intermediate result in an array. Useful for tracking the progression of
319
+ * a value through a series of transformations.
320
+ *
321
+ * **Example**
322
+ *
323
+ * ```ts
324
+ * import { Array } from "effect";
325
+ *
326
+ * const result = Array.scan([1, 2, 3, 4], 0, (acc, value) => acc + value)
327
+ * console.log(result) // [0, 1, 3, 6, 10]
328
+ *
329
+ * // Explanation:
330
+ * // This function starts with the initial value (0 in this case)
331
+ * // and adds each element of the array to this accumulator one by one,
332
+ * // keeping track of the cumulative sum after each addition.
333
+ * // Each of these sums is captured in the resulting array.
334
+ * ```
335
+ *
336
+ * @category folding
337
+ * @since 2.0.0
338
+ */
339
+ const scan = exports.scan = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => {
340
+ const out = [b];
341
+ let i = 0;
342
+ for (const a of self) {
343
+ out[i + 1] = f(out[i], a);
344
+ i++;
345
+ }
346
+ return out;
347
+ });
348
+ /**
349
+ * Accumulates values from an `Iterable` starting from the right, storing
350
+ * each intermediate result in an array. Useful for tracking the progression of
351
+ * a value through a series of transformations.
352
+ *
353
+ * **Example**
354
+ *
355
+ * ```ts
356
+ * import { Array } from "effect";
357
+ *
358
+ * const result = Array.scanRight([1, 2, 3, 4], 0, (acc, value) => acc + value)
359
+ * console.log(result) // [10, 9, 7, 4, 0]
360
+ * ```
361
+ *
362
+ * @category folding
363
+ * @since 2.0.0
364
+ */
365
+ const scanRight = exports.scanRight = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => {
366
+ const input = fromIterable(self);
367
+ const out = new Array(input.length + 1);
368
+ out[input.length] = b;
369
+ for (let i = input.length - 1; i >= 0; i--) {
370
+ out[i] = f(out[i + 1], input[i]);
371
+ }
372
+ return out;
373
+ });
374
+ /**
375
+ * Determine if `unknown` is an Array.
376
+ *
377
+ * **Example**
378
+ *
379
+ * ```ts
380
+ * import { Array } from "effect"
381
+ *
382
+ * console.log(Array.isArray(null)) // false
383
+ * console.log(Array.isArray([1, 2, 3])) // true
384
+ * ```
385
+ *
386
+ * @category guards
387
+ * @since 2.0.0
388
+ */
389
+ const isArray = exports.isArray = Array.isArray;
390
+ /**
391
+ * Determine if an `Array` is empty narrowing down the type to `[]`.
392
+ *
393
+ * **Example**
394
+ *
395
+ * ```ts
396
+ * import { Array } from "effect"
397
+ *
398
+ * console.log(Array.isEmptyArray([])) // true
399
+ * console.log(Array.isEmptyArray([1, 2, 3])) // false
400
+ * ```
401
+ *
402
+ * @category guards
403
+ * @since 2.0.0
404
+ */
405
+ const isEmptyArray = self => self.length === 0;
406
+ /**
407
+ * Determine if a `ReadonlyArray` is empty narrowing down the type to `readonly []`.
408
+ *
409
+ * **Example**
410
+ *
411
+ * ```ts
412
+ * import { Array } from "effect"
413
+ *
414
+ * console.log(Array.isEmptyReadonlyArray([])) // true
415
+ * console.log(Array.isEmptyReadonlyArray([1, 2, 3])) // false
416
+ * ```
417
+ *
418
+ * @category guards
419
+ * @since 2.0.0
420
+ */
421
+ exports.isEmptyArray = isEmptyArray;
422
+ const isEmptyReadonlyArray = exports.isEmptyReadonlyArray = isEmptyArray;
423
+ /**
424
+ * Determine if an `Array` is non empty narrowing down the type to `NonEmptyArray`.
425
+ *
426
+ * An `Array` is considered to be a `NonEmptyArray` if it contains at least one element.
427
+ *
428
+ * **Example**
429
+ *
430
+ * ```ts
431
+ * import { Array } from "effect"
432
+ *
433
+ * console.log(Array.isNonEmptyArray([])) // false
434
+ * console.log(Array.isNonEmptyArray([1, 2, 3])) // true
435
+ * ```
436
+ *
437
+ * @category guards
438
+ * @since 2.0.0
439
+ */
440
+ const isNonEmptyArray = exports.isNonEmptyArray = internalArray.isNonEmptyArray;
441
+ /**
442
+ * Determine if a `ReadonlyArray` is non empty narrowing down the type to `NonEmptyReadonlyArray`.
443
+ *
444
+ * A `ReadonlyArray` is considered to be a `NonEmptyReadonlyArray` if it contains at least one element.
445
+ *
446
+ * **Example**
447
+ *
448
+ * ```ts
449
+ * import { Array } from "effect"
450
+ *
451
+ * console.log(Array.isNonEmptyReadonlyArray([])) // false
452
+ * console.log(Array.isNonEmptyReadonlyArray([1, 2, 3])) // true
453
+ * ```
454
+ *
455
+ * @category guards
456
+ * @since 2.0.0
457
+ */
458
+ const isNonEmptyReadonlyArray = exports.isNonEmptyReadonlyArray = internalArray.isNonEmptyArray;
459
+ /**
460
+ * Return the number of elements in a `ReadonlyArray`.
461
+ *
462
+ * @category getters
463
+ * @since 2.0.0
464
+ */
465
+ const length = self => self.length;
466
+ exports.length = length;
467
+ const isOutOfBounds = (i, as) => i < 0 || i >= as.length;
468
+ const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
469
+ /**
470
+ * This function provides a safe way to read a value at a particular index from a `ReadonlyArray`.
471
+ *
472
+ * @category getters
473
+ * @since 2.0.0
474
+ */
475
+ const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => {
476
+ const i = Math.floor(index);
477
+ return isOutOfBounds(i, self) ? Option.none() : Option.some(self[i]);
478
+ });
479
+ /**
480
+ * Gets an element unsafely, will throw on out of bounds.
481
+ *
482
+ * @since 2.0.0
483
+ * @category unsafe
484
+ */
485
+ const unsafeGet = exports.unsafeGet = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => {
486
+ const i = Math.floor(index);
487
+ if (isOutOfBounds(i, self)) {
488
+ throw new Error(`Index ${i} out of bounds`);
489
+ }
490
+ return self[i];
491
+ });
492
+ /**
493
+ * Return a tuple containing the first element, and a new `Array` of the remaining elements, if any.
494
+ *
495
+ * **Example**
496
+ *
497
+ * ```ts
498
+ * import { Array } from "effect";
499
+ *
500
+ * const result = Array.unprepend([1, 2, 3, 4])
501
+ * console.log(result) // [1, [2, 3, 4]]
502
+ * ```
503
+ *
504
+ * @category splitting
505
+ * @since 2.0.0
506
+ */
507
+ const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)];
508
+ /**
509
+ * Return a tuple containing a copy of the `NonEmptyReadonlyArray` without its last element, and that last element.
510
+ *
511
+ * **Example**
512
+ *
513
+ * ```ts
514
+ * import { Array } from "effect";
515
+ *
516
+ * const result = Array.unappend([1, 2, 3, 4])
517
+ * console.log(result) // [[1, 2, 3], 4]
518
+ * ```
519
+ *
520
+ * @category splitting
521
+ * @since 2.0.0
522
+ */
523
+ exports.unprepend = unprepend;
524
+ const unappend = self => [initNonEmpty(self), lastNonEmpty(self)];
525
+ /**
526
+ * Get the first element of a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty.
527
+ *
528
+ * @category getters
529
+ * @since 2.0.0
530
+ */
531
+ exports.unappend = unappend;
532
+ const head = exports.head = /*#__PURE__*/get(0);
533
+ /**
534
+ * Get the first element of a non empty array.
535
+ *
536
+ * **Example**
537
+ *
538
+ * ```ts
539
+ * import { Array } from "effect"
540
+ *
541
+ * const result = Array.headNonEmpty([1, 2, 3, 4])
542
+ * console.log(result) // 1
543
+ * ```
544
+ *
545
+ * @category getters
546
+ * @since 2.0.0
547
+ */
548
+ const headNonEmpty = exports.headNonEmpty = /*#__PURE__*/unsafeGet(0);
549
+ /**
550
+ * Get the last element in a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty.
551
+ *
552
+ * @category getters
553
+ * @since 2.0.0
554
+ */
555
+ const last = self => isNonEmptyReadonlyArray(self) ? Option.some(lastNonEmpty(self)) : Option.none();
556
+ /**
557
+ * Get the last element of a non empty array.
558
+ *
559
+ * **Example**
560
+ *
561
+ * ```ts
562
+ * import { Array } from "effect"
563
+ *
564
+ * const result = Array.lastNonEmpty([1, 2, 3, 4])
565
+ * console.log(result) // 4
566
+ * ```
567
+ *
568
+ * @category getters
569
+ * @since 2.0.0
570
+ */
571
+ exports.last = last;
572
+ const lastNonEmpty = self => self[self.length - 1];
573
+ /**
574
+ * Get all but the first element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty.
575
+ *
576
+ * @category getters
577
+ * @since 2.0.0
578
+ */
579
+ exports.lastNonEmpty = lastNonEmpty;
580
+ const tail = self => {
581
+ const input = fromIterable(self);
582
+ return isNonEmptyReadonlyArray(input) ? Option.some(tailNonEmpty(input)) : Option.none();
583
+ };
584
+ /**
585
+ * Get all but the first element of a `NonEmptyReadonlyArray`.
586
+ *
587
+ * **Example**
588
+ *
589
+ * ```ts
590
+ * import { Array } from "effect"
591
+ *
592
+ * const result = Array.tailNonEmpty([1, 2, 3, 4])
593
+ * console.log(result) // [2, 3, 4]
594
+ * ```
595
+ *
596
+ * @category getters
597
+ * @since 2.0.0
598
+ */
599
+ exports.tail = tail;
600
+ const tailNonEmpty = self => self.slice(1);
601
+ /**
602
+ * Get all but the last element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty.
603
+ *
604
+ * @category getters
605
+ * @since 2.0.0
606
+ */
607
+ exports.tailNonEmpty = tailNonEmpty;
608
+ const init = self => {
609
+ const input = fromIterable(self);
610
+ return isNonEmptyReadonlyArray(input) ? Option.some(initNonEmpty(input)) : Option.none();
611
+ };
612
+ /**
613
+ * Get all but the last element of a non empty array, creating a new array.
614
+ *
615
+ * **Example**
616
+ *
617
+ * ```ts
618
+ * import { Array } from "effect"
619
+ *
620
+ * const result = Array.initNonEmpty([1, 2, 3, 4])
621
+ * console.log(result) // [1, 2, 3]
622
+ * ```
623
+ *
624
+ * @category getters
625
+ * @since 2.0.0
626
+ */
627
+ exports.init = init;
628
+ const initNonEmpty = self => self.slice(0, -1);
629
+ /**
630
+ * Keep only a max number of elements from the start of an `Iterable`, creating a new `Array`.
631
+ *
632
+ * **Note**. `n` is normalized to a non negative integer.
633
+ *
634
+ * **Example**
635
+ *
636
+ * ```ts
637
+ * import { Array } from "effect"
638
+ *
639
+ * const result = Array.take([1, 2, 3, 4, 5], 3)
640
+ * console.log(result) // [1, 2, 3]
641
+ * ```
642
+ *
643
+ * @category getters
644
+ * @since 2.0.0
645
+ */
646
+ exports.initNonEmpty = initNonEmpty;
647
+ const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
648
+ const input = fromIterable(self);
649
+ return input.slice(0, clamp(n, input));
650
+ });
651
+ /**
652
+ * Keep only a max number of elements from the end of an `Iterable`, creating a new `Array`.
653
+ *
654
+ * **Note**. `n` is normalized to a non negative integer.
655
+ *
656
+ * **Example**
657
+ *
658
+ * ```ts
659
+ * import { Array } from "effect"
660
+ *
661
+ * const result = Array.takeRight([1, 2, 3, 4, 5], 3)
662
+ * console.log(result) // [3, 4, 5]
663
+ * ```
664
+ *
665
+ * @category getters
666
+ * @since 2.0.0
667
+ */
668
+ const takeRight = exports.takeRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
669
+ const input = fromIterable(self);
670
+ const i = clamp(n, input);
671
+ return i === 0 ? [] : input.slice(-i);
672
+ });
673
+ /**
674
+ * Calculate the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`.
675
+ *
676
+ * **Example**
677
+ *
678
+ * ```ts
679
+ * import { Array } from "effect"
680
+ *
681
+ * const result = Array.takeWhile([1, 3, 2, 4, 1, 2], x => x < 4)
682
+ * console.log(result) // [1, 3, 2]
683
+ *
684
+ * // Explanation:
685
+ * // - The function starts with the first element (`1`), which is less than `4`, so it adds `1` to the result.
686
+ * // - The next element (`3`) is also less than `4`, so it adds `3`.
687
+ * // - The next element (`2`) is again less than `4`, so it adds `2`.
688
+ * // - The function then encounters `4`, which is not less than `4`. At this point, it stops checking further elements and finalizes the result.
689
+ * ```
690
+ *
691
+ * @category getters
692
+ * @since 2.0.0
693
+ */
694
+ const takeWhile = exports.takeWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
695
+ let i = 0;
696
+ const out = [];
697
+ for (const a of self) {
698
+ if (!predicate(a, i)) {
699
+ break;
700
+ }
701
+ out.push(a);
702
+ i++;
703
+ }
704
+ return out;
705
+ });
706
+ const spanIndex = (self, predicate) => {
707
+ let i = 0;
708
+ for (const a of self) {
709
+ if (!predicate(a, i)) {
710
+ break;
711
+ }
712
+ i++;
713
+ }
714
+ return i;
715
+ };
716
+ /**
717
+ * Split an `Iterable` into two parts:
718
+ *
719
+ * 1. the longest initial subarray for which all elements satisfy the specified predicate
720
+ * 2. the remaining elements
721
+ *
722
+ * @category splitting
723
+ * @since 2.0.0
724
+ */
725
+ const span = exports.span = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => splitAt(self, spanIndex(self, predicate)));
726
+ /**
727
+ * Drop a max number of elements from the start of an `Iterable`, creating a new `Array`.
728
+ *
729
+ * **Note**. `n` is normalized to a non negative integer.
730
+ *
731
+ * **Example**
732
+ *
733
+ * ```ts
734
+ * import { Array } from "effect"
735
+ *
736
+ * const result = Array.drop([1, 2, 3, 4, 5], 2)
737
+ * console.log(result) // [3, 4, 5]
738
+ * ```
739
+ *
740
+ * @category getters
741
+ * @since 2.0.0
742
+ */
743
+ const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
744
+ const input = fromIterable(self);
745
+ return input.slice(clamp(n, input), input.length);
746
+ });
747
+ /**
748
+ * Drop a max number of elements from the end of an `Iterable`, creating a new `Array`.
749
+ *
750
+ * **Note**. `n` is normalized to a non negative integer.
751
+ *
752
+ * **Example**
753
+ *
754
+ * ```ts
755
+ * import { Array } from "effect"
756
+ *
757
+ * const result = Array.dropRight([1, 2, 3, 4, 5], 2)
758
+ * console.log(result) // [1, 2, 3]
759
+ * ```
760
+ *
761
+ * @category getters
762
+ * @since 2.0.0
763
+ */
764
+ const dropRight = exports.dropRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
765
+ const input = fromIterable(self);
766
+ return input.slice(0, input.length - clamp(n, input));
767
+ });
768
+ /**
769
+ * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`.
770
+ *
771
+ * **Example**
772
+ *
773
+ * ```ts
774
+ * import { Array } from "effect"
775
+ *
776
+ * const result = Array.dropWhile([1, 2, 3, 4, 5], x => x < 4)
777
+ * console.log(result) // [4, 5]
778
+ * ```
779
+ *
780
+ * @category getters
781
+ * @since 2.0.0
782
+ */
783
+ const dropWhile = exports.dropWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => fromIterable(self).slice(spanIndex(self, predicate)));
784
+ /**
785
+ * Return the first index for which a predicate holds.
786
+ *
787
+ * **Example**
788
+ *
789
+ * ```ts
790
+ * import { Array } from "effect"
791
+ *
792
+ * const result = Array.findFirstIndex([5, 3, 8, 9], x => x > 5)
793
+ * console.log(result) // Option.some(2)
794
+ * ```
795
+ *
796
+ * @category elements
797
+ * @since 2.0.0
798
+ */
799
+ const findFirstIndex = exports.findFirstIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
800
+ let i = 0;
801
+ for (const a of self) {
802
+ if (predicate(a, i)) {
803
+ return Option.some(i);
804
+ }
805
+ i++;
806
+ }
807
+ return Option.none();
808
+ });
809
+ /**
810
+ * Return the last index for which a predicate holds.
811
+ *
812
+ * **Example**
813
+ *
814
+ * ```ts
815
+ * import { Array } from "effect"
816
+ *
817
+ * const result = Array.findLastIndex([1, 3, 8, 9], x => x < 5)
818
+ * console.log(result) // Option.some(1)
819
+ * ```
820
+ *
821
+ * @category elements
822
+ * @since 2.0.0
823
+ */
824
+ const findLastIndex = exports.findLastIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
825
+ const input = fromIterable(self);
826
+ for (let i = input.length - 1; i >= 0; i--) {
827
+ if (predicate(input[i], i)) {
828
+ return Option.some(i);
829
+ }
830
+ }
831
+ return Option.none();
832
+ });
833
+ /**
834
+ * Returns the first element that satisfies the specified
835
+ * predicate, or `None` if no such element exists.
836
+ *
837
+ * **Example**
838
+ *
839
+ * ```ts
840
+ * import { Array } from "effect"
841
+ *
842
+ * const result = Array.findFirst([1, 2, 3, 4, 5], x => x > 3)
843
+ * console.log(result) // Option.some(4)
844
+ * ```
845
+ *
846
+ * @category elements
847
+ * @since 2.0.0
848
+ */
849
+ const findFirst = exports.findFirst = moduleIterable.findFirst;
850
+ /**
851
+ * Finds the last element in an iterable collection that satisfies the given predicate or refinement.
852
+ * Returns an `Option` containing the found element, or `Option.none` if no element matches.
853
+ *
854
+ * **Example**
855
+ *
856
+ * ```ts
857
+ * import { Array } from "effect"
858
+ *
859
+ * const result = Array.findLast([1, 2, 3, 4, 5], n => n % 2 === 0)
860
+ * console.log(result) // Option.some(4)
861
+ * ```
862
+ *
863
+ * @category elements
864
+ * @since 2.0.0
865
+ */
866
+ const findLast = exports.findLast = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
867
+ const input = fromIterable(self);
868
+ for (let i = input.length - 1; i >= 0; i--) {
869
+ const a = input[i];
870
+ const o = f(a, i);
871
+ if (Predicate.isBoolean(o)) {
872
+ if (o) {
873
+ return Option.some(a);
874
+ }
875
+ } else {
876
+ if (Option.isSome(o)) {
877
+ return o;
878
+ }
879
+ }
880
+ }
881
+ return Option.none();
882
+ });
883
+ /**
884
+ * Returns a tuple of the first element that satisfies the specified
885
+ * predicate and its index, or `None` if no such element exists.
886
+ *
887
+ * **Example**
888
+ *
889
+ * ```ts
890
+ * import { Array } from "effect"
891
+ *
892
+ * const result = Array.findFirstWithIndex([1, 2, 3, 4, 5], x => x > 3)
893
+ * console.log(result) // Option.some([4, 3])
894
+ * ```
895
+ *
896
+ * @category elements
897
+ * @since 3.17.0
898
+ */
899
+ const findFirstWithIndex = exports.findFirstWithIndex = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
900
+ let i = 0;
901
+ for (const a of self) {
902
+ const o = f(a, i);
903
+ if (Predicate.isBoolean(o)) {
904
+ if (o) {
905
+ return Option.some([a, i]);
906
+ }
907
+ } else {
908
+ if (Option.isSome(o)) {
909
+ return Option.some([o.value, i]);
910
+ }
911
+ }
912
+ i++;
913
+ }
914
+ return Option.none();
915
+ });
916
+ /**
917
+ * Counts all the element of the given array that pass the given predicate
918
+ *
919
+ * **Example**
920
+ *
921
+ * ```ts
922
+ * import { Array } from "effect"
923
+ *
924
+ * const result = Array.countBy([1, 2, 3, 4, 5], n => n % 2 === 0)
925
+ * console.log(result) // 2
926
+ * ```
927
+ *
928
+ * @category folding
929
+ * @since 3.16.0
930
+ */
931
+ const countBy = exports.countBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
932
+ let count = 0;
933
+ const as = fromIterable(self);
934
+ for (let i = 0; i < as.length; i++) {
935
+ const a = as[i];
936
+ if (f(a, i)) {
937
+ count++;
938
+ }
939
+ }
940
+ return count;
941
+ });
942
+ /**
943
+ * Insert an element at the specified index, creating a new `NonEmptyArray`,
944
+ * or return `None` if the index is out of bounds.
945
+ *
946
+ * **Example**
947
+ *
948
+ * ```ts
949
+ * import { Array } from "effect"
950
+ *
951
+ * const result = Array.insertAt(['a', 'b', 'c', 'e'], 3, 'd')
952
+ * console.log(result) // Option.some(['a', 'b', 'c', 'd', 'e'])
953
+ * ```
954
+ *
955
+ * @since 2.0.0
956
+ */
957
+ const insertAt = exports.insertAt = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => {
958
+ const out = Array.from(self);
959
+ // v--- `= self.length` is ok, it means inserting in last position
960
+ if (i < 0 || i > out.length) {
961
+ return Option.none();
962
+ }
963
+ out.splice(i, 0, b);
964
+ return Option.some(out);
965
+ });
966
+ /**
967
+ * Change the element at the specified index, creating a new `Array`,
968
+ * or return a copy of the input if the index is out of bounds.
969
+ *
970
+ * **Example**
971
+ *
972
+ * ```ts
973
+ * import { Array } from "effect"
974
+ *
975
+ * const result = Array.replace(['a', 'b', 'c', 'd'], 1, 'z')
976
+ * console.log(result) // ['a', 'z', 'c', 'd']
977
+ * ```
978
+ *
979
+ * @since 2.0.0
980
+ */
981
+ const replace = exports.replace = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modify(self, i, () => b));
982
+ /**
983
+ * Replaces an element in an array with the given value, returning an option of the updated array.
984
+ *
985
+ * **Example**
986
+ *
987
+ * ```ts
988
+ * import { Array } from "effect"
989
+ *
990
+ * const result = Array.replaceOption([1, 2, 3], 1, 4)
991
+ * console.log(result) // Option.some([1, 4, 3])
992
+ * ```
993
+ *
994
+ * @since 2.0.0
995
+ */
996
+ const replaceOption = exports.replaceOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modifyOption(self, i, () => b));
997
+ /**
998
+ * Apply a function to the element at the specified index, creating a new `Array`,
999
+ * or return a copy of the input if the index is out of bounds.
1000
+ *
1001
+ * **Example**
1002
+ *
1003
+ * ```ts
1004
+ * import { Array } from "effect"
1005
+ *
1006
+ * const result = Array.modify([1, 2, 3, 4], 2, (n) => n * 2)
1007
+ * console.log(result) // [1, 2, 6, 4]
1008
+ * ```
1009
+ *
1010
+ * @since 2.0.0
1011
+ */
1012
+ const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => {
1013
+ const out = Array.from(self);
1014
+ if (isOutOfBounds(i, out)) {
1015
+ return out;
1016
+ }
1017
+ const b = f(out[i]);
1018
+ out[i] = b;
1019
+ return out;
1020
+ });
1021
+ /**
1022
+ * Apply a function to the element at the specified index, creating a new `Array`,
1023
+ * or return `None` if the index is out of bounds.
1024
+ *
1025
+ * **Example**
1026
+ *
1027
+ * ```ts
1028
+ * import { Array } from "effect"
1029
+ *
1030
+ * const input = [1, 2, 3, 4]
1031
+ * const result = Array.modifyOption(input, 2, (n) => n * 2)
1032
+ * console.log(result) // Option.some([1, 2, 6, 4])
1033
+ *
1034
+ * const outOfBoundsResult = Array.modifyOption(input, 5, (n) => n * 2)
1035
+ * console.log(outOfBoundsResult) // Option.none()
1036
+ * ```
1037
+ *
1038
+ * @since 2.0.0
1039
+ */
1040
+ const modifyOption = exports.modifyOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => {
1041
+ const arr = fromIterable(self);
1042
+ if (isOutOfBounds(i, arr)) {
1043
+ return Option.none();
1044
+ }
1045
+ const out = Array.isArray(self) ? self.slice() : arr;
1046
+ const b = f(arr[i]);
1047
+ out[i] = b;
1048
+ return Option.some(out);
1049
+ });
1050
+ /**
1051
+ * Delete the element at the specified index, creating a new `Array`,
1052
+ * or return a copy of the input if the index is out of bounds.
1053
+ *
1054
+ * **Example**
1055
+ *
1056
+ * ```ts
1057
+ * import { Array } from "effect"
1058
+ *
1059
+ * const input = [1, 2, 3, 4]
1060
+ * const result = Array.remove(input, 2)
1061
+ * console.log(result) // [1, 2, 4]
1062
+ *
1063
+ * const outOfBoundsResult = Array.remove(input, 5)
1064
+ * console.log(outOfBoundsResult) // [1, 2, 3, 4]
1065
+ * ```
1066
+ *
1067
+ * @since 2.0.0
1068
+ */
1069
+ const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => {
1070
+ const out = Array.from(self);
1071
+ if (isOutOfBounds(i, out)) {
1072
+ return out;
1073
+ }
1074
+ out.splice(i, 1);
1075
+ return out;
1076
+ });
1077
+ /**
1078
+ * Delete the element at the specified index, creating a new `Array`,
1079
+ * or return `None` if the index is out of bounds.
1080
+ *
1081
+ * @example
1082
+ * ```ts
1083
+ * import * as assert from "node:assert"
1084
+ * import { Array, Option } from "effect"
1085
+ *
1086
+ * const numbers = [1, 2, 3, 4]
1087
+ * const result = Array.removeOption(numbers, 2)
1088
+ * assert.deepStrictEqual(result, Option.some([1, 2, 4]))
1089
+ *
1090
+ * const outOfBoundsResult = Array.removeOption(numbers, 5)
1091
+ * assert.deepStrictEqual(outOfBoundsResult, Option.none())
1092
+ * ```
1093
+ *
1094
+ * @since 3.16.0
1095
+ */
1096
+ const removeOption = exports.removeOption = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => {
1097
+ const arr = fromIterable(self);
1098
+ if (isOutOfBounds(i, arr)) {
1099
+ return Option.none();
1100
+ }
1101
+ const out = Array.isArray(self) ? self.slice() : arr;
1102
+ out.splice(i, 1);
1103
+ return Option.some(out);
1104
+ });
1105
+ /**
1106
+ * Reverse an `Iterable`, creating a new `Array`.
1107
+ *
1108
+ * **Example**
1109
+ *
1110
+ * ```ts
1111
+ * import { Array } from "effect"
1112
+ *
1113
+ * const result = Array.reverse([1, 2, 3, 4])
1114
+ * console.log(result) // [4, 3, 2, 1]
1115
+ * ```
1116
+ *
1117
+ * @category elements
1118
+ * @since 2.0.0
1119
+ */
1120
+ const reverse = self => Array.from(self).reverse();
1121
+ /**
1122
+ * Create a new array with elements sorted in increasing order based on the specified comparator.
1123
+ * If the input is a `NonEmptyReadonlyArray`, the output will also be a `NonEmptyReadonlyArray`.
1124
+ *
1125
+ * @category sorting
1126
+ * @since 2.0.0
1127
+ */
1128
+ exports.reverse = reverse;
1129
+ const sort = exports.sort = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => {
1130
+ const out = Array.from(self);
1131
+ out.sort(O);
1132
+ return out;
1133
+ });
1134
+ /**
1135
+ * Sorts an array based on a provided mapping function and order. The mapping
1136
+ * function transforms the elements into a value that can be compared, and the
1137
+ * order defines how those values should be sorted.
1138
+ *
1139
+ * **Example**
1140
+ *
1141
+ * ```ts
1142
+ * import { Array, Order } from "effect"
1143
+ *
1144
+ * const result = Array.sortWith(["aaa", "b", "cc"], (s) => s.length, Order.number)
1145
+ * console.log(result) // ["b", "cc", "aaa"]
1146
+ *
1147
+ * // Explanation:
1148
+ * // The array of strings is sorted based on their lengths. The mapping function `(s) => s.length`
1149
+ * // converts each string into its length, and the `Order.number` specifies that the lengths should
1150
+ * // be sorted in ascending order.
1151
+ * ```
1152
+ *
1153
+ * @since 2.0.0
1154
+ * @category elements
1155
+ */
1156
+ const sortWith = exports.sortWith = /*#__PURE__*/(0, _Function.dual)(3, (self, f, order) => Array.from(self).map(a => [a, f(a)]).sort(([, a], [, b]) => order(a, b)).map(([_]) => _));
1157
+ /**
1158
+ * Sorts the elements of an `Iterable` in increasing order based on the provided
1159
+ * orders. The elements are compared using the first order in `orders`, then the
1160
+ * second order if the first comparison is equal, and so on.
1161
+ *
1162
+ * **Example**
1163
+ *
1164
+ * ```ts
1165
+ * import { Array, Order, pipe } from "effect"
1166
+ *
1167
+ * const users = [
1168
+ * { name: "Alice", age: 30 },
1169
+ * { name: "Bob", age: 25 },
1170
+ * { name: "Charlie", age: 30 }
1171
+ * ]
1172
+ *
1173
+ * const result = pipe(
1174
+ * users,
1175
+ * Array.sortBy(
1176
+ * Order.mapInput(Order.number, (user: (typeof users)[number]) => user.age),
1177
+ * Order.mapInput(Order.string, (user: (typeof users)[number]) => user.name)
1178
+ * )
1179
+ * )
1180
+ *
1181
+ * console.log(result)
1182
+ * // [
1183
+ * // { name: "Bob", age: 25 },
1184
+ * // { name: "Alice", age: 30 },
1185
+ * // { name: "Charlie", age: 30 }
1186
+ * // ]
1187
+ *
1188
+ * // Explanation:
1189
+ * // The array of users is sorted first by age in ascending order. When ages are equal,
1190
+ * // the users are further sorted by name in ascending order.
1191
+ * ```
1192
+ *
1193
+ * @category sorting
1194
+ * @since 2.0.0
1195
+ */
1196
+ const sortBy = (...orders) => {
1197
+ const sortByAll = sort(Order.combineAll(orders));
1198
+ return self => {
1199
+ const input = fromIterable(self);
1200
+ if (isNonEmptyReadonlyArray(input)) {
1201
+ return sortByAll(input);
1202
+ }
1203
+ return [];
1204
+ };
1205
+ };
1206
+ /**
1207
+ * Takes two `Iterable`s and returns an `Array` of corresponding pairs.
1208
+ * If one input `Iterable` is short, excess elements of the
1209
+ * longer `Iterable` are discarded.
1210
+ *
1211
+ * **Example**
1212
+ *
1213
+ * ```ts
1214
+ * import { Array } from "effect"
1215
+ *
1216
+ * const result = Array.zip([1, 2, 3], ['a', 'b'])
1217
+ * console.log(result) // [[1, 'a'], [2, 'b']]
1218
+ * ```
1219
+ *
1220
+ * @category zipping
1221
+ * @since 2.0.0
1222
+ */
1223
+ exports.sortBy = sortBy;
1224
+ const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, Tuple.make));
1225
+ /**
1226
+ * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results in a new `Array`. If one
1227
+ * input `Iterable` is short, excess elements of the longer `Iterable` are discarded.
1228
+ *
1229
+ * **Example**
1230
+ *
1231
+ * ```ts
1232
+ * import { Array } from "effect"
1233
+ *
1234
+ * const result = Array.zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b)
1235
+ * console.log(result) // [5, 7, 9]
1236
+ * ```
1237
+ *
1238
+ * @category zipping
1239
+ * @since 2.0.0
1240
+ */
1241
+ const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => {
1242
+ const as = fromIterable(self);
1243
+ const bs = fromIterable(that);
1244
+ if (isNonEmptyReadonlyArray(as) && isNonEmptyReadonlyArray(bs)) {
1245
+ const out = [f(headNonEmpty(as), headNonEmpty(bs))];
1246
+ const len = Math.min(as.length, bs.length);
1247
+ for (let i = 1; i < len; i++) {
1248
+ out[i] = f(as[i], bs[i]);
1249
+ }
1250
+ return out;
1251
+ }
1252
+ return [];
1253
+ });
1254
+ /**
1255
+ * This function is the inverse of `zip`. Takes an `Iterable` of pairs and return two corresponding `Array`s.
1256
+ *
1257
+ * **Example**
1258
+ *
1259
+ * ```ts
1260
+ * import { Array } from "effect"
1261
+ *
1262
+ * const result = Array.unzip([[1, "a"], [2, "b"], [3, "c"]])
1263
+ * console.log(result) // [[1, 2, 3], ['a', 'b', 'c']]
1264
+ * ```
1265
+ *
1266
+ * @since 2.0.0
1267
+ */
1268
+ const unzip = self => {
1269
+ const input = fromIterable(self);
1270
+ if (isNonEmptyReadonlyArray(input)) {
1271
+ const fa = [input[0][0]];
1272
+ const fb = [input[0][1]];
1273
+ for (let i = 1; i < input.length; i++) {
1274
+ fa[i] = input[i][0];
1275
+ fb[i] = input[i][1];
1276
+ }
1277
+ return [fa, fb];
1278
+ }
1279
+ return [[], []];
1280
+ };
1281
+ /**
1282
+ * Places an element in between members of an `Iterable`.
1283
+ * If the input is a non-empty array, the result is also a non-empty array.
1284
+ *
1285
+ * **Example**
1286
+ *
1287
+ * ```ts
1288
+ * import { Array } from "effect"
1289
+ *
1290
+ * const result = Array.intersperse([1, 2, 3], 0)
1291
+ * console.log(result) // [1, 0, 2, 0, 3]
1292
+ * ```
1293
+ *
1294
+ * @since 2.0.0
1295
+ */
1296
+ exports.unzip = unzip;
1297
+ const intersperse = exports.intersperse = /*#__PURE__*/(0, _Function.dual)(2, (self, middle) => {
1298
+ const input = fromIterable(self);
1299
+ if (isNonEmptyReadonlyArray(input)) {
1300
+ const out = [headNonEmpty(input)];
1301
+ const tail = tailNonEmpty(input);
1302
+ for (let i = 0; i < tail.length; i++) {
1303
+ if (i < tail.length) {
1304
+ out.push(middle);
1305
+ }
1306
+ out.push(tail[i]);
1307
+ }
1308
+ return out;
1309
+ }
1310
+ return [];
1311
+ });
1312
+ /**
1313
+ * Apply a function to the head, creating a new `NonEmptyReadonlyArray`.
1314
+ *
1315
+ * **Example**
1316
+ *
1317
+ * ```ts
1318
+ * import { Array } from "effect"
1319
+ *
1320
+ * const result = Array.modifyNonEmptyHead([1, 2, 3], n => n * 10)
1321
+ * console.log(result) // [10, 2, 3]
1322
+ * ```
1323
+ *
1324
+ * @since 2.0.0
1325
+ */
1326
+ const modifyNonEmptyHead = exports.modifyNonEmptyHead = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => [f(headNonEmpty(self)), ...tailNonEmpty(self)]);
1327
+ /**
1328
+ * Change the head, creating a new `NonEmptyReadonlyArray`.
1329
+ *
1330
+ * **Example**
1331
+ *
1332
+ * ```ts
1333
+ * import { Array } from "effect"
1334
+ *
1335
+ * const result = Array.setNonEmptyHead([1, 2, 3], 10)
1336
+ * console.log(result) // [10, 2, 3]
1337
+ * ```
1338
+ *
1339
+ * @since 2.0.0
1340
+ */
1341
+ const setNonEmptyHead = exports.setNonEmptyHead = /*#__PURE__*/(0, _Function.dual)(2, (self, b) => modifyNonEmptyHead(self, () => b));
1342
+ /**
1343
+ * Apply a function to the last element, creating a new `NonEmptyReadonlyArray`.
1344
+ *
1345
+ * **Example**
1346
+ *
1347
+ * ```ts
1348
+ * import { Array } from "effect"
1349
+ *
1350
+ * const result = Array.modifyNonEmptyLast([1, 2, 3], n => n * 2)
1351
+ * console.log(result) // [1, 2, 6]
1352
+ * ```
1353
+ *
1354
+ * @since 2.0.0
1355
+ */
1356
+ const modifyNonEmptyLast = exports.modifyNonEmptyLast = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => append(initNonEmpty(self), f(lastNonEmpty(self))));
1357
+ /**
1358
+ * Change the last element, creating a new `NonEmptyReadonlyArray`.
1359
+ *
1360
+ * **Example**
1361
+ *
1362
+ * ```ts
1363
+ * import { Array } from "effect"
1364
+ *
1365
+ * const result = Array.setNonEmptyLast([1, 2, 3], 4)
1366
+ * console.log(result) // [1, 2, 4]
1367
+ * ```
1368
+ *
1369
+ * @since 2.0.0
1370
+ */
1371
+ const setNonEmptyLast = exports.setNonEmptyLast = /*#__PURE__*/(0, _Function.dual)(2, (self, b) => modifyNonEmptyLast(self, () => b));
1372
+ /**
1373
+ * Rotate an `Iterable` by `n` steps.
1374
+ * If the input is a non-empty array, the result is also a non-empty array.
1375
+ *
1376
+ * **Example**
1377
+ *
1378
+ * ```ts
1379
+ * import { Array } from "effect"
1380
+ *
1381
+ * const result = Array.rotate(['a', 'b', 'c', 'd', 'e'], 2)
1382
+ * console.log(result) // [ 'd', 'e', 'a', 'b', 'c' ]
1383
+ * ```
1384
+ *
1385
+ * @since 2.0.0
1386
+ */
1387
+ const rotate = exports.rotate = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1388
+ const input = fromIterable(self);
1389
+ if (isNonEmptyReadonlyArray(input)) {
1390
+ const len = input.length;
1391
+ const m = Math.round(n) % len;
1392
+ if (isOutOfBounds(Math.abs(m), input) || m === 0) {
1393
+ return copy(input);
1394
+ }
1395
+ if (m < 0) {
1396
+ const [f, s] = splitNonEmptyAt(input, -m);
1397
+ return appendAll(s, f);
1398
+ } else {
1399
+ return rotate(self, m - len);
1400
+ }
1401
+ }
1402
+ return [];
1403
+ });
1404
+ /**
1405
+ * Returns a function that checks if a `ReadonlyArray` contains a given value using a provided `isEquivalent` function.
1406
+ *
1407
+ * **Example**
1408
+ *
1409
+ * ```ts
1410
+ * import { Array, pipe } from "effect"
1411
+ *
1412
+ * const isEquivalent = (a: number, b: number) => a === b
1413
+ * const containsNumber = Array.containsWith(isEquivalent)
1414
+ * const result = pipe([1, 2, 3, 4], containsNumber(3))
1415
+ * console.log(result) // true
1416
+ * ```
1417
+ *
1418
+ * @category elements
1419
+ * @since 2.0.0
1420
+ */
1421
+ const containsWith = isEquivalent => (0, _Function.dual)(2, (self, a) => {
1422
+ for (const i of self) {
1423
+ if (isEquivalent(a, i)) {
1424
+ return true;
1425
+ }
1426
+ }
1427
+ return false;
1428
+ });
1429
+ exports.containsWith = containsWith;
1430
+ const _equivalence = /*#__PURE__*/Equal.equivalence();
1431
+ /**
1432
+ * Returns a function that checks if a `ReadonlyArray` contains a given value using the default `Equivalence`.
1433
+ *
1434
+ * **Example**
1435
+ *
1436
+ * ```ts
1437
+ * import { Array, pipe } from "effect"
1438
+ *
1439
+ * const result = pipe(['a', 'b', 'c', 'd'], Array.contains('c'))
1440
+ * console.log(result) // true
1441
+ * ```
1442
+ *
1443
+ * @category elements
1444
+ * @since 2.0.0
1445
+ */
1446
+ const contains = exports.contains = /*#__PURE__*/containsWith(_equivalence);
1447
+ /**
1448
+ * A useful recursion pattern for processing an `Iterable` to produce a new `Array`, often used for "chopping" up the input
1449
+ * `Iterable`. Typically chop is called with some function that will consume an initial prefix of the `Iterable` and produce a
1450
+ * value and the rest of the `Array`.
1451
+ *
1452
+ * **Example**
1453
+ *
1454
+ * ```ts
1455
+ * import { Array } from "effect"
1456
+ *
1457
+ * const result = Array.chop([1, 2, 3, 4, 5], (as): [number, Array<number>] => [as[0] * 2, as.slice(1)])
1458
+ * console.log(result) // [2, 4, 6, 8, 10]
1459
+ *
1460
+ * // Explanation:
1461
+ * // The `chopFunction` takes the first element of the array, doubles it, and then returns it along with the rest of the array.
1462
+ * // The `chop` function applies this `chopFunction` recursively to the input array `[1, 2, 3, 4, 5]`,
1463
+ * // resulting in a new array `[2, 4, 6, 8, 10]`.
1464
+ * ```
1465
+ *
1466
+ * @since 2.0.0
1467
+ */
1468
+ const chop = exports.chop = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
1469
+ const input = fromIterable(self);
1470
+ if (isNonEmptyReadonlyArray(input)) {
1471
+ const [b, rest] = f(input);
1472
+ const out = [b];
1473
+ let next = rest;
1474
+ while (internalArray.isNonEmptyArray(next)) {
1475
+ const [b, rest] = f(next);
1476
+ out.push(b);
1477
+ next = rest;
1478
+ }
1479
+ return out;
1480
+ }
1481
+ return [];
1482
+ });
1483
+ /**
1484
+ * Splits an `Iterable` into two segments, with the first segment containing a maximum of `n` elements.
1485
+ * The value of `n` can be `0`.
1486
+ *
1487
+ * **Example**
1488
+ *
1489
+ * ```ts
1490
+ * import { Array } from "effect"
1491
+ *
1492
+ * const result = Array.splitAt([1, 2, 3, 4, 5], 3)
1493
+ * console.log(result) // [[1, 2, 3], [4, 5]]
1494
+ * ```
1495
+ *
1496
+ * @category splitting
1497
+ * @since 2.0.0
1498
+ */
1499
+ const splitAt = exports.splitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1500
+ const input = Array.from(self);
1501
+ const _n = Math.floor(n);
1502
+ if (isNonEmptyReadonlyArray(input)) {
1503
+ if (_n >= 1) {
1504
+ return splitNonEmptyAt(input, _n);
1505
+ }
1506
+ return [[], input];
1507
+ }
1508
+ return [input, []];
1509
+ });
1510
+ /**
1511
+ * Splits a `NonEmptyReadonlyArray` into two segments, with the first segment containing a maximum of `n` elements.
1512
+ * The value of `n` must be `>= 1`.
1513
+ *
1514
+ * **Example**
1515
+ *
1516
+ * ```ts
1517
+ * import { Array } from "effect"
1518
+ *
1519
+ * const result = Array.splitNonEmptyAt(["a", "b", "c", "d", "e"], 3)
1520
+ * console.log(result) // [["a", "b", "c"], ["d", "e"]]
1521
+ * ```
1522
+ *
1523
+ * @category splitting
1524
+ * @since 2.0.0
1525
+ */
1526
+ const splitNonEmptyAt = exports.splitNonEmptyAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1527
+ const _n = Math.max(1, Math.floor(n));
1528
+ return _n >= self.length ? [copy(self), []] : [prepend(self.slice(1, _n), headNonEmpty(self)), self.slice(_n)];
1529
+ });
1530
+ /**
1531
+ * Splits this iterable into `n` equally sized arrays.
1532
+ *
1533
+ * **Example**
1534
+ *
1535
+ * ```ts
1536
+ * import { Array } from "effect"
1537
+ *
1538
+ * const result = Array.split([1, 2, 3, 4, 5, 6, 7, 8], 3)
1539
+ * console.log(result) // [[1, 2, 3], [4, 5, 6], [7, 8]]
1540
+ * ```
1541
+ *
1542
+ * @since 2.0.0
1543
+ * @category splitting
1544
+ */
1545
+ const split = exports.split = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1546
+ const input = fromIterable(self);
1547
+ return chunksOf(input, Math.ceil(input.length / Math.floor(n)));
1548
+ });
1549
+ /**
1550
+ * Splits this iterable on the first element that matches this predicate.
1551
+ * Returns a tuple containing two arrays: the first one is before the match, and the second one is from the match onward.
1552
+ *
1553
+ * **Example**
1554
+ *
1555
+ * ```ts
1556
+ * import { Array } from "effect"
1557
+ *
1558
+ * const result = Array.splitWhere([1, 2, 3, 4, 5], n => n > 3)
1559
+ * console.log(result) // [[1, 2, 3], [4, 5]]
1560
+ * ```
1561
+ *
1562
+ * @category splitting
1563
+ * @since 2.0.0
1564
+ */
1565
+ const splitWhere = exports.splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => span(self, (a, i) => !predicate(a, i)));
1566
+ /**
1567
+ * Copies an array.
1568
+ *
1569
+ * **Example**
1570
+ *
1571
+ * ```ts
1572
+ * import { Array } from "effect"
1573
+ *
1574
+ * const result = Array.copy([1, 2, 3])
1575
+ * console.log(result) // [1, 2, 3]
1576
+ * ```
1577
+ *
1578
+ * @since 2.0.0
1579
+ */
1580
+ const copy = self => self.slice();
1581
+ /**
1582
+ * Pads an array.
1583
+ * Returns a new array of length `n` with the elements of `array` followed by `fill` elements if `array` is shorter than `n`.
1584
+ * If `array` is longer than `n`, the returned array will be a slice of `array` containing the `n` first elements of `array`.
1585
+ * If `n` is less than or equal to 0, the returned array will be an empty array.
1586
+ *
1587
+ * **Example**
1588
+ *
1589
+ * ```ts
1590
+ * import { Array } from "effect"
1591
+ *
1592
+ * const result = Array.pad([1, 2, 3], 6, 0)
1593
+ * console.log(result) // [1, 2, 3, 0, 0, 0]
1594
+ * ```
1595
+ *
1596
+ * @since 3.8.4
1597
+ */
1598
+ exports.copy = copy;
1599
+ const pad = exports.pad = /*#__PURE__*/(0, _Function.dual)(3, (self, n, fill) => {
1600
+ if (self.length >= n) {
1601
+ return take(self, n);
1602
+ }
1603
+ return appendAll(self, makeBy(n - self.length, () => fill));
1604
+ });
1605
+ /**
1606
+ * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of
1607
+ * the `Iterable`. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive
1608
+ * definition of `chunksOf`; it satisfies the property that
1609
+ *
1610
+ * ```ts skip-type-checking
1611
+ * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys)))
1612
+ * ```
1613
+ *
1614
+ * whenever `n` evenly divides the length of `self`.
1615
+ *
1616
+ * **Example**
1617
+ *
1618
+ * ```ts
1619
+ * import { Array } from "effect"
1620
+ *
1621
+ * const result = Array.chunksOf([1, 2, 3, 4, 5], 2)
1622
+ * console.log(result) // [[1, 2], [3, 4], [5]]
1623
+ *
1624
+ * // Explanation:
1625
+ * // The `chunksOf` function takes an array of numbers `[1, 2, 3, 4, 5]` and a number `2`.
1626
+ * // It splits the array into chunks of length 2. Since the array length is not evenly divisible by 2,
1627
+ * // the last chunk contains the remaining elements.
1628
+ * // The result is `[[1, 2], [3, 4], [5]]`.
1629
+ * ```
1630
+ *
1631
+ * @category splitting
1632
+ * @since 2.0.0
1633
+ */
1634
+ const chunksOf = exports.chunksOf = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1635
+ const input = fromIterable(self);
1636
+ if (isNonEmptyReadonlyArray(input)) {
1637
+ return chop(input, splitNonEmptyAt(n));
1638
+ }
1639
+ return [];
1640
+ });
1641
+ /**
1642
+ * Creates sliding windows of size `n` from an `Iterable`.
1643
+ * If the number of elements is less than `n` or if `n` is not greater than zero,
1644
+ * an empty array is returned.
1645
+ *
1646
+ * @example
1647
+ * ```ts
1648
+ * import * as assert from "node:assert"
1649
+ * import { Array } from "effect"
1650
+ *
1651
+ * const numbers = [1, 2, 3, 4, 5]
1652
+ * assert.deepStrictEqual(Array.window(numbers, 3), [[1, 2, 3], [2, 3, 4], [3, 4, 5]])
1653
+ * assert.deepStrictEqual(Array.window(numbers, 6), [])
1654
+ * ```
1655
+ *
1656
+ * @category splitting
1657
+ * @since 3.13.2
1658
+ */
1659
+ const window = exports.window = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
1660
+ const input = fromIterable(self);
1661
+ if (n > 0 && isNonEmptyReadonlyArray(input)) {
1662
+ return Array.from({
1663
+ length: input.length - (n - 1)
1664
+ }, (_, index) => input.slice(index, index + n));
1665
+ }
1666
+ return [];
1667
+ });
1668
+ /**
1669
+ * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s using the provided `isEquivalent` function.
1670
+ *
1671
+ * **Example**
1672
+ *
1673
+ * ```ts
1674
+ * import { Array } from "effect"
1675
+ *
1676
+ * const result = Array.groupWith(["a", "a", "b", "b", "b", "c", "a"], (x, y) => x === y)
1677
+ * console.log(result) // [["a", "a"], ["b", "b", "b"], ["c"], ["a"]]
1678
+ * ```
1679
+ *
1680
+ * @category grouping
1681
+ * @since 2.0.0
1682
+ */
1683
+ const groupWith = exports.groupWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => chop(self, as => {
1684
+ const h = headNonEmpty(as);
1685
+ const out = [h];
1686
+ let i = 1;
1687
+ for (; i < as.length; i++) {
1688
+ const a = as[i];
1689
+ if (isEquivalent(a, h)) {
1690
+ out.push(a);
1691
+ } else {
1692
+ break;
1693
+ }
1694
+ }
1695
+ return [out, as.slice(i)];
1696
+ }));
1697
+ /**
1698
+ * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s.
1699
+ *
1700
+ * **Example**
1701
+ *
1702
+ * ```ts
1703
+ * import { Array } from "effect"
1704
+ *
1705
+ * const result = Array.group([1, 1, 2, 2, 2, 3, 1])
1706
+ * console.log(result) // [[1, 1], [2, 2, 2], [3], [1]]
1707
+ * ```
1708
+ *
1709
+ * @category grouping
1710
+ * @since 2.0.0
1711
+ */
1712
+ const group = exports.group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.equivalence());
1713
+ /**
1714
+ * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning
1715
+ * function on each element, and grouping the results according to values returned
1716
+ *
1717
+ * **Example**
1718
+ *
1719
+ * ```ts
1720
+ * import { Array } from "effect"
1721
+ *
1722
+ * const people = [
1723
+ * { name: "Alice", group: "A" },
1724
+ * { name: "Bob", group: "B" },
1725
+ * { name: "Charlie", group: "A" }
1726
+ * ]
1727
+ *
1728
+ * const result = Array.groupBy(people, person => person.group)
1729
+ * console.log(result)
1730
+ * // {
1731
+ * // A: [{ name: "Alice", group: "A" }, { name: "Charlie", group: "A" }],
1732
+ * // B: [{ name: "Bob", group: "B" }]
1733
+ * // }
1734
+ * ```
1735
+ *
1736
+ * @category grouping
1737
+ * @since 2.0.0
1738
+ */
1739
+ const groupBy = exports.groupBy = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
1740
+ const out = {};
1741
+ for (const a of self) {
1742
+ const k = f(a);
1743
+ if (Object.prototype.hasOwnProperty.call(out, k)) {
1744
+ out[k].push(a);
1745
+ } else {
1746
+ out[k] = [a];
1747
+ }
1748
+ }
1749
+ return out;
1750
+ });
1751
+ /**
1752
+ * Calculates the union of two arrays using the provided equivalence relation.
1753
+ *
1754
+ * **Example**
1755
+ *
1756
+ * ```ts
1757
+ * import { Array } from "effect"
1758
+ *
1759
+ * const union = Array.unionWith([1, 2], [2, 3], (a, b) => a === b)
1760
+ * console.log(union) // [1, 2, 3]
1761
+ * ```
1762
+ *
1763
+ * @since 2.0.0
1764
+ */
1765
+ const unionWith = exports.unionWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, isEquivalent) => {
1766
+ const a = fromIterable(self);
1767
+ const b = fromIterable(that);
1768
+ if (isNonEmptyReadonlyArray(a)) {
1769
+ if (isNonEmptyReadonlyArray(b)) {
1770
+ const dedupe = dedupeWith(isEquivalent);
1771
+ return dedupe(appendAll(a, b));
1772
+ }
1773
+ return a;
1774
+ }
1775
+ return b;
1776
+ });
1777
+ /**
1778
+ * Creates a union of two arrays, removing duplicates.
1779
+ *
1780
+ * **Example**
1781
+ *
1782
+ * ```ts
1783
+ * import { Array } from "effect"
1784
+ *
1785
+ * const result = Array.union([1, 2], [2, 3])
1786
+ * console.log(result) // [1, 2, 3]
1787
+ * ```
1788
+ *
1789
+ * @since 2.0.0
1790
+ */
1791
+ const union = exports.union = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unionWith(self, that, _equivalence));
1792
+ /**
1793
+ * Creates an `Array` of unique values that are included in all given `Iterable`s using the provided `isEquivalent` function.
1794
+ * The order and references of result values are determined by the first `Iterable`.
1795
+ *
1796
+ * **Example**
1797
+ *
1798
+ * ```ts
1799
+ * import { Array } from "effect"
1800
+ *
1801
+ * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]
1802
+ * const array2 = [{ id: 3 }, { id: 4 }, { id: 1 }]
1803
+ * const isEquivalent = (a: { id: number }, b: { id: number }) => a.id === b.id
1804
+ * const result = Array.intersectionWith(isEquivalent)(array2)(array1)
1805
+ * console.log(result) // [{ id: 1 }, { id: 3 }]
1806
+ * ```
1807
+ *
1808
+ * @since 2.0.0
1809
+ */
1810
+ const intersectionWith = isEquivalent => {
1811
+ const has = containsWith(isEquivalent);
1812
+ return (0, _Function.dual)(2, (self, that) => {
1813
+ const bs = fromIterable(that);
1814
+ return fromIterable(self).filter(a => has(bs, a));
1815
+ });
1816
+ };
1817
+ /**
1818
+ * Creates an `Array` of unique values that are included in all given `Iterable`s.
1819
+ * The order and references of result values are determined by the first `Iterable`.
1820
+ *
1821
+ * **Example**
1822
+ *
1823
+ * ```ts
1824
+ * import { Array } from "effect"
1825
+ *
1826
+ * const result = Array.intersection([1, 2, 3], [3, 4, 1])
1827
+ * console.log(result) // [1, 3]
1828
+ * ```
1829
+ *
1830
+ * @since 2.0.0
1831
+ */
1832
+ exports.intersectionWith = intersectionWith;
1833
+ const intersection = exports.intersection = /*#__PURE__*/intersectionWith(_equivalence);
1834
+ /**
1835
+ * Creates a `Array` of values not included in the other given `Iterable` using the provided `isEquivalent` function.
1836
+ * The order and references of result values are determined by the first `Iterable`.
1837
+ *
1838
+ * **Example**
1839
+ *
1840
+ * ```ts
1841
+ * import { Array } from "effect"
1842
+ *
1843
+ * const array1 = [1, 2, 3]
1844
+ * const array2 = [2, 3, 4]
1845
+ * const difference = Array.differenceWith<number>((a, b) => a === b)(array1, array2)
1846
+ * console.log(difference) // [1]
1847
+ * ```
1848
+ *
1849
+ * @since 2.0.0
1850
+ */
1851
+ const differenceWith = isEquivalent => {
1852
+ const has = containsWith(isEquivalent);
1853
+ return (0, _Function.dual)(2, (self, that) => {
1854
+ const bs = fromIterable(that);
1855
+ return fromIterable(self).filter(a => !has(bs, a));
1856
+ });
1857
+ };
1858
+ /**
1859
+ * Creates a `Array` of values not included in the other given `Iterable`.
1860
+ * The order and references of result values are determined by the first `Iterable`.
1861
+ *
1862
+ * **Example**
1863
+ *
1864
+ * ```ts
1865
+ * import { Array } from "effect"
1866
+ *
1867
+ * const difference = Array.difference([1, 2, 3], [2, 3, 4])
1868
+ * console.log(difference) // [1]
1869
+ * ```
1870
+ *
1871
+ * @since 2.0.0
1872
+ */
1873
+ exports.differenceWith = differenceWith;
1874
+ const difference = exports.difference = /*#__PURE__*/differenceWith(_equivalence);
1875
+ /**
1876
+ * @category constructors
1877
+ * @since 2.0.0
1878
+ */
1879
+ const empty = () => [];
1880
+ /**
1881
+ * Constructs a new `NonEmptyArray<A>` from the specified value.
1882
+ *
1883
+ * @category constructors
1884
+ * @since 2.0.0
1885
+ */
1886
+ exports.empty = empty;
1887
+ const of = a => [a];
1888
+ /**
1889
+ * @category mapping
1890
+ * @since 2.0.0
1891
+ */
1892
+ exports.of = of;
1893
+ const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.map(f));
1894
+ /**
1895
+ * Applies a function to each element in an array and returns a new array containing the concatenated mapped elements.
1896
+ *
1897
+ * @category sequencing
1898
+ * @since 2.0.0
1899
+ */
1900
+ const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
1901
+ if (isEmptyReadonlyArray(self)) {
1902
+ return [];
1903
+ }
1904
+ const out = [];
1905
+ for (let i = 0; i < self.length; i++) {
1906
+ const inner = f(self[i], i);
1907
+ for (let j = 0; j < inner.length; j++) {
1908
+ out.push(inner[j]);
1909
+ }
1910
+ }
1911
+ return out;
1912
+ });
1913
+ /**
1914
+ * Combines multiple arrays into a single array by concatenating all elements
1915
+ * from each nested array. This function ensures that the structure of nested
1916
+ * arrays is collapsed into a single, flat array.
1917
+ *
1918
+ * **Example**
1919
+ *
1920
+ * ```ts
1921
+ * import { Array } from "effect"
1922
+ *
1923
+ * const result = Array.flatten([[1, 2], [], [3, 4], [], [5, 6]])
1924
+ * console.log(result) // [1, 2, 3, 4, 5, 6]
1925
+ * ```
1926
+ *
1927
+ * @category sequencing
1928
+ * @since 2.0.0
1929
+ */
1930
+ const flatten = exports.flatten = /*#__PURE__*/flatMap(_Function.identity);
1931
+ /**
1932
+ * Applies a function to each element of the `Iterable` and filters based on the result, keeping the transformed values where the function returns `Some`.
1933
+ * This method combines filtering and mapping functionalities, allowing transformations and filtering of elements based on a single function pass.
1934
+ *
1935
+ * **Example**
1936
+ *
1937
+ * ```ts
1938
+ * import { Array, Option } from "effect"
1939
+ *
1940
+ * const evenSquares = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none()
1941
+ *
1942
+ * const result = Array.filterMap([1, 2, 3, 4, 5], evenSquares);
1943
+ * console.log(result) // [4, 16]
1944
+ * ```
1945
+ *
1946
+ * @category filtering
1947
+ * @since 2.0.0
1948
+ */
1949
+ const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
1950
+ const as = fromIterable(self);
1951
+ const out = [];
1952
+ for (let i = 0; i < as.length; i++) {
1953
+ const o = f(as[i], i);
1954
+ if (Option.isSome(o)) {
1955
+ out.push(o.value);
1956
+ }
1957
+ }
1958
+ return out;
1959
+ });
1960
+ /**
1961
+ * Applies a function to each element of the array and filters based on the result, stopping when a condition is not met.
1962
+ * This method combines filtering and mapping in a single pass, and short-circuits, i.e., stops processing, as soon as the function returns `None`.
1963
+ * This is useful when you need to transform an array but only up to the point where a certain condition holds true.
1964
+ *
1965
+ * **Example**
1966
+ *
1967
+ * ```ts
1968
+ * import { Array, Option } from "effect"
1969
+ *
1970
+ * const toSquareTillOdd = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none()
1971
+ *
1972
+ * const result = Array.filterMapWhile([2, 4, 5], toSquareTillOdd)
1973
+ * console.log(result) // [4, 16]
1974
+ * ```
1975
+ *
1976
+ * @category filtering
1977
+ * @since 2.0.0
1978
+ */
1979
+ const filterMapWhile = exports.filterMapWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
1980
+ let i = 0;
1981
+ const out = [];
1982
+ for (const a of self) {
1983
+ const b = f(a, i);
1984
+ if (Option.isSome(b)) {
1985
+ out.push(b.value);
1986
+ } else {
1987
+ break;
1988
+ }
1989
+ i++;
1990
+ }
1991
+ return out;
1992
+ });
1993
+ /**
1994
+ * Applies a function to each element of the `Iterable`, categorizing the results into two separate arrays.
1995
+ * This function is particularly useful for operations where each element can result in two possible types,
1996
+ * and you want to separate these types into different collections. For instance, separating validation results
1997
+ * into successes and failures.
1998
+ *
1999
+ * **Example**
2000
+ *
2001
+ * ```ts
2002
+ * import { Array, Either } from "effect";
2003
+ *
2004
+ * const isEven = (x: number) => x % 2 === 0
2005
+ *
2006
+ * const result = Array.partitionMap([1, 2, 3, 4, 5], x =>
2007
+ * isEven(x) ? Either.right(x) : Either.left(x)
2008
+ * )
2009
+ * console.log(result)
2010
+ * // [
2011
+ * // [1, 3, 5],
2012
+ * // [2, 4]
2013
+ * // ]
2014
+ * ```
2015
+ *
2016
+ * @category filtering
2017
+ * @since 2.0.0
2018
+ */
2019
+ const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
2020
+ const left = [];
2021
+ const right = [];
2022
+ const as = fromIterable(self);
2023
+ for (let i = 0; i < as.length; i++) {
2024
+ const e = f(as[i], i);
2025
+ if (Either.isLeft(e)) {
2026
+ left.push(e.left);
2027
+ } else {
2028
+ right.push(e.right);
2029
+ }
2030
+ }
2031
+ return [left, right];
2032
+ });
2033
+ /**
2034
+ * Retrieves the `Some` values from an `Iterable` of `Option`s, collecting them into an array.
2035
+ *
2036
+ * **Example**
2037
+ *
2038
+ * ```ts
2039
+ * import { Array, Option } from "effect"
2040
+ *
2041
+ * const result = Array.getSomes([Option.some(1), Option.none(), Option.some(2)])
2042
+ * console.log(result) // [1, 2]
2043
+ * ```
2044
+ *
2045
+ * @category filtering
2046
+ * @since 2.0.0
2047
+ */
2048
+ const getSomes = exports.getSomes = /*#__PURE__*/filterMap(_Function.identity);
2049
+ /**
2050
+ * Retrieves the `Left` values from an `Iterable` of `Either`s, collecting them into an array.
2051
+ *
2052
+ * **Example**
2053
+ *
2054
+ * ```ts
2055
+ * import { Array, Either } from "effect"
2056
+ *
2057
+ * const result = Array.getLefts([Either.right(1), Either.left("err"), Either.right(2)])
2058
+ * console.log(result) // ["err"]
2059
+ * ```
2060
+ *
2061
+ * @category filtering
2062
+ * @since 2.0.0
2063
+ */
2064
+ const getLefts = self => {
2065
+ const out = [];
2066
+ for (const a of self) {
2067
+ if (Either.isLeft(a)) {
2068
+ out.push(a.left);
2069
+ }
2070
+ }
2071
+ return out;
2072
+ };
2073
+ /**
2074
+ * Retrieves the `Right` values from an `Iterable` of `Either`s, collecting them into an array.
2075
+ *
2076
+ * **Example**
2077
+ *
2078
+ * ```ts
2079
+ * import { Array, Either } from "effect"
2080
+ *
2081
+ * const result = Array.getRights([Either.right(1), Either.left("err"), Either.right(2)])
2082
+ * console.log(result) // [1, 2]
2083
+ * ```
2084
+ *
2085
+ * @category filtering
2086
+ * @since 2.0.0
2087
+ */
2088
+ exports.getLefts = getLefts;
2089
+ const getRights = self => {
2090
+ const out = [];
2091
+ for (const a of self) {
2092
+ if (Either.isRight(a)) {
2093
+ out.push(a.right);
2094
+ }
2095
+ }
2096
+ return out;
2097
+ };
2098
+ /**
2099
+ * @category filtering
2100
+ * @since 2.0.0
2101
+ */
2102
+ exports.getRights = getRights;
2103
+ const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
2104
+ const as = fromIterable(self);
2105
+ const out = [];
2106
+ for (let i = 0; i < as.length; i++) {
2107
+ if (predicate(as[i], i)) {
2108
+ out.push(as[i]);
2109
+ }
2110
+ }
2111
+ return out;
2112
+ });
2113
+ /**
2114
+ * Separate elements based on a predicate that also exposes the index of the element.
2115
+ *
2116
+ * **Example**
2117
+ *
2118
+ * ```ts
2119
+ * import { Array } from "effect"
2120
+ *
2121
+ * const result = Array.partition([1, 2, 3, 4], n => n % 2 === 0)
2122
+ * console.log(result) // [[1, 3], [2, 4]]
2123
+ * ```
2124
+ *
2125
+ * @category filtering
2126
+ * @since 2.0.0
2127
+ */
2128
+ const partition = exports.partition = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
2129
+ const left = [];
2130
+ const right = [];
2131
+ const as = fromIterable(self);
2132
+ for (let i = 0; i < as.length; i++) {
2133
+ if (predicate(as[i], i)) {
2134
+ right.push(as[i]);
2135
+ } else {
2136
+ left.push(as[i]);
2137
+ }
2138
+ }
2139
+ return [left, right];
2140
+ });
2141
+ /**
2142
+ * Separates an `Iterable` into two arrays based on a predicate.
2143
+ *
2144
+ * @category filtering
2145
+ * @since 2.0.0
2146
+ */
2147
+ const separate = exports.separate = /*#__PURE__*/partitionMap(_Function.identity);
2148
+ /**
2149
+ * Reduces an array from the left.
2150
+ *
2151
+ * **Example**
2152
+ *
2153
+ * ```ts
2154
+ * import { Array } from "effect"
2155
+ *
2156
+ * const result = Array.reduce([1, 2, 3], 0, (acc, n) => acc + n)
2157
+ * console.log(result) // 6
2158
+ * ```
2159
+ *
2160
+ * @category folding
2161
+ * @since 2.0.0
2162
+ */
2163
+ const reduce = exports.reduce = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b));
2164
+ /**
2165
+ * Reduces an array from the right.
2166
+ *
2167
+ * **Example**
2168
+ *
2169
+ * ```ts
2170
+ * import { Array } from "effect"
2171
+ *
2172
+ * const result = Array.reduceRight([1, 2, 3], 0, (acc, n) => acc + n)
2173
+ * console.log(result) // 6
2174
+ * ```
2175
+ *
2176
+ * @category folding
2177
+ * @since 2.0.0
2178
+ */
2179
+ const reduceRight = exports.reduceRight = /*#__PURE__*/(0, _Function.dual)(3, (self, b, f) => fromIterable(self).reduceRight((b, a, i) => f(b, a, i), b));
2180
+ /**
2181
+ * Lifts a predicate into an array.
2182
+ *
2183
+ * **Example**
2184
+ *
2185
+ * ```ts
2186
+ * import { Array } from "effect"
2187
+ *
2188
+ * const isEven = (n: number) => n % 2 === 0
2189
+ * const to = Array.liftPredicate(isEven)
2190
+ * console.log(to(1)) // []
2191
+ * console.log(to(2)) // [2]
2192
+ * ```
2193
+ *
2194
+ * @category lifting
2195
+ * @since 2.0.0
2196
+ */
2197
+ const liftPredicate = predicate => b => predicate(b) ? [b] : [];
2198
+ /**
2199
+ * @category lifting
2200
+ * @since 2.0.0
2201
+ */
2202
+ exports.liftPredicate = liftPredicate;
2203
+ const liftOption = f => (...a) => fromOption(f(...a));
2204
+ /**
2205
+ * @category conversions
2206
+ * @since 2.0.0
2207
+ */
2208
+ exports.liftOption = liftOption;
2209
+ const fromNullable = a => a == null ? empty() : [a];
2210
+ /**
2211
+ * @category lifting
2212
+ * @since 2.0.0
2213
+ */
2214
+ exports.fromNullable = fromNullable;
2215
+ const liftNullable = f => (...a) => fromNullable(f(...a));
2216
+ /**
2217
+ * Maps over an array and flattens the result, removing null and undefined values.
2218
+ *
2219
+ * **Example**
2220
+ *
2221
+ * ```ts
2222
+ * import { Array } from "effect"
2223
+ *
2224
+ * const result = Array.flatMapNullable([1, 2, 3], n => (n % 2 === 0 ? null : n))
2225
+ * console.log(result) // [1, 3]
2226
+ *
2227
+ * // Explanation:
2228
+ * // The array of numbers [1, 2, 3] is mapped with a function that returns null for even numbers
2229
+ * // and the number itself for odd numbers. The resulting array [1, null, 3] is then flattened
2230
+ * // to remove null values, resulting in [1, 3].
2231
+ * ```
2232
+ *
2233
+ * @category sequencing
2234
+ * @since 2.0.0
2235
+ */
2236
+ exports.liftNullable = liftNullable;
2237
+ const flatMapNullable = exports.flatMapNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => fromNullable(f(a))));
2238
+ /**
2239
+ * Lifts a function that returns an `Either` into a function that returns an array.
2240
+ * If the `Either` is a left, it returns an empty array.
2241
+ * If the `Either` is a right, it returns an array with the right value.
2242
+ *
2243
+ * **Example**
2244
+ *
2245
+ * ```ts
2246
+ * import { Array, Either } from "effect"
2247
+ *
2248
+ * const parseNumber = (s: string): Either.Either<number, Error> =>
2249
+ * isNaN(Number(s)) ? Either.left(new Error("Not a number")) : Either.right(Number(s))
2250
+ *
2251
+ * const liftedParseNumber = Array.liftEither(parseNumber)
2252
+ *
2253
+ * const result1 = liftedParseNumber("42")
2254
+ * console.log(result1) // [42]
2255
+ *
2256
+ * const result2 = liftedParseNumber("not a number")
2257
+ * console.log(result2) // []
2258
+ *
2259
+ * // Explanation:
2260
+ * // The function parseNumber is lifted to return an array.
2261
+ * // When parsing "42", it returns an Either.left with the number 42, resulting in [42].
2262
+ * // When parsing "not a number", it returns an Either.right with an error, resulting in an empty array [].
2263
+ * ```
2264
+ *
2265
+ * @category lifting
2266
+ * @since 2.0.0
2267
+ */
2268
+ const liftEither = f => (...a) => {
2269
+ const e = f(...a);
2270
+ return Either.isLeft(e) ? [] : [e.right];
2271
+ };
2272
+ /**
2273
+ * Check if a predicate holds true for every `ReadonlyArray` element.
2274
+ *
2275
+ * @category elements
2276
+ * @since 2.0.0
2277
+ */
2278
+ exports.liftEither = liftEither;
2279
+ const every = exports.every = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => self.every(refinement));
2280
+ /**
2281
+ * Check if a predicate holds true for some `ReadonlyArray` element.
2282
+ *
2283
+ * @category elements
2284
+ * @since 2.0.0
2285
+ */
2286
+ const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => self.some(predicate));
2287
+ /**
2288
+ * Extends an array with a function that maps each subarray to a value.
2289
+ *
2290
+ * **Example**
2291
+ *
2292
+ * ```ts
2293
+ * import { Array } from "effect"
2294
+ *
2295
+ * const result = Array.extend([1, 2, 3], as => as.length)
2296
+ * console.log(result) // [3, 2, 1]
2297
+ *
2298
+ * // Explanation:
2299
+ * // The function maps each subarray starting from each element to its length.
2300
+ * // The subarrays are: [1, 2, 3], [2, 3], [3].
2301
+ * // The lengths are: 3, 2, 1.
2302
+ * // Therefore, the result is [3, 2, 1].
2303
+ * ```
2304
+ *
2305
+ * @since 2.0.0
2306
+ */
2307
+ const extend = exports.extend = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.map((_, i, as) => f(as.slice(i))));
2308
+ /**
2309
+ * Finds the minimum element in an array based on a comparator.
2310
+ *
2311
+ * **Example**
2312
+ *
2313
+ * ```ts
2314
+ * import { Array, Order } from "effect"
2315
+ *
2316
+ * const result = Array.min([3, 1, 2], Order.number)
2317
+ * console.log(result) // 1
2318
+ * ```
2319
+ *
2320
+ * @since 2.0.0
2321
+ */
2322
+ const min = exports.min = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => self.reduce(Order.min(O)));
2323
+ /**
2324
+ * Finds the maximum element in an array based on a comparator.
2325
+ *
2326
+ * **Example**
2327
+ *
2328
+ * ```ts
2329
+ * import { Array, Order } from "effect"
2330
+ *
2331
+ * const result = Array.max([3, 1, 2], Order.number)
2332
+ * console.log(result) // 3
2333
+ * ```
2334
+ *
2335
+ * @since 2.0.0
2336
+ */
2337
+ const max = exports.max = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => self.reduce(Order.max(O)));
2338
+ /**
2339
+ * @category constructors
2340
+ * @since 2.0.0
2341
+ */
2342
+ const unfold = (b, f) => {
2343
+ const out = [];
2344
+ let next = b;
2345
+ let o;
2346
+ while (Option.isSome(o = f(next))) {
2347
+ const [a, b] = o.value;
2348
+ out.push(a);
2349
+ next = b;
2350
+ }
2351
+ return out;
2352
+ };
2353
+ /**
2354
+ * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array.
2355
+ * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays.
2356
+ * If all elements are equal, the arrays are then compared based on their length.
2357
+ * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array.
2358
+ *
2359
+ * @category instances
2360
+ * @since 2.0.0
2361
+ */
2362
+ exports.unfold = unfold;
2363
+ const getOrder = exports.getOrder = Order.array;
2364
+ /**
2365
+ * Creates an equivalence relation for arrays.
2366
+ *
2367
+ * **Example**
2368
+ *
2369
+ * ```ts
2370
+ * import { Array } from "effect"
2371
+ *
2372
+ * const eq = Array.getEquivalence<number>((a, b) => a === b)
2373
+ * console.log(eq([1, 2, 3], [1, 2, 3])) // true
2374
+ * ```
2375
+ *
2376
+ * @category instances
2377
+ * @since 2.0.0
2378
+ */
2379
+ const getEquivalence = exports.getEquivalence = Equivalence.array;
2380
+ /**
2381
+ * Performs a side-effect for each element of the `Iterable`.
2382
+ *
2383
+ * **Example**
2384
+ *
2385
+ * ```ts
2386
+ * import { Array } from "effect"
2387
+ *
2388
+ * Array.forEach([1, 2, 3], n => console.log(n)) // 1, 2, 3
2389
+ * ```
2390
+ *
2391
+ * @since 2.0.0
2392
+ */
2393
+ const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => fromIterable(self).forEach((a, i) => f(a, i)));
2394
+ /**
2395
+ * Remove duplicates from an `Iterable` using the provided `isEquivalent` function,
2396
+ * preserving the order of the first occurrence of each element.
2397
+ *
2398
+ * **Example**
2399
+ *
2400
+ * ```ts
2401
+ * import { Array } from "effect"
2402
+ *
2403
+ * const result = Array.dedupeWith([1, 2, 2, 3, 3, 3], (a, b) => a === b)
2404
+ * console.log(result) // [1, 2, 3]
2405
+ * ```
2406
+ *
2407
+ * @since 2.0.0
2408
+ */
2409
+ const dedupeWith = exports.dedupeWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => {
2410
+ const input = fromIterable(self);
2411
+ if (isNonEmptyReadonlyArray(input)) {
2412
+ const out = [headNonEmpty(input)];
2413
+ const rest = tailNonEmpty(input);
2414
+ for (const r of rest) {
2415
+ if (out.every(a => !isEquivalent(r, a))) {
2416
+ out.push(r);
2417
+ }
2418
+ }
2419
+ return out;
2420
+ }
2421
+ return [];
2422
+ });
2423
+ /**
2424
+ * Remove duplicates from an `Iterable`, preserving the order of the first occurrence of each element.
2425
+ * The equivalence used to compare elements is provided by `Equal.equivalence()` from the `Equal` module.
2426
+ *
2427
+ * @since 2.0.0
2428
+ */
2429
+ const dedupe = self => dedupeWith(self, Equal.equivalence());
2430
+ /**
2431
+ * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function.
2432
+ *
2433
+ * **Example**
2434
+ *
2435
+ * ```ts
2436
+ * import { Array } from "effect"
2437
+ *
2438
+ * const result = Array.dedupeAdjacentWith([1, 1, 2, 2, 3, 3], (a, b) => a === b)
2439
+ * console.log(result) // [1, 2, 3]
2440
+ * ```
2441
+ *
2442
+ * @since 2.0.0
2443
+ */
2444
+ exports.dedupe = dedupe;
2445
+ const dedupeAdjacentWith = exports.dedupeAdjacentWith = /*#__PURE__*/(0, _Function.dual)(2, (self, isEquivalent) => {
2446
+ const out = [];
2447
+ let lastA = Option.none();
2448
+ for (const a of self) {
2449
+ if (Option.isNone(lastA) || !isEquivalent(a, lastA.value)) {
2450
+ out.push(a);
2451
+ lastA = Option.some(a);
2452
+ }
2453
+ }
2454
+ return out;
2455
+ });
2456
+ /**
2457
+ * Deduplicates adjacent elements that are identical.
2458
+ *
2459
+ * **Example**
2460
+ *
2461
+ * ```ts
2462
+ * import { Array } from "effect"
2463
+ *
2464
+ * const result = Array.dedupeAdjacent([1, 1, 2, 2, 3, 3])
2465
+ * console.log(result) // [1, 2, 3]
2466
+ * ```
2467
+ *
2468
+ * @since 2.0.0
2469
+ */
2470
+ const dedupeAdjacent = exports.dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal.equivalence());
2471
+ /**
2472
+ * Joins the elements together with "sep" in the middle.
2473
+ *
2474
+ * **Example**
2475
+ *
2476
+ * ```ts
2477
+ * import { Array } from "effect"
2478
+ *
2479
+ * const strings = ["a", "b", "c"]
2480
+ * const joined = Array.join(strings, "-")
2481
+ * console.log(joined) // "a-b-c"
2482
+ * ```
2483
+ *
2484
+ * @since 2.0.0
2485
+ * @category folding
2486
+ */
2487
+ const join = exports.join = /*#__PURE__*/(0, _Function.dual)(2, (self, sep) => fromIterable(self).join(sep));
2488
+ /**
2489
+ * Statefully maps over the chunk, producing new elements of type `B`.
2490
+ *
2491
+ * **Example**
2492
+ *
2493
+ * ```ts
2494
+ * import { Array } from "effect"
2495
+ *
2496
+ * const result = Array.mapAccum([1, 2, 3], 0, (acc, n) => [acc + n, acc + n])
2497
+ * console.log(result) // [6, [1, 3, 6]]
2498
+ * ```
2499
+ *
2500
+ * @since 2.0.0
2501
+ * @category folding
2502
+ */
2503
+ const mapAccum = exports.mapAccum = /*#__PURE__*/(0, _Function.dual)(3, (self, s, f) => {
2504
+ let i = 0;
2505
+ let s1 = s;
2506
+ const out = [];
2507
+ for (const a of self) {
2508
+ const r = f(s1, a, i);
2509
+ s1 = r[0];
2510
+ out.push(r[1]);
2511
+ i++;
2512
+ }
2513
+ return [s1, out];
2514
+ });
2515
+ /**
2516
+ * Zips this chunk crosswise with the specified chunk using the specified combiner.
2517
+ *
2518
+ * **Example**
2519
+ *
2520
+ * ```ts
2521
+ * import { Array } from "effect"
2522
+ *
2523
+ * const result = Array.cartesianWith([1, 2], ["a", "b"], (a, b) => `${a}-${b}`)
2524
+ * console.log(result) // ["1-a", "1-b", "2-a", "2-b"]
2525
+ * ```
2526
+ *
2527
+ * @since 2.0.0
2528
+ * @category elements
2529
+ */
2530
+ const cartesianWith = exports.cartesianWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b))));
2531
+ /**
2532
+ * Zips this chunk crosswise with the specified chunk.
2533
+ *
2534
+ * **Example**
2535
+ *
2536
+ * ```ts
2537
+ * import { Array } from "effect"
2538
+ *
2539
+ * const result = Array.cartesian([1, 2], ["a", "b"])
2540
+ * console.log(result) // [[1, "a"], [1, "b"], [2, "a"], [2, "b"]]
2541
+ * ```
2542
+ *
2543
+ * @since 2.0.0
2544
+ * @category elements
2545
+ */
2546
+ const cartesian = exports.cartesian = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b]));
2547
+ // -------------------------------------------------------------------------------------
2548
+ // do notation
2549
+ // -------------------------------------------------------------------------------------
2550
+ /**
2551
+ * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays.
2552
+ *
2553
+ * It can be used to simulate "array comprehension".
2554
+ * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules.
2555
+ *
2556
+ * Here's how the do simulation works:
2557
+ *
2558
+ * 1. Start the do simulation using the `Do` value
2559
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values
2560
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
2561
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
2562
+ * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope
2563
+ *
2564
+ * **Example**
2565
+ *
2566
+ * ```ts
2567
+ * import { Array, pipe } from "effect"
2568
+ *
2569
+ * const doResult = pipe(
2570
+ * Array.Do,
2571
+ * Array.bind("x", () => [1, 3, 5]),
2572
+ * Array.bind("y", () => [2, 4, 6]),
2573
+ * Array.filter(({ x, y }) => x < y), // condition
2574
+ * Array.map(({ x, y }) => [x, y] as const) // transformation
2575
+ * )
2576
+ * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]]
2577
+ *
2578
+ * // equivalent
2579
+ * const x = [1, 3, 5],
2580
+ * y = [2, 4, 6],
2581
+ * result = [];
2582
+ * for(let i = 0; i < x.length; i++) {
2583
+ * for(let j = 0; j < y.length; j++) {
2584
+ * const _x = x[i], _y = y[j];
2585
+ * if(_x < _y) result.push([_x, _y] as const)
2586
+ * }
2587
+ * }
2588
+ * ```
2589
+ *
2590
+ * @see {@link bindTo}
2591
+ * @see {@link bind}
2592
+ * @see {@link let_ let}
2593
+ *
2594
+ * @category do notation
2595
+ * @since 3.2.0
2596
+ */
2597
+ const Do = exports.Do = /*#__PURE__*/of({});
2598
+ /**
2599
+ * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays.
2600
+ *
2601
+ * It can be used to simulate "array comprehension".
2602
+ * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules.
2603
+ *
2604
+ * Here's how the do simulation works:
2605
+ *
2606
+ * 1. Start the do simulation using the `Do` value
2607
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values
2608
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
2609
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
2610
+ * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope
2611
+ *
2612
+ * **Example**
2613
+ *
2614
+ * ```ts
2615
+ * import { Array, pipe } from "effect"
2616
+ *
2617
+ * const doResult = pipe(
2618
+ * Array.Do,
2619
+ * Array.bind("x", () => [1, 3, 5]),
2620
+ * Array.bind("y", () => [2, 4, 6]),
2621
+ * Array.filter(({ x, y }) => x < y), // condition
2622
+ * Array.map(({ x, y }) => [x, y] as const) // transformation
2623
+ * )
2624
+ * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]]
2625
+ *
2626
+ * // equivalent
2627
+ * const x = [1, 3, 5],
2628
+ * y = [2, 4, 6],
2629
+ * result = [];
2630
+ * for(let i = 0; i < x.length; i++) {
2631
+ * for(let j = 0; j < y.length; j++) {
2632
+ * const _x = x[i], _y = y[j];
2633
+ * if(_x < _y) result.push([_x, _y] as const)
2634
+ * }
2635
+ * }
2636
+ * ```
2637
+ *
2638
+ * @see {@link bindTo}
2639
+ * @see {@link Do}
2640
+ * @see {@link let_ let}
2641
+ *
2642
+ * @category do notation
2643
+ * @since 3.2.0
2644
+ */
2645
+ const bind = exports.bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap);
2646
+ /**
2647
+ * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays.
2648
+ *
2649
+ * It can be used to simulate "array comprehension".
2650
+ * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules.
2651
+ *
2652
+ * Here's how the do simulation works:
2653
+ *
2654
+ * 1. Start the do simulation using the `Do` value
2655
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values
2656
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
2657
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
2658
+ * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope
2659
+ *
2660
+ * **Example**
2661
+ *
2662
+ * ```ts
2663
+ * import { Array, pipe } from "effect"
2664
+ *
2665
+ * const doResult = pipe(
2666
+ * Array.Do,
2667
+ * Array.bind("x", () => [1, 3, 5]),
2668
+ * Array.bind("y", () => [2, 4, 6]),
2669
+ * Array.filter(({ x, y }) => x < y), // condition
2670
+ * Array.map(({ x, y }) => [x, y] as const) // transformation
2671
+ * )
2672
+ * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]]
2673
+ *
2674
+ * // equivalent
2675
+ * const x = [1, 3, 5],
2676
+ * y = [2, 4, 6],
2677
+ * result = [];
2678
+ * for(let i = 0; i < x.length; i++) {
2679
+ * for(let j = 0; j < y.length; j++) {
2680
+ * const _x = x[i], _y = y[j];
2681
+ * if(_x < _y) result.push([_x, _y] as const)
2682
+ * }
2683
+ * }
2684
+ * ```
2685
+ *
2686
+ * @see {@link bindTo}
2687
+ * @see {@link Do}
2688
+ * @see {@link let_ let}
2689
+ *
2690
+ * @category do notation
2691
+ * @since 3.2.0
2692
+ */
2693
+ const bindTo = exports.bindTo = /*#__PURE__*/internalDoNotation.bindTo(map);
2694
+ const let_ = exports.let = /*#__PURE__*/internalDoNotation.let_(map);
2695
+ //# sourceMappingURL=Array.js.map
backend/node_modules/effect/dist/cjs/BigDecimal.js ADDED
@@ -0,0 +1,1116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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ineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unsafeToNumber = exports.unsafeRemainder = exports.unsafeMakeNormalized = exports.unsafeFromString = exports.unsafeFromNumber = exports.unsafeDivide = exports.truncate = exports.toExponential = exports.sumAll = exports.sum = exports.subtract = exports.sign = exports.scale = exports.safeFromNumber = exports.roundTerminal = exports.round = exports.remainder = exports.normalize = exports.negate = exports.multiply = exports.min = exports.max = exports.make = exports.lessThanOrEqualTo = exports.lessThan = exports.isZero = exports.isPositive = exports.isNegative = exports.isInteger = exports.isBigDecimal = exports.greaterThanOrEqualTo = exports.greaterThan = exports.fromString = exports.fromNumber = exports.fromBigInt = exports.format = exports.floor = exports.equals = exports.divide = exports.digitAt = exports.clamp = exports.ceil = exports.between = exports.abs = exports.TypeId = exports.Order = exports.Equivalence = void 0;
7
+ var Equal = _interopRequireWildcard(require("./Equal.js"));
8
+ var equivalence = _interopRequireWildcard(require("./Equivalence.js"));
9
+ var _Function = require("./Function.js");
10
+ var Hash = _interopRequireWildcard(require("./Hash.js"));
11
+ var _Inspectable = require("./Inspectable.js");
12
+ var Option = _interopRequireWildcard(require("./Option.js"));
13
+ var order = _interopRequireWildcard(require("./Order.js"));
14
+ var _Pipeable = require("./Pipeable.js");
15
+ var _Predicate = require("./Predicate.js");
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
+ /**
18
+ * This module provides utility functions and type class instances for working with the `BigDecimal` type in TypeScript.
19
+ * It includes functions for basic arithmetic operations, as well as type class instances for `Equivalence` and `Order`.
20
+ *
21
+ * A `BigDecimal` allows storing any real number to arbitrary precision; which avoids common floating point errors
22
+ * (such as 0.1 + 0.2 ≠ 0.3) at the cost of complexity.
23
+ *
24
+ * Internally, `BigDecimal` uses a `BigInt` object, paired with a 64-bit integer which determines the position of the
25
+ * decimal point. Therefore, the precision *is not* actually arbitrary, but limited to 2<sup>63</sup> decimal places.
26
+ *
27
+ * It is not recommended to convert a floating point number to a decimal directly, as the floating point representation
28
+ * may be unexpected.
29
+ *
30
+ * @module BigDecimal
31
+ * @since 2.0.0
32
+ * @see {@link module:BigInt} for more similar operations on `bigint` types
33
+ * @see {@link module:Number} for more similar operations on `number` types
34
+ */
35
+
36
+ const DEFAULT_PRECISION = 100;
37
+ const FINITE_INT_REGEX = /^[+-]?\d+$/;
38
+ /**
39
+ * @since 2.0.0
40
+ * @category symbols
41
+ */
42
+ const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/BigDecimal");
43
+ const BigDecimalProto = {
44
+ [TypeId]: TypeId,
45
+ [Hash.symbol]() {
46
+ const normalized = normalize(this);
47
+ return (0, _Function.pipe)(Hash.hash(normalized.value), Hash.combine(Hash.number(normalized.scale)), Hash.cached(this));
48
+ },
49
+ [Equal.symbol](that) {
50
+ return isBigDecimal(that) && equals(this, that);
51
+ },
52
+ toString() {
53
+ return `BigDecimal(${format(this)})`;
54
+ },
55
+ toJSON() {
56
+ return {
57
+ _id: "BigDecimal",
58
+ value: String(this.value),
59
+ scale: this.scale
60
+ };
61
+ },
62
+ [_Inspectable.NodeInspectSymbol]() {
63
+ return this.toJSON();
64
+ },
65
+ pipe() {
66
+ return (0, _Pipeable.pipeArguments)(this, arguments);
67
+ }
68
+ };
69
+ /**
70
+ * Checks if a given value is a `BigDecimal`.
71
+ *
72
+ * @since 2.0.0
73
+ * @category guards
74
+ */
75
+ const isBigDecimal = u => (0, _Predicate.hasProperty)(u, TypeId);
76
+ /**
77
+ * Creates a `BigDecimal` from a `bigint` value and a scale.
78
+ *
79
+ * @since 2.0.0
80
+ * @category constructors
81
+ */
82
+ exports.isBigDecimal = isBigDecimal;
83
+ const make = (value, scale) => {
84
+ const o = Object.create(BigDecimalProto);
85
+ o.value = value;
86
+ o.scale = scale;
87
+ return o;
88
+ };
89
+ /**
90
+ * Internal function used to create pre-normalized `BigDecimal`s.
91
+ *
92
+ * @internal
93
+ */
94
+ exports.make = make;
95
+ const unsafeMakeNormalized = (value, scale) => {
96
+ if (value !== bigint0 && value % bigint10 === bigint0) {
97
+ throw new RangeError("Value must be normalized");
98
+ }
99
+ const o = make(value, scale);
100
+ o.normalized = o;
101
+ return o;
102
+ };
103
+ exports.unsafeMakeNormalized = unsafeMakeNormalized;
104
+ const bigint0 = /*#__PURE__*/BigInt(0);
105
+ const bigint1 = /*#__PURE__*/BigInt(1);
106
+ const bigint10 = /*#__PURE__*/BigInt(10);
107
+ const zero = /*#__PURE__*/unsafeMakeNormalized(bigint0, 0);
108
+ /**
109
+ * Normalizes a given `BigDecimal` by removing trailing zeros.
110
+ *
111
+ * **Example**
112
+ *
113
+ * ```ts
114
+ * import * as assert from "node:assert"
115
+ * import { normalize, make, unsafeFromString } from "effect/BigDecimal"
116
+ *
117
+ * assert.deepStrictEqual(normalize(unsafeFromString("123.00000")), normalize(make(123n, 0)))
118
+ * assert.deepStrictEqual(normalize(unsafeFromString("12300000")), normalize(make(123n, -5)))
119
+ * ```
120
+ *
121
+ * @since 2.0.0
122
+ * @category scaling
123
+ */
124
+ const normalize = self => {
125
+ if (self.normalized === undefined) {
126
+ if (self.value === bigint0) {
127
+ self.normalized = zero;
128
+ } else {
129
+ const digits = `${self.value}`;
130
+ let trail = 0;
131
+ for (let i = digits.length - 1; i >= 0; i--) {
132
+ if (digits[i] === "0") {
133
+ trail++;
134
+ } else {
135
+ break;
136
+ }
137
+ }
138
+ if (trail === 0) {
139
+ self.normalized = self;
140
+ }
141
+ const value = BigInt(digits.substring(0, digits.length - trail));
142
+ const scale = self.scale - trail;
143
+ self.normalized = unsafeMakeNormalized(value, scale);
144
+ }
145
+ }
146
+ return self.normalized;
147
+ };
148
+ /**
149
+ * Scales a given `BigDecimal` to the specified scale.
150
+ *
151
+ * If the given scale is smaller than the current scale, the value will be rounded down to
152
+ * the nearest integer.
153
+ *
154
+ * @since 2.0.0
155
+ * @category scaling
156
+ */
157
+ exports.normalize = normalize;
158
+ const scale = exports.scale = /*#__PURE__*/(0, _Function.dual)(2, (self, scale) => {
159
+ if (scale > self.scale) {
160
+ return make(self.value * bigint10 ** BigInt(scale - self.scale), scale);
161
+ }
162
+ if (scale < self.scale) {
163
+ return make(self.value / bigint10 ** BigInt(self.scale - scale), scale);
164
+ }
165
+ return self;
166
+ });
167
+ /**
168
+ * Provides an addition operation on `BigDecimal`s.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * import * as assert from "node:assert"
173
+ * import { sum, unsafeFromString } from "effect/BigDecimal"
174
+ *
175
+ * assert.deepStrictEqual(sum(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("5"))
176
+ * ```
177
+ *
178
+ * @since 2.0.0
179
+ * @category math
180
+ */
181
+ const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
182
+ if (that.value === bigint0) {
183
+ return self;
184
+ }
185
+ if (self.value === bigint0) {
186
+ return that;
187
+ }
188
+ if (self.scale > that.scale) {
189
+ return make(scale(that, self.scale).value + self.value, self.scale);
190
+ }
191
+ if (self.scale < that.scale) {
192
+ return make(scale(self, that.scale).value + that.value, that.scale);
193
+ }
194
+ return make(self.value + that.value, self.scale);
195
+ });
196
+ /**
197
+ * Provides a multiplication operation on `BigDecimal`s.
198
+ *
199
+ * @example
200
+ * ```ts
201
+ * import * as assert from "node:assert"
202
+ * import { multiply, unsafeFromString } from "effect/BigDecimal"
203
+ *
204
+ * assert.deepStrictEqual(multiply(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("6"))
205
+ * ```
206
+ *
207
+ * @since 2.0.0
208
+ * @category math
209
+ */
210
+ const multiply = exports.multiply = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
211
+ if (that.value === bigint0 || self.value === bigint0) {
212
+ return zero;
213
+ }
214
+ return make(self.value * that.value, self.scale + that.scale);
215
+ });
216
+ /**
217
+ * Provides a subtraction operation on `BigDecimal`s.
218
+ *
219
+ * @example
220
+ * ```ts
221
+ * import * as assert from "node:assert"
222
+ * import { subtract, unsafeFromString } from "effect/BigDecimal"
223
+ *
224
+ * assert.deepStrictEqual(subtract(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("-1"))
225
+ * ```
226
+ *
227
+ * @since 2.0.0
228
+ * @category math
229
+ */
230
+ const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
231
+ if (that.value === bigint0) {
232
+ return self;
233
+ }
234
+ if (self.value === bigint0) {
235
+ return make(-that.value, that.scale);
236
+ }
237
+ if (self.scale > that.scale) {
238
+ return make(self.value - scale(that, self.scale).value, self.scale);
239
+ }
240
+ if (self.scale < that.scale) {
241
+ return make(scale(self, that.scale).value - that.value, that.scale);
242
+ }
243
+ return make(self.value - that.value, self.scale);
244
+ });
245
+ /**
246
+ * Internal function used for arbitrary precision division.
247
+ */
248
+ const divideWithPrecision = (num, den, scale, precision) => {
249
+ const numNegative = num < bigint0;
250
+ const denNegative = den < bigint0;
251
+ const negateResult = numNegative !== denNegative;
252
+ num = numNegative ? -num : num;
253
+ den = denNegative ? -den : den;
254
+ // Shift digits until numerator is larger than denominator (set scale appropriately).
255
+ while (num < den) {
256
+ num *= bigint10;
257
+ scale++;
258
+ }
259
+ // First division.
260
+ let quotient = num / den;
261
+ let remainder = num % den;
262
+ if (remainder === bigint0) {
263
+ // No remainder, return immediately.
264
+ return make(negateResult ? -quotient : quotient, scale);
265
+ }
266
+ // The quotient is guaranteed to be non-negative at this point. No need to consider sign.
267
+ let count = `${quotient}`.length;
268
+ // Shift the remainder by 1 decimal; The quotient will be 1 digit upon next division.
269
+ remainder *= bigint10;
270
+ while (remainder !== bigint0 && count < precision) {
271
+ const q = remainder / den;
272
+ const r = remainder % den;
273
+ quotient = quotient * bigint10 + q;
274
+ remainder = r * bigint10;
275
+ count++;
276
+ scale++;
277
+ }
278
+ if (remainder !== bigint0) {
279
+ // Round final number with remainder.
280
+ quotient += roundTerminal(remainder / den);
281
+ }
282
+ return make(negateResult ? -quotient : quotient, scale);
283
+ };
284
+ /**
285
+ * Internal function used for rounding.
286
+ *
287
+ * Returns 1 if the most significant digit is >= 5, otherwise 0.
288
+ *
289
+ * This is used after dividing a number by a power of ten and rounding the last digit.
290
+ *
291
+ * @internal
292
+ */
293
+ const roundTerminal = n => {
294
+ const pos = n >= bigint0 ? 0 : 1;
295
+ return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1;
296
+ };
297
+ /**
298
+ * Provides a division operation on `BigDecimal`s.
299
+ *
300
+ * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value
301
+ * which represents the integer division rounded down to the nearest integer.
302
+ *
303
+ * If the divisor is `0`, the result will be `None`.
304
+ *
305
+ * @example
306
+ * ```ts
307
+ * import * as assert from "node:assert"
308
+ * import { BigDecimal, Option } from "effect"
309
+ *
310
+ * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("3")), Option.some(BigDecimal.unsafeFromString("2")))
311
+ * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("4")), Option.some(BigDecimal.unsafeFromString("1.5")))
312
+ * assert.deepStrictEqual(BigDecimal.divide(BigDecimal.unsafeFromString("6"), BigDecimal.unsafeFromString("0")), Option.none())
313
+ * ```
314
+ *
315
+ * @since 2.0.0
316
+ * @category math
317
+ */
318
+ exports.roundTerminal = roundTerminal;
319
+ const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
320
+ if (that.value === bigint0) {
321
+ return Option.none();
322
+ }
323
+ if (self.value === bigint0) {
324
+ return Option.some(zero);
325
+ }
326
+ const scale = self.scale - that.scale;
327
+ if (self.value === that.value) {
328
+ return Option.some(make(bigint1, scale));
329
+ }
330
+ return Option.some(divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION));
331
+ });
332
+ /**
333
+ * Provides an unsafe division operation on `BigDecimal`s.
334
+ *
335
+ * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value
336
+ * which represents the integer division rounded down to the nearest integer.
337
+ *
338
+ * Throws a `RangeError` if the divisor is `0`.
339
+ *
340
+ * @example
341
+ * ```ts
342
+ * import * as assert from "node:assert"
343
+ * import { unsafeDivide, unsafeFromString } from "effect/BigDecimal"
344
+ *
345
+ * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("3")), unsafeFromString("2"))
346
+ * assert.deepStrictEqual(unsafeDivide(unsafeFromString("6"), unsafeFromString("4")), unsafeFromString("1.5"))
347
+ * ```
348
+ *
349
+ * @since 2.0.0
350
+ * @category math
351
+ */
352
+ const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
353
+ if (that.value === bigint0) {
354
+ throw new RangeError("Division by zero");
355
+ }
356
+ if (self.value === bigint0) {
357
+ return zero;
358
+ }
359
+ const scale = self.scale - that.scale;
360
+ if (self.value === that.value) {
361
+ return make(bigint1, scale);
362
+ }
363
+ return divideWithPrecision(self.value, that.value, scale, DEFAULT_PRECISION);
364
+ });
365
+ /**
366
+ * @since 2.0.0
367
+ * @category instances
368
+ */
369
+ const Order = exports.Order = /*#__PURE__*/order.make((self, that) => {
370
+ const scmp = order.number(sign(self), sign(that));
371
+ if (scmp !== 0) {
372
+ return scmp;
373
+ }
374
+ if (self.scale > that.scale) {
375
+ return order.bigint(self.value, scale(that, self.scale).value);
376
+ }
377
+ if (self.scale < that.scale) {
378
+ return order.bigint(scale(self, that.scale).value, that.value);
379
+ }
380
+ return order.bigint(self.value, that.value);
381
+ });
382
+ /**
383
+ * Returns `true` if the first argument is less than the second, otherwise `false`.
384
+ *
385
+ * @example
386
+ * ```ts
387
+ * import * as assert from "node:assert"
388
+ * import { lessThan, unsafeFromString } from "effect/BigDecimal"
389
+ *
390
+ * assert.deepStrictEqual(lessThan(unsafeFromString("2"), unsafeFromString("3")), true)
391
+ * assert.deepStrictEqual(lessThan(unsafeFromString("3"), unsafeFromString("3")), false)
392
+ * assert.deepStrictEqual(lessThan(unsafeFromString("4"), unsafeFromString("3")), false)
393
+ * ```
394
+ *
395
+ * @since 2.0.0
396
+ * @category predicates
397
+ */
398
+ const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order);
399
+ /**
400
+ * Checks if a given `BigDecimal` is less than or equal to the provided one.
401
+ *
402
+ * @example
403
+ * ```ts
404
+ * import * as assert from "node:assert"
405
+ * import { lessThanOrEqualTo, unsafeFromString } from "effect/BigDecimal"
406
+ *
407
+ * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), true)
408
+ * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true)
409
+ * assert.deepStrictEqual(lessThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), false)
410
+ * ```
411
+ *
412
+ * @since 2.0.0
413
+ * @category predicates
414
+ */
415
+ const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order);
416
+ /**
417
+ * Returns `true` if the first argument is greater than the second, otherwise `false`.
418
+ *
419
+ * @example
420
+ * ```ts
421
+ * import * as assert from "node:assert"
422
+ * import { greaterThan, unsafeFromString } from "effect/BigDecimal"
423
+ *
424
+ * assert.deepStrictEqual(greaterThan(unsafeFromString("2"), unsafeFromString("3")), false)
425
+ * assert.deepStrictEqual(greaterThan(unsafeFromString("3"), unsafeFromString("3")), false)
426
+ * assert.deepStrictEqual(greaterThan(unsafeFromString("4"), unsafeFromString("3")), true)
427
+ * ```
428
+ *
429
+ * @since 2.0.0
430
+ * @category predicates
431
+ */
432
+ const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order);
433
+ /**
434
+ * Checks if a given `BigDecimal` is greater than or equal to the provided one.
435
+ *
436
+ * @example
437
+ * ```ts
438
+ * import * as assert from "node:assert"
439
+ * import { greaterThanOrEqualTo, unsafeFromString } from "effect/BigDecimal"
440
+ *
441
+ * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("2"), unsafeFromString("3")), false)
442
+ * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("3"), unsafeFromString("3")), true)
443
+ * assert.deepStrictEqual(greaterThanOrEqualTo(unsafeFromString("4"), unsafeFromString("3")), true)
444
+ * ```
445
+ *
446
+ * @since 2.0.0
447
+ * @category predicates
448
+ */
449
+ const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order);
450
+ /**
451
+ * Checks if a `BigDecimal` is between a `minimum` and `maximum` value (inclusive).
452
+ *
453
+ * @example
454
+ * ```ts
455
+ * import * as assert from "node:assert"
456
+ * import { BigDecimal } from "effect"
457
+ *
458
+ * const between = BigDecimal.between({
459
+ * minimum: BigDecimal.unsafeFromString("1"),
460
+ * maximum: BigDecimal.unsafeFromString("5") }
461
+ * )
462
+ *
463
+ * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("3")), true)
464
+ * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("0")), false)
465
+ * assert.deepStrictEqual(between(BigDecimal.unsafeFromString("6")), false)
466
+ * ```
467
+ *
468
+ * @since 2.0.0
469
+ * @category predicates
470
+ */
471
+ const between = exports.between = /*#__PURE__*/order.between(Order);
472
+ /**
473
+ * Restricts the given `BigDecimal` to be within the range specified by the `minimum` and `maximum` values.
474
+ *
475
+ * - If the `BigDecimal` is less than the `minimum` value, the function returns the `minimum` value.
476
+ * - If the `BigDecimal` is greater than the `maximum` value, the function returns the `maximum` value.
477
+ * - Otherwise, it returns the original `BigDecimal`.
478
+ *
479
+ * @example
480
+ * ```ts
481
+ * import * as assert from "node:assert"
482
+ * import { BigDecimal } from "effect"
483
+ *
484
+ * const clamp = BigDecimal.clamp({
485
+ * minimum: BigDecimal.unsafeFromString("1"),
486
+ * maximum: BigDecimal.unsafeFromString("5") }
487
+ * )
488
+ *
489
+ * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("3")), BigDecimal.unsafeFromString("3"))
490
+ * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("0")), BigDecimal.unsafeFromString("1"))
491
+ * assert.deepStrictEqual(clamp(BigDecimal.unsafeFromString("6")), BigDecimal.unsafeFromString("5"))
492
+ * ```
493
+ *
494
+ * @since 2.0.0
495
+ * @category math
496
+ */
497
+ const clamp = exports.clamp = /*#__PURE__*/order.clamp(Order);
498
+ /**
499
+ * Returns the minimum between two `BigDecimal`s.
500
+ *
501
+ * @example
502
+ * ```ts
503
+ * import * as assert from "node:assert"
504
+ * import { min, unsafeFromString } from "effect/BigDecimal"
505
+ *
506
+ * assert.deepStrictEqual(min(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("2"))
507
+ * ```
508
+ *
509
+ * @since 2.0.0
510
+ * @category math
511
+ */
512
+ const min = exports.min = /*#__PURE__*/order.min(Order);
513
+ /**
514
+ * Returns the maximum between two `BigDecimal`s.
515
+ *
516
+ * @example
517
+ * ```ts
518
+ * import * as assert from "node:assert"
519
+ * import { max, unsafeFromString } from "effect/BigDecimal"
520
+ *
521
+ * assert.deepStrictEqual(max(unsafeFromString("2"), unsafeFromString("3")), unsafeFromString("3"))
522
+ * ```
523
+ *
524
+ * @since 2.0.0
525
+ * @category math
526
+ */
527
+ const max = exports.max = /*#__PURE__*/order.max(Order);
528
+ /**
529
+ * Determines the sign of a given `BigDecimal`.
530
+ *
531
+ * @example
532
+ * ```ts
533
+ * import * as assert from "node:assert"
534
+ * import { sign, unsafeFromString } from "effect/BigDecimal"
535
+ *
536
+ * assert.deepStrictEqual(sign(unsafeFromString("-5")), -1)
537
+ * assert.deepStrictEqual(sign(unsafeFromString("0")), 0)
538
+ * assert.deepStrictEqual(sign(unsafeFromString("5")), 1)
539
+ * ```
540
+ *
541
+ * @since 2.0.0
542
+ * @category math
543
+ */
544
+ const sign = n => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1;
545
+ /**
546
+ * Determines the absolute value of a given `BigDecimal`.
547
+ *
548
+ * @example
549
+ * ```ts
550
+ * import * as assert from "node:assert"
551
+ * import { abs, unsafeFromString } from "effect/BigDecimal"
552
+ *
553
+ * assert.deepStrictEqual(abs(unsafeFromString("-5")), unsafeFromString("5"))
554
+ * assert.deepStrictEqual(abs(unsafeFromString("0")), unsafeFromString("0"))
555
+ * assert.deepStrictEqual(abs(unsafeFromString("5")), unsafeFromString("5"))
556
+ * ```
557
+ *
558
+ * @since 2.0.0
559
+ * @category math
560
+ */
561
+ exports.sign = sign;
562
+ const abs = n => n.value < bigint0 ? make(-n.value, n.scale) : n;
563
+ /**
564
+ * Provides a negate operation on `BigDecimal`s.
565
+ *
566
+ * @example
567
+ * ```ts
568
+ * import * as assert from "node:assert"
569
+ * import { negate, unsafeFromString } from "effect/BigDecimal"
570
+ *
571
+ * assert.deepStrictEqual(negate(unsafeFromString("3")), unsafeFromString("-3"))
572
+ * assert.deepStrictEqual(negate(unsafeFromString("-6")), unsafeFromString("6"))
573
+ * ```
574
+ *
575
+ * @since 2.0.0
576
+ * @category math
577
+ */
578
+ exports.abs = abs;
579
+ const negate = n => make(-n.value, n.scale);
580
+ /**
581
+ * Returns the remainder left over when one operand is divided by a second operand.
582
+ *
583
+ * If the divisor is `0`, the result will be `None`.
584
+ *
585
+ * @example
586
+ * ```ts
587
+ * import * as assert from "node:assert"
588
+ * import { BigDecimal, Option } from "effect"
589
+ *
590
+ * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("2"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0")))
591
+ * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("3"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("1")))
592
+ * assert.deepStrictEqual(BigDecimal.remainder(BigDecimal.unsafeFromString("-4"), BigDecimal.unsafeFromString("2")), Option.some(BigDecimal.unsafeFromString("0")))
593
+ * ```
594
+ *
595
+ * @since 2.0.0
596
+ * @category math
597
+ */
598
+ exports.negate = negate;
599
+ const remainder = exports.remainder = /*#__PURE__*/(0, _Function.dual)(2, (self, divisor) => {
600
+ if (divisor.value === bigint0) {
601
+ return Option.none();
602
+ }
603
+ const max = Math.max(self.scale, divisor.scale);
604
+ return Option.some(make(scale(self, max).value % scale(divisor, max).value, max));
605
+ });
606
+ /**
607
+ * Returns the remainder left over when one operand is divided by a second operand.
608
+ *
609
+ * Throws a `RangeError` if the divisor is `0`.
610
+ *
611
+ * @example
612
+ * ```ts
613
+ * import * as assert from "node:assert"
614
+ * import { unsafeRemainder, unsafeFromString } from "effect/BigDecimal"
615
+ *
616
+ * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("2"), unsafeFromString("2")), unsafeFromString("0"))
617
+ * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("3"), unsafeFromString("2")), unsafeFromString("1"))
618
+ * assert.deepStrictEqual(unsafeRemainder(unsafeFromString("-4"), unsafeFromString("2")), unsafeFromString("0"))
619
+ * ```
620
+ *
621
+ * @since 2.0.0
622
+ * @category math
623
+ */
624
+ const unsafeRemainder = exports.unsafeRemainder = /*#__PURE__*/(0, _Function.dual)(2, (self, divisor) => {
625
+ if (divisor.value === bigint0) {
626
+ throw new RangeError("Division by zero");
627
+ }
628
+ const max = Math.max(self.scale, divisor.scale);
629
+ return make(scale(self, max).value % scale(divisor, max).value, max);
630
+ });
631
+ /**
632
+ * @category instances
633
+ * @since 2.0.0
634
+ */
635
+ const Equivalence = exports.Equivalence = /*#__PURE__*/equivalence.make((self, that) => {
636
+ if (self.scale > that.scale) {
637
+ return scale(that, self.scale).value === self.value;
638
+ }
639
+ if (self.scale < that.scale) {
640
+ return scale(self, that.scale).value === that.value;
641
+ }
642
+ return self.value === that.value;
643
+ });
644
+ /**
645
+ * Checks if two `BigDecimal`s are equal.
646
+ *
647
+ * @since 2.0.0
648
+ * @category predicates
649
+ */
650
+ const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(self, that));
651
+ /**
652
+ * Creates a `BigDecimal` from a `bigint` value.
653
+ *
654
+ * @since 2.0.0
655
+ * @category constructors
656
+ */
657
+ const fromBigInt = n => make(n, 0);
658
+ /**
659
+ * Creates a `BigDecimal` from a `number` value.
660
+ *
661
+ * It is not recommended to convert a floating point number to a decimal directly,
662
+ * as the floating point representation may be unexpected.
663
+ *
664
+ * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`).
665
+ *
666
+ * @example
667
+ * ```ts
668
+ * import * as assert from "node:assert"
669
+ * import { unsafeFromNumber, make } from "effect/BigDecimal"
670
+ *
671
+ * assert.deepStrictEqual(unsafeFromNumber(123), make(123n, 0))
672
+ * assert.deepStrictEqual(unsafeFromNumber(123.456), make(123456n, 3))
673
+ * ```
674
+ *
675
+ * @since 3.11.0
676
+ * @category constructors
677
+ */
678
+ exports.fromBigInt = fromBigInt;
679
+ const unsafeFromNumber = n => Option.getOrThrowWith(safeFromNumber(n), () => new RangeError(`Number must be finite, got ${n}`));
680
+ /**
681
+ * Creates a `BigDecimal` from a `number` value.
682
+ *
683
+ * It is not recommended to convert a floating point number to a decimal directly,
684
+ * as the floating point representation may be unexpected.
685
+ *
686
+ * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`).
687
+ *
688
+ * @since 2.0.0
689
+ * @category constructors
690
+ * @deprecated Use {@link unsafeFromNumber} instead.
691
+ */
692
+ exports.unsafeFromNumber = unsafeFromNumber;
693
+ const fromNumber = exports.fromNumber = unsafeFromNumber;
694
+ // TODO(4.0): Rename this to `fromNumber` after removing the current, unsafe implementation of `fromNumber`.
695
+ /**
696
+ * Creates a `BigDecimal` from a `number` value.
697
+ *
698
+ * It is not recommended to convert a floating point number to a decimal directly,
699
+ * as the floating point representation may be unexpected.
700
+ *
701
+ * Returns `None` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`).
702
+ *
703
+ * @example
704
+ * ```ts
705
+ * import * as assert from "node:assert"
706
+ * import { BigDecimal, Option } from "effect"
707
+ *
708
+ * assert.deepStrictEqual(BigDecimal.safeFromNumber(123), Option.some(BigDecimal.make(123n, 0)))
709
+ * assert.deepStrictEqual(BigDecimal.safeFromNumber(123.456), Option.some(BigDecimal.make(123456n, 3)))
710
+ * assert.deepStrictEqual(BigDecimal.safeFromNumber(Infinity), Option.none())
711
+ * ```
712
+ *
713
+ * @since 3.11.0
714
+ * @category constructors
715
+ */
716
+ const safeFromNumber = n => {
717
+ if (!Number.isFinite(n)) {
718
+ return Option.none();
719
+ }
720
+ const string = `${n}`;
721
+ if (string.includes("e")) {
722
+ return fromString(string);
723
+ }
724
+ const [lead, trail = ""] = string.split(".");
725
+ return Option.some(make(BigInt(`${lead}${trail}`), trail.length));
726
+ };
727
+ /**
728
+ * Parses a numerical `string` into a `BigDecimal`.
729
+ *
730
+ * @example
731
+ * ```ts
732
+ * import * as assert from "node:assert"
733
+ * import { BigDecimal, Option } from "effect"
734
+ *
735
+ * assert.deepStrictEqual(BigDecimal.fromString("123"), Option.some(BigDecimal.make(123n, 0)))
736
+ * assert.deepStrictEqual(BigDecimal.fromString("123.456"), Option.some(BigDecimal.make(123456n, 3)))
737
+ * assert.deepStrictEqual(BigDecimal.fromString("123.abc"), Option.none())
738
+ * ```
739
+ *
740
+ * @since 2.0.0
741
+ * @category constructors
742
+ */
743
+ exports.safeFromNumber = safeFromNumber;
744
+ const fromString = s => {
745
+ if (s === "") {
746
+ return Option.some(zero);
747
+ }
748
+ let base;
749
+ let exp;
750
+ const seperator = s.search(/[eE]/);
751
+ if (seperator !== -1) {
752
+ const trail = s.slice(seperator + 1);
753
+ base = s.slice(0, seperator);
754
+ exp = Number(trail);
755
+ if (base === "" || !Number.isSafeInteger(exp) || !FINITE_INT_REGEX.test(trail)) {
756
+ return Option.none();
757
+ }
758
+ } else {
759
+ base = s;
760
+ exp = 0;
761
+ }
762
+ let digits;
763
+ let offset;
764
+ const dot = base.search(/\./);
765
+ if (dot !== -1) {
766
+ const lead = base.slice(0, dot);
767
+ const trail = base.slice(dot + 1);
768
+ digits = `${lead}${trail}`;
769
+ offset = trail.length;
770
+ } else {
771
+ digits = base;
772
+ offset = 0;
773
+ }
774
+ if (!FINITE_INT_REGEX.test(digits)) {
775
+ return Option.none();
776
+ }
777
+ const scale = offset - exp;
778
+ if (!Number.isSafeInteger(scale)) {
779
+ return Option.none();
780
+ }
781
+ return Option.some(make(BigInt(digits), scale));
782
+ };
783
+ /**
784
+ * Parses a numerical `string` into a `BigDecimal`.
785
+ *
786
+ * @example
787
+ * ```ts
788
+ * import * as assert from "node:assert"
789
+ * import { unsafeFromString, make } from "effect/BigDecimal"
790
+ *
791
+ * assert.deepStrictEqual(unsafeFromString("123"), make(123n, 0))
792
+ * assert.deepStrictEqual(unsafeFromString("123.456"), make(123456n, 3))
793
+ * assert.throws(() => unsafeFromString("123.abc"))
794
+ * ```
795
+ *
796
+ * @since 2.0.0
797
+ * @category constructors
798
+ */
799
+ exports.fromString = fromString;
800
+ const unsafeFromString = s => Option.getOrThrowWith(fromString(s), () => new Error("Invalid numerical string"));
801
+ /**
802
+ * Formats a given `BigDecimal` as a `string`.
803
+ *
804
+ * If the scale of the `BigDecimal` is greater than or equal to 16, the `BigDecimal` will
805
+ * be formatted in scientific notation.
806
+ *
807
+ * @example
808
+ * ```ts
809
+ * import * as assert from "node:assert"
810
+ * import { format, unsafeFromString } from "effect/BigDecimal"
811
+ *
812
+ * assert.deepStrictEqual(format(unsafeFromString("-5")), "-5")
813
+ * assert.deepStrictEqual(format(unsafeFromString("123.456")), "123.456")
814
+ * assert.deepStrictEqual(format(unsafeFromString("-0.00000123")), "-0.00000123")
815
+ * ```
816
+ *
817
+ * @since 2.0.0
818
+ * @category conversions
819
+ */
820
+ exports.unsafeFromString = unsafeFromString;
821
+ const format = n => {
822
+ const normalized = normalize(n);
823
+ if (Math.abs(normalized.scale) >= 16) {
824
+ return toExponential(normalized);
825
+ }
826
+ const negative = normalized.value < bigint0;
827
+ const absolute = negative ? `${normalized.value}`.substring(1) : `${normalized.value}`;
828
+ let before;
829
+ let after;
830
+ if (normalized.scale >= absolute.length) {
831
+ before = "0";
832
+ after = "0".repeat(normalized.scale - absolute.length) + absolute;
833
+ } else {
834
+ const location = absolute.length - normalized.scale;
835
+ if (location > absolute.length) {
836
+ const zeros = location - absolute.length;
837
+ before = `${absolute}${"0".repeat(zeros)}`;
838
+ after = "";
839
+ } else {
840
+ after = absolute.slice(location);
841
+ before = absolute.slice(0, location);
842
+ }
843
+ }
844
+ const complete = after === "" ? before : `${before}.${after}`;
845
+ return negative ? `-${complete}` : complete;
846
+ };
847
+ /**
848
+ * Formats a given `BigDecimal` as a `string` in scientific notation.
849
+ *
850
+ * @example
851
+ * ```ts
852
+ * import * as assert from "node:assert"
853
+ * import { toExponential, make } from "effect/BigDecimal"
854
+ *
855
+ * assert.deepStrictEqual(toExponential(make(123456n, -5)), "1.23456e+10")
856
+ * ```
857
+ *
858
+ * @since 3.11.0
859
+ * @category conversions
860
+ */
861
+ exports.format = format;
862
+ const toExponential = n => {
863
+ if (isZero(n)) {
864
+ return "0e+0";
865
+ }
866
+ const normalized = normalize(n);
867
+ const digits = `${abs(normalized).value}`;
868
+ const head = digits.slice(0, 1);
869
+ const tail = digits.slice(1);
870
+ let output = `${isNegative(normalized) ? "-" : ""}${head}`;
871
+ if (tail !== "") {
872
+ output += `.${tail}`;
873
+ }
874
+ const exp = tail.length - normalized.scale;
875
+ return `${output}e${exp >= 0 ? "+" : ""}${exp}`;
876
+ };
877
+ /**
878
+ * Converts a `BigDecimal` to a `number`.
879
+ *
880
+ * This function will produce incorrect results if the `BigDecimal` exceeds the 64-bit range of a `number`.
881
+ *
882
+ * @example
883
+ * ```ts
884
+ * import * as assert from "node:assert"
885
+ * import { unsafeToNumber, unsafeFromString } from "effect/BigDecimal"
886
+ *
887
+ * assert.deepStrictEqual(unsafeToNumber(unsafeFromString("123.456")), 123.456)
888
+ * ```
889
+ *
890
+ * @since 2.0.0
891
+ * @category conversions
892
+ */
893
+ exports.toExponential = toExponential;
894
+ const unsafeToNumber = n => Number(format(n));
895
+ /**
896
+ * Checks if a given `BigDecimal` is an integer.
897
+ *
898
+ * @example
899
+ * ```ts
900
+ * import * as assert from "node:assert"
901
+ * import { isInteger, unsafeFromString } from "effect/BigDecimal"
902
+ *
903
+ * assert.deepStrictEqual(isInteger(unsafeFromString("0")), true)
904
+ * assert.deepStrictEqual(isInteger(unsafeFromString("1")), true)
905
+ * assert.deepStrictEqual(isInteger(unsafeFromString("1.1")), false)
906
+ * ```
907
+ *
908
+ * @since 2.0.0
909
+ * @category predicates
910
+ */
911
+ exports.unsafeToNumber = unsafeToNumber;
912
+ const isInteger = n => normalize(n).scale <= 0;
913
+ /**
914
+ * Checks if a given `BigDecimal` is `0`.
915
+ *
916
+ * @example
917
+ * ```ts
918
+ * import * as assert from "node:assert"
919
+ * import { isZero, unsafeFromString } from "effect/BigDecimal"
920
+ *
921
+ * assert.deepStrictEqual(isZero(unsafeFromString("0")), true)
922
+ * assert.deepStrictEqual(isZero(unsafeFromString("1")), false)
923
+ * ```
924
+ *
925
+ * @since 2.0.0
926
+ * @category predicates
927
+ */
928
+ exports.isInteger = isInteger;
929
+ const isZero = n => n.value === bigint0;
930
+ /**
931
+ * Checks if a given `BigDecimal` is negative.
932
+ *
933
+ * @example
934
+ * ```ts
935
+ * import * as assert from "node:assert"
936
+ * import { isNegative, unsafeFromString } from "effect/BigDecimal"
937
+ *
938
+ * assert.deepStrictEqual(isNegative(unsafeFromString("-1")), true)
939
+ * assert.deepStrictEqual(isNegative(unsafeFromString("0")), false)
940
+ * assert.deepStrictEqual(isNegative(unsafeFromString("1")), false)
941
+ * ```
942
+ *
943
+ * @since 2.0.0
944
+ * @category predicates
945
+ */
946
+ exports.isZero = isZero;
947
+ const isNegative = n => n.value < bigint0;
948
+ /**
949
+ * Checks if a given `BigDecimal` is positive.
950
+ *
951
+ * @example
952
+ * ```ts
953
+ * import * as assert from "node:assert"
954
+ * import { isPositive, unsafeFromString } from "effect/BigDecimal"
955
+ *
956
+ * assert.deepStrictEqual(isPositive(unsafeFromString("-1")), false)
957
+ * assert.deepStrictEqual(isPositive(unsafeFromString("0")), false)
958
+ * assert.deepStrictEqual(isPositive(unsafeFromString("1")), true)
959
+ * ```
960
+ *
961
+ * @since 2.0.0
962
+ * @category predicates
963
+ */
964
+ exports.isNegative = isNegative;
965
+ const isPositive = n => n.value > bigint0;
966
+ exports.isPositive = isPositive;
967
+ const isBigDecimalArgs = args => isBigDecimal(args[0]);
968
+ /**
969
+ * Calculate the ceiling of a `BigDecimal` at the given scale.
970
+ *
971
+ * @example
972
+ * ```ts
973
+ * import * as assert from "node:assert"
974
+ * import { ceil, unsafeFromString } from "effect/BigDecimal"
975
+ *
976
+ * assert.deepStrictEqual(ceil(unsafeFromString("145"), -1), unsafeFromString("150"))
977
+ * assert.deepStrictEqual(ceil(unsafeFromString("-14.5")), unsafeFromString("-14"))
978
+ * ```
979
+ *
980
+ * @since 3.16.0
981
+ * @category math
982
+ */
983
+ const ceil = exports.ceil = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => {
984
+ const truncated = truncate(self, scale);
985
+ if (isPositive(self) && lessThan(truncated, self)) {
986
+ return sum(truncated, make(1n, scale));
987
+ }
988
+ return truncated;
989
+ });
990
+ /**
991
+ * Calculate the floor of a `BigDecimal` at the given scale.
992
+ *
993
+ * @example
994
+ * ```ts
995
+ * import * as assert from "node:assert"
996
+ * import { floor, unsafeFromString } from "effect/BigDecimal"
997
+ *
998
+ * assert.deepStrictEqual(floor(unsafeFromString("145"), -1), unsafeFromString("140"))
999
+ * assert.deepStrictEqual(floor(unsafeFromString("-14.5")), unsafeFromString("-15"))
1000
+ * ```
1001
+ *
1002
+ * @since 3.16.0
1003
+ * @category math
1004
+ */
1005
+ const floor = exports.floor = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => {
1006
+ const truncated = truncate(self, scale);
1007
+ if (isNegative(self) && greaterThan(truncated, self)) {
1008
+ return sum(truncated, make(-1n, scale));
1009
+ }
1010
+ return truncated;
1011
+ });
1012
+ /**
1013
+ * Truncate a `BigDecimal` at the given scale. This is the same operation as rounding away from zero.
1014
+ *
1015
+ * @example
1016
+ * ```ts
1017
+ * import * as assert from "node:assert"
1018
+ * import { truncate, unsafeFromString } from "effect/BigDecimal"
1019
+ *
1020
+ * assert.deepStrictEqual(truncate(unsafeFromString("145"), -1), unsafeFromString("140"))
1021
+ * assert.deepStrictEqual(truncate(unsafeFromString("-14.5")), unsafeFromString("-14"))
1022
+ * ```
1023
+ *
1024
+ * @since 3.16.0
1025
+ * @category math
1026
+ */
1027
+ const truncate = exports.truncate = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, scale = 0) => {
1028
+ if (self.scale <= scale) {
1029
+ return self;
1030
+ }
1031
+ // BigInt division truncates towards zero
1032
+ return make(self.value / 10n ** BigInt(self.scale - scale), scale);
1033
+ });
1034
+ /**
1035
+ * Internal function used by `round` for `half-even` and `half-odd` rounding modes.
1036
+ *
1037
+ * Returns the digit at the position of the given `scale` within the `BigDecimal`.
1038
+ *
1039
+ * @internal
1040
+ */
1041
+ const digitAt = exports.digitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, scale) => {
1042
+ if (self.scale < scale) {
1043
+ return 0n;
1044
+ }
1045
+ const scaled = self.value / 10n ** BigInt(self.scale - scale);
1046
+ return scaled % 10n;
1047
+ });
1048
+ /**
1049
+ * Rounds a `BigDecimal` at the given scale with the specified rounding mode.
1050
+ *
1051
+ * @example
1052
+ * ```ts
1053
+ * import * as assert from "node:assert"
1054
+ * import { round, unsafeFromString } from "effect/BigDecimal"
1055
+ *
1056
+ * assert.deepStrictEqual(round(unsafeFromString("145"), { mode: "from-zero", scale: -1 }), unsafeFromString("150"))
1057
+ * assert.deepStrictEqual(round(unsafeFromString("-14.5")), unsafeFromString("-15"))
1058
+ * ```
1059
+ *
1060
+ * @since 3.16.0
1061
+ * @category math
1062
+ */
1063
+ const round = exports.round = /*#__PURE__*/(0, _Function.dual)(isBigDecimalArgs, (self, options) => {
1064
+ const mode = options?.mode ?? "half-from-zero";
1065
+ const scale = options?.scale ?? 0;
1066
+ switch (mode) {
1067
+ case "ceil":
1068
+ return ceil(self, scale);
1069
+ case "floor":
1070
+ return floor(self, scale);
1071
+ case "to-zero":
1072
+ return truncate(self, scale);
1073
+ case "from-zero":
1074
+ return isPositive(self) ? ceil(self, scale) : floor(self, scale);
1075
+ case "half-ceil":
1076
+ return floor(sum(self, make(5n, scale + 1)), scale);
1077
+ case "half-floor":
1078
+ return ceil(sum(self, make(-5n, scale + 1)), scale);
1079
+ case "half-to-zero":
1080
+ return isNegative(self) ? floor(sum(self, make(5n, scale + 1)), scale) : ceil(sum(self, make(-5n, scale + 1)), scale);
1081
+ case "half-from-zero":
1082
+ return isNegative(self) ? ceil(sum(self, make(-5n, scale + 1)), scale) : floor(sum(self, make(5n, scale + 1)), scale);
1083
+ }
1084
+ const halfCeil = floor(sum(self, make(5n, scale + 1)), scale);
1085
+ const halfFloor = ceil(sum(self, make(-5n, scale + 1)), scale);
1086
+ const digit = digitAt(halfCeil, scale);
1087
+ switch (mode) {
1088
+ case "half-even":
1089
+ return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfCeil : halfFloor;
1090
+ case "half-odd":
1091
+ return equals(halfCeil, halfFloor) ? halfCeil : digit % 2n === 0n ? halfFloor : halfCeil;
1092
+ }
1093
+ });
1094
+ /**
1095
+ * Takes an `Iterable` of `BigDecimal`s and returns their sum as a single `BigDecimal`
1096
+ *
1097
+ * @example
1098
+ * ```ts
1099
+ * import * as assert from "node:assert"
1100
+ * import { unsafeFromString, sumAll } from "effect/BigDecimal"
1101
+ *
1102
+ * assert.deepStrictEqual(sumAll([unsafeFromString("2"), unsafeFromString("3"), unsafeFromString("4")]), unsafeFromString("9"))
1103
+ * ```
1104
+ *
1105
+ * @category math
1106
+ * @since 3.16.0
1107
+ */
1108
+ const sumAll = collection => {
1109
+ let out = zero;
1110
+ for (const n of collection) {
1111
+ out = sum(out, n);
1112
+ }
1113
+ return out;
1114
+ };
1115
+ exports.sumAll = sumAll;
1116
+ //# sourceMappingURL=BigDecimal.js.map
backend/node_modules/effect/dist/cjs/BigDecimal.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"BigDecimal.js","names":["Equal","_interopRequireWildcard","require","equivalence","_Function","Hash","_Inspectable","Option","order","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_PRECISION","FINITE_INT_REGEX","TypeId","exports","Symbol","for","BigDecimalProto","symbol","normalized","normalize","pipe","hash","value","combine","number","scale","cached","that","isBigDecimal","equals","toString","format","toJSON","_id","String","NodeInspectSymbol","pipeArguments","arguments","u","hasProperty","make","create","unsafeMakeNormalized","bigint0","bigint10","RangeError","BigInt","bigint1","zero","self","undefined","digits","trail","length","substring","dual","sum","multiply","subtract","divideWithPrecision","num","den","precision","numNegative","denNegative","negateResult","quotient","remainder","count","q","roundTerminal","pos","Number","divide","none","some","unsafeDivide","Order","scmp","sign","bigint","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","abs","negate","divisor","Math","unsafeRemainder","Equivalence","fromBigInt","unsafeFromNumber","getOrThrowWith","safeFromNumber","fromNumber","isFinite","string","includes","fromString","lead","split","s","base","exp","seperator","search","slice","isSafeInteger","test","offset","dot","unsafeFromString","Error","toExponential","negative","absolute","before","after","repeat","location","zeros","complete","isZero","head","tail","output","isNegative","unsafeToNumber","isInteger","isPositive","isBigDecimalArgs","args","ceil","truncated","truncate","floor","digitAt","scaled","round","options","mode","halfCeil","halfFloor","digit","sumAll","collection","out"],"sources":["../../src/BigDecimal.ts"],"sourcesContent":[null],"mappings":";;;;;;AAmBA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,uBAAA,CAAAC,OAAA;AAEA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAA4C,SAAAD,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,C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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unsafeSqrt = exports.unsafeDivide = exports.toNumber = exports.sumAll = exports.sum = exports.subtract = exports.sqrt = exports.sign = exports.multiplyAll = exports.multiply = exports.min = exports.max = exports.lessThanOrEqualTo = exports.lessThan = exports.lcm = exports.isBigInt = exports.increment = exports.greaterThanOrEqualTo = exports.greaterThan = exports.gcd = exports.fromString = exports.fromNumber = exports.divide = exports.decrement = exports.clamp = exports.between = exports.abs = exports.Order = exports.Equivalence = void 0;
7
+ var equivalence = _interopRequireWildcard(require("./Equivalence.js"));
8
+ var _Function = require("./Function.js");
9
+ var Option = _interopRequireWildcard(require("./Option.js"));
10
+ var order = _interopRequireWildcard(require("./Order.js"));
11
+ var predicate = _interopRequireWildcard(require("./Predicate.js"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript.
15
+ * It includes functions for basic arithmetic operations, as well as type class instances for
16
+ * `Equivalence` and `Order`.
17
+ *
18
+ * @module BigInt
19
+ * @since 2.0.0
20
+ * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types
21
+ * @see {@link module:Number} for more similar operations on `number` types
22
+ */
23
+
24
+ const bigint0 = /*#__PURE__*/BigInt(0);
25
+ const bigint1 = /*#__PURE__*/BigInt(1);
26
+ const bigint2 = /*#__PURE__*/BigInt(2);
27
+ /**
28
+ * Tests if a value is a `bigint`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import * as assert from "node:assert"
33
+ * import { isBigInt } from "effect/BigInt"
34
+ *
35
+ * assert.deepStrictEqual(isBigInt(1n), true)
36
+ * assert.deepStrictEqual(isBigInt(1), false)
37
+ * ```
38
+ *
39
+ * @category guards
40
+ * @since 2.0.0
41
+ */
42
+ const isBigInt = exports.isBigInt = predicate.isBigInt;
43
+ /**
44
+ * Provides an addition operation on `bigint`s.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * import * as assert from "node:assert"
49
+ * import { sum } from "effect/BigInt"
50
+ *
51
+ * assert.deepStrictEqual(sum(2n, 3n), 5n)
52
+ * ```
53
+ *
54
+ * @category math
55
+ * @since 2.0.0
56
+ */
57
+ const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self + that);
58
+ /**
59
+ * Provides a multiplication operation on `bigint`s.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * import * as assert from "node:assert"
64
+ * import { multiply } from "effect/BigInt"
65
+ *
66
+ * assert.deepStrictEqual(multiply(2n, 3n), 6n)
67
+ * ```
68
+ *
69
+ * @category math
70
+ * @since 2.0.0
71
+ */
72
+ const multiply = exports.multiply = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self * that);
73
+ /**
74
+ * Provides a subtraction operation on `bigint`s.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * import * as assert from "node:assert"
79
+ * import { subtract } from "effect/BigInt"
80
+ *
81
+ * assert.deepStrictEqual(subtract(2n, 3n), -1n)
82
+ * ```
83
+ *
84
+ * @category math
85
+ * @since 2.0.0
86
+ */
87
+ const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self - that);
88
+ /**
89
+ * Provides a division operation on `bigint`s.
90
+ *
91
+ * If the dividend is not a multiple of the divisor the result will be a `bigint` value
92
+ * which represents the integer division rounded down to the nearest integer.
93
+ *
94
+ * Returns `None` if the divisor is `0n`.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * import * as assert from "node:assert"
99
+ * import { BigInt, Option } from "effect"
100
+ *
101
+ * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n))
102
+ * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none())
103
+ * ```
104
+ *
105
+ * @category math
106
+ * @since 2.0.0
107
+ */
108
+ const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => that === bigint0 ? Option.none() : Option.some(self / that));
109
+ /**
110
+ * Provides a division operation on `bigint`s.
111
+ *
112
+ * If the dividend is not a multiple of the divisor the result will be a `bigint` value
113
+ * which represents the integer division rounded down to the nearest integer.
114
+ *
115
+ * Throws a `RangeError` if the divisor is `0n`.
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * import * as assert from "node:assert"
120
+ * import { unsafeDivide } from "effect/BigInt"
121
+ *
122
+ * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n)
123
+ * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n)
124
+ * ```
125
+ *
126
+ * @category math
127
+ * @since 2.0.0
128
+ */
129
+ const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self / that);
130
+ /**
131
+ * Returns the result of adding `1n` to a given number.
132
+ *
133
+ * @example
134
+ * ```ts
135
+ * import * as assert from "node:assert"
136
+ * import { increment } from "effect/BigInt"
137
+ *
138
+ * assert.deepStrictEqual(increment(2n), 3n)
139
+ * ```
140
+ *
141
+ * @category math
142
+ * @since 2.0.0
143
+ */
144
+ const increment = n => n + bigint1;
145
+ /**
146
+ * Decrements a number by `1n`.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * import * as assert from "node:assert"
151
+ * import { decrement } from "effect/BigInt"
152
+ *
153
+ * assert.deepStrictEqual(decrement(3n), 2n)
154
+ * ```
155
+ *
156
+ * @category math
157
+ * @since 2.0.0
158
+ */
159
+ exports.increment = increment;
160
+ const decrement = n => n - bigint1;
161
+ /**
162
+ * @category instances
163
+ * @since 2.0.0
164
+ */
165
+ exports.decrement = decrement;
166
+ const Equivalence = exports.Equivalence = equivalence.bigint;
167
+ /**
168
+ * @category instances
169
+ * @since 2.0.0
170
+ */
171
+ const Order = exports.Order = order.bigint;
172
+ /**
173
+ * Returns `true` if the first argument is less than the second, otherwise `false`.
174
+ *
175
+ * @example
176
+ * ```ts
177
+ * import * as assert from "node:assert"
178
+ * import { lessThan } from "effect/BigInt"
179
+ *
180
+ * assert.deepStrictEqual(lessThan(2n, 3n), true)
181
+ * assert.deepStrictEqual(lessThan(3n, 3n), false)
182
+ * assert.deepStrictEqual(lessThan(4n, 3n), false)
183
+ * ```
184
+ *
185
+ * @category predicates
186
+ * @since 2.0.0
187
+ */
188
+ const lessThan = exports.lessThan = /*#__PURE__*/order.lessThan(Order);
189
+ /**
190
+ * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
191
+ *
192
+ * @example
193
+ * ```ts
194
+ * import * as assert from "node:assert"
195
+ * import { lessThanOrEqualTo } from "effect/BigInt"
196
+ *
197
+ * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true)
198
+ * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true)
199
+ * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false)
200
+ * ```
201
+ *
202
+ * @category predicates
203
+ * @since 2.0.0
204
+ */
205
+ const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order);
206
+ /**
207
+ * Returns `true` if the first argument is greater than the second, otherwise `false`.
208
+ *
209
+ * @example
210
+ * ```ts
211
+ * import * as assert from "node:assert"
212
+ * import { greaterThan } from "effect/BigInt"
213
+ *
214
+ * assert.deepStrictEqual(greaterThan(2n, 3n), false)
215
+ * assert.deepStrictEqual(greaterThan(3n, 3n), false)
216
+ * assert.deepStrictEqual(greaterThan(4n, 3n), true)
217
+ * ```
218
+ *
219
+ * @category predicates
220
+ * @since 2.0.0
221
+ */
222
+ const greaterThan = exports.greaterThan = /*#__PURE__*/order.greaterThan(Order);
223
+ /**
224
+ * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * import * as assert from "node:assert"
229
+ * import { greaterThanOrEqualTo } from "effect/BigInt"
230
+ *
231
+ * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false)
232
+ * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true)
233
+ * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true)
234
+ * ```
235
+ *
236
+ * @category predicates
237
+ * @since 2.0.0
238
+ */
239
+ const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order);
240
+ /**
241
+ * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive).
242
+ *
243
+ * @example
244
+ * ```ts
245
+ * import * as assert from "node:assert"
246
+ * import { BigInt } from "effect"
247
+ *
248
+ * const between = BigInt.between({ minimum: 0n, maximum: 5n })
249
+ *
250
+ * assert.deepStrictEqual(between(3n), true)
251
+ * assert.deepStrictEqual(between(-1n), false)
252
+ * assert.deepStrictEqual(between(6n), false)
253
+ * ```
254
+ *
255
+ * @category predicates
256
+ * @since 2.0.0
257
+ */
258
+ const between = exports.between = /*#__PURE__*/order.between(Order);
259
+ /**
260
+ * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
261
+ *
262
+ * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value.
263
+ * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value.
264
+ * - Otherwise, it returns the original `bigint`.
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * import * as assert from "node:assert"
269
+ * import { BigInt } from "effect"
270
+ *
271
+ * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
272
+ *
273
+ * assert.equal(clamp(3n), 3n)
274
+ * assert.equal(clamp(0n), 1n)
275
+ * assert.equal(clamp(6n), 5n)
276
+ * ```
277
+ *
278
+ * @since 2.0.0
279
+ */
280
+ const clamp = exports.clamp = /*#__PURE__*/order.clamp(Order);
281
+ /**
282
+ * Returns the minimum between two `bigint`s.
283
+ *
284
+ * @example
285
+ * ```ts
286
+ * import * as assert from "node:assert"
287
+ * import { min } from "effect/BigInt"
288
+ *
289
+ * assert.deepStrictEqual(min(2n, 3n), 2n)
290
+ * ```
291
+ *
292
+ * @since 2.0.0
293
+ */
294
+ const min = exports.min = /*#__PURE__*/order.min(Order);
295
+ /**
296
+ * Returns the maximum between two `bigint`s.
297
+ *
298
+ * @example
299
+ * ```ts
300
+ * import * as assert from "node:assert"
301
+ * import { max } from "effect/BigInt"
302
+ *
303
+ * assert.deepStrictEqual(max(2n, 3n), 3n)
304
+ * ```
305
+ *
306
+ * @since 2.0.0
307
+ */
308
+ const max = exports.max = /*#__PURE__*/order.max(Order);
309
+ /**
310
+ * Determines the sign of a given `bigint`.
311
+ *
312
+ * @example
313
+ * ```ts
314
+ * import * as assert from "node:assert"
315
+ * import { sign } from "effect/BigInt"
316
+ *
317
+ * assert.deepStrictEqual(sign(-5n), -1)
318
+ * assert.deepStrictEqual(sign(0n), 0)
319
+ * assert.deepStrictEqual(sign(5n), 1)
320
+ * ```
321
+ *
322
+ * @category math
323
+ * @since 2.0.0
324
+ */
325
+ const sign = n => Order(n, bigint0);
326
+ /**
327
+ * Determines the absolute value of a given `bigint`.
328
+ *
329
+ * @example
330
+ * ```ts
331
+ * import * as assert from "node:assert"
332
+ * import { abs } from "effect/BigInt"
333
+ *
334
+ * assert.deepStrictEqual(abs(-5n), 5n)
335
+ * assert.deepStrictEqual(abs(0n), 0n)
336
+ * assert.deepStrictEqual(abs(5n), 5n)
337
+ * ```
338
+ *
339
+ * @category math
340
+ * @since 2.0.0
341
+ */
342
+ exports.sign = sign;
343
+ const abs = n => n < bigint0 ? -n : n;
344
+ /**
345
+ * Determines the greatest common divisor of two `bigint`s.
346
+ *
347
+ * @example
348
+ * ```ts
349
+ * import * as assert from "node:assert"
350
+ * import { gcd } from "effect/BigInt"
351
+ *
352
+ * assert.deepStrictEqual(gcd(2n, 3n), 1n)
353
+ * assert.deepStrictEqual(gcd(2n, 4n), 2n)
354
+ * assert.deepStrictEqual(gcd(16n, 24n), 8n)
355
+ * ```
356
+ *
357
+ * @category math
358
+ * @since 2.0.0
359
+ */
360
+ exports.abs = abs;
361
+ const gcd = exports.gcd = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
362
+ while (that !== bigint0) {
363
+ const t = that;
364
+ that = self % that;
365
+ self = t;
366
+ }
367
+ return self;
368
+ });
369
+ /**
370
+ * Determines the least common multiple of two `bigint`s.
371
+ *
372
+ * @example
373
+ * ```ts
374
+ * import * as assert from "node:assert"
375
+ * import { lcm } from "effect/BigInt"
376
+ *
377
+ * assert.deepStrictEqual(lcm(2n, 3n), 6n)
378
+ * assert.deepStrictEqual(lcm(2n, 4n), 4n)
379
+ * assert.deepStrictEqual(lcm(16n, 24n), 48n)
380
+ * ```
381
+ *
382
+ * @category math
383
+ * @since 2.0.0
384
+ */
385
+ const lcm = exports.lcm = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self * that / gcd(self, that));
386
+ /**
387
+ * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative.
388
+ *
389
+ * @example
390
+ * ```ts
391
+ * import * as assert from "node:assert"
392
+ * import { unsafeSqrt } from "effect/BigInt"
393
+ *
394
+ * assert.deepStrictEqual(unsafeSqrt(4n), 2n)
395
+ * assert.deepStrictEqual(unsafeSqrt(9n), 3n)
396
+ * assert.deepStrictEqual(unsafeSqrt(16n), 4n)
397
+ * ```
398
+ *
399
+ * @category math
400
+ * @since 2.0.0
401
+ */
402
+ const unsafeSqrt = n => {
403
+ if (n < bigint0) {
404
+ throw new RangeError("Cannot take the square root of a negative number");
405
+ }
406
+ if (n < bigint2) {
407
+ return n;
408
+ }
409
+ let x = n / bigint2;
410
+ while (x * x > n) {
411
+ x = (n / x + x) / bigint2;
412
+ }
413
+ return x;
414
+ };
415
+ /**
416
+ * Determines the square root of a given `bigint` safely. Returns `none` if the given `bigint` is negative.
417
+ *
418
+ * @example
419
+ * ```ts
420
+ * import * as assert from "node:assert"
421
+ * import { BigInt, Option } from "effect"
422
+ *
423
+ * assert.deepStrictEqual(BigInt.sqrt(4n), Option.some(2n))
424
+ * assert.deepStrictEqual(BigInt.sqrt(9n), Option.some(3n))
425
+ * assert.deepStrictEqual(BigInt.sqrt(16n), Option.some(4n))
426
+ * assert.deepStrictEqual(BigInt.sqrt(-1n), Option.none())
427
+ * ```
428
+ *
429
+ * @category math
430
+ * @since 2.0.0
431
+ */
432
+ exports.unsafeSqrt = unsafeSqrt;
433
+ const sqrt = n => greaterThanOrEqualTo(n, bigint0) ? Option.some(unsafeSqrt(n)) : Option.none();
434
+ /**
435
+ * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint
436
+ *
437
+ * @example
438
+ * ```ts
439
+ * import * as assert from "node:assert"
440
+ * import { sumAll } from "effect/BigInt"
441
+ *
442
+ * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n)
443
+ * ```
444
+ *
445
+ * @category math
446
+ * @since 2.0.0
447
+ */
448
+ exports.sqrt = sqrt;
449
+ const sumAll = collection => {
450
+ let out = bigint0;
451
+ for (const n of collection) {
452
+ out += n;
453
+ }
454
+ return out;
455
+ };
456
+ /**
457
+ * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`.
458
+ *
459
+ * @example
460
+ * ```ts
461
+ * import * as assert from "node:assert"
462
+ * import { multiplyAll } from "effect/BigInt"
463
+ *
464
+ * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n)
465
+ * ```
466
+ *
467
+ * @category math
468
+ * @since 2.0.0
469
+ */
470
+ exports.sumAll = sumAll;
471
+ const multiplyAll = collection => {
472
+ let out = bigint1;
473
+ for (const n of collection) {
474
+ if (n === bigint0) {
475
+ return bigint0;
476
+ }
477
+ out *= n;
478
+ }
479
+ return out;
480
+ };
481
+ /**
482
+ * Takes a `bigint` and returns an `Option` of `number`.
483
+ *
484
+ * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
485
+ * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it converts the `bigint`
486
+ * to a number and returns `Option.some(number)`.
487
+ *
488
+ * @example
489
+ * ```ts
490
+ * import * as assert from "node:assert"
491
+ * import { BigInt as BI, Option } from "effect"
492
+ *
493
+ * assert.deepStrictEqual(BI.toNumber(BigInt(42)), Option.some(42))
494
+ * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none())
495
+ * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none())
496
+ * ```
497
+ *
498
+ * @category conversions
499
+ * @since 2.0.0
500
+ */
501
+ exports.multiplyAll = multiplyAll;
502
+ const toNumber = b => {
503
+ if (b > BigInt(Number.MAX_SAFE_INTEGER) || b < BigInt(Number.MIN_SAFE_INTEGER)) {
504
+ return Option.none();
505
+ }
506
+ return Option.some(Number(b));
507
+ };
508
+ /**
509
+ * Takes a string and returns an `Option` of `bigint`.
510
+ *
511
+ * If the string is empty or contains characters that cannot be converted into a `bigint`,
512
+ * it returns `Option.none()`, otherwise, it returns `Option.some(bigint)`.
513
+ *
514
+ * @example
515
+ * ```ts
516
+ * import * as assert from "node:assert"
517
+ * import { BigInt as BI, Option } from "effect"
518
+ *
519
+ * assert.deepStrictEqual(BI.fromString("42"), Option.some(BigInt(42)))
520
+ * assert.deepStrictEqual(BI.fromString(" "), Option.none())
521
+ * assert.deepStrictEqual(BI.fromString("a"), Option.none())
522
+ * ```
523
+ *
524
+ * @category conversions
525
+ * @since 2.4.12
526
+ */
527
+ exports.toNumber = toNumber;
528
+ const fromString = s => {
529
+ try {
530
+ return s.trim() === "" ? Option.none() : Option.some(BigInt(s));
531
+ } catch {
532
+ return Option.none();
533
+ }
534
+ };
535
+ /**
536
+ * Takes a number and returns an `Option` of `bigint`.
537
+ *
538
+ * If the number is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
539
+ * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it attempts to
540
+ * convert the number to a `bigint` and returns `Option.some(bigint)`.
541
+ *
542
+ * @example
543
+ * ```ts
544
+ * import * as assert from "node:assert"
545
+ * import { BigInt as BI, Option } from "effect"
546
+ *
547
+ * assert.deepStrictEqual(BI.fromNumber(42), Option.some(BigInt(42)))
548
+ * assert.deepStrictEqual(BI.fromNumber(Number.MAX_SAFE_INTEGER + 1), Option.none())
549
+ * assert.deepStrictEqual(BI.fromNumber(Number.MIN_SAFE_INTEGER - 1), Option.none())
550
+ * ```
551
+ *
552
+ * @category conversions
553
+ * @since 2.4.12
554
+ */
555
+ exports.fromString = fromString;
556
+ const fromNumber = n => {
557
+ if (n > Number.MAX_SAFE_INTEGER || n < Number.MIN_SAFE_INTEGER) {
558
+ return Option.none();
559
+ }
560
+ try {
561
+ return Option.some(BigInt(n));
562
+ } catch {
563
+ return Option.none();
564
+ }
565
+ };
566
+ exports.fromNumber = fromNumber;
567
+ //# sourceMappingURL=BigInt.js.map
backend/node_modules/effect/dist/cjs/BigInt.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"BigInt.js","names":["equivalence","_interopRequireWildcard","require","_Function","Option","order","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","bigint0","BigInt","bigint1","bigint2","isBigInt","exports","sum","dual","self","that","multiply","subtract","divide","none","some","unsafeDivide","increment","decrement","Equivalence","bigint","Order","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","sign","abs","gcd","lcm","unsafeSqrt","RangeError","x","sqrt","sumAll","collection","out","multiplyAll","toNumber","b","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fromString","s","trim","fromNumber"],"sources":["../../src/BigInt.ts"],"sourcesContent":[null],"mappings":";;;;;;AAWA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,SAAA,GAAAL,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,C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ACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;AAAAR,OAAA,CAAAyC,UAAA,GAAAA,UAAA;AAoBO,MAAMG,UAAU,GAAIhE,CAAS,IAA2B;EAC7D,IAAIA,CAAC,GAAG0D,MAAM,CAACC,gBAAgB,IAAI3D,CAAC,GAAG0D,MAAM,CAACE,gBAAgB,EAAE;IAC9D,OAAOnE,MAAM,CAACmC,IAAI,EAAE;EACtB;EAEA,IAAI;IACF,OAAOnC,MAAM,CAACoC,IAAI,CAACb,MAAM,CAAChB,CAAC,CAAC,CAAC;EAC/B,CAAC,CAAC,MAAM;IACN,OAAOP,MAAM,CAACmC,IAAI,EAAE;EACtB;AACF,CAAC;AAAAR,OAAA,CAAA4C,UAAA,GAAAA,UAAA","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Boolean.js ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.xor = exports.some = exports.or = exports.not = exports.nor = exports.nand = exports.match = exports.isBoolean = exports.implies = exports.every = exports.eqv = exports.and = exports.Order = exports.Equivalence = void 0;
7
+ var equivalence = _interopRequireWildcard(require("./Equivalence.js"));
8
+ var _Function = require("./Function.js");
9
+ var order = _interopRequireWildcard(require("./Order.js"));
10
+ var predicate = _interopRequireWildcard(require("./Predicate.js"));
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ /**
13
+ * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript.
14
+ * It includes functions for basic boolean operations, as well as type class instances for
15
+ * `Equivalence` and `Order`.
16
+ *
17
+ * @since 2.0.0
18
+ */
19
+
20
+ /**
21
+ * Tests if a value is a `boolean`.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * import * as assert from "node:assert"
26
+ * import { isBoolean } from "effect/Boolean"
27
+ *
28
+ * assert.deepStrictEqual(isBoolean(true), true)
29
+ * assert.deepStrictEqual(isBoolean("true"), false)
30
+ * ```
31
+ *
32
+ * @category guards
33
+ * @since 2.0.0
34
+ */
35
+ const isBoolean = exports.isBoolean = predicate.isBoolean;
36
+ /**
37
+ * This function returns the result of either of the given functions depending on the value of the boolean parameter.
38
+ * It is useful when you have to run one of two functions depending on the boolean value.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import * as assert from "node:assert"
43
+ * import { Boolean } from "effect"
44
+ *
45
+ * assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!")
46
+ * ```
47
+ *
48
+ * @category pattern matching
49
+ * @since 2.0.0
50
+ */
51
+ const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (value, options) => value ? options.onTrue() : options.onFalse());
52
+ /**
53
+ * @category instances
54
+ * @since 2.0.0
55
+ */
56
+ const Equivalence = exports.Equivalence = equivalence.boolean;
57
+ /**
58
+ * @category instances
59
+ * @since 2.0.0
60
+ */
61
+ const Order = exports.Order = order.boolean;
62
+ /**
63
+ * Negates the given boolean: `!self`
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * import * as assert from "node:assert"
68
+ * import { not } from "effect/Boolean"
69
+ *
70
+ * assert.deepStrictEqual(not(true), false)
71
+ * assert.deepStrictEqual(not(false), true)
72
+ * ```
73
+ *
74
+ * @category combinators
75
+ * @since 2.0.0
76
+ */
77
+ const not = self => !self;
78
+ /**
79
+ * Combines two boolean using AND: `self && that`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * import * as assert from "node:assert"
84
+ * import { and } from "effect/Boolean"
85
+ *
86
+ * assert.deepStrictEqual(and(true, true), true)
87
+ * assert.deepStrictEqual(and(true, false), false)
88
+ * assert.deepStrictEqual(and(false, true), false)
89
+ * assert.deepStrictEqual(and(false, false), false)
90
+ * ```
91
+ *
92
+ * @category combinators
93
+ * @since 2.0.0
94
+ */
95
+ exports.not = not;
96
+ const and = exports.and = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self && that);
97
+ /**
98
+ * Combines two boolean using NAND: `!(self && that)`.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * import * as assert from "node:assert"
103
+ * import { nand } from "effect/Boolean"
104
+ *
105
+ * assert.deepStrictEqual(nand(true, true), false)
106
+ * assert.deepStrictEqual(nand(true, false), true)
107
+ * assert.deepStrictEqual(nand(false, true), true)
108
+ * assert.deepStrictEqual(nand(false, false), true)
109
+ * ```
110
+ *
111
+ * @category combinators
112
+ * @since 2.0.0
113
+ */
114
+ const nand = exports.nand = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !(self && that));
115
+ /**
116
+ * Combines two boolean using OR: `self || that`.
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * import * as assert from "node:assert"
121
+ * import { or } from "effect/Boolean"
122
+ *
123
+ * assert.deepStrictEqual(or(true, true), true)
124
+ * assert.deepStrictEqual(or(true, false), true)
125
+ * assert.deepStrictEqual(or(false, true), true)
126
+ * assert.deepStrictEqual(or(false, false), false)
127
+ * ```
128
+ *
129
+ * @category combinators
130
+ * @since 2.0.0
131
+ */
132
+ const or = exports.or = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self || that);
133
+ /**
134
+ * Combines two booleans using NOR: `!(self || that)`.
135
+ *
136
+ * @example
137
+ * ```ts
138
+ * import * as assert from "node:assert"
139
+ * import { nor } from "effect/Boolean"
140
+ *
141
+ * assert.deepStrictEqual(nor(true, true), false)
142
+ * assert.deepStrictEqual(nor(true, false), false)
143
+ * assert.deepStrictEqual(nor(false, true), false)
144
+ * assert.deepStrictEqual(nor(false, false), true)
145
+ * ```
146
+ *
147
+ * @category combinators
148
+ * @since 2.0.0
149
+ */
150
+ const nor = exports.nor = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !(self || that));
151
+ /**
152
+ * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * import * as assert from "node:assert"
157
+ * import { xor } from "effect/Boolean"
158
+ *
159
+ * assert.deepStrictEqual(xor(true, true), false)
160
+ * assert.deepStrictEqual(xor(true, false), true)
161
+ * assert.deepStrictEqual(xor(false, true), true)
162
+ * assert.deepStrictEqual(xor(false, false), false)
163
+ * ```
164
+ *
165
+ * @category combinators
166
+ * @since 2.0.0
167
+ */
168
+ const xor = exports.xor = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !self && that || self && !that);
169
+ /**
170
+ * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * import * as assert from "node:assert"
175
+ * import { eqv } from "effect/Boolean"
176
+ *
177
+ * assert.deepStrictEqual(eqv(true, true), true)
178
+ * assert.deepStrictEqual(eqv(true, false), false)
179
+ * assert.deepStrictEqual(eqv(false, true), false)
180
+ * assert.deepStrictEqual(eqv(false, false), true)
181
+ * ```
182
+ *
183
+ * @category combinators
184
+ * @since 2.0.0
185
+ */
186
+ const eqv = exports.eqv = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => !xor(self, that));
187
+ /**
188
+ * Combines two booleans using an implication: `(!self || that)`.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * import * as assert from "node:assert"
193
+ * import { implies } from "effect/Boolean"
194
+ *
195
+ * assert.deepStrictEqual(implies(true, true), true)
196
+ * assert.deepStrictEqual(implies(true, false), false)
197
+ * assert.deepStrictEqual(implies(false, true), true)
198
+ * assert.deepStrictEqual(implies(false, false), true)
199
+ * ```
200
+ *
201
+ * @category combinators
202
+ * @since 2.0.0
203
+ */
204
+ const implies = exports.implies = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => self ? that : true);
205
+ /**
206
+ * This utility function is used to check if all the elements in a collection of boolean values are `true`.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * import * as assert from "node:assert"
211
+ * import { every } from "effect/Boolean"
212
+ *
213
+ * assert.deepStrictEqual(every([true, true, true]), true)
214
+ * assert.deepStrictEqual(every([true, false, true]), false)
215
+ * ```
216
+ *
217
+ * @since 2.0.0
218
+ */
219
+ const every = collection => {
220
+ for (const b of collection) {
221
+ if (!b) {
222
+ return false;
223
+ }
224
+ }
225
+ return true;
226
+ };
227
+ /**
228
+ * This utility function is used to check if at least one of the elements in a collection of boolean values is `true`.
229
+ *
230
+ * @example
231
+ * ```ts
232
+ * import * as assert from "node:assert"
233
+ * import { some } from "effect/Boolean"
234
+ *
235
+ * assert.deepStrictEqual(some([true, false, true]), true)
236
+ * assert.deepStrictEqual(some([false, false, false]), false)
237
+ * ```
238
+ *
239
+ * @since 2.0.0
240
+ */
241
+ exports.every = every;
242
+ const some = collection => {
243
+ for (const b of collection) {
244
+ if (b) {
245
+ return true;
246
+ }
247
+ }
248
+ return false;
249
+ };
250
+ exports.some = some;
251
+ //# sourceMappingURL=Boolean.js.map
backend/node_modules/effect/dist/cjs/Boolean.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Boolean.js","names":["equivalence","_interopRequireWildcard","require","_Function","order","predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isBoolean","exports","match","dual","value","options","onTrue","onFalse","Equivalence","boolean","Order","not","self","and","that","nand","or","nor","xor","eqv","implies","every","collection","b","some"],"sources":["../../src/Boolean.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAA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AO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;AAAAtB,OAAA,CAAAoB,KAAA,GAAAA,KAAA;AAcO,MAAMG,IAAI,GAAIF,UAA6B,IAAa;EAC7D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAIC,CAAC,EAAE;MACL,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC;AAAAtB,OAAA,CAAAuB,IAAA,GAAAA,IAAA","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Brand.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Brand.js","names":["Arr","_interopRequireWildcard","require","Either","_Function","Option","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BrandTypeId","exports","Symbol","for","RefinedConstructorsTypeId","error","message","meta","errors","flatten","refined","args","either","length","unbranded","right","left","match","onNone","onSome","assign","getOrThrowWith","identity","option","getRight","is","isRight","nominal","some","_args","all","brands","result","brand","nextResult","isLeft","onLeft","onRight","unsafeCoerce"],"sources":["../../src/Brand.ts"],"sourcesContent":[null],"mappings":";;;;;;;;AAkBA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA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AA,GAAAA,GAAA;AAMO,MAAMhB,SAAS,GAAAb,OAAA,CAAAa,SAAA,GAA6DwB,sBAAY","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Cache.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.makeWith = exports.makeEntryStats = exports.makeCacheStats = exports.make = exports.ConsumerCacheTypeId = exports.CacheTypeId = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/cache.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ * @category symbols
12
+ */
13
+ const CacheTypeId = exports.CacheTypeId = internal.CacheTypeId;
14
+ /**
15
+ * @since 3.6.4
16
+ * @category symbols
17
+ */
18
+ const ConsumerCacheTypeId = exports.ConsumerCacheTypeId = internal.ConsumerCacheTypeId;
19
+ /**
20
+ * Constructs a new cache with the specified capacity, time to live, and
21
+ * lookup function.
22
+ *
23
+ * @since 2.0.0
24
+ * @category constructors
25
+ */
26
+ const make = exports.make = internal.make;
27
+ /**
28
+ * Constructs a new cache with the specified capacity, time to live, and
29
+ * lookup function, where the time to live can depend on the `Exit` value
30
+ * returned by the lookup function.
31
+ *
32
+ * @since 2.0.0
33
+ * @category constructors
34
+ */
35
+ const makeWith = exports.makeWith = internal.makeWith;
36
+ /**
37
+ * Constructs a new `CacheStats` from the specified values.
38
+ *
39
+ * @since 2.0.0
40
+ * @category constructors
41
+ */
42
+ const makeCacheStats = exports.makeCacheStats = internal.makeCacheStats;
43
+ /**
44
+ * Constructs a new `EntryStats` from the specified values.
45
+ *
46
+ * @since 2.0.0
47
+ * @category constructors
48
+ */
49
+ const makeEntryStats = exports.makeEntryStats = internal.makeEntryStats;
50
+ //# sourceMappingURL=Cache.js.map
backend/node_modules/effect/dist/cjs/Cache.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Cache.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CacheTypeId","exports","ConsumerCacheTypeId","make","makeWith","makeCacheStats","makeEntryStats"],"sources":["../../src/Cache.ts"],"sourcesContent":[null],"mappings":";;;;;;AAOA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+C,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.stripSomeDefects = exports.stripFailures = exports.squashWith = exports.squash = exports.size = exports.sequential = exports.reduceWithContext = exports.reduce = exports.prettyErrors = exports.pretty = exports.parallel = exports.originalError = exports.match = exports.map = exports.linearize = exports.keepDefects = exports.isUnknownException = exports.isTimeoutException = exports.isSequentialType = exports.isRuntimeException = exports.isParallelType = exports.isNoSuchElementException = exports.isInterruptedOnly = exports.isInterruptedException = exports.isInterrupted = exports.isInterruptType = exports.isIllegalArgumentException = exports.isFailure = exports.isFailType = exports.isExceededCapacityException = exports.isEmptyType = exports.isEmpty = exports.isDieType = exports.isDie = exports.isCause = exports.interruptors = exports.interruptOption = exports.interrupt = exports.flipCauseOption = exports.flatten = exports.flatMap = exports.find = exports.filter = exports.failures = exports.failureOrCause = exports.failureOption = exports.fail = exports.empty = exports.dieOption = exports.die = exports.defects = exports.contains = exports.as = exports.andThen = exports.YieldableError = exports.UnknownExceptionTypeId = exports.UnknownException = exports.TimeoutExceptionTypeId = exports.TimeoutException = exports.RuntimeExceptionTypeId = exports.RuntimeException = exports.NoSuchElementExceptionTypeId = exports.NoSuchElementException = exports.InvalidPubSubCapacityExceptionTypeId = exports.InterruptedExceptionTypeId = exports.InterruptedException = exports.IllegalArgumentExceptionTypeId = exports.IllegalArgumentException = exports.ExceededCapacityExceptionTypeId = exports.ExceededCapacityException = exports.CauseTypeId = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/cause.js"));
8
+ var core = _interopRequireWildcard(require("./internal/core.js"));
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * A unique symbol identifying the `Cause` type.
12
+ *
13
+ * **Details**
14
+ *
15
+ * This provides a symbol that helps identify instances of the `Cause` data
16
+ * type. This can be used for advanced operations such as refining types or
17
+ * building internal utilities that check whether an unknown value is a `Cause`.
18
+ *
19
+ * @see {@link isCause} Check if a value is a `Cause`
20
+ *
21
+ * @since 2.0.0
22
+ * @category Symbols
23
+ */
24
+ const CauseTypeId = exports.CauseTypeId = internal.CauseTypeId;
25
+ /**
26
+ * A unique symbol identifying the `RuntimeException` type.
27
+ *
28
+ * **Details**
29
+ *
30
+ * This provides a symbol that identifies a `RuntimeException`. This is
31
+ * typically used internally by the library to recognize checked exceptions that
32
+ * occur during runtime.
33
+ *
34
+ * @see {@link RuntimeException} Create or work with a `RuntimeException`
35
+ *
36
+ * @since 2.0.0
37
+ * @category Symbols
38
+ */
39
+ const RuntimeExceptionTypeId = exports.RuntimeExceptionTypeId = core.RuntimeExceptionTypeId;
40
+ /**
41
+ * A unique symbol identifying the `InterruptedException` type.
42
+ *
43
+ * **Details**
44
+ *
45
+ * This provides a symbol that identifies an `InterruptedException`. This is
46
+ * typically used internally to recognize when a fiber has been interrupted,
47
+ * helping the framework handle interruption logic correctly.
48
+ *
49
+ * @see {@link InterruptedException} Create or work with an `InterruptedException`
50
+ *
51
+ * @since 2.0.0
52
+ * @category Symbols
53
+ */
54
+ const InterruptedExceptionTypeId = exports.InterruptedExceptionTypeId = core.InterruptedExceptionTypeId;
55
+ /**
56
+ * A unique symbol identifying the `IllegalArgumentException` type.
57
+ *
58
+ * **Details**
59
+ *
60
+ * This provides a symbol that identifies an `IllegalArgumentException`. This is
61
+ * often used in scenarios where invalid arguments are supplied to methods that
62
+ * expect specific input.
63
+ *
64
+ * @see {@link IllegalArgumentException} Create or work with an `IllegalArgumentException`
65
+ *
66
+ * @since 2.0.0
67
+ * @category Symbols
68
+ */
69
+ const IllegalArgumentExceptionTypeId = exports.IllegalArgumentExceptionTypeId = core.IllegalArgumentExceptionTypeId;
70
+ /**
71
+ * A unique symbol identifying the `NoSuchElementException` type.
72
+ *
73
+ * **Details**
74
+ *
75
+ * This provides a symbol that identifies a `NoSuchElementException`. It helps
76
+ * differentiate cases where a required element is missing within a data
77
+ * structure.
78
+ *
79
+ * @see {@link NoSuchElementException} Create or work with a `NoSuchElementException`
80
+ *
81
+ * @since 2.0.0
82
+ * @category Symbols
83
+ */
84
+ const NoSuchElementExceptionTypeId = exports.NoSuchElementExceptionTypeId = core.NoSuchElementExceptionTypeId;
85
+ /**
86
+ * A unique symbol identifying the `InvalidPubSubCapacityException` type.
87
+ *
88
+ * **Details**
89
+ *
90
+ * This provides a symbol that identifies an `InvalidPubSubCapacityException`.
91
+ * It indicates an error related to an invalid capacity passed to a `PubSub`
92
+ * structure.
93
+ *
94
+ * @see {@link InvalidPubSubCapacityException} Create or work with an `InvalidPubSubCapacityException`
95
+ *
96
+ * @since 2.0.0
97
+ * @category Symbols
98
+ */
99
+ const InvalidPubSubCapacityExceptionTypeId = exports.InvalidPubSubCapacityExceptionTypeId = core.InvalidPubSubCapacityExceptionTypeId;
100
+ /**
101
+ * A unique symbol identifying the `ExceededCapacityException` type.
102
+ *
103
+ * **Details**
104
+ *
105
+ * This provides a symbol that identifies an `ExceededCapacityException`. It
106
+ * denotes situations where a resource has exceeded its configured capacity
107
+ * limit.
108
+ *
109
+ * @see {@link ExceededCapacityException} Create or work with an `ExceededCapacityException`
110
+ *
111
+ * @since 3.5.0
112
+ * @category Symbols
113
+ */
114
+ const ExceededCapacityExceptionTypeId = exports.ExceededCapacityExceptionTypeId = core.ExceededCapacityExceptionTypeId;
115
+ /**
116
+ * A unique symbol identifying the `TimeoutException` type.
117
+ *
118
+ * **Details**
119
+ *
120
+ * This provides a symbol that identifies a `TimeoutException`. It helps the
121
+ * framework recognize errors related to operations that fail to complete within
122
+ * a given timeframe.
123
+ *
124
+ * @see {@link TimeoutException} Create or work with a `TimeoutException`
125
+ *
126
+ * @since 2.0.0
127
+ * @category Symbols
128
+ */
129
+ const TimeoutExceptionTypeId = exports.TimeoutExceptionTypeId = core.TimeoutExceptionTypeId;
130
+ /**
131
+ * A unique symbol identifying the `UnknownException` type.
132
+ *
133
+ * **Details**
134
+ *
135
+ * This provides a symbol that identifies an `UnknownException`. It is typically
136
+ * used for generic or unexpected errors that do not fit other specific
137
+ * exception categories.
138
+ *
139
+ * @see {@link UnknownException} Create or work with an `UnknownException`
140
+ *
141
+ * @since 2.0.0
142
+ * @category Symbols
143
+ */
144
+ const UnknownExceptionTypeId = exports.UnknownExceptionTypeId = core.UnknownExceptionTypeId;
145
+ /**
146
+ * Creates an error that occurs at runtime, extendable for other exception
147
+ * types.
148
+ *
149
+ * @since 2.0.0
150
+ * @category Errors
151
+ */
152
+ const YieldableError = exports.YieldableError = core.YieldableError;
153
+ /**
154
+ * Creates an `Empty` cause.
155
+ *
156
+ * **Details**
157
+ *
158
+ * This function returns a cause that signifies "no error." It's commonly used
159
+ * to represent an absence of failure conditions.
160
+ *
161
+ * @see {@link isEmpty} Check if a `Cause` is empty
162
+ *
163
+ * @since 2.0.0
164
+ * @category Constructors
165
+ */
166
+ const empty = exports.empty = internal.empty;
167
+ /**
168
+ * Creates a `Fail` cause from an expected error.
169
+ *
170
+ * **Details**
171
+ *
172
+ * This function constructs a `Cause` carrying an error of type `E`. It's used
173
+ * when you want to represent a known or anticipated failure in your effectful
174
+ * computations.
175
+ *
176
+ * @see {@link isFailure} Check if a `Cause` contains a failure
177
+ *
178
+ * @since 2.0.0
179
+ * @category Constructors
180
+ */
181
+ const fail = exports.fail = internal.fail;
182
+ /**
183
+ * Creates a `Die` cause from an unexpected error.
184
+ *
185
+ * **Details**
186
+ *
187
+ * This function wraps an unhandled or unknown defect (like a runtime crash)
188
+ * into a `Cause`. It's useful for capturing unforeseen issues in a structured
189
+ * way.
190
+ *
191
+ * @see {@link isDie} Check if a `Cause` contains a defect
192
+ *
193
+ * @since 2.0.0
194
+ * @category Constructors
195
+ */
196
+ const die = exports.die = internal.die;
197
+ /**
198
+ * Creates an `Interrupt` cause from a `FiberId`.
199
+ *
200
+ * **Details**
201
+ *
202
+ * This function represents a fiber that has been interrupted. It stores the
203
+ * identifier of the interrupted fiber, enabling precise tracking of concurrent
204
+ * cancellations.
205
+ *
206
+ * @see {@link isInterrupted} Check if a `Cause` contains an interruption
207
+ *
208
+ * @since 2.0.0
209
+ * @category Constructors
210
+ */
211
+ const interrupt = exports.interrupt = internal.interrupt;
212
+ /**
213
+ * Combines two `Cause`s in parallel.
214
+ *
215
+ * **Details**
216
+ *
217
+ * This function merges two errors that occurred simultaneously. Instead of
218
+ * discarding one error, both are retained, allowing for richer error reporting
219
+ * and debugging.
220
+ *
221
+ * @see {@link isParallelType} Check if a `Cause` is a `Parallel`
222
+ *
223
+ * @since 2.0.0
224
+ * @category Constructors
225
+ */
226
+ const parallel = exports.parallel = internal.parallel;
227
+ /**
228
+ * Combines two `Cause`s sequentially.
229
+ *
230
+ * **Details**
231
+ *
232
+ * This function merges two errors that occurred in sequence, such as a main
233
+ * error followed by a finalization error. It preserves both errors for complete
234
+ * failure information.
235
+ *
236
+ * @see {@link isSequentialType} Check if a `Cause` is a `Sequential`
237
+ *
238
+ * @since 2.0.0
239
+ * @category Constructors
240
+ */
241
+ const sequential = exports.sequential = internal.sequential;
242
+ /**
243
+ * Checks if a value is a `Cause`.
244
+ *
245
+ * @since 2.0.0
246
+ * @category Guards
247
+ */
248
+ const isCause = exports.isCause = internal.isCause;
249
+ /**
250
+ * Checks if a `Cause` is an `Empty` type.
251
+ *
252
+ * @see {@link empty} Create a new `Empty` cause
253
+ *
254
+ * @since 2.0.0
255
+ * @category Guards
256
+ */
257
+ const isEmptyType = exports.isEmptyType = internal.isEmptyType;
258
+ /**
259
+ * Checks if a `Cause` is a `Fail` type.
260
+ *
261
+ * @see {@link fail} Create a new `Fail` cause
262
+ *
263
+ * @since 2.0.0
264
+ * @category Guards
265
+ */
266
+ const isFailType = exports.isFailType = internal.isFailType;
267
+ /**
268
+ * Checks if a `Cause` is a `Die` type.
269
+ *
270
+ * @see {@link die} Create a new `Die` cause
271
+ *
272
+ * @since 2.0.0
273
+ * @category Guards
274
+ */
275
+ const isDieType = exports.isDieType = internal.isDieType;
276
+ /**
277
+ * Checks if a `Cause` is an `Interrupt` type.
278
+ *
279
+ * @see {@link interrupt} Create an `Interrupt` cause
280
+ *
281
+ * @since 2.0.0
282
+ * @category Guards
283
+ */
284
+ const isInterruptType = exports.isInterruptType = internal.isInterruptType;
285
+ /**
286
+ * Checks if a `Cause` is a `Sequential` type.
287
+ *
288
+ * @see {@link sequential} Combine two `Cause`s sequentially
289
+ *
290
+ * @since 2.0.0
291
+ * @category Guards
292
+ */
293
+ const isSequentialType = exports.isSequentialType = internal.isSequentialType;
294
+ /**
295
+ * Checks if a `Cause` is a `Parallel` type.
296
+ *
297
+ * @see {@link parallel} Combine two `Cause`s in parallel
298
+ *
299
+ * @since 2.0.0
300
+ * @category Guards
301
+ */
302
+ const isParallelType = exports.isParallelType = internal.isParallelType;
303
+ /**
304
+ * Calculates the size of a `Cause`.
305
+ *
306
+ * **Details**
307
+ *
308
+ * This function returns the total number of `Cause` nodes in the semiring
309
+ * structure, reflecting how many individual error elements are recorded.
310
+ *
311
+ * @since 2.0.0
312
+ * @category Getters
313
+ */
314
+ const size = exports.size = internal.size;
315
+ /**
316
+ * Checks if a `Cause` is entirely empty.
317
+ *
318
+ * **Details**
319
+ *
320
+ * This function returns `true` if the `Cause` contains no errors, defects, or
321
+ * interruptions. It's helpful for verifying if a computation truly had no
322
+ * failures.
323
+ *
324
+ * @since 2.0.0
325
+ * @category Getters
326
+ */
327
+ const isEmpty = exports.isEmpty = internal.isEmpty;
328
+ /**
329
+ * Checks if a `Cause` contains a failure.
330
+ *
331
+ * **Details**
332
+ *
333
+ * This function returns `true` if the `Cause` includes any `Fail` error. It's
334
+ * commonly used to confirm whether a workflow encountered an anticipated error
335
+ * versus just defects or interruptions.
336
+ *
337
+ * @since 2.0.0
338
+ * @category Getters
339
+ */
340
+ const isFailure = exports.isFailure = internal.isFailure;
341
+ /**
342
+ * Checks if a `Cause` contains a defect.
343
+ *
344
+ * **Details**
345
+ *
346
+ * This function returns `true` if the `Cause` includes any unexpected or
347
+ * unhandled errors (`Die`). It's useful for differentiating known failures from
348
+ * unexpected ones.
349
+ *
350
+ * @since 2.0.0
351
+ * @category Getters
352
+ */
353
+ const isDie = exports.isDie = internal.isDie;
354
+ /**
355
+ * Checks if a `Cause` contains an interruption.
356
+ *
357
+ * **Details**
358
+ *
359
+ * This function returns `true` if the `Cause` includes any fiber interruptions.
360
+ *
361
+ * @since 2.0.0
362
+ * @category Getters
363
+ */
364
+ const isInterrupted = exports.isInterrupted = internal.isInterrupted;
365
+ /**
366
+ * Checks if a `Cause` contains only interruptions.
367
+ *
368
+ * **Details**
369
+ *
370
+ * This function returns `true` if the `Cause` has been interrupted but does not
371
+ * contain any other failures, such as `Fail` or `Die`. It's helpful for
372
+ * verifying purely "cancellation" scenarios.
373
+ *
374
+ * @since 2.0.0
375
+ * @category Getters
376
+ */
377
+ const isInterruptedOnly = exports.isInterruptedOnly = internal.isInterruptedOnly;
378
+ /**
379
+ * Extracts all recoverable errors of type `E` from a `Cause`.
380
+ *
381
+ * **Details**
382
+ *
383
+ * This function returns a chunk of errors, providing a list of all `Fail`
384
+ * values found in the cause. It's useful for collecting all known failures for
385
+ * logging or combined error handling.
386
+ *
387
+ * @since 2.0.0
388
+ * @category Getters
389
+ */
390
+ const failures = exports.failures = internal.failures;
391
+ /**
392
+ * Extracts all unrecoverable defects from a `Cause`.
393
+ *
394
+ * **Details**
395
+ *
396
+ * This function returns a chunk of values representing unexpected errors
397
+ * (`Die`). It's handy for capturing or logging unanticipated failures that
398
+ * might need special handling, such as bug reports.
399
+ *
400
+ * @since 2.0.0
401
+ * @category Getters
402
+ */
403
+ const defects = exports.defects = internal.defects;
404
+ /**
405
+ * Collects all `FiberId`s responsible for interrupting a fiber.
406
+ *
407
+ * **Details**
408
+ *
409
+ * This function returns a set of IDs indicating which fibers caused
410
+ * interruptions within this `Cause`. It's useful for debugging concurrency
411
+ * issues or tracing cancellations.
412
+ *
413
+ * @since 2.0.0
414
+ * @category Getters
415
+ */
416
+ const interruptors = exports.interruptors = internal.interruptors;
417
+ /**
418
+ * Retrieves the first `Fail` error in a `Cause`, if present.
419
+ *
420
+ * **Details**
421
+ *
422
+ * This function returns an `Option` containing the first recoverable error
423
+ * (`E`) from the cause. It's often used to quickly check if there's a primary
424
+ * error to handle or display.
425
+ *
426
+ * @since 2.0.0
427
+ * @category Getters
428
+ */
429
+ const failureOption = exports.failureOption = internal.failureOption;
430
+ /**
431
+ * Splits a `Cause` into either its first `Fail` error or the rest of the cause
432
+ * (which might only contain `Die` or `Interrupt`).
433
+ *
434
+ * **Details**
435
+ *
436
+ * This function either returns the checked error (`E`) or the remaining
437
+ * `Cause<never>` with defects/interruptions. It helps you decide if there's a
438
+ * recoverable path or if only unhandled issues remain.
439
+ *
440
+ * @since 2.0.0
441
+ * @category Getters
442
+ */
443
+ const failureOrCause = exports.failureOrCause = internal.failureOrCause;
444
+ /**
445
+ * Strips out failures with an error of `None` from a `Cause<Option<E>>`.
446
+ *
447
+ * **Details**
448
+ *
449
+ * This function turns a `Cause<Option<E>>` into an `Option<Cause<E>>`. If the
450
+ * cause only contains failures of `None`, it becomes `None`; otherwise, it
451
+ * returns a `Cause` of the remaining errors. It's helpful when working with
452
+ * optional errors and filtering out certain error paths.
453
+ *
454
+ * @since 2.0.0
455
+ * @category Getters
456
+ */
457
+ const flipCauseOption = exports.flipCauseOption = internal.flipCauseOption;
458
+ /**
459
+ * Retrieves the first `Die` defect in a `Cause`, if present.
460
+ *
461
+ * **Details**
462
+ *
463
+ * This function returns an `Option` containing the first unexpected failure
464
+ * (`Die`) discovered. It's helpful for diagnosing the primary defect in a chain
465
+ * of errors.
466
+ *
467
+ * @since 2.0.0
468
+ * @category Getters
469
+ */
470
+ const dieOption = exports.dieOption = internal.dieOption;
471
+ /**
472
+ * Retrieves the first `Interrupt` in a `Cause`, if present.
473
+ *
474
+ * **Details**
475
+ *
476
+ * This function returns an `Option` with the first fiber interruption
477
+ * discovered. This is particularly useful for concurrency analysis or debugging
478
+ * cancellations.
479
+ *
480
+ * @since 2.0.0
481
+ * @category Getters
482
+ */
483
+ const interruptOption = exports.interruptOption = internal.interruptOption;
484
+ /**
485
+ * Removes all `Fail` and `Interrupt` nodes, keeping only defects (`Die`) in a
486
+ * `Cause`.
487
+ *
488
+ * **Details**
489
+ *
490
+ * This function strips a cause of recoverable errors and interruptions, leaving
491
+ * only unexpected failures. If no defects remain, it returns `None`. It's
492
+ * valuable for focusing only on unanticipated problems when both known errors
493
+ * and defects could occur.
494
+ *
495
+ * @since 2.0.0
496
+ * @category Getters
497
+ */
498
+ const keepDefects = exports.keepDefects = internal.keepDefects;
499
+ // TODO(4.0): remove? what's the point of this API?
500
+ /**
501
+ * Linearizes a `Cause` into a set of parallel causes, each containing a
502
+ * sequential chain of failures.
503
+ *
504
+ * **Details**
505
+ *
506
+ * This function reorganizes the cause structure so that you can analyze each
507
+ * parallel branch separately, even if they have multiple sequential errors.
508
+ *
509
+ * @since 2.0.0
510
+ * @category Getters
511
+ */
512
+ const linearize = exports.linearize = internal.linearize;
513
+ /**
514
+ * Removes `Fail` and `Interrupt` nodes from a `Cause`, keeping only defects
515
+ * (`Die`).
516
+ *
517
+ * **Details**
518
+ *
519
+ * This function is similar to `keepDefects` but returns a `Cause<never>`
520
+ * directly, which can still store `Die` or finalizer-related defects. It's
521
+ * helpful for analyzing only the irrecoverable portion of the error.
522
+ *
523
+ * @since 2.0.0
524
+ * @category Getters
525
+ */
526
+ const stripFailures = exports.stripFailures = internal.stripFailures;
527
+ /**
528
+ * Removes matching defects from a `Cause` using a partial function, returning
529
+ * the remainder.
530
+ *
531
+ * **Details**
532
+ *
533
+ * This function applies a user-defined extraction function to each defect
534
+ * (`Die`). If the function matches the defect, that defect is removed. If all
535
+ * defects match, the result is `None`. Otherwise, you get a `Cause` with the
536
+ * unmatched defects.
537
+ *
538
+ * @since 2.0.0
539
+ * @category Getters
540
+ */
541
+ const stripSomeDefects = exports.stripSomeDefects = internal.stripSomeDefects;
542
+ /**
543
+ * Replaces any errors in a `Cause` with a provided constant error.
544
+ *
545
+ * **Details**
546
+ *
547
+ * This function transforms all `Fail` errors into the specified error value,
548
+ * preserving the structure of the `Cause`. It's useful when you no longer need
549
+ * the original error details but still want to keep the cause shape.
550
+ *
551
+ * @see {@link map} Apply a custom transformation to `Fail` errors
552
+ *
553
+ * @since 2.0.0
554
+ * @category Mapping
555
+ */
556
+ const as = exports.as = internal.as;
557
+ /**
558
+ * Transforms the errors in a `Cause` using a user-provided function.
559
+ *
560
+ * **Details**
561
+ *
562
+ * This function applies `f` to each `Fail` error while leaving defects (`Die`)
563
+ * and interruptions untouched. It's useful for changing or simplifying error
564
+ * types in your effectful workflows.
565
+ *
566
+ * @see {@link as} Replace errors with a single constant
567
+ *
568
+ * @since 2.0.0
569
+ * @category Mapping
570
+ */
571
+ const map = exports.map = internal.map;
572
+ /**
573
+ * Transforms errors in a `Cause` into new causes.
574
+ *
575
+ * **Details**
576
+ *
577
+ * This function applies a function `f` to each `Fail` error, converting it into
578
+ * a new `Cause`. This is especially powerful for merging or restructuring error
579
+ * types while preserving or combining cause information.
580
+ *
581
+ * @see {@link map} Apply a simpler transformation to errors
582
+ *
583
+ * @since 2.0.0
584
+ * @category Sequencing
585
+ */
586
+ const flatMap = exports.flatMap = internal.flatMap;
587
+ /**
588
+ * Sequences two `Cause`s. The second `Cause` can be dependent on the result of
589
+ * the first `Cause`.
590
+ *
591
+ * @since 2.0.0
592
+ * @category Sequencing
593
+ */
594
+ const andThen = exports.andThen = internal.andThen;
595
+ /**
596
+ * Flattens a nested `Cause` structure.
597
+ *
598
+ * **Details**
599
+ *
600
+ * This function takes a `Cause<Cause<E>>` and merges the layers into a single
601
+ * `Cause<E>`. It's useful for eliminating additional nesting created by
602
+ * repeated transformations or compositions.
603
+ *
604
+ * @see {@link flatMap} Compose nested causes
605
+ *
606
+ * @since 2.0.0
607
+ * @category Sequencing
608
+ */
609
+ const flatten = exports.flatten = internal.flatten;
610
+ /**
611
+ * Checks if the current `Cause` contains or is equal to another `Cause`.
612
+ *
613
+ * **Details**
614
+ *
615
+ * This function returns `true` if `that` cause is part of or the same as
616
+ * the current `Cause`. It's useful when you need to check for specific
617
+ * error patterns or deduplicate repeated failures.
618
+ *
619
+ * @since 2.0.0
620
+ * @category Elements
621
+ */
622
+ const contains = exports.contains = internal.contains;
623
+ /**
624
+ * Extracts the most "important" defect from a `Cause`.
625
+ *
626
+ * **Details**
627
+ *
628
+ * This function reduces a `Cause` to a single, prioritized defect. It evaluates
629
+ * the `Cause` in the following order of priority:
630
+ *
631
+ * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it returns
632
+ * the raw error value.
633
+ * 2. If there is no failure, it looks for the first defect (e.g., from
634
+ * `Effect.die`).
635
+ * 3. If neither of the above is present, and the `Cause` stems from an
636
+ * interruption, it creates and returns an `InterruptedException`.
637
+ *
638
+ * This function ensures you can always extract a meaningful representation of
639
+ * the primary issue from a potentially complex `Cause` structure.
640
+ *
641
+ * **When to Use**
642
+ *
643
+ * Use this function when you need to extract the most relevant error or defect
644
+ * from a `Cause`, especially in scenarios where multiple errors or defects may
645
+ * be present. It's particularly useful for simplifying error reporting or
646
+ * logging.
647
+ *
648
+ * @see {@link squashWith} Allows transforming failures into defects when squashing.
649
+ *
650
+ * @since 2.0.0
651
+ * @category Destructors
652
+ */
653
+ const squash = exports.squash = core.causeSquash;
654
+ /**
655
+ * Extracts the most "important" defect from a `Cause`, transforming failures
656
+ * into defects using a provided function.
657
+ *
658
+ * **Details**
659
+ *
660
+ * This function reduces a `Cause` to a single, prioritized defect, while
661
+ * allowing you to transform recoverable failures into defects through a custom
662
+ * function. It processes the `Cause` in the following order:
663
+ *
664
+ * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it applies
665
+ * the provided function `f` to the error to transform it into a defect.
666
+ * 2. If there is no failure, it looks for the first defect (e.g., from
667
+ * `Effect.die`) and returns it.
668
+ * 3. If neither is present and the `Cause` stems from an interruption, it
669
+ * returns an `InterruptedException`.
670
+ *
671
+ * This function is particularly useful when you need custom handling or
672
+ * transformation of errors while processing a `Cause`.
673
+ *
674
+ * @see {@link squash} Extracts the most "important" defect without transforming failures.
675
+ *
676
+ * @since 2.0.0
677
+ * @category Destructors
678
+ */
679
+ const squashWith = exports.squashWith = core.causeSquashWith;
680
+ /**
681
+ * Searches a `Cause` using a partial function to extract information.
682
+ *
683
+ * **Details**
684
+ *
685
+ * This function allows you to search through a `Cause` using a custom partial
686
+ * function. The partial function is applied to the `Cause`, and if it matches,
687
+ * the result is returned wrapped in a `Some`. If no match is found, the result
688
+ * is `None`.
689
+ *
690
+ * This is particularly useful when you are only interested in specific types of
691
+ * errors, defects, or interruption causes within a potentially complex `Cause`
692
+ * structure. By leveraging a partial function, you can focus on extracting only
693
+ * the relevant information you care about.
694
+ *
695
+ * The partial function should return an `Option` indicating whether it matched
696
+ * and the value it extracted.
697
+ *
698
+ * @since 2.0.0
699
+ * @category Elements
700
+ */
701
+ const find = exports.find = internal.find;
702
+ /**
703
+ * Preserves parts of a `Cause` that match a given predicate.
704
+ *
705
+ * **Details**
706
+ *
707
+ * This function allows you to retain only the parts of a `Cause` structure that
708
+ * match a specified predicate or refinement. Any parts of the `Cause` that do
709
+ * not match the provided condition are excluded from the result.
710
+ *
711
+ * You can use this function in two ways:
712
+ * - With a `Predicate`: A function that evaluates whether a `Cause` should be
713
+ * retained based on its value.
714
+ * - With a `Refinement`: A more specific predicate that can refine the type of
715
+ * the `Cause`.
716
+ *
717
+ * This is useful when you need to extract specific types of errors, defects, or
718
+ * interruptions from a `Cause` while discarding unrelated parts.
719
+ *
720
+ * @since 2.0.0
721
+ * @category Filtering
722
+ */
723
+ const filter = exports.filter = internal.filter;
724
+ /**
725
+ * Transforms a `Cause` into a single value using custom handlers for each
726
+ * possible case.
727
+ *
728
+ * **Details**
729
+ *
730
+ * This function processes a `Cause` by applying a set of custom handlers to
731
+ * each possible type of cause: `Empty`, `Fail`, `Die`, `Interrupt`,
732
+ * `Sequential`, and `Parallel`. The result of this function is a single value
733
+ * of type `Z`. This function allows you to define exactly how to handle each
734
+ * part of a `Cause`, whether it's a failure, defect, interruption, or a
735
+ * combination of these.
736
+ *
737
+ * The options parameter provides handlers for:
738
+ * - `onEmpty`: Handles the case where the cause is `Empty`, meaning no errors
739
+ * occurred.
740
+ * - `onFail`: Processes a failure with an error of type `E`.
741
+ * - `onDie`: Processes a defect (unexpected error).
742
+ * - `onInterrupt`: Handles a fiber interruption, providing the `FiberId` of the
743
+ * interruption.
744
+ * - `onSequential`: Combines two sequential causes into a single value of type
745
+ * `Z`.
746
+ * - `onParallel`: Combines two parallel causes into a single value of type `Z`.
747
+ *
748
+ * @since 2.0.0
749
+ * @category Matching
750
+ */
751
+ const match = exports.match = internal.match;
752
+ /**
753
+ * Combines all parts of a `Cause` into a single value by starting with an
754
+ * initial value.
755
+ *
756
+ * **Details**
757
+ *
758
+ * This function processes a `Cause` by starting with an initial value (`zero`)
759
+ * and applying a custom function (`pf`) to combine all elements of the `Cause`
760
+ * into a single result of type `Z`. The custom function determines how each
761
+ * part of the `Cause` contributes to the final result. The function can return
762
+ * an `Option` to either continue combining values or skip specific parts of the
763
+ * `Cause`.
764
+ *
765
+ * This function is useful for tasks such as:
766
+ * - Aggregating error messages from a `Cause` into a single string.
767
+ * - Summarizing the structure of a `Cause` into a simplified result.
768
+ * - Filtering or processing only specific parts of a `Cause`.
769
+ *
770
+ * The reduction proceeds in a top-down manner, visiting all nodes in the
771
+ * `Cause` structure. This gives you complete control over how each part of the
772
+ * `Cause` contributes to the final result.
773
+ *
774
+ * @since 2.0.0
775
+ * @category Reducing
776
+ */
777
+ const reduce = exports.reduce = internal.reduce;
778
+ /**
779
+ * Combines all parts of a `Cause` into a single value using a custom reducer
780
+ * and a context.
781
+ *
782
+ * **Details**
783
+ *
784
+ * This function allows you to reduce a `Cause` into a single value of type `Z`
785
+ * using a custom `CauseReducer`. A `CauseReducer` provides methods to handle
786
+ * specific parts of the `Cause`, such as failures, defects, or interruptions.
787
+ * Additionally, this function provides access to a `context` value, which can
788
+ * be used to carry information or maintain state during the reduction process.
789
+ *
790
+ * This is particularly useful when the reduction process needs additional
791
+ * context or configuration, such as:
792
+ * - Aggregating error details with dynamic formatting.
793
+ * - Collecting logs or statistics about the `Cause`.
794
+ * - Performing stateful transformations based on the `context`.
795
+ *
796
+ * @see {@link reduce} To reduce a `Cause` without additional context.
797
+ *
798
+ * @since 2.0.0
799
+ * @category Reducing
800
+ */
801
+ const reduceWithContext = exports.reduceWithContext = internal.reduceWithContext;
802
+ /**
803
+ * Creates an error that indicates a `Fiber` was interrupted.
804
+ *
805
+ * **Details**
806
+ *
807
+ * This function constructs an `InterruptedException` recognized by the Effect
808
+ * runtime. It is usually thrown or returned when a fiber's execution is
809
+ * interrupted by external events or by another fiber. This is particularly
810
+ * helpful in concurrent programs where fibers may halt each other before
811
+ * completion.
812
+ *
813
+ * @since 2.0.0
814
+ * @category Errors
815
+ */
816
+ const InterruptedException = exports.InterruptedException = core.InterruptedException;
817
+ /**
818
+ * Checks if a given unknown value is an `InterruptedException`.
819
+ *
820
+ * @since 2.0.0
821
+ * @category Guards
822
+ */
823
+ const isInterruptedException = exports.isInterruptedException = core.isInterruptedException;
824
+ /**
825
+ * Creates an error indicating an invalid method argument.
826
+ *
827
+ * **Details**
828
+ *
829
+ * This function constructs an `IllegalArgumentException`. It is typically
830
+ * thrown or returned when an operation receives improper inputs, such as
831
+ * out-of-range values or invalid object states.
832
+ *
833
+ * @since 2.0.0
834
+ * @category Errors
835
+ */
836
+ const IllegalArgumentException = exports.IllegalArgumentException = core.IllegalArgumentException;
837
+ /**
838
+ * Checks if a given unknown value is an `IllegalArgumentException`.
839
+ *
840
+ * @since 2.0.0
841
+ * @category Guards
842
+ */
843
+ const isIllegalArgumentException = exports.isIllegalArgumentException = core.isIllegalArgumentException;
844
+ /**
845
+ * Creates an error indicating a missing element.
846
+ *
847
+ * **Details**
848
+ *
849
+ * This function constructs a `NoSuchElementException`. It helps you clearly
850
+ * communicate that a required element is unavailable.
851
+ *
852
+ * @since 2.0.0
853
+ * @category Errors
854
+ */
855
+ const NoSuchElementException = exports.NoSuchElementException = core.NoSuchElementException;
856
+ /**
857
+ * Checks if a given unknown value is a `NoSuchElementException`.
858
+ *
859
+ * @since 2.0.0
860
+ * @category Guards
861
+ */
862
+ const isNoSuchElementException = exports.isNoSuchElementException = core.isNoSuchElementException;
863
+ /**
864
+ * Creates an error for general runtime errors.
865
+ *
866
+ * **Details**
867
+ *
868
+ * This function constructs a `RuntimeException`, for errors that occur at
869
+ * runtime but are not specifically typed or categorized as interruptions,
870
+ * missing elements, or invalid arguments. It helps unify a wide range of
871
+ * unexpected conditions under a single, recognizable error type.
872
+ *
873
+ * @since 2.0.0
874
+ * @category Errors
875
+ */
876
+ const RuntimeException = exports.RuntimeException = core.RuntimeException;
877
+ /**
878
+ * Checks if a given unknown value is a `RuntimeException`.
879
+ *
880
+ * @since 2.0.0
881
+ * @category Guards
882
+ */
883
+ const isRuntimeException = exports.isRuntimeException = core.isRuntimeException;
884
+ /**
885
+ * Creates an error for operations that exceed their expected time.
886
+ *
887
+ * **Details**
888
+ *
889
+ * This function constructs a `TimeoutException`. It is typically used to signal
890
+ * that an operation or fiber did not complete within a designated time limit,
891
+ * allowing you to handle slow or hanging processes.
892
+ *
893
+ * @since 2.0.0
894
+ * @category Errors
895
+ */
896
+ const TimeoutException = exports.TimeoutException = core.TimeoutException;
897
+ /**
898
+ * Checks if a given unknown value is a `TimeoutException`.
899
+ *
900
+ * @since 3.15.0
901
+ * @category Guards
902
+ */
903
+ const isTimeoutException = exports.isTimeoutException = core.isTimeoutException;
904
+ /**
905
+ * Creates an instance of `UnknownException`, an error object used to handle
906
+ * unknown errors such as those from rejected promises.
907
+ *
908
+ * **Details**
909
+ *
910
+ * This function constructs an `UnknownException` with flexible behavior for
911
+ * managing the error message and cause.
912
+ *
913
+ * The required `error` argument is passed as the `cause` to the global `Error`
914
+ * constructor, ensuring that the original cause is preserved in the error chain
915
+ * for debugging purposes. This ensures that the origin stack trace is
916
+ * preserved.
917
+ *
918
+ * The `error` argument is always stored in the `error` property of the
919
+ * `UnknownException` instance for reference, regardless of its type.
920
+ *
921
+ * Additionally, if you provide a `message` argument, it is used as the error
922
+ * message. If no `message` is provided, the error message defaults to `"An
923
+ * unknown error occurred"`.
924
+ *
925
+ * **When to Use**
926
+ *
927
+ * Use this function when you need to handle unexpected or unknown errors in
928
+ * your application, particularly when the source of the error might not provide
929
+ * a clear message. This is useful for wrapping generic errors thrown from
930
+ * promises or external APIs.
931
+ *
932
+ * @since 2.0.0
933
+ * @category Errors
934
+ */
935
+ const UnknownException = exports.UnknownException = core.UnknownException;
936
+ /**
937
+ * Checks if a given unknown value is an `UnknownException`.
938
+ *
939
+ * @since 2.0.0
940
+ * @category Guards
941
+ */
942
+ const isUnknownException = exports.isUnknownException = core.isUnknownException;
943
+ /**
944
+ * Creates an error indicating resource capacity has been exceeded.
945
+ *
946
+ * **Details**
947
+ *
948
+ * This function constructs an `ExceededCapacityException`, signifying that an
949
+ * operation or resource usage surpassed established limits. This can be
950
+ * essential for concurrency or resource management situations, ensuring your
951
+ * application doesn't go beyond acceptable thresholds.
952
+ *
953
+ * @since 3.5.0
954
+ * @category Errors
955
+ */
956
+ const ExceededCapacityException = exports.ExceededCapacityException = core.ExceededCapacityException;
957
+ /**
958
+ * Checks if a given unknown value is an `ExceededCapacityException`.
959
+ *
960
+ * @since 3.5.0
961
+ * @category Guards
962
+ */
963
+ const isExceededCapacityException = exports.isExceededCapacityException = core.isExceededCapacityException;
964
+ /**
965
+ * Converts a `Cause` into a human-readable string.
966
+ *
967
+ * **Details**
968
+ *
969
+ * This function pretty-prints the entire `Cause`, including any failures,
970
+ * defects, and interruptions. It can be especially helpful for logging,
971
+ * debugging, or displaying structured errors to users.
972
+ *
973
+ * You can optionally pass `options` to configure how the error cause is
974
+ * rendered. By default, it includes essential details of all errors in the
975
+ * `Cause`.
976
+ *
977
+ * @see {@link prettyErrors} Get a list of `PrettyError` objects instead of a single string.
978
+ *
979
+ * @since 2.0.0
980
+ * @category Formatting
981
+ */
982
+ const pretty = exports.pretty = internal.pretty;
983
+ /**
984
+ * Returns a list of prettified errors (`PrettyError`) from a `Cause`.
985
+ *
986
+ * **Details**
987
+ *
988
+ * This function inspects the entire `Cause` and produces an array of
989
+ * `PrettyError` objects. Each object may include additional metadata, such as a
990
+ * `Span`, to provide deeper insights into where and how the error occurred.
991
+ *
992
+ * @since 3.2.0
993
+ * @category Formatting
994
+ */
995
+ const prettyErrors = exports.prettyErrors = internal.prettyErrors;
996
+ /**
997
+ * Retrieves the original, unproxied error instance from an error object.
998
+ *
999
+ * **Details**
1000
+ *
1001
+ * This function returns the underlying error object without any
1002
+ * library-specific wrapping or proxying that might occur during error handling.
1003
+ * This can be essential if you need direct access to the error's native
1004
+ * properties, such as stack traces or custom data fields, for detailed
1005
+ * debugging or integration with external systems.
1006
+ *
1007
+ * @since 2.0.0
1008
+ * @category Errors
1009
+ */
1010
+ const originalError = exports.originalError = core.originalInstance;
1011
+ //# sourceMappingURL=Cause.js.map
backend/node_modules/effect/dist/cjs/Cause.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Cause.js","names":["internal","_interopRequireWildcard","require","core","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CauseTypeId","exports","RuntimeExceptionTypeId","InterruptedExceptionTypeId","IllegalArgumentExceptionTypeId","NoSuchElementExceptionTypeId","InvalidPubSubCapacityExceptionTypeId","ExceededCapacityExceptionTypeId","TimeoutExceptionTypeId","UnknownExceptionTypeId","YieldableError","empty","fail","die","interrupt","parallel","sequential","isCause","isEmptyType","isFailType","isDieType","isInterruptType","isSequentialType","isParallelType","size","isEmpty","isFailure","isDie","isInterrupted","isInterruptedOnly","failures","defects","interruptors","failureOption","failureOrCause","flipCauseOption","dieOption","interruptOption","keepDefects","linearize","stripFailures","stripSomeDefects","as","map","flatMap","andThen","flatten","contains","squash","causeSquash","squashWith","causeSquashWith","find","filter","match","reduce","reduceWithContext","InterruptedException","isInterruptedException","IllegalArgumentException","isIllegalArgumentException","NoSuchElementException","isNoSuchElementException","RuntimeException","isRuntimeException","TimeoutException","isTimeoutException","UnknownException","isUnknownException","ExceededCapacityException","isExceededCapacityException","pretty","prettyErrors","originalError","originalInstance"],"sources":["../../src/Cause.ts"],"sourcesContent":[null],"mappings":";;;;;;AA+BA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA0C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toSink = exports.toQueue = exports.toPullIn = exports.toPull = exports.toPubSub = exports.sync = exports.suspend = exports.succeed = exports.splitLines = exports.scopedWith = exports.scoped = exports.runScoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.readWithCause = exports.readWith = exports.readOrFail = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.provideContext = exports.pipeToOrFail = exports.pipeTo = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapInputInEffect = exports.mapInputIn = exports.mapInputErrorEffect = exports.mapInputError = exports.mapInputEffect = exports.mapInputContext = exports.mapInput = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.isChannel = exports.interruptWhenDeferred = exports.interruptWhen = exports.identity = exports.fromQueue = exports.fromPubSubScoped = exports.fromPubSub = exports.fromOption = exports.fromInput = exports.fromEither = exports.fromEffect = exports.foldChannel = exports.foldCauseChannel = exports.flatten = exports.flatMap = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.ensuringWith = exports.ensuring = exports.emitCollect = exports.embedInput = exports.drain = exports.doneCollect = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMapWithCustom = exports.concatMapWith = exports.concatMap = exports.concatAllWith = exports.concatAll = exports.collect = exports.catchAllCause = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asVoid = exports.as = exports.acquireUseRelease = exports.acquireReleaseOut = exports.ChannelTypeId = exports.ChannelExceptionTypeId = exports.ChannelException = void 0;
7
+ exports.zipRight = exports.zipLeft = exports.zip = exports.writeChunk = exports.writeAll = exports.write = exports.withSpan = exports.void = exports.updateService = exports.unwrapScopedWith = exports.unwrapScoped = exports.unwrap = exports.toStream = void 0;
8
+ var channel = _interopRequireWildcard(require("./internal/channel.js"));
9
+ var core = _interopRequireWildcard(require("./internal/core-stream.js"));
10
+ var sink = _interopRequireWildcard(require("./internal/sink.js"));
11
+ var stream = _interopRequireWildcard(require("./internal/stream.js"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * @since 2.0.0
15
+ * @category symbols
16
+ */
17
+ const ChannelTypeId = exports.ChannelTypeId = core.ChannelTypeId;
18
+ /**
19
+ * @since 2.0.0
20
+ * @category symbols
21
+ */
22
+ const ChannelExceptionTypeId = exports.ChannelExceptionTypeId = channel.ChannelExceptionTypeId;
23
+ /**
24
+ * @since 3.5.4
25
+ * @category refinements
26
+ */
27
+ const isChannel = exports.isChannel = core.isChannel;
28
+ /**
29
+ * @since 2.0.0
30
+ * @category constructors
31
+ */
32
+ const acquireUseRelease = exports.acquireUseRelease = channel.acquireUseRelease;
33
+ /**
34
+ * @since 2.0.0
35
+ * @category constructors
36
+ */
37
+ const acquireReleaseOut = exports.acquireReleaseOut = core.acquireReleaseOut;
38
+ /**
39
+ * Returns a new channel that is the same as this one, except the terminal
40
+ * value of the channel is the specified constant value.
41
+ *
42
+ * This method produces the same result as mapping this channel to the
43
+ * specified constant value.
44
+ *
45
+ * @since 2.0.0
46
+ * @category mapping
47
+ */
48
+ const as = exports.as = channel.as;
49
+ /**
50
+ * @since 2.0.0
51
+ * @category mapping
52
+ */
53
+ const asVoid = exports.asVoid = channel.asVoid;
54
+ /**
55
+ * Creates a channel backed by a buffer. When the buffer is empty, the channel
56
+ * will simply passthrough its input as output. However, when the buffer is
57
+ * non-empty, the value inside the buffer will be passed along as output.
58
+ *
59
+ * @since 2.0.0
60
+ * @category constructors
61
+ */
62
+ const buffer = exports.buffer = channel.buffer;
63
+ /**
64
+ * @since 2.0.0
65
+ * @category constructors
66
+ */
67
+ const bufferChunk = exports.bufferChunk = channel.bufferChunk;
68
+ /**
69
+ * Returns a new channel that is the same as this one, except if this channel
70
+ * errors for any typed error, then the returned channel will switch over to
71
+ * using the fallback channel returned by the specified error handler.
72
+ *
73
+ * @since 2.0.0
74
+ * @category error handling
75
+ */
76
+ const catchAll = exports.catchAll = channel.catchAll;
77
+ /**
78
+ * Returns a new channel that is the same as this one, except if this channel
79
+ * errors for any typed error, then the returned channel will switch over to
80
+ * using the fallback channel returned by the specified error handler.
81
+ *
82
+ * @since 2.0.0
83
+ * @category error handling
84
+ */
85
+ const catchAllCause = exports.catchAllCause = core.catchAllCause;
86
+ /**
87
+ * Concat sequentially a channel of channels.
88
+ *
89
+ * @since 2.0.0
90
+ * @category constructors
91
+ */
92
+ const concatAll = exports.concatAll = core.concatAll;
93
+ /**
94
+ * Concat sequentially a channel of channels.
95
+ *
96
+ * @since 2.0.0
97
+ * @category constructors
98
+ */
99
+ const concatAllWith = exports.concatAllWith = core.concatAllWith;
100
+ /**
101
+ * Returns a new channel whose outputs are fed to the specified factory
102
+ * function, which creates new channels in response. These new channels are
103
+ * sequentially concatenated together, and all their outputs appear as outputs
104
+ * of the newly returned channel.
105
+ *
106
+ * @since 2.0.0
107
+ * @category utils
108
+ */
109
+ const concatMap = exports.concatMap = channel.concatMap;
110
+ /**
111
+ * Returns a new channel whose outputs are fed to the specified factory
112
+ * function, which creates new channels in response. These new channels are
113
+ * sequentially concatenated together, and all their outputs appear as outputs
114
+ * of the newly returned channel. The provided merging function is used to
115
+ * merge the terminal values of all channels into the single terminal value of
116
+ * the returned channel.
117
+ *
118
+ * @since 2.0.0
119
+ * @category utils
120
+ */
121
+ const concatMapWith = exports.concatMapWith = core.concatMapWith;
122
+ /**
123
+ * Returns a new channel whose outputs are fed to the specified factory
124
+ * function, which creates new channels in response. These new channels are
125
+ * sequentially concatenated together, and all their outputs appear as outputs
126
+ * of the newly returned channel. The provided merging function is used to
127
+ * merge the terminal values of all channels into the single terminal value of
128
+ * the returned channel.
129
+ *
130
+ * @since 2.0.0
131
+ * @category utils
132
+ */
133
+ const concatMapWithCustom = exports.concatMapWithCustom = core.concatMapWithCustom;
134
+ /**
135
+ * Returns a new channel, which is the same as this one, except its outputs
136
+ * are filtered and transformed by the specified partial function.
137
+ *
138
+ * @since 2.0.0
139
+ * @category utils
140
+ */
141
+ const collect = exports.collect = channel.collect;
142
+ /**
143
+ * Returns a new channel, which is the concatenation of all the channels that
144
+ * are written out by this channel. This method may only be called on channels
145
+ * that output other channels.
146
+ *
147
+ * @since 2.0.0
148
+ * @category utils
149
+ */
150
+ const concatOut = exports.concatOut = channel.concatOut;
151
+ /**
152
+ * Returns a new channel which is the same as this one but applies the given
153
+ * function to the input channel's done value.
154
+ *
155
+ * @since 2.0.0
156
+ * @category utils
157
+ */
158
+ const mapInput = exports.mapInput = channel.mapInput;
159
+ /**
160
+ * Returns a new channel which is the same as this one but applies the given
161
+ * effectual function to the input channel's done value.
162
+ *
163
+ * @since 2.0.0
164
+ * @category utils
165
+ */
166
+ const mapInputEffect = exports.mapInputEffect = channel.mapInputEffect;
167
+ /**
168
+ * Returns a new channel which is the same as this one but applies the given
169
+ * function to the input channel's error value.
170
+ *
171
+ * @since 2.0.0
172
+ * @category utils
173
+ */
174
+ const mapInputError = exports.mapInputError = channel.mapInputError;
175
+ /**
176
+ * Returns a new channel which is the same as this one but applies the given
177
+ * effectual function to the input channel's error value.
178
+ *
179
+ * @since 2.0.0
180
+ * @category utils
181
+ */
182
+ const mapInputErrorEffect = exports.mapInputErrorEffect = channel.mapInputErrorEffect;
183
+ /**
184
+ * Returns a new channel which is the same as this one but applies the given
185
+ * function to the input channel's output elements.
186
+ *
187
+ * @since 2.0.0
188
+ * @category utils
189
+ */
190
+ const mapInputIn = exports.mapInputIn = channel.mapInputIn;
191
+ /**
192
+ * Returns a new channel which is the same as this one but applies the given
193
+ * effectual function to the input channel's output elements.
194
+ *
195
+ * @since 2.0.0
196
+ * @category utils
197
+ */
198
+ const mapInputInEffect = exports.mapInputInEffect = channel.mapInputInEffect;
199
+ /**
200
+ * Returns a new channel, which is the same as this one, except that all the
201
+ * outputs are collected and bundled into a tuple together with the terminal
202
+ * value of this channel.
203
+ *
204
+ * As the channel returned from this channel collects all of this channel's
205
+ * output into an in- memory chunk, it is not safe to call this method on
206
+ * channels that output a large or unbounded number of values.
207
+ *
208
+ * @since 2.0.0
209
+ * @category utils
210
+ */
211
+ const doneCollect = exports.doneCollect = channel.doneCollect;
212
+ /**
213
+ * Returns a new channel which reads all the elements from upstream's output
214
+ * channel and ignores them, then terminates with the upstream result value.
215
+ *
216
+ * @since 2.0.0
217
+ * @category utils
218
+ */
219
+ const drain = exports.drain = channel.drain;
220
+ /**
221
+ * Returns a new channel which connects the given `AsyncInputProducer` as
222
+ * this channel's input.
223
+ *
224
+ * @since 2.0.0
225
+ * @category utils
226
+ */
227
+ const embedInput = exports.embedInput = core.embedInput;
228
+ /**
229
+ * Returns a new channel that collects the output and terminal value of this
230
+ * channel, which it then writes as output of the returned channel.
231
+ *
232
+ * @since 2.0.0
233
+ * @category utils
234
+ */
235
+ const emitCollect = exports.emitCollect = channel.emitCollect;
236
+ /**
237
+ * Returns a new channel with an attached finalizer. The finalizer is
238
+ * guaranteed to be executed so long as the channel begins execution (and
239
+ * regardless of whether or not it completes).
240
+ *
241
+ * @since 2.0.0
242
+ * @category utils
243
+ */
244
+ const ensuring = exports.ensuring = channel.ensuring;
245
+ /**
246
+ * Returns a new channel with an attached finalizer. The finalizer is
247
+ * guaranteed to be executed so long as the channel begins execution (and
248
+ * regardless of whether or not it completes).
249
+ *
250
+ * @since 2.0.0
251
+ * @category utils
252
+ */
253
+ const ensuringWith = exports.ensuringWith = core.ensuringWith;
254
+ /**
255
+ * Accesses the whole context of the channel.
256
+ *
257
+ * @since 2.0.0
258
+ * @category context
259
+ */
260
+ const context = exports.context = channel.context;
261
+ /**
262
+ * Accesses the context of the channel with the specified function.
263
+ *
264
+ * @since 2.0.0
265
+ * @category context
266
+ */
267
+ const contextWith = exports.contextWith = channel.contextWith;
268
+ /**
269
+ * Accesses the context of the channel in the context of a channel.
270
+ *
271
+ * @since 2.0.0
272
+ * @category context
273
+ */
274
+ const contextWithChannel = exports.contextWithChannel = channel.contextWithChannel;
275
+ /**
276
+ * Accesses the context of the channel in the context of an effect.
277
+ *
278
+ * @since 2.0.0
279
+ * @category context
280
+ */
281
+ const contextWithEffect = exports.contextWithEffect = channel.contextWithEffect;
282
+ /**
283
+ * Constructs a channel that fails immediately with the specified error.
284
+ *
285
+ * @since 2.0.0
286
+ * @category constructors
287
+ */
288
+ const fail = exports.fail = core.fail;
289
+ /**
290
+ * Constructs a channel that succeeds immediately with the specified lazily
291
+ * evaluated value.
292
+ *
293
+ * @since 2.0.0
294
+ * @category constructors
295
+ */
296
+ const failSync = exports.failSync = core.failSync;
297
+ /**
298
+ * Constructs a channel that fails immediately with the specified `Cause`.
299
+ *
300
+ * @since 2.0.0
301
+ * @category constructors
302
+ */
303
+ const failCause = exports.failCause = core.failCause;
304
+ /**
305
+ * Constructs a channel that succeeds immediately with the specified lazily
306
+ * evaluated `Cause`.
307
+ *
308
+ * @since 2.0.0
309
+ * @category constructors
310
+ */
311
+ const failCauseSync = exports.failCauseSync = core.failCauseSync;
312
+ /**
313
+ * Returns a new channel, which sequentially combines this channel, together
314
+ * with the provided factory function, which creates a second channel based on
315
+ * the terminal value of this channel. The result is a channel that will first
316
+ * perform the functions of this channel, before performing the functions of
317
+ * the created channel (including yielding its terminal value).
318
+ *
319
+ * @since 2.0.0
320
+ * @category sequencing
321
+ */
322
+ const flatMap = exports.flatMap = core.flatMap;
323
+ /**
324
+ * Returns a new channel, which flattens the terminal value of this channel.
325
+ * This function may only be called if the terminal value of this channel is
326
+ * another channel of compatible types.
327
+ *
328
+ * @since 2.0.0
329
+ * @category sequencing
330
+ */
331
+ const flatten = exports.flatten = channel.flatten;
332
+ /**
333
+ * Folds over the result of this channel.
334
+ *
335
+ * @since 2.0.0
336
+ * @category utils
337
+ */
338
+ const foldChannel = exports.foldChannel = channel.foldChannel;
339
+ /**
340
+ * Folds over the result of this channel including any cause of termination.
341
+ *
342
+ * @since 2.0.0
343
+ * @category utils
344
+ */
345
+ const foldCauseChannel = exports.foldCauseChannel = core.foldCauseChannel;
346
+ /**
347
+ * Use an effect to end a channel.
348
+ *
349
+ * @since 2.0.0
350
+ * @category constructors
351
+ */
352
+ const fromEffect = exports.fromEffect = core.fromEffect;
353
+ /**
354
+ * Constructs a channel from an `Either`.
355
+ *
356
+ * @since 2.0.0
357
+ * @category constructors
358
+ */
359
+ const fromEither = exports.fromEither = channel.fromEither;
360
+ /**
361
+ * Construct a `Channel` from an `AsyncInputConsumer`.
362
+ *
363
+ * @since 2.0.0
364
+ * @category constructors
365
+ */
366
+ const fromInput = exports.fromInput = channel.fromInput;
367
+ /**
368
+ * Construct a `Channel` from a `PubSub`.
369
+ *
370
+ * @since 2.0.0
371
+ * @category constructors
372
+ */
373
+ const fromPubSub = exports.fromPubSub = channel.fromPubSub;
374
+ /**
375
+ * Construct a `Channel` from a `PubSub` within a scoped effect.
376
+ *
377
+ * @since 2.0.0
378
+ * @category constructors
379
+ */
380
+ const fromPubSubScoped = exports.fromPubSubScoped = channel.fromPubSubScoped;
381
+ /**
382
+ * Construct a `Channel` from an `Option`.
383
+ *
384
+ * @since 2.0.0
385
+ * @category constructors
386
+ */
387
+ const fromOption = exports.fromOption = channel.fromOption;
388
+ /**
389
+ * Construct a `Channel` from a `Queue`.
390
+ *
391
+ * @since 2.0.0
392
+ * @category constructors
393
+ */
394
+ const fromQueue = exports.fromQueue = channel.fromQueue;
395
+ /**
396
+ * @since 2.0.0
397
+ * @category constructors
398
+ */
399
+ const identity = exports.identity = channel.identityChannel;
400
+ /**
401
+ * Returns a new channel, which is the same as this one, except it will be
402
+ * interrupted when the specified effect completes. If the effect completes
403
+ * successfully before the underlying channel is done, then the returned
404
+ * channel will yield the success value of the effect as its terminal value.
405
+ * On the other hand, if the underlying channel finishes first, then the
406
+ * returned channel will yield the success value of the underlying channel as
407
+ * its terminal value.
408
+ *
409
+ * @since 2.0.0
410
+ * @category utils
411
+ */
412
+ const interruptWhen = exports.interruptWhen = channel.interruptWhen;
413
+ /**
414
+ * Returns a new channel, which is the same as this one, except it will be
415
+ * interrupted when the specified deferred is completed. If the deferred is
416
+ * completed before the underlying channel is done, then the returned channel
417
+ * will yield the value of the deferred. Otherwise, if the underlying channel
418
+ * finishes first, then the returned channel will yield the value of the
419
+ * underlying channel.
420
+ *
421
+ * @since 2.0.0
422
+ * @category utils
423
+ */
424
+ const interruptWhenDeferred = exports.interruptWhenDeferred = channel.interruptWhenDeferred;
425
+ /**
426
+ * Returns a new channel, which is the same as this one, except the terminal
427
+ * value of the returned channel is created by applying the specified function
428
+ * to the terminal value of this channel.
429
+ *
430
+ * @since 2.0.0
431
+ * @category mapping
432
+ */
433
+ const map = exports.map = channel.map;
434
+ /**
435
+ * Returns a new channel, which is the same as this one, except the terminal
436
+ * value of the returned channel is created by applying the specified
437
+ * effectful function to the terminal value of this channel.
438
+ *
439
+ * @since 2.0.0
440
+ * @category mapping
441
+ */
442
+ const mapEffect = exports.mapEffect = channel.mapEffect;
443
+ /**
444
+ * Returns a new channel, which is the same as this one, except the failure
445
+ * value of the returned channel is created by applying the specified function
446
+ * to the failure value of this channel.
447
+ *
448
+ * @since 2.0.0
449
+ * @category mapping
450
+ */
451
+ const mapError = exports.mapError = channel.mapError;
452
+ /**
453
+ * A more powerful version of `mapError` which also surfaces the `Cause`
454
+ * of the channel failure.
455
+ *
456
+ * @since 2.0.0
457
+ * @category mapping
458
+ */
459
+ const mapErrorCause = exports.mapErrorCause = channel.mapErrorCause;
460
+ /**
461
+ * Maps the output of this channel using the specified function.
462
+ *
463
+ * @since 2.0.0
464
+ * @category mapping
465
+ */
466
+ const mapOut = exports.mapOut = channel.mapOut;
467
+ /**
468
+ * Creates a channel that is like this channel but the given effectful function
469
+ * gets applied to each emitted output element.
470
+ *
471
+ * @since 2.0.0
472
+ * @category mapping
473
+ */
474
+ const mapOutEffect = exports.mapOutEffect = channel.mapOutEffect;
475
+ /**
476
+ * Creates a channel that is like this channel but the given Effect function gets
477
+ * applied to each emitted output element, taking `n` elements at once and
478
+ * mapping them in parallel.
479
+ *
480
+ * @since 2.0.0
481
+ * @category mapping
482
+ */
483
+ const mapOutEffectPar = exports.mapOutEffectPar = channel.mapOutEffectPar;
484
+ /**
485
+ * @since 2.0.0
486
+ * @category utils
487
+ */
488
+ const mergeAll = exports.mergeAll = channel.mergeAll;
489
+ /**
490
+ * @since 2.0.0
491
+ * @category utils
492
+ */
493
+ const mergeAllUnbounded = exports.mergeAllUnbounded = channel.mergeAllUnbounded;
494
+ /**
495
+ * @since 2.0.0
496
+ * @category utils
497
+ */
498
+ const mergeAllUnboundedWith = exports.mergeAllUnboundedWith = channel.mergeAllUnboundedWith;
499
+ /**
500
+ * @since 2.0.0
501
+ * @category utils
502
+ */
503
+ const mergeAllWith = exports.mergeAllWith = channel.mergeAllWith;
504
+ /**
505
+ * Returns a new channel which creates a new channel for each emitted element
506
+ * and merges some of them together. Different merge strategies control what
507
+ * happens if there are more than the given maximum number of channels gets
508
+ * created. See `Channel.mergeAll`.
509
+ *
510
+ * @since 2.0.0
511
+ * @category mapping
512
+ */
513
+ const mergeMap = exports.mergeMap = channel.mergeMap;
514
+ /**
515
+ * Returns a new channel which merges a number of channels emitted by this
516
+ * channel using the back pressuring merge strategy. See `Channel.mergeAll`.
517
+ *
518
+ * @since 2.0.0
519
+ * @category utils
520
+ */
521
+ const mergeOut = exports.mergeOut = channel.mergeOut;
522
+ /**
523
+ * Returns a new channel which merges a number of channels emitted by this
524
+ * channel using the back pressuring merge strategy and uses a given function
525
+ * to merge each completed subchannel's result value. See
526
+ * `Channel.mergeAll`.
527
+ *
528
+ * @since 2.0.0
529
+ * @category utils
530
+ */
531
+ const mergeOutWith = exports.mergeOutWith = channel.mergeOutWith;
532
+ /**
533
+ * Returns a new channel, which is the merge of this channel and the specified
534
+ * channel, where the behavior of the returned channel on left or right early
535
+ * termination is decided by the specified `leftDone` and `rightDone` merge
536
+ * decisions.
537
+ *
538
+ * @since 2.0.0
539
+ * @category utils
540
+ */
541
+ const mergeWith = exports.mergeWith = channel.mergeWith;
542
+ /**
543
+ * Returns a channel that never completes
544
+ *
545
+ * @since 2.0.0
546
+ * @category constructors
547
+ */
548
+ const never = exports.never = channel.never;
549
+ /**
550
+ * Translates channel failure into death of the fiber, making all failures
551
+ * unchecked and not a part of the type of the channel.
552
+ *
553
+ * @since 2.0.0
554
+ * @category error handling
555
+ */
556
+ const orDie = exports.orDie = channel.orDie;
557
+ /**
558
+ * Keeps none of the errors, and terminates the fiber with them, using the
559
+ * specified function to convert the `OutErr` into a defect.
560
+ *
561
+ * @since 2.0.0
562
+ * @category error handling
563
+ */
564
+ const orDieWith = exports.orDieWith = channel.orDieWith;
565
+ /**
566
+ * Returns a new channel that will perform the operations of this one, until
567
+ * failure, and then it will switch over to the operations of the specified
568
+ * fallback channel.
569
+ *
570
+ * @since 2.0.0
571
+ * @category error handling
572
+ */
573
+ const orElse = exports.orElse = channel.orElse;
574
+ /**
575
+ * Returns a new channel that pipes the output of this channel into the
576
+ * specified channel. The returned channel has the input type of this channel,
577
+ * and the output type of the specified channel, terminating with the value of
578
+ * the specified channel.
579
+ *
580
+ * @since 2.0.0
581
+ * @category utils
582
+ */
583
+ const pipeTo = exports.pipeTo = core.pipeTo;
584
+ /**
585
+ * Returns a new channel that pipes the output of this channel into the
586
+ * specified channel and preserves this channel's failures without providing
587
+ * them to the other channel for observation.
588
+ *
589
+ * @since 2.0.0
590
+ * @category utils
591
+ */
592
+ const pipeToOrFail = exports.pipeToOrFail = channel.pipeToOrFail;
593
+ /**
594
+ * Provides the channel with its required context, which eliminates its
595
+ * dependency on `Env`.
596
+ *
597
+ * @since 2.0.0
598
+ * @category context
599
+ */
600
+ const provideContext = exports.provideContext = core.provideContext;
601
+ /**
602
+ * Provides a layer to the channel, which translates it to another level.
603
+ *
604
+ * @since 2.0.0
605
+ * @category context
606
+ */
607
+ const provideLayer = exports.provideLayer = channel.provideLayer;
608
+ /**
609
+ * Transforms the context being provided to the channel with the specified
610
+ * function.
611
+ *
612
+ * @since 2.0.0
613
+ * @category context
614
+ */
615
+ const mapInputContext = exports.mapInputContext = channel.mapInputContext;
616
+ /**
617
+ * Splits the context into two parts, providing one part using the
618
+ * specified layer and leaving the remainder `Env0`.
619
+ *
620
+ * @since 2.0.0
621
+ * @category context
622
+ */
623
+ const provideSomeLayer = exports.provideSomeLayer = channel.provideSomeLayer;
624
+ /**
625
+ * Provides the effect with the single service it requires. If the effect
626
+ * requires more than one service use `provideContext` instead.
627
+ *
628
+ * @since 2.0.0
629
+ * @category context
630
+ */
631
+ const provideService = exports.provideService = channel.provideService;
632
+ /**
633
+ * @since 2.0.0
634
+ * @category constructors
635
+ */
636
+ const read = exports.read = channel.read;
637
+ /**
638
+ * @since 2.0.0
639
+ * @category constructors
640
+ */
641
+ const readOrFail = exports.readOrFail = core.readOrFail;
642
+ /**
643
+ * @since 2.0.0
644
+ * @category constructors
645
+ */
646
+ const readWith = exports.readWith = core.readWith;
647
+ /**
648
+ * @since 2.0.0
649
+ * @category constructors
650
+ */
651
+ const readWithCause = exports.readWithCause = core.readWithCause;
652
+ /**
653
+ * Creates a channel which repeatedly runs this channel.
654
+ *
655
+ * @since 2.0.0
656
+ * @category utils
657
+ */
658
+ const repeated = exports.repeated = channel.repeated;
659
+ /**
660
+ * Runs a channel until the end is received.
661
+ *
662
+ * @since 2.0.0
663
+ * @category destructors
664
+ */
665
+ const run = exports.run = channel.run;
666
+ /**
667
+ * Run the channel until it finishes with a done value or fails with an error
668
+ * and collects its emitted output elements.
669
+ *
670
+ * The channel must not read any input.
671
+ *
672
+ * @since 2.0.0
673
+ * @category destructors
674
+ */
675
+ const runCollect = exports.runCollect = channel.runCollect;
676
+ /**
677
+ * Runs a channel until the end is received.
678
+ *
679
+ * @since 2.0.0
680
+ * @category destructors
681
+ */
682
+ const runDrain = exports.runDrain = channel.runDrain;
683
+ /**
684
+ * Run the channel until it finishes with a done value or fails with an error.
685
+ * The channel must not read any input or write any output.
686
+ *
687
+ * Closing the channel, which includes execution of all the finalizers
688
+ * attached to the channel will be added to the current scope as a finalizer.
689
+ *
690
+ * @since 3.11.0
691
+ * @category destructors
692
+ */
693
+ const runScoped = exports.runScoped = channel.runScoped;
694
+ /**
695
+ * Use a scoped effect to emit an output element.
696
+ *
697
+ * @since 2.0.0
698
+ * @category constructors
699
+ */
700
+ const scoped = exports.scoped = channel.scoped;
701
+ /**
702
+ * Use a function that receives a scope and returns an effect to emit an output
703
+ * element. The output element will be the result of the returned effect, if
704
+ * successful.
705
+ *
706
+ * @since 3.11.0
707
+ * @category constructors
708
+ */
709
+ const scopedWith = exports.scopedWith = channel.scopedWith;
710
+ /**
711
+ * Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX
712
+ * newlines (`\n`).
713
+ *
714
+ * @since 2.0.0
715
+ * @category combinators
716
+ */
717
+ const splitLines = exports.splitLines = channel.splitLines;
718
+ /**
719
+ * Constructs a channel that succeeds immediately with the specified value.
720
+ *
721
+ * @since 2.0.0
722
+ * @category constructors
723
+ */
724
+ const succeed = exports.succeed = core.succeed;
725
+ /**
726
+ * Lazily constructs a channel from the given side effect.
727
+ *
728
+ * @since 2.0.0
729
+ * @category constructors
730
+ */
731
+ const suspend = exports.suspend = core.suspend;
732
+ /**
733
+ * Constructs a channel that succeeds immediately with the specified lazy value.
734
+ *
735
+ * @since 2.0.0
736
+ * @category constructors
737
+ */
738
+ const sync = exports.sync = core.sync;
739
+ /**
740
+ * Converts a `Channel` to a `PubSub`.
741
+ *
742
+ * @since 2.0.0
743
+ * @category destructors
744
+ */
745
+ const toPubSub = exports.toPubSub = channel.toPubSub;
746
+ /**
747
+ * Returns a scoped `Effect` that can be used to repeatedly pull elements from
748
+ * the constructed `Channel`. The pull effect fails with the channel's failure
749
+ * in case the channel fails, or returns either the channel's done value or an
750
+ * emitted element.
751
+ *
752
+ * @since 2.0.0
753
+ * @category destructors
754
+ */
755
+ const toPull = exports.toPull = channel.toPull;
756
+ /**
757
+ * Returns an `Effect` that can be used to repeatedly pull elements from the
758
+ * constructed `Channel` within the provided `Scope`. The pull effect fails
759
+ * with the channel's failure in case the channel fails, or returns either the
760
+ * channel's done value or an emitted element.
761
+ *
762
+ * @since 3.11.0
763
+ * @category destructors
764
+ */
765
+ const toPullIn = exports.toPullIn = channel.toPullIn;
766
+ /**
767
+ * Converts a `Channel` to a `Queue`.
768
+ *
769
+ * @since 2.0.0
770
+ * @category destructors
771
+ */
772
+ const toQueue = exports.toQueue = channel.toQueue;
773
+ /** Converts this channel to a `Sink`.
774
+ *
775
+ * @since 2.0.0
776
+ * @category destructors
777
+ */
778
+ const toSink = exports.toSink = sink.channelToSink;
779
+ /**
780
+ * Converts this channel to a `Stream`.
781
+ *
782
+ * @since 2.0.0
783
+ * @category destructors
784
+ */
785
+ const toStream = exports.toStream = stream.channelToStream;
786
+ const void_ = exports.void = core.void;
787
+ /**
788
+ * Constructs a `Channel` from an effect that will result in a `Channel` if
789
+ * successful.
790
+ *
791
+ * @since 2.0.0
792
+ * @category constructors
793
+ */
794
+ const unwrap = exports.unwrap = channel.unwrap;
795
+ /**
796
+ * Constructs a `Channel` from a scoped effect that will result in a
797
+ * `Channel` if successful.
798
+ *
799
+ * @since 2.0.0
800
+ * @category constructors
801
+ */
802
+ const unwrapScoped = exports.unwrapScoped = channel.unwrapScoped;
803
+ /**
804
+ * Constructs a `Channel` from a function which receives a `Scope` and returns
805
+ * an effect that will result in a `Channel` if successful.
806
+ *
807
+ * @since 3.11.0
808
+ * @category constructors
809
+ */
810
+ const unwrapScopedWith = exports.unwrapScopedWith = channel.unwrapScopedWith;
811
+ /**
812
+ * Updates a service in the context of this channel.
813
+ *
814
+ * @since 2.0.0
815
+ * @category context
816
+ */
817
+ const updateService = exports.updateService = channel.updateService;
818
+ /**
819
+ * Wraps the channel with a new span for tracing.
820
+ *
821
+ * @since 2.0.0
822
+ * @category tracing
823
+ */
824
+ const withSpan = exports.withSpan = channel.withSpan;
825
+ /**
826
+ * Writes a single value to the channel.
827
+ *
828
+ * @since 2.0.0
829
+ * @category constructors
830
+ */
831
+ const write = exports.write = core.write;
832
+ /**
833
+ * Writes a sequence of values to the channel.
834
+ *
835
+ * @since 2.0.0
836
+ * @category constructors
837
+ */
838
+ const writeAll = exports.writeAll = channel.writeAll;
839
+ /**
840
+ * Writes a `Chunk` of values to the channel.
841
+ *
842
+ * @since 2.0.0
843
+ * @category constructors
844
+ */
845
+ const writeChunk = exports.writeChunk = channel.writeChunk;
846
+ /**
847
+ * Returns a new channel that is the sequential composition of this channel
848
+ * and the specified channel. The returned channel terminates with a tuple of
849
+ * the terminal values of both channels.
850
+ *
851
+ * @since 2.0.0
852
+ * @category zipping
853
+ */
854
+ const zip = exports.zip = channel.zip;
855
+ /**
856
+ * Returns a new channel that is the sequential composition of this channel
857
+ * and the specified channel. The returned channel terminates with the
858
+ * terminal value of this channel.
859
+ *
860
+ * @since 2.0.0
861
+ * @category zipping
862
+ */
863
+ const zipLeft = exports.zipLeft = channel.zipLeft;
864
+ /**
865
+ * Returns a new channel that is the sequential composition of this channel
866
+ * and the specified channel. The returned channel terminates with the
867
+ * terminal value of that channel.
868
+ *
869
+ * @since 2.0.0
870
+ * @category zipping
871
+ */
872
+ const zipRight = exports.zipRight = channel.zipRight;
873
+ /**
874
+ * Represents a generic checked exception which occurs when a `Channel` is
875
+ * executed.
876
+ *
877
+ * @since 2.0.0
878
+ * @category errors
879
+ */
880
+ const ChannelException = exports.ChannelException = channel.ChannelException;
881
+ /**
882
+ * Returns `true` if the specified value is an `ChannelException`, `false`
883
+ * otherwise.
884
+ *
885
+ * @since 2.0.0
886
+ * @category refinements
887
+ */
888
+ const isChannelException = exports.isChannelException = channel.isChannelException;
889
+ //# sourceMappingURL=Channel.js.map
backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.match = exports.isYield = exports.isContinue = exports.isClose = exports.isChildExecutorDecision = exports.Yield = exports.Continue = exports.Close = exports.ChildExecutorDecisionTypeId = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/channel/childExecutorDecision.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ */
12
+
13
+ /**
14
+ * @since 2.0.0
15
+ * @category symbols
16
+ */
17
+ const ChildExecutorDecisionTypeId = exports.ChildExecutorDecisionTypeId = internal.ChildExecutorDecisionTypeId;
18
+ /**
19
+ * @since 2.0.0
20
+ * @category constructors
21
+ */
22
+ const Continue = exports.Continue = internal.Continue;
23
+ /**
24
+ * @since 2.0.0
25
+ * @category constructors
26
+ */
27
+ const Close = exports.Close = internal.Close;
28
+ /**
29
+ * @since 2.0.0
30
+ * @category constructors
31
+ */
32
+ const Yield = exports.Yield = internal.Yield;
33
+ /**
34
+ * Returns `true` if the specified value is a `ChildExecutorDecision`, `false`
35
+ * otherwise.
36
+ *
37
+ * @since 2.0.0
38
+ * @category refinements
39
+ */
40
+ const isChildExecutorDecision = exports.isChildExecutorDecision = internal.isChildExecutorDecision;
41
+ /**
42
+ * Returns `true` if the specified `ChildExecutorDecision` is a `Continue`,
43
+ * `false` otherwise.
44
+ *
45
+ * @since 2.0.0
46
+ * @category refinements
47
+ */
48
+ const isContinue = exports.isContinue = internal.isContinue;
49
+ /**
50
+ * Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false`
51
+ * otherwise.
52
+ *
53
+ * @since 2.0.0
54
+ * @category refinements
55
+ */
56
+ const isClose = exports.isClose = internal.isClose;
57
+ /**
58
+ * Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false`
59
+ * otherwise.
60
+ *
61
+ * @since 2.0.0
62
+ * @category refinements
63
+ */
64
+ const isYield = exports.isYield = internal.isYield;
65
+ /**
66
+ * Folds over a `ChildExecutorDecision` to produce a value of type `A`.
67
+ *
68
+ * @since 2.0.0
69
+ * @category folding
70
+ */
71
+ const match = exports.match = internal.match;
72
+ //# sourceMappingURL=ChildExecutorDecision.js.map
backend/node_modules/effect/dist/cjs/ChildExecutorDecision.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"ChildExecutorDecision.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChildExecutorDecisionTypeId","exports","Continue","Close","Yield","isChildExecutorDecision","isContinue","isClose","isYield","match"],"sources":["../../src/ChildExecutorDecision.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAuE,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zipWith = exports.zip = exports.unzip = exports.unsafeLast = exports.unsafeHead = exports.unsafeGet = exports.unsafeFromNonEmptyArray = exports.unsafeFromArray = exports.union = exports.toReadonlyArray = exports.toArray = exports.takeWhile = exports.takeRight = exports.take = exports.tailNonEmpty = exports.tail = exports.splitWhere = exports.splitNonEmptyAt = exports.splitAt = exports.split = exports.sortWith = exports.sort = exports.some = exports.size = exports.separate = exports.reverse = exports.replaceOption = exports.replace = exports.removeOption = exports.remove = exports.reduceRight = exports.reduce = exports.range = exports.prependAll = exports.prepend = exports.partitionMap = exports.partition = exports.of = exports.modifyOption = exports.modify = exports.mapAccum = exports.map = exports.makeBy = exports.make = exports.lastNonEmpty = exports.last = exports.join = exports.isNonEmpty = exports.isEmpty = exports.isChunk = exports.intersection = exports.headNonEmpty = exports.head = exports.getEquivalence = exports.get = exports.fromIterable = exports.forEach = exports.flatten = exports.flatMap = exports.findLastIndex = exports.findLast = exports.findFirstIndex = exports.findFirst = exports.filterMapWhile = exports.filterMap = exports.filter = exports.every = exports.empty = exports.dropWhile = exports.dropRight = exports.drop = exports.differenceWith = exports.difference = exports.dedupeAdjacent = exports.dedupe = exports.containsWith = exports.contains = exports.compact = exports.chunksOf = exports.appendAll = exports.append = void 0;
7
+ var RA = _interopRequireWildcard(require("./Array.js"));
8
+ var Equal = _interopRequireWildcard(require("./Equal.js"));
9
+ var Equivalence = _interopRequireWildcard(require("./Equivalence.js"));
10
+ var _Function = require("./Function.js");
11
+ var Hash = _interopRequireWildcard(require("./Hash.js"));
12
+ var _Inspectable = require("./Inspectable.js");
13
+ var O = _interopRequireWildcard(require("./Option.js"));
14
+ var Order = _interopRequireWildcard(require("./Order.js"));
15
+ var _Pipeable = require("./Pipeable.js");
16
+ var _Predicate = require("./Predicate.js");
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
+ /**
19
+ * @since 2.0.0
20
+ */
21
+
22
+ const TypeId = /*#__PURE__*/Symbol.for("effect/Chunk");
23
+ function copy(src, srcPos, dest, destPos, len) {
24
+ for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
25
+ dest[destPos + i - srcPos] = src[i];
26
+ }
27
+ return dest;
28
+ }
29
+ const emptyArray = [];
30
+ /**
31
+ * Compares the two chunks of equal length using the specified function
32
+ *
33
+ * @category equivalence
34
+ * @since 2.0.0
35
+ */
36
+ const getEquivalence = isEquivalent => Equivalence.make((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, unsafeGet(that, i))));
37
+ exports.getEquivalence = getEquivalence;
38
+ const _equivalence = /*#__PURE__*/getEquivalence(Equal.equals);
39
+ const ChunkProto = {
40
+ [TypeId]: {
41
+ _A: _ => _
42
+ },
43
+ toString() {
44
+ return (0, _Inspectable.format)(this.toJSON());
45
+ },
46
+ toJSON() {
47
+ return {
48
+ _id: "Chunk",
49
+ values: toReadonlyArray(this).map(_Inspectable.toJSON)
50
+ };
51
+ },
52
+ [_Inspectable.NodeInspectSymbol]() {
53
+ return this.toJSON();
54
+ },
55
+ [Equal.symbol](that) {
56
+ return isChunk(that) && _equivalence(this, that);
57
+ },
58
+ [Hash.symbol]() {
59
+ return Hash.cached(this, Hash.array(toReadonlyArray(this)));
60
+ },
61
+ [Symbol.iterator]() {
62
+ switch (this.backing._tag) {
63
+ case "IArray":
64
+ {
65
+ return this.backing.array[Symbol.iterator]();
66
+ }
67
+ case "IEmpty":
68
+ {
69
+ return emptyArray[Symbol.iterator]();
70
+ }
71
+ default:
72
+ {
73
+ return toReadonlyArray(this)[Symbol.iterator]();
74
+ }
75
+ }
76
+ },
77
+ pipe() {
78
+ return (0, _Pipeable.pipeArguments)(this, arguments);
79
+ }
80
+ };
81
+ const makeChunk = backing => {
82
+ const chunk = Object.create(ChunkProto);
83
+ chunk.backing = backing;
84
+ switch (backing._tag) {
85
+ case "IEmpty":
86
+ {
87
+ chunk.length = 0;
88
+ chunk.depth = 0;
89
+ chunk.left = chunk;
90
+ chunk.right = chunk;
91
+ break;
92
+ }
93
+ case "IConcat":
94
+ {
95
+ chunk.length = backing.left.length + backing.right.length;
96
+ chunk.depth = 1 + Math.max(backing.left.depth, backing.right.depth);
97
+ chunk.left = backing.left;
98
+ chunk.right = backing.right;
99
+ break;
100
+ }
101
+ case "IArray":
102
+ {
103
+ chunk.length = backing.array.length;
104
+ chunk.depth = 0;
105
+ chunk.left = _empty;
106
+ chunk.right = _empty;
107
+ break;
108
+ }
109
+ case "ISingleton":
110
+ {
111
+ chunk.length = 1;
112
+ chunk.depth = 0;
113
+ chunk.left = _empty;
114
+ chunk.right = _empty;
115
+ break;
116
+ }
117
+ case "ISlice":
118
+ {
119
+ chunk.length = backing.length;
120
+ chunk.depth = backing.chunk.depth + 1;
121
+ chunk.left = _empty;
122
+ chunk.right = _empty;
123
+ break;
124
+ }
125
+ }
126
+ return chunk;
127
+ };
128
+ /**
129
+ * Checks if `u` is a `Chunk<unknown>`
130
+ *
131
+ * @category constructors
132
+ * @since 2.0.0
133
+ */
134
+ const isChunk = u => (0, _Predicate.hasProperty)(u, TypeId);
135
+ exports.isChunk = isChunk;
136
+ const _empty = /*#__PURE__*/makeChunk({
137
+ _tag: "IEmpty"
138
+ });
139
+ /**
140
+ * @category constructors
141
+ * @since 2.0.0
142
+ */
143
+ const empty = () => _empty;
144
+ /**
145
+ * Builds a `NonEmptyChunk` from an non-empty collection of elements.
146
+ *
147
+ * @category constructors
148
+ * @since 2.0.0
149
+ */
150
+ exports.empty = empty;
151
+ const make = (...as) => unsafeFromNonEmptyArray(as);
152
+ /**
153
+ * Builds a `NonEmptyChunk` from a single element.
154
+ *
155
+ * @category constructors
156
+ * @since 2.0.0
157
+ */
158
+ exports.make = make;
159
+ const of = a => makeChunk({
160
+ _tag: "ISingleton",
161
+ a
162
+ });
163
+ /**
164
+ * Creates a new `Chunk` from an iterable collection of values.
165
+ *
166
+ * @category constructors
167
+ * @since 2.0.0
168
+ */
169
+ exports.of = of;
170
+ const fromIterable = self => isChunk(self) ? self : unsafeFromArray(RA.fromIterable(self));
171
+ exports.fromIterable = fromIterable;
172
+ const copyToArray = (self, array, initial) => {
173
+ switch (self.backing._tag) {
174
+ case "IArray":
175
+ {
176
+ copy(self.backing.array, 0, array, initial, self.length);
177
+ break;
178
+ }
179
+ case "IConcat":
180
+ {
181
+ copyToArray(self.left, array, initial);
182
+ copyToArray(self.right, array, initial + self.left.length);
183
+ break;
184
+ }
185
+ case "ISingleton":
186
+ {
187
+ array[initial] = self.backing.a;
188
+ break;
189
+ }
190
+ case "ISlice":
191
+ {
192
+ let i = 0;
193
+ let j = initial;
194
+ while (i < self.length) {
195
+ array[j] = unsafeGet(self, i);
196
+ i += 1;
197
+ j += 1;
198
+ }
199
+ break;
200
+ }
201
+ }
202
+ };
203
+ const toArray_ = self => toReadonlyArray(self).slice();
204
+ /**
205
+ * Converts a `Chunk` into an `Array`. If the provided `Chunk` is non-empty
206
+ * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
207
+ * non-empty property is preserved.
208
+ *
209
+ * @category conversions
210
+ * @since 2.0.0
211
+ */
212
+ const toArray = exports.toArray = toArray_;
213
+ const toReadonlyArray_ = self => {
214
+ switch (self.backing._tag) {
215
+ case "IEmpty":
216
+ {
217
+ return emptyArray;
218
+ }
219
+ case "IArray":
220
+ {
221
+ return self.backing.array;
222
+ }
223
+ default:
224
+ {
225
+ const arr = new Array(self.length);
226
+ copyToArray(self, arr, 0);
227
+ self.backing = {
228
+ _tag: "IArray",
229
+ array: arr
230
+ };
231
+ self.left = _empty;
232
+ self.right = _empty;
233
+ self.depth = 0;
234
+ return arr;
235
+ }
236
+ }
237
+ };
238
+ /**
239
+ * Converts a `Chunk` into a `ReadonlyArray`. If the provided `Chunk` is
240
+ * non-empty (`NonEmptyChunk`), the function will return a
241
+ * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
242
+ *
243
+ * @category conversions
244
+ * @since 2.0.0
245
+ */
246
+ const toReadonlyArray = exports.toReadonlyArray = toReadonlyArray_;
247
+ const reverseChunk = self => {
248
+ switch (self.backing._tag) {
249
+ case "IEmpty":
250
+ case "ISingleton":
251
+ return self;
252
+ case "IArray":
253
+ {
254
+ return makeChunk({
255
+ _tag: "IArray",
256
+ array: RA.reverse(self.backing.array)
257
+ });
258
+ }
259
+ case "IConcat":
260
+ {
261
+ return makeChunk({
262
+ _tag: "IConcat",
263
+ left: reverse(self.backing.right),
264
+ right: reverse(self.backing.left)
265
+ });
266
+ }
267
+ case "ISlice":
268
+ return unsafeFromArray(RA.reverse(toReadonlyArray(self)));
269
+ }
270
+ };
271
+ /**
272
+ * Reverses the order of elements in a `Chunk`.
273
+ * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
274
+ *
275
+ * **Example**
276
+ *
277
+ * ```ts
278
+ * import { Chunk } from "effect"
279
+ *
280
+ * const chunk = Chunk.make(1, 2, 3)
281
+ * const result = Chunk.reverse(chunk)
282
+ *
283
+ * console.log(result)
284
+ * // { _id: 'Chunk', values: [ 3, 2, 1 ] }
285
+ * ```
286
+ *
287
+ * @since 2.0.0
288
+ * @category elements
289
+ */
290
+ const reverse = exports.reverse = reverseChunk;
291
+ /**
292
+ * This function provides a safe way to read a value at a particular index from a `Chunk`.
293
+ *
294
+ * @category elements
295
+ * @since 2.0.0
296
+ */
297
+ const get = exports.get = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => index < 0 || index >= self.length ? O.none() : O.some(unsafeGet(self, index)));
298
+ /**
299
+ * Wraps an array into a chunk without copying, unsafe on mutable arrays
300
+ *
301
+ * @since 2.0.0
302
+ * @category unsafe
303
+ */
304
+ const unsafeFromArray = self => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({
305
+ _tag: "IArray",
306
+ array: self
307
+ });
308
+ /**
309
+ * Wraps an array into a chunk without copying, unsafe on mutable arrays
310
+ *
311
+ * @since 2.0.0
312
+ * @category unsafe
313
+ */
314
+ exports.unsafeFromArray = unsafeFromArray;
315
+ const unsafeFromNonEmptyArray = self => unsafeFromArray(self);
316
+ /**
317
+ * Gets an element unsafely, will throw on out of bounds
318
+ *
319
+ * @since 2.0.0
320
+ * @category unsafe
321
+ */
322
+ exports.unsafeFromNonEmptyArray = unsafeFromNonEmptyArray;
323
+ const unsafeGet = exports.unsafeGet = /*#__PURE__*/(0, _Function.dual)(2, (self, index) => {
324
+ switch (self.backing._tag) {
325
+ case "IEmpty":
326
+ {
327
+ throw new Error(`Index out of bounds`);
328
+ }
329
+ case "ISingleton":
330
+ {
331
+ if (index !== 0) {
332
+ throw new Error(`Index out of bounds`);
333
+ }
334
+ return self.backing.a;
335
+ }
336
+ case "IArray":
337
+ {
338
+ if (index >= self.length || index < 0) {
339
+ throw new Error(`Index out of bounds`);
340
+ }
341
+ return self.backing.array[index];
342
+ }
343
+ case "IConcat":
344
+ {
345
+ return index < self.left.length ? unsafeGet(self.left, index) : unsafeGet(self.right, index - self.left.length);
346
+ }
347
+ case "ISlice":
348
+ {
349
+ return unsafeGet(self.backing.chunk, index + self.backing.offset);
350
+ }
351
+ }
352
+ });
353
+ /**
354
+ * Appends the specified element to the end of the `Chunk`.
355
+ *
356
+ * @category concatenating
357
+ * @since 2.0.0
358
+ */
359
+ const append = exports.append = /*#__PURE__*/(0, _Function.dual)(2, (self, a) => appendAll(self, of(a)));
360
+ /**
361
+ * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
362
+ *
363
+ * @category concatenating
364
+ * @since 2.0.0
365
+ */
366
+ const prepend = exports.prepend = /*#__PURE__*/(0, _Function.dual)(2, (self, elem) => appendAll(of(elem), self));
367
+ /**
368
+ * Takes the first up to `n` elements from the chunk
369
+ *
370
+ * @since 2.0.0
371
+ */
372
+ const take = exports.take = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
373
+ if (n <= 0) {
374
+ return _empty;
375
+ } else if (n >= self.length) {
376
+ return self;
377
+ } else {
378
+ switch (self.backing._tag) {
379
+ case "ISlice":
380
+ {
381
+ return makeChunk({
382
+ _tag: "ISlice",
383
+ chunk: self.backing.chunk,
384
+ length: n,
385
+ offset: self.backing.offset
386
+ });
387
+ }
388
+ case "IConcat":
389
+ {
390
+ if (n > self.left.length) {
391
+ return makeChunk({
392
+ _tag: "IConcat",
393
+ left: self.left,
394
+ right: take(self.right, n - self.left.length)
395
+ });
396
+ }
397
+ return take(self.left, n);
398
+ }
399
+ default:
400
+ {
401
+ return makeChunk({
402
+ _tag: "ISlice",
403
+ chunk: self,
404
+ offset: 0,
405
+ length: n
406
+ });
407
+ }
408
+ }
409
+ }
410
+ });
411
+ /**
412
+ * Drops the first up to `n` elements from the chunk
413
+ *
414
+ * @since 2.0.0
415
+ */
416
+ const drop = exports.drop = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
417
+ if (n <= 0) {
418
+ return self;
419
+ } else if (n >= self.length) {
420
+ return _empty;
421
+ } else {
422
+ switch (self.backing._tag) {
423
+ case "ISlice":
424
+ {
425
+ return makeChunk({
426
+ _tag: "ISlice",
427
+ chunk: self.backing.chunk,
428
+ offset: self.backing.offset + n,
429
+ length: self.backing.length - n
430
+ });
431
+ }
432
+ case "IConcat":
433
+ {
434
+ if (n > self.left.length) {
435
+ return drop(self.right, n - self.left.length);
436
+ }
437
+ return makeChunk({
438
+ _tag: "IConcat",
439
+ left: drop(self.left, n),
440
+ right: self.right
441
+ });
442
+ }
443
+ default:
444
+ {
445
+ return makeChunk({
446
+ _tag: "ISlice",
447
+ chunk: self,
448
+ offset: n,
449
+ length: self.length - n
450
+ });
451
+ }
452
+ }
453
+ }
454
+ });
455
+ /**
456
+ * Drops the last `n` elements.
457
+ *
458
+ * @since 2.0.0
459
+ */
460
+ const dropRight = exports.dropRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => take(self, Math.max(0, self.length - n)));
461
+ /**
462
+ * Drops all elements so long as the predicate returns true.
463
+ *
464
+ * @since 2.0.0
465
+ */
466
+ const dropWhile = exports.dropWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
467
+ const arr = toReadonlyArray(self);
468
+ const len = arr.length;
469
+ let i = 0;
470
+ while (i < len && predicate(arr[i])) {
471
+ i++;
472
+ }
473
+ return drop(self, i);
474
+ });
475
+ /**
476
+ * Prepends the specified prefix chunk to the beginning of the specified chunk.
477
+ * If either chunk is non-empty, the result is also a non-empty chunk.
478
+ *
479
+ * **Example**
480
+ *
481
+ * ```ts
482
+ * import { Chunk } from "effect"
483
+ *
484
+ * const result = Chunk.make(1, 2).pipe(Chunk.prependAll(Chunk.make("a", "b")), Chunk.toArray)
485
+ *
486
+ * console.log(result)
487
+ * // [ "a", "b", 1, 2 ]
488
+ * ```
489
+ *
490
+ * @category concatenating
491
+ * @since 2.0.0
492
+ */
493
+ const prependAll = exports.prependAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => appendAll(that, self));
494
+ /**
495
+ * Concatenates two chunks, combining their elements.
496
+ * If either chunk is non-empty, the result is also a non-empty chunk.
497
+ *
498
+ * **Example**
499
+ *
500
+ * ```ts
501
+ * import { Chunk } from "effect"
502
+ *
503
+ * const result = Chunk.make(1, 2).pipe(Chunk.appendAll(Chunk.make("a", "b")), Chunk.toArray)
504
+ *
505
+ * console.log(result)
506
+ * // [ 1, 2, "a", "b" ]
507
+ * ```
508
+ *
509
+ * @category concatenating
510
+ * @since 2.0.0
511
+ */
512
+ const appendAll = exports.appendAll = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => {
513
+ if (self.backing._tag === "IEmpty") {
514
+ return that;
515
+ }
516
+ if (that.backing._tag === "IEmpty") {
517
+ return self;
518
+ }
519
+ const diff = that.depth - self.depth;
520
+ if (Math.abs(diff) <= 1) {
521
+ return makeChunk({
522
+ _tag: "IConcat",
523
+ left: self,
524
+ right: that
525
+ });
526
+ } else if (diff < -1) {
527
+ if (self.left.depth >= self.right.depth) {
528
+ const nr = appendAll(self.right, that);
529
+ return makeChunk({
530
+ _tag: "IConcat",
531
+ left: self.left,
532
+ right: nr
533
+ });
534
+ } else {
535
+ const nrr = appendAll(self.right.right, that);
536
+ if (nrr.depth === self.depth - 3) {
537
+ const nr = makeChunk({
538
+ _tag: "IConcat",
539
+ left: self.right.left,
540
+ right: nrr
541
+ });
542
+ return makeChunk({
543
+ _tag: "IConcat",
544
+ left: self.left,
545
+ right: nr
546
+ });
547
+ } else {
548
+ const nl = makeChunk({
549
+ _tag: "IConcat",
550
+ left: self.left,
551
+ right: self.right.left
552
+ });
553
+ return makeChunk({
554
+ _tag: "IConcat",
555
+ left: nl,
556
+ right: nrr
557
+ });
558
+ }
559
+ }
560
+ } else {
561
+ if (that.right.depth >= that.left.depth) {
562
+ const nl = appendAll(self, that.left);
563
+ return makeChunk({
564
+ _tag: "IConcat",
565
+ left: nl,
566
+ right: that.right
567
+ });
568
+ } else {
569
+ const nll = appendAll(self, that.left.left);
570
+ if (nll.depth === that.depth - 3) {
571
+ const nl = makeChunk({
572
+ _tag: "IConcat",
573
+ left: nll,
574
+ right: that.left.right
575
+ });
576
+ return makeChunk({
577
+ _tag: "IConcat",
578
+ left: nl,
579
+ right: that.right
580
+ });
581
+ } else {
582
+ const nr = makeChunk({
583
+ _tag: "IConcat",
584
+ left: that.left.right,
585
+ right: that.right
586
+ });
587
+ return makeChunk({
588
+ _tag: "IConcat",
589
+ left: nll,
590
+ right: nr
591
+ });
592
+ }
593
+ }
594
+ }
595
+ });
596
+ /**
597
+ * Returns a filtered and mapped subset of the elements.
598
+ *
599
+ * @since 2.0.0
600
+ * @category filtering
601
+ */
602
+ const filterMap = exports.filterMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => unsafeFromArray(RA.filterMap(self, f)));
603
+ /**
604
+ * Returns a filtered and mapped subset of the elements.
605
+ *
606
+ * @since 2.0.0
607
+ * @category filtering
608
+ */
609
+ const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => unsafeFromArray(RA.filter(self, predicate)));
610
+ /**
611
+ * Transforms all elements of the chunk for as long as the specified function returns some value
612
+ *
613
+ * @since 2.0.0
614
+ * @category filtering
615
+ */
616
+ const filterMapWhile = exports.filterMapWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => unsafeFromArray(RA.filterMapWhile(self, f)));
617
+ /**
618
+ * Filter out optional values
619
+ *
620
+ * @since 2.0.0
621
+ * @category filtering
622
+ */
623
+ const compact = self => filterMap(self, _Function.identity);
624
+ /**
625
+ * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
626
+ *
627
+ * @since 2.0.0
628
+ * @category sequencing
629
+ */
630
+ exports.compact = compact;
631
+ const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
632
+ if (self.backing._tag === "ISingleton") {
633
+ return f(self.backing.a, 0);
634
+ }
635
+ let out = _empty;
636
+ let i = 0;
637
+ for (const k of self) {
638
+ out = appendAll(out, f(k, i++));
639
+ }
640
+ return out;
641
+ });
642
+ /**
643
+ * Iterates over each element of a `Chunk` and applies a function to it.
644
+ *
645
+ * **Details**
646
+ *
647
+ * This function processes every element of the given `Chunk`, calling the
648
+ * provided function `f` on each element. It does not return a new value;
649
+ * instead, it is primarily used for side effects, such as logging or
650
+ * accumulating data in an external variable.
651
+ *
652
+ * @since 2.0.0
653
+ * @category combinators
654
+ */
655
+ const forEach = exports.forEach = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => toReadonlyArray(self).forEach(f));
656
+ /**
657
+ * Flattens a chunk of chunks into a single chunk by concatenating all chunks.
658
+ *
659
+ * @since 2.0.0
660
+ * @category sequencing
661
+ */
662
+ const flatten = exports.flatten = /*#__PURE__*/flatMap(_Function.identity);
663
+ /**
664
+ * Groups elements in chunks of up to `n` elements.
665
+ *
666
+ * @since 2.0.0
667
+ * @category elements
668
+ */
669
+ const chunksOf = exports.chunksOf = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
670
+ const gr = [];
671
+ let current = [];
672
+ toReadonlyArray(self).forEach(a => {
673
+ current.push(a);
674
+ if (current.length >= n) {
675
+ gr.push(unsafeFromArray(current));
676
+ current = [];
677
+ }
678
+ });
679
+ if (current.length > 0) {
680
+ gr.push(unsafeFromArray(current));
681
+ }
682
+ return unsafeFromArray(gr);
683
+ });
684
+ /**
685
+ * Creates a Chunk of unique values that are included in all given Chunks.
686
+ *
687
+ * The order and references of result values are determined by the Chunk.
688
+ *
689
+ * @since 2.0.0
690
+ * @category elements
691
+ */
692
+ const intersection = exports.intersection = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.intersection(toReadonlyArray(self), toReadonlyArray(that))));
693
+ /**
694
+ * Determines if the chunk is empty.
695
+ *
696
+ * @since 2.0.0
697
+ * @category elements
698
+ */
699
+ const isEmpty = self => self.length === 0;
700
+ /**
701
+ * Determines if the chunk is not empty.
702
+ *
703
+ * @since 2.0.0
704
+ * @category elements
705
+ */
706
+ exports.isEmpty = isEmpty;
707
+ const isNonEmpty = self => self.length > 0;
708
+ /**
709
+ * Returns the first element of this chunk if it exists.
710
+ *
711
+ * @since 2.0.0
712
+ * @category elements
713
+ */
714
+ exports.isNonEmpty = isNonEmpty;
715
+ const head = exports.head = /*#__PURE__*/get(0);
716
+ /**
717
+ * Returns the first element of this chunk.
718
+ *
719
+ * It will throw an error if the chunk is empty.
720
+ *
721
+ * @since 2.0.0
722
+ * @category unsafe
723
+ */
724
+ const unsafeHead = self => unsafeGet(self, 0);
725
+ /**
726
+ * Returns the first element of this non empty chunk.
727
+ *
728
+ * @since 2.0.0
729
+ * @category elements
730
+ */
731
+ exports.unsafeHead = unsafeHead;
732
+ const headNonEmpty = exports.headNonEmpty = unsafeHead;
733
+ /**
734
+ * Returns the last element of this chunk if it exists.
735
+ *
736
+ * @since 2.0.0
737
+ * @category elements
738
+ */
739
+ const last = self => get(self, self.length - 1);
740
+ /**
741
+ * Returns the last element of this chunk.
742
+ *
743
+ * It will throw an error if the chunk is empty.
744
+ *
745
+ * @since 2.0.0
746
+ * @category unsafe
747
+ */
748
+ exports.last = last;
749
+ const unsafeLast = self => unsafeGet(self, self.length - 1);
750
+ /**
751
+ * Returns the last element of this non empty chunk.
752
+ *
753
+ * @since 3.4.0
754
+ * @category elements
755
+ */
756
+ exports.unsafeLast = unsafeLast;
757
+ const lastNonEmpty = exports.lastNonEmpty = unsafeLast;
758
+ /**
759
+ * Transforms the elements of a chunk using the specified mapping function.
760
+ * If the input chunk is non-empty, the resulting chunk will also be non-empty.
761
+ *
762
+ * **Example**
763
+ *
764
+ * ```ts
765
+ * import { Chunk } from "effect"
766
+ *
767
+ * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
768
+ *
769
+ * console.log(result)
770
+ * // { _id: 'Chunk', values: [ 2, 3 ] }
771
+ * ```
772
+ *
773
+ * @since 2.0.0
774
+ * @category mapping
775
+ */
776
+ const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.backing._tag === "ISingleton" ? of(f(self.backing.a, 0)) : unsafeFromArray((0, _Function.pipe)(toReadonlyArray(self), RA.map((a, i) => f(a, i)))));
777
+ /**
778
+ * Statefully maps over the chunk, producing new elements of type `B`.
779
+ *
780
+ * @since 2.0.0
781
+ * @category folding
782
+ */
783
+ const mapAccum = exports.mapAccum = /*#__PURE__*/(0, _Function.dual)(3, (self, s, f) => {
784
+ const [s1, as] = RA.mapAccum(self, s, f);
785
+ return [s1, unsafeFromArray(as)];
786
+ });
787
+ /**
788
+ * Separate elements based on a predicate that also exposes the index of the element.
789
+ *
790
+ * @category filtering
791
+ * @since 2.0.0
792
+ */
793
+ const partition = exports.partition = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => (0, _Function.pipe)(RA.partition(toReadonlyArray(self), predicate), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)]));
794
+ /**
795
+ * Partitions the elements of this chunk into two chunks using f.
796
+ *
797
+ * @category filtering
798
+ * @since 2.0.0
799
+ */
800
+ const partitionMap = exports.partitionMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => (0, _Function.pipe)(RA.partitionMap(toReadonlyArray(self), f), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)]));
801
+ /**
802
+ * Partitions the elements of this chunk into two chunks.
803
+ *
804
+ * @category filtering
805
+ * @since 2.0.0
806
+ */
807
+ const separate = self => (0, _Function.pipe)(RA.separate(toReadonlyArray(self)), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)]);
808
+ /**
809
+ * Retireves the size of the chunk
810
+ *
811
+ * @since 2.0.0
812
+ * @category elements
813
+ */
814
+ exports.separate = separate;
815
+ const size = self => self.length;
816
+ /**
817
+ * Sort the elements of a Chunk in increasing order, creating a new Chunk.
818
+ *
819
+ * @since 2.0.0
820
+ * @category sorting
821
+ */
822
+ exports.size = size;
823
+ const sort = exports.sort = /*#__PURE__*/(0, _Function.dual)(2, (self, O) => unsafeFromArray(RA.sort(toReadonlyArray(self), O)));
824
+ /**
825
+ * @since 2.0.0
826
+ * @category sorting
827
+ */
828
+ const sortWith = exports.sortWith = /*#__PURE__*/(0, _Function.dual)(3, (self, f, order) => sort(self, Order.mapInput(order, f)));
829
+ /**
830
+ * Returns two splits of this chunk at the specified index.
831
+ *
832
+ * @since 2.0.0
833
+ * @category splitting
834
+ */
835
+ const splitAt = exports.splitAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => [take(self, n), drop(self, n)]);
836
+ /**
837
+ * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
838
+ * The value of `n` must be `>= 1`.
839
+ *
840
+ * @category splitting
841
+ * @since 2.0.0
842
+ */
843
+ const splitNonEmptyAt = exports.splitNonEmptyAt = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => {
844
+ const _n = Math.max(1, Math.floor(n));
845
+ return _n >= self.length ? [self, empty()] : [take(self, _n), drop(self, _n)];
846
+ });
847
+ /**
848
+ * Splits this chunk into `n` equally sized chunks.
849
+ *
850
+ * @since 2.0.0
851
+ * @category splitting
852
+ */
853
+ const split = exports.split = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => chunksOf(self, Math.ceil(self.length / Math.floor(n))));
854
+ /**
855
+ * Splits this chunk on the first element that matches this predicate.
856
+ * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
857
+ *
858
+ * @category splitting
859
+ * @since 2.0.0
860
+ */
861
+ const splitWhere = exports.splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
862
+ let i = 0;
863
+ for (const a of toReadonlyArray(self)) {
864
+ if (predicate(a)) {
865
+ break;
866
+ } else {
867
+ i++;
868
+ }
869
+ }
870
+ return splitAt(self, i);
871
+ });
872
+ /**
873
+ * Returns every elements after the first.
874
+ *
875
+ * @since 2.0.0
876
+ * @category elements
877
+ */
878
+ const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none();
879
+ /**
880
+ * Returns every elements after the first.
881
+ *
882
+ * @since 2.0.0
883
+ * @category elements
884
+ */
885
+ exports.tail = tail;
886
+ const tailNonEmpty = self => drop(self, 1);
887
+ /**
888
+ * Takes the last `n` elements.
889
+ *
890
+ * @since 2.0.0
891
+ * @category elements
892
+ */
893
+ exports.tailNonEmpty = tailNonEmpty;
894
+ const takeRight = exports.takeRight = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => drop(self, self.length - n));
895
+ /**
896
+ * Takes all elements so long as the predicate returns true.
897
+ *
898
+ * @since 2.0.0
899
+ * @category elements
900
+ */
901
+ const takeWhile = exports.takeWhile = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => {
902
+ const out = [];
903
+ for (const a of toReadonlyArray(self)) {
904
+ if (predicate(a)) {
905
+ out.push(a);
906
+ } else {
907
+ break;
908
+ }
909
+ }
910
+ return unsafeFromArray(out);
911
+ });
912
+ /**
913
+ * Creates a Chunks of unique values, in order, from all given Chunks.
914
+ *
915
+ * @since 2.0.0
916
+ * @category elements
917
+ */
918
+ const union = exports.union = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.union(toReadonlyArray(self), toReadonlyArray(that))));
919
+ /**
920
+ * Remove duplicates from an array, keeping the first occurrence of an element.
921
+ *
922
+ * @since 2.0.0
923
+ * @category elements
924
+ */
925
+ const dedupe = self => unsafeFromArray(RA.dedupe(toReadonlyArray(self)));
926
+ /**
927
+ * Deduplicates adjacent elements that are identical.
928
+ *
929
+ * @since 2.0.0
930
+ * @category filtering
931
+ */
932
+ exports.dedupe = dedupe;
933
+ const dedupeAdjacent = self => unsafeFromArray(RA.dedupeAdjacent(self));
934
+ /**
935
+ * Takes a `Chunk` of pairs and return two corresponding `Chunk`s.
936
+ *
937
+ * Note: The function is reverse of `zip`.
938
+ *
939
+ * @since 2.0.0
940
+ * @category elements
941
+ */
942
+ exports.dedupeAdjacent = dedupeAdjacent;
943
+ const unzip = self => {
944
+ const [left, right] = RA.unzip(self);
945
+ return [unsafeFromArray(left), unsafeFromArray(right)];
946
+ };
947
+ /**
948
+ * Zips this chunk pointwise with the specified chunk using the specified combiner.
949
+ *
950
+ * @since 2.0.0
951
+ * @category zipping
952
+ */
953
+ exports.unzip = unzip;
954
+ const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => unsafeFromArray(RA.zipWith(self, that, f)));
955
+ /**
956
+ * Zips this chunk pointwise with the specified chunk.
957
+ *
958
+ * @since 2.0.0
959
+ * @category zipping
960
+ */
961
+ const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (a, b) => [a, b]));
962
+ /**
963
+ * Delete the element at the specified index, creating a new `Chunk`.
964
+ *
965
+ * @since 2.0.0
966
+ */
967
+ const remove = exports.remove = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => {
968
+ if (i < 0 || i >= self.length) return self;
969
+ return unsafeFromArray(RA.remove(toReadonlyArray(self), i));
970
+ });
971
+ /**
972
+ * @since 3.16.0
973
+ */
974
+ const removeOption = exports.removeOption = /*#__PURE__*/(0, _Function.dual)(2, (self, i) => {
975
+ if (i < 0 || i >= self.length) return O.none();
976
+ return O.some(unsafeFromArray(RA.remove(toReadonlyArray(self), i)));
977
+ });
978
+ /**
979
+ * @since 2.0.0
980
+ */
981
+ const modifyOption = exports.modifyOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => {
982
+ if (i < 0 || i >= self.length) return O.none();
983
+ return O.some(unsafeFromArray(RA.modify(toReadonlyArray(self), i, f)));
984
+ });
985
+ /**
986
+ * Apply a function to the element at the specified index, creating a new `Chunk`,
987
+ * or returning the input if the index is out of bounds.
988
+ *
989
+ * @since 2.0.0
990
+ */
991
+ const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(3, (self, i, f) => O.getOrElse(modifyOption(self, i, f), () => self));
992
+ /**
993
+ * Change the element at the specified index, creating a new `Chunk`,
994
+ * or returning the input if the index is out of bounds.
995
+ *
996
+ * @since 2.0.0
997
+ */
998
+ const replace = exports.replace = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modify(self, i, () => b));
999
+ /**
1000
+ * @since 2.0.0
1001
+ */
1002
+ const replaceOption = exports.replaceOption = /*#__PURE__*/(0, _Function.dual)(3, (self, i, b) => modifyOption(self, i, () => b));
1003
+ /**
1004
+ * Return a Chunk of length n with element i initialized with f(i).
1005
+ *
1006
+ * **Note**. `n` is normalized to an integer >= 1.
1007
+ *
1008
+ * @category constructors
1009
+ * @since 2.0.0
1010
+ */
1011
+ const makeBy = exports.makeBy = /*#__PURE__*/(0, _Function.dual)(2, (n, f) => fromIterable(RA.makeBy(n, f)));
1012
+ /**
1013
+ * Create a non empty `Chunk` containing a range of integers, including both endpoints.
1014
+ *
1015
+ * @category constructors
1016
+ * @since 2.0.0
1017
+ */
1018
+ const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : of(start);
1019
+ // -------------------------------------------------------------------------------------
1020
+ // re-exports from ReadonlyArray
1021
+ // -------------------------------------------------------------------------------------
1022
+ /**
1023
+ * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
1024
+ *
1025
+ * @category elements
1026
+ * @since 2.0.0
1027
+ */
1028
+ exports.range = range;
1029
+ const contains = exports.contains = RA.contains;
1030
+ /**
1031
+ * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
1032
+ *
1033
+ * @category elements
1034
+ * @since 2.0.0
1035
+ */
1036
+ const containsWith = exports.containsWith = RA.containsWith;
1037
+ /**
1038
+ * Returns the first element that satisfies the specified
1039
+ * predicate, or `None` if no such element exists.
1040
+ *
1041
+ * @category elements
1042
+ * @since 2.0.0
1043
+ */
1044
+ const findFirst = exports.findFirst = RA.findFirst;
1045
+ /**
1046
+ * Return the first index for which a predicate holds.
1047
+ *
1048
+ * @category elements
1049
+ * @since 2.0.0
1050
+ */
1051
+ const findFirstIndex = exports.findFirstIndex = RA.findFirstIndex;
1052
+ /**
1053
+ * Find the last element for which a predicate holds.
1054
+ *
1055
+ * @category elements
1056
+ * @since 2.0.0
1057
+ */
1058
+ const findLast = exports.findLast = RA.findLast;
1059
+ /**
1060
+ * Return the last index for which a predicate holds.
1061
+ *
1062
+ * @category elements
1063
+ * @since 2.0.0
1064
+ */
1065
+ const findLastIndex = exports.findLastIndex = RA.findLastIndex;
1066
+ /**
1067
+ * Check if a predicate holds true for every `Chunk` element.
1068
+ *
1069
+ * @category elements
1070
+ * @since 2.0.0
1071
+ */
1072
+ const every = exports.every = /*#__PURE__*/(0, _Function.dual)(2, (self, refinement) => RA.fromIterable(self).every(refinement));
1073
+ /**
1074
+ * Check if a predicate holds true for some `Chunk` element.
1075
+ *
1076
+ * @category elements
1077
+ * @since 2.0.0
1078
+ */
1079
+ const some = exports.some = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => RA.fromIterable(self).some(predicate));
1080
+ /**
1081
+ * Joins the elements together with "sep" in the middle.
1082
+ *
1083
+ * @category folding
1084
+ * @since 2.0.0
1085
+ */
1086
+ const join = exports.join = RA.join;
1087
+ /**
1088
+ * @category folding
1089
+ * @since 2.0.0
1090
+ */
1091
+ const reduce = exports.reduce = RA.reduce;
1092
+ /**
1093
+ * @category folding
1094
+ * @since 2.0.0
1095
+ */
1096
+ const reduceRight = exports.reduceRight = RA.reduceRight;
1097
+ /**
1098
+ * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
1099
+ * The order and references of result values are determined by the first `Chunk`.
1100
+ *
1101
+ * @since 3.2.0
1102
+ */
1103
+ const differenceWith = isEquivalent => {
1104
+ return (0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.differenceWith(isEquivalent)(that, self)));
1105
+ };
1106
+ /**
1107
+ * Creates a `Chunk` of values not included in the other given `Chunk`.
1108
+ * The order and references of result values are determined by the first `Chunk`.
1109
+ *
1110
+ * @since 3.2.0
1111
+ */
1112
+ exports.differenceWith = differenceWith;
1113
+ const difference = exports.difference = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => unsafeFromArray(RA.difference(that, self)));
1114
+ //# sourceMappingURL=Chunk.js.map
backend/node_modules/effect/dist/cjs/Clock.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sleep = exports.make = exports.currentTimeNanos = exports.currentTimeMillis = exports.clockWith = exports.ClockTypeId = exports.Clock = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/clock.js"));
8
+ var defaultServices = _interopRequireWildcard(require("./internal/defaultServices.js"));
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * @since 2.0.0
12
+ * @category symbols
13
+ */
14
+ const ClockTypeId = exports.ClockTypeId = internal.ClockTypeId;
15
+ /**
16
+ * @since 2.0.0
17
+ * @category constructors
18
+ */
19
+ const make = exports.make = internal.make;
20
+ /**
21
+ * @since 2.0.0
22
+ * @category constructors
23
+ */
24
+ const sleep = exports.sleep = defaultServices.sleep;
25
+ /**
26
+ * @since 2.0.0
27
+ * @category constructors
28
+ */
29
+ const currentTimeMillis = exports.currentTimeMillis = defaultServices.currentTimeMillis;
30
+ /**
31
+ * @since 2.0.0
32
+ * @category constructors
33
+ */
34
+ const currentTimeNanos = exports.currentTimeNanos = defaultServices.currentTimeNanos;
35
+ /**
36
+ * @since 2.0.0
37
+ * @category constructors
38
+ */
39
+ const clockWith = exports.clockWith = defaultServices.clockWith;
40
+ /**
41
+ * @since 2.0.0
42
+ * @category context
43
+ */
44
+ const Clock = exports.Clock = internal.clockTag;
45
+ //# sourceMappingURL=Clock.js.map
backend/node_modules/effect/dist/cjs/Clock.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Clock.js","names":["internal","_interopRequireWildcard","require","defaultServices","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ClockTypeId","exports","make","sleep","currentTimeMillis","currentTimeNanos","clockWith","Clock","clockTag"],"sources":["../../src/Clock.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAgE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GA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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zipWith = exports.zip = exports.withDescription = exports.withDefault = exports.validate = exports.url = exports.unwrap = exports.sync = exports.suspend = exports.succeed = exports.string = exports.secret = exports.repeat = exports.redacted = exports.primitive = exports.port = exports.orElseIf = exports.orElse = exports.option = exports.number = exports.nonEmptyString = exports.nested = exports.mapOrFail = exports.mapAttempt = exports.map = exports.logLevel = exports.literal = exports.isConfig = exports.integer = exports.hashSet = exports.hashMap = exports.fail = exports.duration = exports.date = exports.chunk = exports.branded = exports.boolean = exports.array = exports.all = exports.ConfigTypeId = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/config.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ * @category symbols
12
+ */
13
+ const ConfigTypeId = exports.ConfigTypeId = internal.ConfigTypeId;
14
+ /**
15
+ * Constructs a config from a tuple / struct / arguments of configs.
16
+ *
17
+ * @since 2.0.0
18
+ * @category constructors
19
+ */
20
+ const all = exports.all = internal.all;
21
+ /**
22
+ * Constructs a config for an array of values.
23
+ *
24
+ * @since 2.0.0
25
+ * @category constructors
26
+ */
27
+ const array = exports.array = internal.array;
28
+ /**
29
+ * Constructs a config for a boolean value.
30
+ *
31
+ * @since 2.0.0
32
+ * @category constructors
33
+ */
34
+ const boolean = exports.boolean = internal.boolean;
35
+ /**
36
+ * Constructs a config for a network port [1, 65535].
37
+ *
38
+ * @since 3.16.0
39
+ * @category constructors
40
+ */
41
+ const port = exports.port = internal.port;
42
+ /**
43
+ * Constructs a config for an URL value.
44
+ *
45
+ * @since 3.11.0
46
+ * @category constructors
47
+ */
48
+ const url = exports.url = internal.url;
49
+ /**
50
+ * Constructs a config for a sequence of values.
51
+ *
52
+ * @since 2.0.0
53
+ * @category constructors
54
+ */
55
+ const chunk = exports.chunk = internal.chunk;
56
+ /**
57
+ * Constructs a config for a date value.
58
+ *
59
+ * @since 2.0.0
60
+ * @category constructors
61
+ */
62
+ const date = exports.date = internal.date;
63
+ /**
64
+ * Constructs a config that fails with the specified message.
65
+ *
66
+ * @since 2.0.0
67
+ * @category constructors
68
+ */
69
+ const fail = exports.fail = internal.fail;
70
+ /**
71
+ * Constructs a config for a float value.
72
+ *
73
+ * @since 2.0.0
74
+ * @category constructors
75
+ */
76
+ const number = exports.number = internal.number;
77
+ /**
78
+ * Constructs a config for a integer value.
79
+ *
80
+ * @since 2.0.0
81
+ * @category constructors
82
+ */
83
+ const integer = exports.integer = internal.integer;
84
+ /**
85
+ * Constructs a config for a literal value.
86
+ *
87
+ * **Example**
88
+ *
89
+ * ```ts
90
+ * import { Config } from "effect"
91
+ *
92
+ * const config = Config.literal("http", "https")("PROTOCOL")
93
+ * ```
94
+ *
95
+ * @since 2.0.0
96
+ * @category constructors
97
+ */
98
+ const literal = exports.literal = internal.literal;
99
+ /**
100
+ * Constructs a config for a `LogLevel` value.
101
+ *
102
+ * @since 2.0.0
103
+ * @category constructors
104
+ */
105
+ const logLevel = exports.logLevel = internal.logLevel;
106
+ /**
107
+ * Constructs a config for a duration value.
108
+ *
109
+ * @since 2.5.0
110
+ * @category constructors
111
+ */
112
+ const duration = exports.duration = internal.duration;
113
+ /**
114
+ * This function returns `true` if the specified value is an `Config` value,
115
+ * `false` otherwise.
116
+ *
117
+ * This function can be useful for checking the type of a value before
118
+ * attempting to operate on it as an `Config` value. For example, you could
119
+ * use `isConfig` to check the type of a value before using it as an
120
+ * argument to a function that expects an `Config` value.
121
+ *
122
+ * @since 2.0.0
123
+ * @category refinements
124
+ */
125
+ const isConfig = exports.isConfig = internal.isConfig;
126
+ /**
127
+ * Returns a config whose structure is the same as this one, but which produces
128
+ * a different value, constructed using the specified function.
129
+ *
130
+ * @since 2.0.0
131
+ * @category mapping
132
+ */
133
+ const map = exports.map = internal.map;
134
+ /**
135
+ * Returns a config whose structure is the same as this one, but which may
136
+ * produce a different value, constructed using the specified function, which
137
+ * may throw exceptions that will be translated into validation errors.
138
+ *
139
+ * @since 2.0.0
140
+ * @category utils
141
+ */
142
+ const mapAttempt = exports.mapAttempt = internal.mapAttempt;
143
+ /**
144
+ * Returns a new config whose structure is the samea as this one, but which
145
+ * may produce a different value, constructed using the specified fallible
146
+ * function.
147
+ *
148
+ * @since 2.0.0
149
+ * @category utils
150
+ */
151
+ const mapOrFail = exports.mapOrFail = internal.mapOrFail;
152
+ /**
153
+ * Returns a config that has this configuration nested as a property of the
154
+ * specified name.
155
+ *
156
+ * @since 2.0.0
157
+ * @category utils
158
+ */
159
+ const nested = exports.nested = internal.nested;
160
+ /**
161
+ * Returns a config whose structure is preferentially described by this
162
+ * config, but which falls back to the specified config if there is an issue
163
+ * reading from this config.
164
+ *
165
+ * @since 2.0.0
166
+ * @category utils
167
+ */
168
+ const orElse = exports.orElse = internal.orElse;
169
+ /**
170
+ * Returns configuration which reads from this configuration, but which falls
171
+ * back to the specified configuration if reading from this configuration
172
+ * fails with an error satisfying the specified predicate.
173
+ *
174
+ * @since 2.0.0
175
+ * @category utils
176
+ */
177
+ const orElseIf = exports.orElseIf = internal.orElseIf;
178
+ /**
179
+ * Returns an optional version of this config, which will be `None` if the
180
+ * data is missing from configuration, and `Some` otherwise.
181
+ *
182
+ * @since 2.0.0
183
+ * @category utils
184
+ */
185
+ const option = exports.option = internal.option;
186
+ /**
187
+ * Constructs a new primitive config.
188
+ *
189
+ * @since 2.0.0
190
+ * @category constructors
191
+ */
192
+ const primitive = exports.primitive = internal.primitive;
193
+ /**
194
+ * Returns a config that describes a sequence of values, each of which has the
195
+ * structure of this config.
196
+ *
197
+ * @since 2.0.0
198
+ * @category utils
199
+ */
200
+ const repeat = exports.repeat = internal.repeat;
201
+ /**
202
+ * Constructs a config for a secret value.
203
+ *
204
+ * @since 2.0.0
205
+ * @category constructors
206
+ * @deprecated
207
+ */
208
+ const secret = exports.secret = internal.secret;
209
+ /**
210
+ * Constructs a config for a redacted value.
211
+ *
212
+ * @since 2.0.0
213
+ * @category constructors
214
+ */
215
+ const redacted = exports.redacted = internal.redacted;
216
+ /**
217
+ * Constructs a config for a branded value.
218
+ *
219
+ * @since 3.16.0
220
+ * @category constructors
221
+ */
222
+ const branded = exports.branded = internal.branded;
223
+ /**
224
+ * Constructs a config for a sequence of values.
225
+ *
226
+ * @since 2.0.0
227
+ * @category constructors
228
+ */
229
+ const hashSet = exports.hashSet = internal.hashSet;
230
+ /**
231
+ * Constructs a config for a string value.
232
+ *
233
+ * @since 2.0.0
234
+ * @category constructors
235
+ */
236
+ const string = exports.string = internal.string;
237
+ /**
238
+ * Constructs a config for a non-empty string value.
239
+ *
240
+ * @since 3.7.0
241
+ * @category constructors
242
+ */
243
+ const nonEmptyString = exports.nonEmptyString = internal.nonEmptyString;
244
+ /**
245
+ * Constructs a config which contains the specified value.
246
+ *
247
+ * @since 2.0.0
248
+ * @category constructors
249
+ */
250
+ const succeed = exports.succeed = internal.succeed;
251
+ /**
252
+ * Lazily constructs a config.
253
+ *
254
+ * @since 2.0.0
255
+ * @category constructors
256
+ */
257
+ const suspend = exports.suspend = internal.suspend;
258
+ /**
259
+ * Constructs a config which contains the specified lazy value.
260
+ *
261
+ * @since 2.0.0
262
+ * @category constructors
263
+ */
264
+ const sync = exports.sync = internal.sync;
265
+ /**
266
+ * Constructs a config for a sequence of values.
267
+ *
268
+ * @since 2.0.0
269
+ * @category constructors
270
+ */
271
+ const hashMap = exports.hashMap = internal.hashMap;
272
+ /**
273
+ * Constructs a config from some configuration wrapped with the `Wrap<A>` utility type.
274
+ *
275
+ * For example:
276
+ *
277
+ * ```
278
+ * import { Config, unwrap } from "./Config"
279
+ *
280
+ * interface Options { key: string }
281
+ *
282
+ * const makeConfig = (config: Config.Wrap<Options>): Config<Options> => unwrap(config)
283
+ * ```
284
+ *
285
+ * @since 2.0.0
286
+ * @category constructors
287
+ */
288
+ const unwrap = exports.unwrap = internal.unwrap;
289
+ /**
290
+ * Returns a config that describes the same structure as this one, but which
291
+ * performs validation during loading.
292
+ *
293
+ * @since 2.0.0
294
+ * @category utils
295
+ */
296
+ const validate = exports.validate = internal.validate;
297
+ /**
298
+ * Returns a config that describes the same structure as this one, but has the
299
+ * specified default value in case the information cannot be found.
300
+ *
301
+ * @since 2.0.0
302
+ * @category utils
303
+ */
304
+ const withDefault = exports.withDefault = internal.withDefault;
305
+ /**
306
+ * Adds a description to this configuration, which is intended for humans.
307
+ *
308
+ * @since 2.0.0
309
+ * @category utils
310
+ */
311
+ const withDescription = exports.withDescription = internal.withDescription;
312
+ /**
313
+ * Returns a config that is the composition of this config and the specified
314
+ * config.
315
+ *
316
+ * @since 2.0.0
317
+ * @category zipping
318
+ */
319
+ const zip = exports.zip = internal.zip;
320
+ /**
321
+ * Returns a config that is the composes this config and the specified config
322
+ * using the provided function.
323
+ *
324
+ * @since 2.0.0
325
+ * @category zipping
326
+ */
327
+ const zipWith = exports.zipWith = internal.zipWith;
328
+ //# sourceMappingURL=Config.js.map
backend/node_modules/effect/dist/cjs/Config.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Config.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigTypeId","exports","all","array","boolean","port","url","chunk","date","fail","number","integer","literal","logLevel","duration","isConfig","map","mapAttempt","mapOrFail","nested","orElse","orElseIf","option","primitive","repeat","secret","redacted","branded","hashSet","string","nonEmptyString","succeed","suspend","sync","hashMap","unwrap","validate","withDefault","withDescription","zip","zipWith"],"sources":["../../src/Config.ts"],"sourcesContent":[null],"mappings":";;;;;;AAYA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAA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AAiC,OAAA,GAAgFxD,QAAQ,CAACwD,OAAO;AAEpH;;;;;;;;;;;;;;;;AAgBO,MAAMC,MAAM,GAAAlC,OAAA,CAAAkC,MAAA,GAA8CzD,QAAQ,CAACyD,MAAM;AAEhF;;;;;;;AAOO,MAAMC,QAAQ,GAAAnC,OAAA,CAAAmC,QAAA,GAuDjB1D,QAAQ,CAAC0D,QAAQ;AAErB;;;;;;;AAOO,MAAMC,WAAW,GAAApC,OAAA,CAAAoC,WAAA,GAiBpB3D,QAAQ,CAAC2D,WAAW;AAExB;;;;;;AAMO,MAAMC,eAAe,GAAArC,OAAA,CAAAqC,eAAA,GAexB5D,QAAQ,CAAC4D,eAAe;AAE5B;;;;;;;AAOO,MAAMC,GAAG,GAAAtC,OAAA,CAAAsC,GAAA,GAiBZ7D,QAAQ,CAAC6D,GAAG;AAEhB;;;;;;;AAOO,MAAMC,OAAO,GAAAvC,OAAA,CAAAuC,OAAA,GAiBhB9D,QAAQ,CAAC8D,OAAO","ignoreList":[]}
backend/node_modules/effect/dist/cjs/ConfigError.js ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.reduceWithContext = exports.prefixed = exports.isUnsupported = exports.isSourceUnavailable = exports.isOr = exports.isMissingDataOnly = exports.isMissingData = exports.isInvalidData = exports.isConfigError = exports.isAnd = exports.Unsupported = exports.SourceUnavailable = exports.Or = exports.MissingData = exports.InvalidData = exports.ConfigErrorTypeId = exports.And = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/configError.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ * @category symbols
12
+ */
13
+ const ConfigErrorTypeId = exports.ConfigErrorTypeId = internal.ConfigErrorTypeId;
14
+ /**
15
+ * @since 2.0.0
16
+ * @category constructors
17
+ */
18
+ const And = exports.And = internal.And;
19
+ /**
20
+ * @since 2.0.0
21
+ * @category constructors
22
+ */
23
+ const Or = exports.Or = internal.Or;
24
+ /**
25
+ * @since 2.0.0
26
+ * @category constructors
27
+ */
28
+ const MissingData = exports.MissingData = internal.MissingData;
29
+ /**
30
+ * @since 2.0.0
31
+ * @category constructors
32
+ */
33
+ const InvalidData = exports.InvalidData = internal.InvalidData;
34
+ /**
35
+ * @since 2.0.0
36
+ * @category constructors
37
+ */
38
+ const SourceUnavailable = exports.SourceUnavailable = internal.SourceUnavailable;
39
+ /**
40
+ * @since 2.0.0
41
+ * @category constructors
42
+ */
43
+ const Unsupported = exports.Unsupported = internal.Unsupported;
44
+ /**
45
+ * Returns `true` if the specified value is a `ConfigError`, `false` otherwise.
46
+ *
47
+ * @since 2.0.0
48
+ * @category refinements
49
+ */
50
+ const isConfigError = exports.isConfigError = internal.isConfigError;
51
+ /**
52
+ * Returns `true` if the specified `ConfigError` is an `And`, `false` otherwise.
53
+ *
54
+ * @since 2.0.0
55
+ * @category refinements
56
+ */
57
+ const isAnd = exports.isAnd = internal.isAnd;
58
+ /**
59
+ * Returns `true` if the specified `ConfigError` is an `Or`, `false` otherwise.
60
+ *
61
+ * @since 2.0.0
62
+ * @category refinements
63
+ */
64
+ const isOr = exports.isOr = internal.isOr;
65
+ /**
66
+ * Returns `true` if the specified `ConfigError` is an `InvalidData`, `false`
67
+ * otherwise.
68
+ *
69
+ * @since 2.0.0
70
+ * @category refinements
71
+ */
72
+ const isInvalidData = exports.isInvalidData = internal.isInvalidData;
73
+ /**
74
+ * Returns `true` if the specified `ConfigError` is an `MissingData`, `false`
75
+ * otherwise.
76
+ *
77
+ * @since 2.0.0
78
+ * @category refinements
79
+ */
80
+ const isMissingData = exports.isMissingData = internal.isMissingData;
81
+ /**
82
+ * Returns `true` if the specified `ConfigError` contains only `MissingData` errors, `false` otherwise.
83
+ *
84
+ * @since 2.0.0
85
+ * @categer getters
86
+ */
87
+ const isMissingDataOnly = exports.isMissingDataOnly = internal.isMissingDataOnly;
88
+ /**
89
+ * Returns `true` if the specified `ConfigError` is a `SourceUnavailable`,
90
+ * `false` otherwise.
91
+ *
92
+ * @since 2.0.0
93
+ * @category refinements
94
+ */
95
+ const isSourceUnavailable = exports.isSourceUnavailable = internal.isSourceUnavailable;
96
+ /**
97
+ * Returns `true` if the specified `ConfigError` is an `Unsupported`, `false`
98
+ * otherwise.
99
+ *
100
+ * @since 2.0.0
101
+ * @category refinements
102
+ */
103
+ const isUnsupported = exports.isUnsupported = internal.isUnsupported;
104
+ /**
105
+ * @since 2.0.0
106
+ * @category utils
107
+ */
108
+ const prefixed = exports.prefixed = internal.prefixed;
109
+ /**
110
+ * @since 2.0.0
111
+ * @category folding
112
+ */
113
+ const reduceWithContext = exports.reduceWithContext = internal.reduceWithContext;
114
+ //# sourceMappingURL=ConfigError.js.map
backend/node_modules/effect/dist/cjs/ConfigError.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"ConfigError.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigErrorTypeId","exports","And","Or","MissingData","InvalidData","SourceUnavailable","Unsupported","isConfigError","isAnd","isOr","isInvalidData","isMissingData","isMissingDataOnly","isSourceUnavailable","isUnsupported","prefixed","reduceWithContext"],"sources":["../../src/ConfigError.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAqD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAErD;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QAAQ,CAACoC,mBAAmB;AAEjH;;;;;;;AAOO,MAAMC,aAAa,GAAAd,OAAA,CAAAc,aAAA,GAA+CrC,QAAQ,CAACqC,aAAa;AAE/F;;;;AAIO,MAAMC,QAAQ,GAAAf,OAAA,CAAAe,QAAA,GAWjBtC,QAAQ,CAACsC,QAAQ;AAErB;;;;AAIO,MAAMC,iBAAiB,GAAAhB,OAAA,CAAAgB,iBAAA,GAW1BvC,QAAQ,CAACuC,iBAAiB","ignoreList":[]}
backend/node_modules/effect/dist/cjs/ConfigProvider.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"ConfigProvider.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConfigProviderTypeId","exports","FlatConfigProviderTypeId","ConfigProvider","configProviderTag","make","makeFlat","fromEnv","fromFlat","fromJson","fromMap","constantCase","mapInputPath","kebabCase","lowerCase","nested","orElse","unnested","snakeCase","upperCase","within"],"sources":["../../src/ConfigProvider.ts"],"sourcesContent":[null],"mappings":";;;;;;AAUA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAwD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,G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
6
+ exports.unnested = exports.nested = exports.mapName = exports.empty = exports.andThen = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/configProvider/pathPatch.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ */
12
+
13
+ /**
14
+ * @since 2.0.0
15
+ * @category constructors
16
+ */
17
+ const empty = exports.empty = internal.empty;
18
+ /**
19
+ * @since 2.0.0
20
+ * @category constructors
21
+ */
22
+ const andThen = exports.andThen = internal.andThen;
23
+ /**
24
+ * @since 2.0.0
25
+ * @category constructors
26
+ */
27
+ const mapName = exports.mapName = internal.mapName;
28
+ /**
29
+ * @since 2.0.0
30
+ * @category constructors
31
+ */
32
+ const nested = exports.nested = internal.nested;
33
+ /**
34
+ * @since 2.0.0
35
+ * @category constructors
36
+ */
37
+ const unnested = exports.unnested = internal.unnested;
38
+ //# sourceMappingURL=ConfigProviderPathPatch.js.map
backend/node_modules/effect/dist/cjs/ConfigProviderPathPatch.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"ConfigProviderPathPatch.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","empty","exports","andThen","mapName","nested","unnested"],"sources":["../../src/ConfigProviderPathPatch.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,O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;;AAIO,MAAMC,MAAM,GAAAH,OAAA,CAAAG,MAAA,GAWf1B,QAAQ,CAAC0B,MAAM;AAEnB;;;;AAIO,MAAMC,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAWjB3B,QAAQ,CAAC2B,QAAQ","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Console.js ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.withTime = exports.withGroup = exports.withConsole = exports.warn = exports.trace = exports.timeLog = exports.time = exports.table = exports.setConsole = exports.log = exports.info = exports.group = exports.error = exports.dirxml = exports.dir = exports.debug = exports.countReset = exports.count = exports.consoleWith = exports.clear = exports.assert = exports.TypeId = exports.Console = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/console.js"));
8
+ var defaultConsole = _interopRequireWildcard(require("./internal/defaultServices/console.js"));
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * @since 2.0.0
12
+ * @category type ids
13
+ */
14
+ const TypeId = exports.TypeId = defaultConsole.TypeId;
15
+ /**
16
+ * @since 2.0.0
17
+ * @category context
18
+ */
19
+ const Console = exports.Console = defaultConsole.consoleTag;
20
+ /**
21
+ * @since 2.0.0
22
+ * @category default services
23
+ */
24
+ const withConsole = exports.withConsole = internal.withConsole;
25
+ /**
26
+ * @since 2.0.0
27
+ * @category default services
28
+ */
29
+ const setConsole = exports.setConsole = internal.setConsole;
30
+ /**
31
+ * @since 2.0.0
32
+ * @category accessor
33
+ */
34
+ const consoleWith = exports.consoleWith = internal.consoleWith;
35
+ /**
36
+ * @since 2.0.0
37
+ * @category accessor
38
+ */
39
+ const assert = exports.assert = internal.assert;
40
+ /**
41
+ * @since 2.0.0
42
+ * @category accessor
43
+ */
44
+ const clear = exports.clear = internal.clear;
45
+ /**
46
+ * @since 2.0.0
47
+ * @category accessor
48
+ */
49
+ const count = exports.count = internal.count;
50
+ /**
51
+ * @since 2.0.0
52
+ * @category accessor
53
+ */
54
+ const countReset = exports.countReset = internal.countReset;
55
+ /**
56
+ * @since 2.0.0
57
+ * @category accessor
58
+ */
59
+ const debug = exports.debug = internal.debug;
60
+ /**
61
+ * @since 2.0.0
62
+ * @category accessor
63
+ */
64
+ const dir = exports.dir = internal.dir;
65
+ /**
66
+ * @since 2.0.0
67
+ * @category accessor
68
+ */
69
+ const dirxml = exports.dirxml = internal.dirxml;
70
+ /**
71
+ * @since 2.0.0
72
+ * @category accessor
73
+ */
74
+ const error = exports.error = internal.error;
75
+ /**
76
+ * @since 2.0.0
77
+ * @category accessor
78
+ */
79
+ const group = exports.group = internal.group;
80
+ /**
81
+ * @since 2.0.0
82
+ * @category accessor
83
+ */
84
+ const info = exports.info = internal.info;
85
+ /**
86
+ * @since 2.0.0
87
+ * @category accessor
88
+ */
89
+ const log = exports.log = internal.log;
90
+ /**
91
+ * @since 2.0.0
92
+ * @category accessor
93
+ */
94
+ const table = exports.table = internal.table;
95
+ /**
96
+ * @since 2.0.0
97
+ * @category accessor
98
+ */
99
+ const time = exports.time = internal.time;
100
+ /**
101
+ * @since 2.0.0
102
+ * @category accessor
103
+ */
104
+ const timeLog = exports.timeLog = internal.timeLog;
105
+ /**
106
+ * @since 2.0.0
107
+ * @category accessor
108
+ */
109
+ const trace = exports.trace = internal.trace;
110
+ /**
111
+ * @since 2.0.0
112
+ * @category accessor
113
+ */
114
+ const warn = exports.warn = internal.warn;
115
+ /**
116
+ * @since 2.0.0
117
+ * @category accessor
118
+ */
119
+ const withGroup = exports.withGroup = internal.withGroup;
120
+ /**
121
+ * @since 2.0.0
122
+ * @category accessor
123
+ */
124
+ const withTime = exports.withTime = internal.withTime;
125
+ //# sourceMappingURL=Console.js.map
backend/node_modules/effect/dist/cjs/Console.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Console.js","names":["internal","_interopRequireWildcard","require","defaultConsole","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Console","consoleTag","withConsole","setConsole","consoleWith","assert","clear","count","countReset","debug","dir","dirxml","error","group","info","log","table","time","timeLog","trace","warn","withGroup","withTime"],"sources":["../../src/Console.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAuE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAA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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unsafeParse = exports.sequenceReverse = exports.sequence = exports.prev = exports.parse = exports.next = exports.match = exports.make = exports.isParseError = exports.isCron = exports.equals = exports.TypeId = exports.ParseErrorTypeId = exports.ParseError = exports.Equivalence = void 0;
7
+ var Arr = _interopRequireWildcard(require("./Array.js"));
8
+ var Data = _interopRequireWildcard(require("./Data.js"));
9
+ var Either = _interopRequireWildcard(require("./Either.js"));
10
+ var Equal = _interopRequireWildcard(require("./Equal.js"));
11
+ var equivalence = _interopRequireWildcard(require("./Equivalence.js"));
12
+ var _Function = require("./Function.js");
13
+ var Hash = _interopRequireWildcard(require("./Hash.js"));
14
+ var _Inspectable = require("./Inspectable.js");
15
+ var dateTime = _interopRequireWildcard(require("./internal/dateTime.js"));
16
+ var N = _interopRequireWildcard(require("./Number.js"));
17
+ var Option = _interopRequireWildcard(require("./Option.js"));
18
+ var _Pipeable = require("./Pipeable.js");
19
+ var _Predicate = require("./Predicate.js");
20
+ var String = _interopRequireWildcard(require("./String.js"));
21
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
22
+ /**
23
+ * @since 2.0.0
24
+ */
25
+
26
+ /**
27
+ * @since 2.0.0
28
+ * @category symbols
29
+ */
30
+ const TypeId = exports.TypeId = /*#__PURE__*/Symbol.for("effect/Cron");
31
+ const CronProto = {
32
+ [TypeId]: TypeId,
33
+ [Equal.symbol](that) {
34
+ return isCron(that) && equals(this, that);
35
+ },
36
+ [Hash.symbol]() {
37
+ return (0, _Function.pipe)(Hash.hash(this.tz), Hash.combine(Hash.array(Arr.fromIterable(this.seconds))), Hash.combine(Hash.array(Arr.fromIterable(this.minutes))), Hash.combine(Hash.array(Arr.fromIterable(this.hours))), Hash.combine(Hash.array(Arr.fromIterable(this.days))), Hash.combine(Hash.array(Arr.fromIterable(this.months))), Hash.combine(Hash.array(Arr.fromIterable(this.weekdays))), Hash.cached(this));
38
+ },
39
+ toString() {
40
+ return (0, _Inspectable.format)(this.toJSON());
41
+ },
42
+ toJSON() {
43
+ return {
44
+ _id: "Cron",
45
+ tz: this.tz,
46
+ seconds: Arr.fromIterable(this.seconds),
47
+ minutes: Arr.fromIterable(this.minutes),
48
+ hours: Arr.fromIterable(this.hours),
49
+ days: Arr.fromIterable(this.days),
50
+ months: Arr.fromIterable(this.months),
51
+ weekdays: Arr.fromIterable(this.weekdays)
52
+ };
53
+ },
54
+ [_Inspectable.NodeInspectSymbol]() {
55
+ return this.toJSON();
56
+ },
57
+ pipe() {
58
+ return (0, _Pipeable.pipeArguments)(this, arguments);
59
+ }
60
+ };
61
+ /**
62
+ * Checks if a given value is a `Cron` instance.
63
+ *
64
+ * @since 2.0.0
65
+ * @category guards
66
+ */
67
+ const isCron = u => (0, _Predicate.hasProperty)(u, TypeId);
68
+ /**
69
+ * Creates a `Cron` instance.
70
+ *
71
+ * @since 2.0.0
72
+ * @category constructors
73
+ */
74
+ exports.isCron = isCron;
75
+ const make = values => {
76
+ const o = Object.create(CronProto);
77
+ o.seconds = new Set(Arr.sort(values.seconds ?? [0], N.Order));
78
+ o.minutes = new Set(Arr.sort(values.minutes, N.Order));
79
+ o.hours = new Set(Arr.sort(values.hours, N.Order));
80
+ o.days = new Set(Arr.sort(values.days, N.Order));
81
+ o.months = new Set(Arr.sort(values.months, N.Order));
82
+ o.weekdays = new Set(Arr.sort(values.weekdays, N.Order));
83
+ o.tz = Option.fromNullable(values.tz);
84
+ const seconds = Array.from(o.seconds);
85
+ const minutes = Array.from(o.minutes);
86
+ const hours = Array.from(o.hours);
87
+ const days = Array.from(o.days);
88
+ const months = Array.from(o.months);
89
+ const weekdays = Array.from(o.weekdays);
90
+ o.first = {
91
+ second: seconds[0] ?? 0,
92
+ minute: minutes[0] ?? 0,
93
+ hour: hours[0] ?? 0,
94
+ day: days[0] ?? 1,
95
+ month: (months[0] ?? 1) - 1,
96
+ weekday: weekdays[0] ?? 0
97
+ };
98
+ o.last = {
99
+ second: seconds[seconds.length - 1] ?? 59,
100
+ minute: minutes[minutes.length - 1] ?? 59,
101
+ hour: hours[hours.length - 1] ?? 23,
102
+ day: days[days.length - 1] ?? 31,
103
+ month: (months[months.length - 1] ?? 12) - 1,
104
+ weekday: weekdays[weekdays.length - 1] ?? 6
105
+ };
106
+ o.next = {
107
+ second: lookupTable(seconds, 60, "next"),
108
+ minute: lookupTable(minutes, 60, "next"),
109
+ hour: lookupTable(hours, 24, "next"),
110
+ day: lookupTable(days, 32, "next"),
111
+ month: lookupTable(months, 13, "next"),
112
+ weekday: lookupTable(weekdays, 7, "next")
113
+ };
114
+ o.prev = {
115
+ second: lookupTable(seconds, 60, "prev"),
116
+ minute: lookupTable(minutes, 60, "prev"),
117
+ hour: lookupTable(hours, 24, "prev"),
118
+ day: lookupTable(days, 32, "prev"),
119
+ month: lookupTable(months, 13, "prev"),
120
+ weekday: lookupTable(weekdays, 7, "prev")
121
+ };
122
+ return o;
123
+ };
124
+ exports.make = make;
125
+ const lookupTable = (values, size, dir) => {
126
+ const result = new Array(size).fill(undefined);
127
+ if (values.length === 0) {
128
+ return result;
129
+ }
130
+ let current = undefined;
131
+ if (dir === "next") {
132
+ let index = values.length - 1;
133
+ for (let i = size - 1; i >= 0; i--) {
134
+ while (index >= 0 && values[index] >= i) {
135
+ current = values[index--];
136
+ }
137
+ result[i] = current;
138
+ }
139
+ } else {
140
+ let index = 0;
141
+ for (let i = 0; i < size; i++) {
142
+ while (index < values.length && values[index] <= i) {
143
+ current = values[index++];
144
+ }
145
+ result[i] = current;
146
+ }
147
+ }
148
+ return result;
149
+ };
150
+ /**
151
+ * @since 2.0.0
152
+ * @category symbol
153
+ */
154
+ const ParseErrorTypeId = exports.ParseErrorTypeId = /*#__PURE__*/Symbol.for("effect/Cron/errors/ParseError");
155
+ /**
156
+ * Represents a checked exception which occurs when decoding fails.
157
+ *
158
+ * @since 2.0.0
159
+ * @category models
160
+ */
161
+ class ParseError extends /*#__PURE__*/Data.TaggedError("CronParseError") {
162
+ /**
163
+ * @since 2.0.0
164
+ */
165
+ [ParseErrorTypeId] = ParseErrorTypeId;
166
+ }
167
+ /**
168
+ * Returns `true` if the specified value is an `ParseError`, `false` otherwise.
169
+ *
170
+ * @since 2.0.0
171
+ * @category guards
172
+ */
173
+ exports.ParseError = ParseError;
174
+ const isParseError = u => (0, _Predicate.hasProperty)(u, ParseErrorTypeId);
175
+ /**
176
+ * Parses a cron expression into a `Cron` instance.
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * import * as assert from "node:assert"
181
+ * import { Cron, Either } from "effect"
182
+ *
183
+ * // At 04:00 on every day-of-month from 8 through 14.
184
+ * assert.deepStrictEqual(Cron.parse("0 0 4 8-14 * *"), Either.right(Cron.make({
185
+ * seconds: [0],
186
+ * minutes: [0],
187
+ * hours: [4],
188
+ * days: [8, 9, 10, 11, 12, 13, 14],
189
+ * months: [],
190
+ * weekdays: []
191
+ * })))
192
+ * ```
193
+ *
194
+ * @since 2.0.0
195
+ * @category constructors
196
+ */
197
+ exports.isParseError = isParseError;
198
+ const parse = (cron, tz) => {
199
+ const segments = cron.split(" ").filter(String.isNonEmpty);
200
+ if (segments.length !== 5 && segments.length !== 6) {
201
+ return Either.left(new ParseError({
202
+ message: `Invalid number of segments in cron expression`,
203
+ input: cron
204
+ }));
205
+ }
206
+ if (segments.length === 5) {
207
+ segments.unshift("0");
208
+ }
209
+ const [seconds, minutes, hours, days, months, weekdays] = segments;
210
+ const zone = tz === undefined || dateTime.isTimeZone(tz) ? Either.right(tz) : Either.fromOption(dateTime.zoneFromString(tz), () => new ParseError({
211
+ message: `Invalid time zone in cron expression`,
212
+ input: tz
213
+ }));
214
+ return Either.all({
215
+ tz: zone,
216
+ seconds: parseSegment(seconds, secondOptions),
217
+ minutes: parseSegment(minutes, minuteOptions),
218
+ hours: parseSegment(hours, hourOptions),
219
+ days: parseSegment(days, dayOptions),
220
+ months: parseSegment(months, monthOptions),
221
+ weekdays: parseSegment(weekdays, weekdayOptions)
222
+ }).pipe(Either.map(make));
223
+ };
224
+ /**
225
+ * Parses a cron expression into a `Cron` instance.
226
+ *
227
+ * **Details**
228
+ *
229
+ * This function takes a cron expression as a string and attempts to parse it
230
+ * into a `Cron` instance. If the expression is valid, the resulting `Cron`
231
+ * instance will represent the schedule defined by the cron expression.
232
+ *
233
+ * If the expression is invalid, the function throws a `ParseError`.
234
+ *
235
+ * You can optionally provide a time zone (`tz`) to interpret the cron
236
+ * expression in a specific time zone. If no time zone is provided, the cron
237
+ * expression will use the default time zone.
238
+ *
239
+ * @example
240
+ * ```ts
241
+ * import { Cron } from "effect"
242
+ *
243
+ * // At 04:00 on every day-of-month from 8 through 14.
244
+ * console.log(Cron.unsafeParse("0 4 8-14 * *"))
245
+ * // Output:
246
+ * // {
247
+ * // _id: 'Cron',
248
+ * // tz: { _id: 'Option', _tag: 'None' },
249
+ * // seconds: [ 0 ],
250
+ * // minutes: [ 0 ],
251
+ * // hours: [ 4 ],
252
+ * // days: [
253
+ * // 8, 9, 10, 11,
254
+ * // 12, 13, 14
255
+ * // ],
256
+ * // months: [],
257
+ * // weekdays: []
258
+ * // }
259
+ * ```
260
+ *
261
+ * @since 2.0.0
262
+ * @category constructors
263
+ */
264
+ exports.parse = parse;
265
+ const unsafeParse = (cron, tz) => Either.getOrThrowWith(parse(cron, tz), _Function.identity);
266
+ /**
267
+ * Checks if a given `Date` falls within an active `Cron` time window.
268
+ *
269
+ * @example
270
+ * ```ts
271
+ * import * as assert from "node:assert"
272
+ * import { Cron, Either } from "effect"
273
+ *
274
+ * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
275
+ * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 04:00:00")), true)
276
+ * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 05:00:00")), false)
277
+ * ```
278
+ *
279
+ * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
280
+ *
281
+ * @since 2.0.0
282
+ */
283
+ exports.unsafeParse = unsafeParse;
284
+ const match = (cron, date) => {
285
+ const parts = dateTime.unsafeMakeZoned(date, {
286
+ timeZone: Option.getOrUndefined(cron.tz)
287
+ }).pipe(dateTime.toParts);
288
+ if (cron.seconds.size !== 0 && !cron.seconds.has(parts.seconds)) {
289
+ return false;
290
+ }
291
+ if (cron.minutes.size !== 0 && !cron.minutes.has(parts.minutes)) {
292
+ return false;
293
+ }
294
+ if (cron.hours.size !== 0 && !cron.hours.has(parts.hours)) {
295
+ return false;
296
+ }
297
+ if (cron.months.size !== 0 && !cron.months.has(parts.month)) {
298
+ return false;
299
+ }
300
+ if (cron.days.size === 0 && cron.weekdays.size === 0) {
301
+ return true;
302
+ }
303
+ if (cron.weekdays.size === 0) {
304
+ return cron.days.has(parts.day);
305
+ }
306
+ if (cron.days.size === 0) {
307
+ return cron.weekdays.has(parts.weekDay);
308
+ }
309
+ return cron.days.has(parts.day) || cron.weekdays.has(parts.weekDay);
310
+ };
311
+ exports.match = match;
312
+ const daysInMonth = date => new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 0)).getUTCDate();
313
+ /**
314
+ * Returns the next run `Date` for the given `Cron` instance.
315
+ *
316
+ * Uses the current time as a starting point if no value is provided for `startFrom`.
317
+ *
318
+ * @example
319
+ * ```ts
320
+ * import * as assert from "node:assert"
321
+ * import { Cron, Either } from "effect"
322
+ *
323
+ * const after = new Date("2021-01-01 00:00:00")
324
+ * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
325
+ * assert.deepStrictEqual(Cron.next(cron, after), new Date("2021-01-08 04:00:00"))
326
+ * ```
327
+ *
328
+ * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
329
+ * @throws `Error` if the next run date cannot be found within 10,000 iterations.
330
+ *
331
+ * @since 2.0.0
332
+ */
333
+ const next = (cron, startFrom) => {
334
+ return stepCron(cron, startFrom, "next");
335
+ };
336
+ /**
337
+ * Returns the previous run `Date` for the given `Cron` instance.
338
+ *
339
+ * Uses the current time as a starting point if no value is provided for `startFrom`.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * import * as assert from "node:assert"
344
+ * import { Cron, Either } from "effect"
345
+ *
346
+ * const before = new Date("2021-01-15 00:00:00")
347
+ * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *"))
348
+ * assert.deepStrictEqual(Cron.prev(cron, before), new Date("2021-01-14 04:00:00"))
349
+ * ```
350
+ *
351
+ * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid.
352
+ * @throws `Error` if the previous run date cannot be found within 10,000 iterations.
353
+ *
354
+ * @since 3.20.0
355
+ */
356
+ exports.next = next;
357
+ const prev = (cron, startFrom) => {
358
+ return stepCron(cron, startFrom, "prev");
359
+ };
360
+ /** @internal */
361
+ exports.prev = prev;
362
+ const stepCron = (cron, startFrom, direction) => {
363
+ const tz = Option.getOrUndefined(cron.tz);
364
+ const zoned = dateTime.unsafeMakeZoned(startFrom ?? new Date(), {
365
+ timeZone: tz
366
+ });
367
+ const prev = direction === "prev";
368
+ const tick = prev ? -1 : 1;
369
+ const table = cron[direction];
370
+ const boundary = prev ? cron.last : cron.first;
371
+ const needsStep = prev ? (next, current) => next < current : (next, current) => next > current;
372
+ const utc = tz !== undefined && dateTime.isTimeZoneNamed(tz) && tz.id === "UTC";
373
+ const adjustDst = utc ? _Function.constVoid : current => {
374
+ const adjusted = dateTime.unsafeMakeZoned(current, {
375
+ timeZone: zoned.zone,
376
+ adjustForTimeZone: true,
377
+ disambiguation: prev ? "later" : undefined
378
+ }).pipe(dateTime.toDate);
379
+ const drift = current.getTime() - adjusted.getTime();
380
+ if (prev ? drift !== 0 : drift > 0) {
381
+ current.setTime(adjusted.getTime());
382
+ }
383
+ };
384
+ const result = dateTime.mutate(zoned, current => {
385
+ current.setUTCSeconds(current.getUTCSeconds() + tick, 0);
386
+ for (let i = 0; i < 10_000; i++) {
387
+ if (cron.seconds.size !== 0) {
388
+ const currentSecond = current.getUTCSeconds();
389
+ const nextSecond = table.second[currentSecond];
390
+ if (nextSecond === undefined) {
391
+ current.setUTCMinutes(current.getUTCMinutes() + tick, boundary.second);
392
+ adjustDst(current);
393
+ continue;
394
+ }
395
+ if (needsStep(nextSecond, currentSecond)) {
396
+ current.setUTCSeconds(nextSecond);
397
+ adjustDst(current);
398
+ continue;
399
+ }
400
+ }
401
+ if (cron.minutes.size !== 0) {
402
+ const currentMinute = current.getUTCMinutes();
403
+ const nextMinute = table.minute[currentMinute];
404
+ if (nextMinute === undefined) {
405
+ current.setUTCHours(current.getUTCHours() + tick, boundary.minute, boundary.second);
406
+ adjustDst(current);
407
+ continue;
408
+ }
409
+ if (needsStep(nextMinute, currentMinute)) {
410
+ current.setUTCMinutes(nextMinute, boundary.second);
411
+ adjustDst(current);
412
+ continue;
413
+ }
414
+ }
415
+ if (cron.hours.size !== 0) {
416
+ const currentHour = current.getUTCHours();
417
+ const nextHour = table.hour[currentHour];
418
+ if (nextHour === undefined) {
419
+ current.setUTCDate(current.getUTCDate() + tick);
420
+ current.setUTCHours(boundary.hour, boundary.minute, boundary.second);
421
+ adjustDst(current);
422
+ continue;
423
+ }
424
+ if (needsStep(nextHour, currentHour)) {
425
+ current.setUTCHours(nextHour, boundary.minute, boundary.second);
426
+ adjustDst(current);
427
+ continue;
428
+ }
429
+ }
430
+ if (cron.weekdays.size !== 0 || cron.days.size !== 0) {
431
+ let a = prev ? -Infinity : Infinity;
432
+ let b = prev ? -Infinity : Infinity;
433
+ if (cron.weekdays.size !== 0) {
434
+ const currentWeekday = current.getUTCDay();
435
+ const nextWeekday = table.weekday[currentWeekday];
436
+ if (nextWeekday === undefined) {
437
+ a = prev ? currentWeekday - 7 + boundary.weekday : 7 - currentWeekday + boundary.weekday;
438
+ } else {
439
+ a = nextWeekday - currentWeekday;
440
+ }
441
+ }
442
+ // Only check day-of-month if weekday constraint not already satisfied (they're OR'd)
443
+ if (cron.days.size !== 0 && a !== 0) {
444
+ const currentDay = current.getUTCDate();
445
+ const nextDay = table.day[currentDay];
446
+ if (nextDay === undefined) {
447
+ if (prev) {
448
+ // When wrapping to previous month, calculate days back:
449
+ // Current day offset + gap from end of prev month to target day
450
+ // Example: June 3 → May 20 with boundary.day=20: -(3 + (31 - 20)) = -14
451
+ const prevMonthDays = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), current.getUTCMonth(), 0)));
452
+ b = -(currentDay + (prevMonthDays - boundary.day));
453
+ } else {
454
+ b = daysInMonth(current) - currentDay + boundary.day;
455
+ }
456
+ } else {
457
+ b = nextDay - currentDay;
458
+ }
459
+ }
460
+ const addDays = prev ? Math.max(a, b) : Math.min(a, b);
461
+ if (addDays !== 0) {
462
+ current.setUTCDate(current.getUTCDate() + addDays);
463
+ current.setUTCHours(boundary.hour, boundary.minute, boundary.second);
464
+ adjustDst(current);
465
+ continue;
466
+ }
467
+ }
468
+ if (cron.months.size !== 0) {
469
+ const currentMonth = current.getUTCMonth() + 1;
470
+ const nextMonth = table.month[currentMonth];
471
+ const clampBoundaryDay = targetMonthIndex => {
472
+ if (cron.days.size !== 0) {
473
+ return boundary.day;
474
+ }
475
+ const maxDayInMonth = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), targetMonthIndex, 1)));
476
+ return Math.min(boundary.day, maxDayInMonth);
477
+ };
478
+ if (nextMonth === undefined) {
479
+ current.setUTCFullYear(current.getUTCFullYear() + tick);
480
+ current.setUTCMonth(boundary.month, clampBoundaryDay(boundary.month));
481
+ current.setUTCHours(boundary.hour, boundary.minute, boundary.second);
482
+ adjustDst(current);
483
+ continue;
484
+ }
485
+ if (needsStep(nextMonth, currentMonth)) {
486
+ const targetMonthIndex = nextMonth - 1;
487
+ current.setUTCMonth(targetMonthIndex, clampBoundaryDay(targetMonthIndex));
488
+ current.setUTCHours(boundary.hour, boundary.minute, boundary.second);
489
+ adjustDst(current);
490
+ continue;
491
+ }
492
+ }
493
+ return;
494
+ }
495
+ throw new Error("Unable to find next cron date");
496
+ });
497
+ return dateTime.toDateUtc(result);
498
+ };
499
+ /**
500
+ * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance.
501
+ *
502
+ * @since 2.0.0
503
+ */
504
+ const sequence = function* (cron, startFrom) {
505
+ while (true) {
506
+ yield startFrom = next(cron, startFrom);
507
+ }
508
+ };
509
+ /**
510
+ * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance,
511
+ * in reverse direction.
512
+ *
513
+ * @since 3.20.0
514
+ */
515
+ exports.sequence = sequence;
516
+ const sequenceReverse = function* (cron, startFrom) {
517
+ while (true) {
518
+ yield startFrom = prev(cron, startFrom);
519
+ }
520
+ };
521
+ /**
522
+ * @category instances
523
+ * @since 2.0.0
524
+ */
525
+ exports.sequenceReverse = sequenceReverse;
526
+ const Equivalence = exports.Equivalence = /*#__PURE__*/equivalence.make((self, that) => restrictionsEquals(self.seconds, that.seconds) && restrictionsEquals(self.minutes, that.minutes) && restrictionsEquals(self.hours, that.hours) && restrictionsEquals(self.days, that.days) && restrictionsEquals(self.months, that.months) && restrictionsEquals(self.weekdays, that.weekdays));
527
+ const restrictionsArrayEquals = /*#__PURE__*/equivalence.array(equivalence.number);
528
+ const restrictionsEquals = (self, that) => restrictionsArrayEquals(Arr.fromIterable(self), Arr.fromIterable(that));
529
+ /**
530
+ * Checks if two `Cron`s are equal.
531
+ *
532
+ * @since 2.0.0
533
+ * @category predicates
534
+ */
535
+ const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(self, that));
536
+ const secondOptions = {
537
+ min: 0,
538
+ max: 59
539
+ };
540
+ const minuteOptions = {
541
+ min: 0,
542
+ max: 59
543
+ };
544
+ const hourOptions = {
545
+ min: 0,
546
+ max: 23
547
+ };
548
+ const dayOptions = {
549
+ min: 1,
550
+ max: 31
551
+ };
552
+ const monthOptions = {
553
+ min: 1,
554
+ max: 12,
555
+ aliases: {
556
+ jan: 1,
557
+ feb: 2,
558
+ mar: 3,
559
+ apr: 4,
560
+ may: 5,
561
+ jun: 6,
562
+ jul: 7,
563
+ aug: 8,
564
+ sep: 9,
565
+ oct: 10,
566
+ nov: 11,
567
+ dec: 12
568
+ }
569
+ };
570
+ const weekdayOptions = {
571
+ min: 0,
572
+ max: 6,
573
+ aliases: {
574
+ sun: 0,
575
+ mon: 1,
576
+ tue: 2,
577
+ wed: 3,
578
+ thu: 4,
579
+ fri: 5,
580
+ sat: 6
581
+ }
582
+ };
583
+ const parseSegment = (input, options) => {
584
+ const capacity = options.max - options.min + 1;
585
+ const values = new Set();
586
+ const fields = input.split(",");
587
+ for (const field of fields) {
588
+ const [raw, step] = splitStep(field);
589
+ if (raw === "*" && step === undefined) {
590
+ return Either.right(new Set());
591
+ }
592
+ if (step !== undefined) {
593
+ if (!Number.isInteger(step)) {
594
+ return Either.left(new ParseError({
595
+ message: `Expected step value to be a positive integer`,
596
+ input
597
+ }));
598
+ }
599
+ if (step < 1) {
600
+ return Either.left(new ParseError({
601
+ message: `Expected step value to be greater than 0`,
602
+ input
603
+ }));
604
+ }
605
+ if (step > options.max) {
606
+ return Either.left(new ParseError({
607
+ message: `Expected step value to be less than ${options.max}`,
608
+ input
609
+ }));
610
+ }
611
+ }
612
+ if (raw === "*") {
613
+ for (let i = options.min; i <= options.max; i += step ?? 1) {
614
+ values.add(i);
615
+ }
616
+ } else {
617
+ const [left, right] = splitRange(raw, options.aliases);
618
+ if (!Number.isInteger(left)) {
619
+ return Either.left(new ParseError({
620
+ message: `Expected a positive integer`,
621
+ input
622
+ }));
623
+ }
624
+ if (left < options.min || left > options.max) {
625
+ return Either.left(new ParseError({
626
+ message: `Expected a value between ${options.min} and ${options.max}`,
627
+ input
628
+ }));
629
+ }
630
+ if (right === undefined) {
631
+ values.add(left);
632
+ } else {
633
+ if (!Number.isInteger(right)) {
634
+ return Either.left(new ParseError({
635
+ message: `Expected a positive integer`,
636
+ input
637
+ }));
638
+ }
639
+ if (right < options.min || right > options.max) {
640
+ return Either.left(new ParseError({
641
+ message: `Expected a value between ${options.min} and ${options.max}`,
642
+ input
643
+ }));
644
+ }
645
+ if (left > right) {
646
+ return Either.left(new ParseError({
647
+ message: `Invalid value range`,
648
+ input
649
+ }));
650
+ }
651
+ for (let i = left; i <= right; i += step ?? 1) {
652
+ values.add(i);
653
+ }
654
+ }
655
+ }
656
+ if (values.size >= capacity) {
657
+ return Either.right(new Set());
658
+ }
659
+ }
660
+ return Either.right(values);
661
+ };
662
+ const splitStep = input => {
663
+ const seperator = input.indexOf("/");
664
+ if (seperator !== -1) {
665
+ return [input.slice(0, seperator), Number(input.slice(seperator + 1))];
666
+ }
667
+ return [input, undefined];
668
+ };
669
+ const splitRange = (input, aliases) => {
670
+ const seperator = input.indexOf("-");
671
+ if (seperator !== -1) {
672
+ return [aliasOrValue(input.slice(0, seperator), aliases), aliasOrValue(input.slice(seperator + 1), aliases)];
673
+ }
674
+ return [aliasOrValue(input, aliases), undefined];
675
+ };
676
+ function aliasOrValue(field, aliases) {
677
+ return aliases?.[field.toLocaleLowerCase()] ?? Number(field);
678
+ }
679
+ //# sourceMappingURL=Cron.js.map
backend/node_modules/effect/dist/cjs/Cron.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Cron.js","names":["Arr","_interopRequireWildcard","require","Data","Either","Equal","equivalence","_Function","Hash","_Inspectable","dateTime","N","Option","_Pipeable","_Predicate","String","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","Symbol","for","CronProto","symbol","that","isCron","equals","pipe","hash","tz","combine","array","fromIterable","seconds","minutes","hours","days","months","weekdays","cached","toString","format","toJSON","_id","NodeInspectSymbol","pipeArguments","arguments","u","hasProperty","make","values","create","Set","sort","Order","fromNullable","Array","from","first","second","minute","hour","day","month","weekday","last","length","next","lookupTable","prev","size","dir","result","fill","undefined","current","index","ParseErrorTypeId","ParseError","TaggedError","isParseError","parse","cron","segments","split","filter","isNonEmpty","left","message","input","unshift","zone","isTimeZone","right","fromOption","zoneFromString","all","parseSegment","secondOptions","minuteOptions","hourOptions","dayOptions","monthOptions","weekdayOptions","map","unsafeParse","getOrThrowWith","identity","match","date","parts","unsafeMakeZoned","timeZone","getOrUndefined","toParts","weekDay","daysInMonth","Date","UTC","getUTCFullYear","getUTCMonth","getUTCDate","startFrom","stepCron","direction","zoned","tick","table","boundary","needsStep","utc","isTimeZoneNamed","id","adjustDst","constVoid","adjusted","adjustForTimeZone","disambiguation","toDate","drift","getTime","setTime","mutate","setUTCSeconds","getUTCSeconds","currentSecond","nextSecond","setUTCMinutes","getUTCMinutes","currentMinute","nextMinute","setUTCHours","getUTCHours","currentHour","nextHour","setUTCDate","a","Infinity","b","currentWeekday","getUTCDay","nextWeekday","currentDay","nextDay","prevMonthDays","addDays","Math","max","min","currentMonth","nextMonth","clampBoundaryDay","targetMonthIndex","maxDayInMonth","setUTCFullYear","setUTCMonth","Error","toDateUtc","sequence","sequenceReverse","Equivalence","self","restrictionsEquals","restrictionsArrayEquals","number","dual","aliases","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec","sun","mon","tue","wed","thu","fri","sat","options","capacity","fields","field","raw","step","splitStep","Number","isInteger","add","splitRange","seperator","indexOf","slice","aliasOrValue","toLocaleLowerCase"],"sources":["../../src/Cron.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAEA,IAAAE,MAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAT,uBAAA,CAAAC,OAAA;AACA,IAAAS,CAAA,GAAAV,uBAAA,CAAAC,OAAA;AACA,IAAAU,MAAA,GAAAX,uBAAA,CAAAC,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAd,uBAAA,CAAAC,OAAA;AAAqC,SAAAD,wBAAAe,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unsafeStruct = exports.unsafeArray = exports.tuple = exports.taggedEnum = exports.tagged = exports.struct = exports.case = exports.array = exports.TaggedError = exports.TaggedClass = exports.Structural = exports.Error = exports.Class = void 0;
7
+ var core = _interopRequireWildcard(require("./internal/core.js"));
8
+ var internal = _interopRequireWildcard(require("./internal/data.js"));
9
+ var _effectable = require("./internal/effectable.js");
10
+ var Predicate = _interopRequireWildcard(require("./Predicate.js"));
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ /**
13
+ * @example
14
+ * ```ts
15
+ * import * as assert from "node:assert"
16
+ * import { Data, Equal } from "effect"
17
+ *
18
+ * const alice = Data.struct({ name: "Alice", age: 30 })
19
+ *
20
+ * const bob = Data.struct({ name: "Bob", age: 40 })
21
+ *
22
+ * assert.deepStrictEqual(Equal.equals(alice, alice), true)
23
+ * assert.deepStrictEqual(Equal.equals(alice, Data.struct({ name: "Alice", age: 30 })), true)
24
+ *
25
+ * assert.deepStrictEqual(Equal.equals(alice, { name: "Alice", age: 30 }), false)
26
+ * assert.deepStrictEqual(Equal.equals(alice, bob), false)
27
+ * ```
28
+ *
29
+ * @category constructors
30
+ * @since 2.0.0
31
+ */
32
+ const struct = exports.struct = internal.struct;
33
+ /**
34
+ * @category constructors
35
+ * @since 2.0.0
36
+ */
37
+ const unsafeStruct = as => Object.setPrototypeOf(as, _effectable.StructuralPrototype);
38
+ /**
39
+ * @example
40
+ * ```ts
41
+ * import * as assert from "node:assert"
42
+ * import { Data, Equal } from "effect"
43
+ *
44
+ * const alice = Data.tuple("Alice", 30)
45
+ *
46
+ * const bob = Data.tuple("Bob", 40)
47
+ *
48
+ * assert.deepStrictEqual(Equal.equals(alice, alice), true)
49
+ * assert.deepStrictEqual(Equal.equals(alice, Data.tuple("Alice", 30)), true)
50
+ *
51
+ * assert.deepStrictEqual(Equal.equals(alice, ["Alice", 30]), false)
52
+ * assert.deepStrictEqual(Equal.equals(alice, bob), false)
53
+ * ```
54
+ *
55
+ * @category constructors
56
+ * @since 2.0.0
57
+ */
58
+ exports.unsafeStruct = unsafeStruct;
59
+ const tuple = (...as) => unsafeArray(as);
60
+ /**
61
+ * @example
62
+ * ```ts
63
+ * import * as assert from "node:assert"
64
+ * import { Data, Equal } from "effect"
65
+ *
66
+ * const alice = Data.struct({ name: "Alice", age: 30 })
67
+ * const bob = Data.struct({ name: "Bob", age: 40 })
68
+ *
69
+ * const persons = Data.array([alice, bob])
70
+ *
71
+ * assert.deepStrictEqual(
72
+ * Equal.equals(
73
+ * persons,
74
+ * Data.array([
75
+ * Data.struct({ name: "Alice", age: 30 }),
76
+ * Data.struct({ name: "Bob", age: 40 })
77
+ * ])
78
+ * ),
79
+ * true
80
+ * )
81
+ * ```
82
+ *
83
+ * @category constructors
84
+ * @since 2.0.0
85
+ */
86
+ exports.tuple = tuple;
87
+ const array = as => unsafeArray(as.slice(0));
88
+ /**
89
+ * @category constructors
90
+ * @since 2.0.0
91
+ */
92
+ exports.array = array;
93
+ const unsafeArray = as => Object.setPrototypeOf(as, internal.ArrayProto);
94
+ exports.unsafeArray = unsafeArray;
95
+ const _case = () => args => args === undefined ? Object.create(_effectable.StructuralPrototype) : struct(args);
96
+ exports.case = _case;
97
+ /**
98
+ * Provides a tagged constructor for the specified `Case`.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * import * as assert from "node:assert"
103
+ * import { Data } from "effect"
104
+ *
105
+ * interface Person {
106
+ * readonly _tag: "Person" // the tag
107
+ * readonly name: string
108
+ * }
109
+ *
110
+ * const Person = Data.tagged<Person>("Person")
111
+ *
112
+ * const mike = Person({ name: "Mike" })
113
+ *
114
+ * assert.deepEqual(mike, { _tag: "Person", name: "Mike" })
115
+ * ```
116
+ *
117
+ * @since 2.0.0
118
+ * @category constructors
119
+ */
120
+ const tagged = tag => args => {
121
+ const value = args === undefined ? Object.create(_effectable.StructuralPrototype) : struct(args);
122
+ value._tag = tag;
123
+ return value;
124
+ };
125
+ /**
126
+ * Provides a constructor for a Case Class.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * import * as assert from "node:assert"
131
+ * import { Data, Equal } from "effect"
132
+ *
133
+ * class Person extends Data.Class<{ readonly name: string }> {}
134
+ *
135
+ * // Creating instances of Person
136
+ * const mike1 = new Person({ name: "Mike" })
137
+ * const mike2 = new Person({ name: "Mike" })
138
+ * const john = new Person({ name: "John" })
139
+ *
140
+ * // Checking equality
141
+ * assert.deepStrictEqual(Equal.equals(mike1, mike2), true)
142
+ * assert.deepStrictEqual(Equal.equals(mike1, john), false)
143
+ * ```
144
+ *
145
+ * @since 2.0.0
146
+ * @category constructors
147
+ */
148
+ exports.tagged = tagged;
149
+ const Class = exports.Class = internal.Structural;
150
+ /**
151
+ * Provides a Tagged constructor for a Case Class.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * import * as assert from "node:assert"
156
+ * import { Data, Equal } from "effect"
157
+ *
158
+ * class Person extends Data.TaggedClass("Person")<{ readonly name: string }> {}
159
+ *
160
+ * // Creating instances of Person
161
+ * const mike1 = new Person({ name: "Mike" })
162
+ * const mike2 = new Person({ name: "Mike" })
163
+ * const john = new Person({ name: "John" })
164
+ *
165
+ * // Checking equality
166
+ * assert.deepStrictEqual(Equal.equals(mike1, mike2), true)
167
+ * assert.deepStrictEqual(Equal.equals(mike1, john), false)
168
+ *
169
+ * assert.deepStrictEqual(mike1._tag, "Person")
170
+ * ```
171
+ *
172
+ * @since 2.0.0
173
+ * @category constructors
174
+ */
175
+ const TaggedClass = tag => {
176
+ class Base extends Class {
177
+ _tag = tag;
178
+ }
179
+ return Base;
180
+ };
181
+ /**
182
+ * @since 2.0.0
183
+ * @category constructors
184
+ */
185
+ exports.TaggedClass = TaggedClass;
186
+ const Structural = exports.Structural = internal.Structural;
187
+ /**
188
+ * Create a constructor for a tagged union of `Data` structs.
189
+ *
190
+ * You can also pass a `TaggedEnum.WithGenerics` if you want to add generics to
191
+ * the constructor.
192
+ *
193
+ * @example
194
+ * ```ts
195
+ * import { Data } from "effect"
196
+ *
197
+ * const { BadRequest, NotFound } = Data.taggedEnum<
198
+ * | { readonly _tag: "BadRequest"; readonly status: 400; readonly message: string }
199
+ * | { readonly _tag: "NotFound"; readonly status: 404; readonly message: string }
200
+ * >()
201
+ *
202
+ * const notFound = NotFound({ status: 404, message: "Not Found" })
203
+ * ```
204
+ *
205
+ * @example
206
+ * import { Data } from "effect"
207
+ *
208
+ * type MyResult<E, A> = Data.TaggedEnum<{
209
+ * Failure: { readonly error: E }
210
+ * Success: { readonly value: A }
211
+ * }>
212
+ * interface MyResultDefinition extends Data.TaggedEnum.WithGenerics<2> {
213
+ * readonly taggedEnum: MyResult<this["A"], this["B"]>
214
+ * }
215
+ * const { Failure, Success } = Data.taggedEnum<MyResultDefinition>()
216
+ *
217
+ * const success = Success({ value: 1 })
218
+ *
219
+ * @category constructors
220
+ * @since 2.0.0
221
+ */
222
+ const taggedEnum = () => new Proxy({}, {
223
+ get(_target, tag, _receiver) {
224
+ if (tag === "$is") {
225
+ return Predicate.isTagged;
226
+ } else if (tag === "$match") {
227
+ return taggedMatch;
228
+ }
229
+ return tagged(tag);
230
+ }
231
+ });
232
+ exports.taggedEnum = taggedEnum;
233
+ function taggedMatch() {
234
+ if (arguments.length === 1) {
235
+ const cases = arguments[0];
236
+ return function (value) {
237
+ return cases[value._tag](value);
238
+ };
239
+ }
240
+ const value = arguments[0];
241
+ const cases = arguments[1];
242
+ return cases[value._tag](value);
243
+ }
244
+ /**
245
+ * Provides a constructor for a Case Class.
246
+ *
247
+ * @since 2.0.0
248
+ * @category constructors
249
+ */
250
+ const Error = exports.Error = /*#__PURE__*/function () {
251
+ const plainArgsSymbol = /*#__PURE__*/Symbol.for("effect/Data/Error/plainArgs");
252
+ const O = {
253
+ BaseEffectError: class extends core.YieldableError {
254
+ constructor(args) {
255
+ super(args?.message, args?.cause ? {
256
+ cause: args.cause
257
+ } : undefined);
258
+ if (args) {
259
+ Object.assign(this, args);
260
+ // @effect-diagnostics-next-line floatingEffect:off
261
+ Object.defineProperty(this, plainArgsSymbol, {
262
+ value: args,
263
+ enumerable: false
264
+ });
265
+ }
266
+ }
267
+ toJSON() {
268
+ return {
269
+ ...this[plainArgsSymbol],
270
+ ...this
271
+ };
272
+ }
273
+ }
274
+ };
275
+ return O.BaseEffectError;
276
+ }();
277
+ /**
278
+ * @since 2.0.0
279
+ * @category constructors
280
+ */
281
+ const TaggedError = tag => {
282
+ const O = {
283
+ BaseEffectError: class extends Error {
284
+ _tag = tag;
285
+ }
286
+ };
287
+ O.BaseEffectError.prototype.name = tag;
288
+ return O.BaseEffectError;
289
+ };
290
+ exports.TaggedError = TaggedError;
291
+ //# sourceMappingURL=Data.js.map
backend/node_modules/effect/dist/cjs/Data.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Data.js","names":["core","_interopRequireWildcard","require","internal","_effectable","Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","struct","exports","unsafeStruct","as","setPrototypeOf","StructuralPrototype","tuple","unsafeArray","array","slice","ArrayProto","_case","args","undefined","create","case","tagged","tag","value","_tag","Class","Structural","TaggedClass","Base","taggedEnum","Proxy","_target","_receiver","isTagged","taggedMatch","arguments","length","cases","Error","plainArgsSymbol","Symbol","for","O","BaseEffectError","YieldableError","constructor","message","cause","assign","enumerable","toJSON","TaggedError","prototype","name"],"sources":["../../src/Data.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA2C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CA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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zonedOffsetIso = exports.zonedOffset = exports.zoneUnsafeMakeNamed = exports.zoneToString = exports.zoneMakeOffset = exports.zoneMakeNamedEffect = exports.zoneMakeNamed = exports.zoneMakeLocal = exports.zoneFromString = exports.withDateUtc = exports.withDate = exports.withCurrentZoneOffset = exports.withCurrentZoneNamed = exports.withCurrentZoneLocal = exports.withCurrentZone = exports.unsafeSetZoneNamed = exports.unsafeNow = exports.unsafeMakeZoned = exports.unsafeMake = exports.unsafeIsPast = exports.unsafeIsFuture = exports.unsafeFromDate = exports.toUtc = exports.toPartsUtc = exports.toParts = exports.toEpochMillis = exports.toDateUtc = exports.toDate = exports.subtractDuration = exports.subtract = exports.startOf = exports.setZoneOffset = exports.setZoneNamed = exports.setZoneCurrent = exports.setZone = exports.setPartsUtc = exports.setParts = exports.removeTime = exports.nowInCurrentZone = exports.nowAsDate = exports.now = exports.nearest = exports.mutateUtc = exports.mutate = exports.min = exports.max = exports.match = exports.mapEpochMillis = exports.makeZonedFromString = exports.makeZoned = exports.make = exports.lessThanOrEqualTo = exports.lessThan = exports.layerCurrentZoneOffset = exports.layerCurrentZoneNamed = exports.layerCurrentZoneLocal = exports.layerCurrentZone = exports.isZoned = exports.isUtc = exports.isTimeZoneOffset = exports.isTimeZoneNamed = exports.isTimeZone = exports.isPast = exports.isFuture = exports.isDateTime = exports.greaterThanOrEqualTo = exports.greaterThan = exports.getPartUtc = exports.getPart = exports.formatUtc = exports.formatLocal = exports.formatIsoZoned = exports.formatIsoOffset = exports.formatIsoDateUtc = exports.formatIsoDate = exports.formatIso = exports.formatIntl = exports.format = exports.endOf = exports.distanceDurationEither = exports.distanceDuration = exports.distance = exports.clamp = exports.between = exports.addDuration = exports.add = exports.TypeId = exports.TimeZoneTypeId = exports.Order = exports.Equivalence = exports.CurrentTimeZone = void 0;
7
+ var Context = _interopRequireWildcard(require("./Context.js"));
8
+ var Effect = _interopRequireWildcard(require("./Effect.js"));
9
+ var _Function = require("./Function.js");
10
+ var Internal = _interopRequireWildcard(require("./internal/dateTime.js"));
11
+ var Layer = _interopRequireWildcard(require("./Layer.js"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * @since 3.6.0
15
+ * @category type ids
16
+ */
17
+ const TypeId = exports.TypeId = Internal.TypeId;
18
+ /**
19
+ * @since 3.6.0
20
+ * @category type ids
21
+ */
22
+ const TimeZoneTypeId = exports.TimeZoneTypeId = Internal.TimeZoneTypeId;
23
+ // =============================================================================
24
+ // guards
25
+ // =============================================================================
26
+ /**
27
+ * @since 3.6.0
28
+ * @category guards
29
+ */
30
+ const isDateTime = exports.isDateTime = Internal.isDateTime;
31
+ /**
32
+ * @since 3.6.0
33
+ * @category guards
34
+ */
35
+ const isTimeZone = exports.isTimeZone = Internal.isTimeZone;
36
+ /**
37
+ * @since 3.6.0
38
+ * @category guards
39
+ */
40
+ const isTimeZoneOffset = exports.isTimeZoneOffset = Internal.isTimeZoneOffset;
41
+ /**
42
+ * @since 3.6.0
43
+ * @category guards
44
+ */
45
+ const isTimeZoneNamed = exports.isTimeZoneNamed = Internal.isTimeZoneNamed;
46
+ /**
47
+ * @since 3.6.0
48
+ * @category guards
49
+ */
50
+ const isUtc = exports.isUtc = Internal.isUtc;
51
+ /**
52
+ * @since 3.6.0
53
+ * @category guards
54
+ */
55
+ const isZoned = exports.isZoned = Internal.isZoned;
56
+ // =============================================================================
57
+ // instances
58
+ // =============================================================================
59
+ /**
60
+ * @since 3.6.0
61
+ * @category instances
62
+ */
63
+ const Equivalence = exports.Equivalence = Internal.Equivalence;
64
+ /**
65
+ * @since 3.6.0
66
+ * @category instances
67
+ */
68
+ const Order = exports.Order = Internal.Order;
69
+ /**
70
+ * @since 3.6.0
71
+ */
72
+ const clamp = exports.clamp = Internal.clamp;
73
+ // =============================================================================
74
+ // constructors
75
+ // =============================================================================
76
+ /**
77
+ * Create a `DateTime` from a `Date`.
78
+ *
79
+ * If the `Date` is invalid, an `IllegalArgumentException` will be thrown.
80
+ *
81
+ * @since 3.6.0
82
+ * @category constructors
83
+ */
84
+ const unsafeFromDate = exports.unsafeFromDate = Internal.unsafeFromDate;
85
+ /**
86
+ * Create a `DateTime` from one of the following:
87
+ *
88
+ * - A `DateTime`
89
+ * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`)
90
+ * - The `number` of milliseconds since the Unix epoch
91
+ * - An object with the parts of a date
92
+ * - A `string` that can be parsed by `Date.parse`
93
+ *
94
+ * @since 3.6.0
95
+ * @category constructors
96
+ * @example
97
+ * ```ts
98
+ * import { DateTime } from "effect"
99
+ *
100
+ * // from Date
101
+ * DateTime.unsafeMake(new Date())
102
+ *
103
+ * // from parts
104
+ * DateTime.unsafeMake({ year: 2024 })
105
+ *
106
+ * // from string
107
+ * DateTime.unsafeMake("2024-01-01")
108
+ * ```
109
+ */
110
+ const unsafeMake = exports.unsafeMake = Internal.unsafeMake;
111
+ /**
112
+ * Create a `DateTime.Zoned` using `DateTime.unsafeMake` and a time zone.
113
+ *
114
+ * The input is treated as UTC and then the time zone is attached, unless
115
+ * `adjustForTimeZone` is set to `true`. In that case, the input is treated as
116
+ * already in the time zone.
117
+ *
118
+ * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions,
119
+ * the `disambiguation` option controls how to resolve the ambiguity:
120
+ * - `compatible` (default): Choose earlier time for repeated times, later for gaps
121
+ * - `earlier`: Always choose the earlier of two possible times
122
+ * - `later`: Always choose the later of two possible times
123
+ * - `reject`: Throw an error when ambiguous times are encountered
124
+ *
125
+ * @since 3.6.0
126
+ * @category constructors
127
+ * @example
128
+ * ```ts
129
+ * import { DateTime } from "effect"
130
+ *
131
+ * DateTime.unsafeMakeZoned(new Date(), { timeZone: "Europe/London" })
132
+ * ```
133
+ */
134
+ const unsafeMakeZoned = exports.unsafeMakeZoned = Internal.unsafeMakeZoned;
135
+ /**
136
+ * Create a `DateTime.Zoned` using `DateTime.make` and a time zone.
137
+ *
138
+ * The input is treated as UTC and then the time zone is attached, unless
139
+ * `adjustForTimeZone` is set to `true`. In that case, the input is treated as
140
+ * already in the time zone.
141
+ *
142
+ * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions,
143
+ * the `disambiguation` option controls how to resolve the ambiguity:
144
+ * - `compatible` (default): Choose earlier time for repeated times, later for gaps
145
+ * - `earlier`: Always choose the earlier of two possible times
146
+ * - `later`: Always choose the later of two possible times
147
+ * - `reject`: Throw an error when ambiguous times are encountered
148
+ *
149
+ * If the date time input or time zone is invalid, `None` will be returned.
150
+ *
151
+ * @since 3.6.0
152
+ * @category constructors
153
+ * @example
154
+ * ```ts
155
+ * import { DateTime } from "effect"
156
+ *
157
+ * DateTime.makeZoned(new Date(), { timeZone: "Europe/London" })
158
+ * ```
159
+ */
160
+ const makeZoned = exports.makeZoned = Internal.makeZoned;
161
+ /**
162
+ * Create a `DateTime` from one of the following:
163
+ *
164
+ * - A `DateTime`
165
+ * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`)
166
+ * - The `number` of milliseconds since the Unix epoch
167
+ * - An object with the parts of a date
168
+ * - A `string` that can be parsed by `Date.parse`
169
+ *
170
+ * If the input is invalid, `None` will be returned.
171
+ *
172
+ * @since 3.6.0
173
+ * @category constructors
174
+ * @example
175
+ * ```ts
176
+ * import { DateTime } from "effect"
177
+ *
178
+ * // from Date
179
+ * DateTime.make(new Date())
180
+ *
181
+ * // from parts
182
+ * DateTime.make({ year: 2024 })
183
+ *
184
+ * // from string
185
+ * DateTime.make("2024-01-01")
186
+ * ```
187
+ */
188
+ const make = exports.make = Internal.make;
189
+ /**
190
+ * Create a `DateTime.Zoned` from a string.
191
+ *
192
+ * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`.
193
+ *
194
+ * @since 3.6.0
195
+ * @category constructors
196
+ */
197
+ const makeZonedFromString = exports.makeZonedFromString = Internal.makeZonedFromString;
198
+ /**
199
+ * Get the current time using the `Clock` service and convert it to a `DateTime`.
200
+ *
201
+ * @since 3.6.0
202
+ * @category constructors
203
+ * @example
204
+ * ```ts
205
+ * import { DateTime, Effect } from "effect"
206
+ *
207
+ * Effect.gen(function* () {
208
+ * const now = yield* DateTime.now
209
+ * })
210
+ * ```
211
+ */
212
+ const now = exports.now = Internal.now;
213
+ /**
214
+ * Get the current time using the `Clock` service.
215
+ *
216
+ * @since 3.14.0
217
+ * @category constructors
218
+ * @example
219
+ * ```ts
220
+ * import { DateTime, Effect } from "effect"
221
+ *
222
+ * Effect.gen(function* () {
223
+ * const now = yield* DateTime.nowAsDate
224
+ * })
225
+ * ```
226
+ */
227
+ const nowAsDate = exports.nowAsDate = Internal.nowAsDate;
228
+ /**
229
+ * Get the current time using `Date.now`.
230
+ *
231
+ * @since 3.6.0
232
+ * @category constructors
233
+ */
234
+ const unsafeNow = exports.unsafeNow = Internal.unsafeNow;
235
+ // =============================================================================
236
+ // time zones
237
+ // =============================================================================
238
+ /**
239
+ * For a `DateTime` returns a new `DateTime.Utc`.
240
+ *
241
+ * @since 3.13.0
242
+ * @category time zones
243
+ * @example
244
+ * ```ts
245
+ * import { DateTime } from "effect"
246
+ *
247
+ * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" })
248
+ *
249
+ * // set as UTC
250
+ * const utc: DateTime.Utc = DateTime.toUtc(now)
251
+ * ```
252
+ */
253
+ const toUtc = exports.toUtc = Internal.toUtc;
254
+ /**
255
+ * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`.
256
+ *
257
+ * @since 3.6.0
258
+ * @category time zones
259
+ * @example
260
+ * ```ts
261
+ * import { DateTime, Effect } from "effect"
262
+ *
263
+ * Effect.gen(function* () {
264
+ * const now = yield* DateTime.now
265
+ * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London")
266
+ *
267
+ * // set the time zone
268
+ * const zoned: DateTime.Zoned = DateTime.setZone(now, zone)
269
+ * })
270
+ * ```
271
+ */
272
+ const setZone = exports.setZone = Internal.setZone;
273
+ /**
274
+ * Add a fixed offset time zone to a `DateTime`.
275
+ *
276
+ * The offset is in milliseconds.
277
+ *
278
+ * @since 3.6.0
279
+ * @category time zones
280
+ * @example
281
+ * ```ts
282
+ * import { DateTime, Effect } from "effect"
283
+ *
284
+ * Effect.gen(function* () {
285
+ * const now = yield* DateTime.now
286
+ *
287
+ * // set the offset time zone in milliseconds
288
+ * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000)
289
+ * })
290
+ * ```
291
+ */
292
+ const setZoneOffset = exports.setZoneOffset = Internal.setZoneOffset;
293
+ /**
294
+ * Attempt to create a named time zone from a IANA time zone identifier.
295
+ *
296
+ * If the time zone is invalid, an `IllegalArgumentException` will be thrown.
297
+ *
298
+ * @since 3.6.0
299
+ * @category time zones
300
+ */
301
+ const zoneUnsafeMakeNamed = exports.zoneUnsafeMakeNamed = Internal.zoneUnsafeMakeNamed;
302
+ /**
303
+ * Create a fixed offset time zone.
304
+ *
305
+ * @since 3.6.0
306
+ * @category time zones
307
+ */
308
+ const zoneMakeOffset = exports.zoneMakeOffset = Internal.zoneMakeOffset;
309
+ /**
310
+ * Create a named time zone from a IANA time zone identifier. If the time zone
311
+ * is invalid, `None` will be returned.
312
+ *
313
+ * @since 3.6.0
314
+ * @category time zones
315
+ */
316
+ const zoneMakeNamed = exports.zoneMakeNamed = Internal.zoneMakeNamed;
317
+ /**
318
+ * Create a named time zone from a IANA time zone identifier. If the time zone
319
+ * is invalid, it will fail with an `IllegalArgumentException`.
320
+ *
321
+ * @since 3.6.0
322
+ * @category time zones
323
+ */
324
+ const zoneMakeNamedEffect = exports.zoneMakeNamedEffect = Internal.zoneMakeNamedEffect;
325
+ /**
326
+ * Create a named time zone from the system's local time zone.
327
+ *
328
+ * @since 3.6.0
329
+ * @category time zones
330
+ */
331
+ const zoneMakeLocal = exports.zoneMakeLocal = Internal.zoneMakeLocal;
332
+ /**
333
+ * Try parse a TimeZone from a string
334
+ *
335
+ * @since 3.6.0
336
+ * @category time zones
337
+ */
338
+ const zoneFromString = exports.zoneFromString = Internal.zoneFromString;
339
+ /**
340
+ * Format a `TimeZone` as a string.
341
+ *
342
+ * @since 3.6.0
343
+ * @category time zones
344
+ * @example
345
+ * ```ts
346
+ * import { DateTime, Effect } from "effect"
347
+ *
348
+ * // Outputs "+03:00"
349
+ * DateTime.zoneToString(DateTime.zoneMakeOffset(3 * 60 * 60 * 1000))
350
+ *
351
+ * // Outputs "Europe/London"
352
+ * DateTime.zoneToString(DateTime.zoneUnsafeMakeNamed("Europe/London"))
353
+ * ```
354
+ */
355
+ const zoneToString = exports.zoneToString = Internal.zoneToString;
356
+ /**
357
+ * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
358
+ * time zone is invalid, `None` will be returned.
359
+ *
360
+ * @since 3.6.0
361
+ * @category time zones
362
+ * @example
363
+ * ```ts
364
+ * import { DateTime, Effect } from "effect"
365
+ *
366
+ * Effect.gen(function* () {
367
+ * const now = yield* DateTime.now
368
+ * // set the time zone, returns an Option
369
+ * DateTime.setZoneNamed(now, "Europe/London")
370
+ * })
371
+ * ```
372
+ */
373
+ const setZoneNamed = exports.setZoneNamed = Internal.setZoneNamed;
374
+ /**
375
+ * Set the time zone of a `DateTime` from an IANA time zone identifier. If the
376
+ * time zone is invalid, an `IllegalArgumentException` will be thrown.
377
+ *
378
+ * @since 3.6.0
379
+ * @category time zones
380
+ * @example
381
+ * ```ts
382
+ * import { DateTime, Effect } from "effect"
383
+ *
384
+ * Effect.gen(function* () {
385
+ * const now = yield* DateTime.now
386
+ * // set the time zone
387
+ * DateTime.unsafeSetZoneNamed(now, "Europe/London")
388
+ * })
389
+ * ```
390
+ */
391
+ const unsafeSetZoneNamed = exports.unsafeSetZoneNamed = Internal.unsafeSetZoneNamed;
392
+ // =============================================================================
393
+ // comparisons
394
+ // =============================================================================
395
+ /**
396
+ * Calulate the difference between two `DateTime` values, returning the number
397
+ * of milliseconds the `other` DateTime is from `self`.
398
+ *
399
+ * If `other` is *after* `self`, the result will be a positive number.
400
+ *
401
+ * @since 3.6.0
402
+ * @category comparisons
403
+ * @example
404
+ * ```ts
405
+ * import { DateTime, Effect } from "effect"
406
+ *
407
+ * Effect.gen(function* () {
408
+ * const now = yield* DateTime.now
409
+ * const other = DateTime.add(now, { minutes: 1 })
410
+ *
411
+ * // returns 60000
412
+ * DateTime.distance(now, other)
413
+ * })
414
+ * ```
415
+ */
416
+ const distance = exports.distance = Internal.distance;
417
+ /**
418
+ * Calulate the difference between two `DateTime` values.
419
+ *
420
+ * If the `other` DateTime is before `self`, the result will be a negative
421
+ * `Duration`, returned as a `Left`.
422
+ *
423
+ * If the `other` DateTime is after `self`, the result will be a positive
424
+ * `Duration`, returned as a `Right`.
425
+ *
426
+ * @since 3.6.0
427
+ * @category comparisons
428
+ * @example
429
+ * ```ts
430
+ * import { DateTime, Effect } from "effect"
431
+ *
432
+ * Effect.gen(function* () {
433
+ * const now = yield* DateTime.now
434
+ * const other = DateTime.add(now, { minutes: 1 })
435
+ *
436
+ * // returns Either.right(Duration.minutes(1))
437
+ * DateTime.distanceDurationEither(now, other)
438
+ *
439
+ * // returns Either.left(Duration.minutes(1))
440
+ * DateTime.distanceDurationEither(other, now)
441
+ * })
442
+ * ```
443
+ */
444
+ const distanceDurationEither = exports.distanceDurationEither = Internal.distanceDurationEither;
445
+ /**
446
+ * Calulate the distance between two `DateTime` values.
447
+ *
448
+ * @since 3.6.0
449
+ * @category comparisons
450
+ * @example
451
+ * ```ts
452
+ * import { DateTime, Effect } from "effect"
453
+ *
454
+ * Effect.gen(function* () {
455
+ * const now = yield* DateTime.now
456
+ * const other = DateTime.add(now, { minutes: 1 })
457
+ *
458
+ * // returns Duration.minutes(1)
459
+ * DateTime.distanceDuration(now, other)
460
+ * })
461
+ * ```
462
+ */
463
+ const distanceDuration = exports.distanceDuration = Internal.distanceDuration;
464
+ /**
465
+ * @since 3.6.0
466
+ * @category comparisons
467
+ */
468
+ const min = exports.min = Internal.min;
469
+ /**
470
+ * @since 3.6.0
471
+ * @category comparisons
472
+ */
473
+ const max = exports.max = Internal.max;
474
+ /**
475
+ * @since 3.6.0
476
+ * @category comparisons
477
+ */
478
+ const greaterThan = exports.greaterThan = Internal.greaterThan;
479
+ /**
480
+ * @since 3.6.0
481
+ * @category comparisons
482
+ */
483
+ const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = Internal.greaterThanOrEqualTo;
484
+ /**
485
+ * @since 3.6.0
486
+ * @category comparisons
487
+ */
488
+ const lessThan = exports.lessThan = Internal.lessThan;
489
+ /**
490
+ * @since 3.6.0
491
+ * @category comparisons
492
+ */
493
+ const lessThanOrEqualTo = exports.lessThanOrEqualTo = Internal.lessThanOrEqualTo;
494
+ /**
495
+ * @since 3.6.0
496
+ * @category comparisons
497
+ */
498
+ const between = exports.between = Internal.between;
499
+ /**
500
+ * @since 3.6.0
501
+ * @category comparisons
502
+ */
503
+ const isFuture = exports.isFuture = Internal.isFuture;
504
+ /**
505
+ * @since 3.6.0
506
+ * @category comparisons
507
+ */
508
+ const unsafeIsFuture = exports.unsafeIsFuture = Internal.unsafeIsFuture;
509
+ /**
510
+ * @since 3.6.0
511
+ * @category comparisons
512
+ */
513
+ const isPast = exports.isPast = Internal.isPast;
514
+ /**
515
+ * @since 3.6.0
516
+ * @category comparisons
517
+ */
518
+ const unsafeIsPast = exports.unsafeIsPast = Internal.unsafeIsPast;
519
+ // =============================================================================
520
+ // conversions
521
+ // =============================================================================
522
+ /**
523
+ * Get the UTC `Date` of a `DateTime`.
524
+ *
525
+ * @since 3.6.0
526
+ * @category conversions
527
+ */
528
+ const toDateUtc = exports.toDateUtc = Internal.toDateUtc;
529
+ /**
530
+ * Convert a `DateTime` to a `Date`, applying the time zone first.
531
+ *
532
+ * @since 3.6.0
533
+ * @category conversions
534
+ */
535
+ const toDate = exports.toDate = Internal.toDate;
536
+ /**
537
+ * Calculate the time zone offset of a `DateTime.Zoned` in milliseconds.
538
+ *
539
+ * @since 3.6.0
540
+ * @category conversions
541
+ */
542
+ const zonedOffset = exports.zonedOffset = Internal.zonedOffset;
543
+ /**
544
+ * Calculate the time zone offset of a `DateTime` in milliseconds.
545
+ *
546
+ * The offset is formatted as "±HH:MM".
547
+ *
548
+ * @since 3.6.0
549
+ * @category conversions
550
+ */
551
+ const zonedOffsetIso = exports.zonedOffsetIso = Internal.zonedOffsetIso;
552
+ /**
553
+ * Get the milliseconds since the Unix epoch of a `DateTime`.
554
+ *
555
+ * @since 3.6.0
556
+ * @category conversions
557
+ */
558
+ const toEpochMillis = exports.toEpochMillis = Internal.toEpochMillis;
559
+ /**
560
+ * Remove the time aspect of a `DateTime`, first adjusting for the time
561
+ * zone. It will return a `DateTime.Utc` only containing the date.
562
+ *
563
+ * @since 3.6.0
564
+ * @category conversions
565
+ * @example
566
+ * ```ts
567
+ * import { DateTime } from "effect"
568
+ *
569
+ * // returns "2024-01-01T00:00:00Z"
570
+ * DateTime.unsafeMakeZoned("2024-01-01T05:00:00Z", {
571
+ * timeZone: "Pacific/Auckland",
572
+ * adjustForTimeZone: true
573
+ * }).pipe(
574
+ * DateTime.removeTime,
575
+ * DateTime.formatIso
576
+ * )
577
+ * ```
578
+ */
579
+ const removeTime = exports.removeTime = Internal.removeTime;
580
+ // =============================================================================
581
+ // parts
582
+ // =============================================================================
583
+ /**
584
+ * Get the different parts of a `DateTime` as an object.
585
+ *
586
+ * The parts will be time zone adjusted.
587
+ *
588
+ * @since 3.6.0
589
+ * @category parts
590
+ */
591
+ const toParts = exports.toParts = Internal.toParts;
592
+ /**
593
+ * Get the different parts of a `DateTime` as an object.
594
+ *
595
+ * The parts will be in UTC.
596
+ *
597
+ * @since 3.6.0
598
+ * @category parts
599
+ */
600
+ const toPartsUtc = exports.toPartsUtc = Internal.toPartsUtc;
601
+ /**
602
+ * Get a part of a `DateTime` as a number.
603
+ *
604
+ * The part will be in the UTC time zone.
605
+ *
606
+ * @since 3.6.0
607
+ * @category parts
608
+ * @example
609
+ * ```ts
610
+ * import * as assert from "node:assert"
611
+ * import { DateTime } from "effect"
612
+ *
613
+ * const now = DateTime.unsafeMake({ year: 2024 })
614
+ * const year = DateTime.getPartUtc(now, "year")
615
+ * assert.strictEqual(year, 2024)
616
+ * ```
617
+ */
618
+ const getPartUtc = exports.getPartUtc = Internal.getPartUtc;
619
+ /**
620
+ * Get a part of a `DateTime` as a number.
621
+ *
622
+ * The part will be time zone adjusted.
623
+ *
624
+ * @since 3.6.0
625
+ * @category parts
626
+ * @example
627
+ * ```ts
628
+ * import * as assert from "node:assert"
629
+ * import { DateTime } from "effect"
630
+ *
631
+ * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" })
632
+ * const year = DateTime.getPart(now, "year")
633
+ * assert.strictEqual(year, 2024)
634
+ * ```
635
+ */
636
+ const getPart = exports.getPart = Internal.getPart;
637
+ /**
638
+ * Set the different parts of a `DateTime` as an object.
639
+ *
640
+ * The Date will be time zone adjusted.
641
+ *
642
+ * @since 3.6.0
643
+ * @category parts
644
+ */
645
+ const setParts = exports.setParts = Internal.setParts;
646
+ /**
647
+ * Set the different parts of a `DateTime` as an object.
648
+ *
649
+ * @since 3.6.0
650
+ * @category parts
651
+ */
652
+ const setPartsUtc = exports.setPartsUtc = Internal.setPartsUtc;
653
+ // =============================================================================
654
+ // current time zone
655
+ // =============================================================================
656
+ /**
657
+ * @since 3.11.0
658
+ * @category current time zone
659
+ */
660
+ class CurrentTimeZone extends /*#__PURE__*/Context.Tag("effect/DateTime/CurrentTimeZone")() {}
661
+ /**
662
+ * Set the time zone of a `DateTime` to the current time zone, which is
663
+ * determined by the `CurrentTimeZone` service.
664
+ *
665
+ * @since 3.6.0
666
+ * @category current time zone
667
+ * @example
668
+ * ```ts
669
+ * import { DateTime, Effect } from "effect"
670
+ *
671
+ * Effect.gen(function* () {
672
+ * const now = yield* DateTime.now
673
+ *
674
+ * // set the time zone to "Europe/London"
675
+ * const zoned = yield* DateTime.setZoneCurrent(now)
676
+ * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
677
+ * ```
678
+ */
679
+ exports.CurrentTimeZone = CurrentTimeZone;
680
+ const setZoneCurrent = self => Effect.map(CurrentTimeZone, zone => setZone(self, zone));
681
+ /**
682
+ * Provide the `CurrentTimeZone` to an effect.
683
+ *
684
+ * @since 3.6.0
685
+ * @category current time zone
686
+ * @example
687
+ * ```ts
688
+ * import { DateTime, Effect } from "effect"
689
+ *
690
+ * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London")
691
+ *
692
+ * Effect.gen(function* () {
693
+ * const now = yield* DateTime.nowInCurrentZone
694
+ * }).pipe(DateTime.withCurrentZone(zone))
695
+ * ```
696
+ */
697
+ exports.setZoneCurrent = setZoneCurrent;
698
+ const withCurrentZone = exports.withCurrentZone = /*#__PURE__*/(0, _Function.dual)(2, (effect, zone) => Effect.provideService(effect, CurrentTimeZone, zone));
699
+ /**
700
+ * Provide the `CurrentTimeZone` to an effect, using the system's local time
701
+ * zone.
702
+ *
703
+ * @since 3.6.0
704
+ * @category current time zone
705
+ * @example
706
+ * ```ts
707
+ * import { DateTime, Effect } from "effect"
708
+ *
709
+ * Effect.gen(function* () {
710
+ * // will use the system's local time zone
711
+ * const now = yield* DateTime.nowInCurrentZone
712
+ * }).pipe(DateTime.withCurrentZoneLocal)
713
+ * ```
714
+ */
715
+ const withCurrentZoneLocal = effect => Effect.provideServiceEffect(effect, CurrentTimeZone, Effect.sync(zoneMakeLocal));
716
+ /**
717
+ * Provide the `CurrentTimeZone` to an effect, using a offset.
718
+ *
719
+ * @since 3.6.0
720
+ * @category current time zone
721
+ * @example
722
+ * ```ts
723
+ * import { DateTime, Effect } from "effect"
724
+ *
725
+ * Effect.gen(function* () {
726
+ * // will use the system's local time zone
727
+ * const now = yield* DateTime.nowInCurrentZone
728
+ * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000))
729
+ * ```
730
+ */
731
+ exports.withCurrentZoneLocal = withCurrentZoneLocal;
732
+ const withCurrentZoneOffset = exports.withCurrentZoneOffset = /*#__PURE__*/(0, _Function.dual)(2, (effect, offset) => Effect.provideService(effect, CurrentTimeZone, zoneMakeOffset(offset)));
733
+ /**
734
+ * Provide the `CurrentTimeZone` to an effect using an IANA time zone
735
+ * identifier.
736
+ *
737
+ * If the time zone is invalid, it will fail with an `IllegalArgumentException`.
738
+ *
739
+ * @since 3.6.0
740
+ * @category current time zone
741
+ * @example
742
+ * ```ts
743
+ * import { DateTime, Effect } from "effect"
744
+ *
745
+ * Effect.gen(function* () {
746
+ * // will use the "Europe/London" time zone
747
+ * const now = yield* DateTime.nowInCurrentZone
748
+ * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
749
+ * ```
750
+ */
751
+ const withCurrentZoneNamed = exports.withCurrentZoneNamed = /*#__PURE__*/(0, _Function.dual)(2, (effect, zone) => Effect.provideServiceEffect(effect, CurrentTimeZone, zoneMakeNamedEffect(zone)));
752
+ /**
753
+ * Get the current time as a `DateTime.Zoned`, using the `CurrentTimeZone`.
754
+ *
755
+ * @since 3.6.0
756
+ * @category current time zone
757
+ * @example
758
+ * ```ts
759
+ * import { DateTime, Effect } from "effect"
760
+ *
761
+ * Effect.gen(function* () {
762
+ * // will use the "Europe/London" time zone
763
+ * const now = yield* DateTime.nowInCurrentZone
764
+ * }).pipe(DateTime.withCurrentZoneNamed("Europe/London"))
765
+ * ```
766
+ */
767
+ const nowInCurrentZone = exports.nowInCurrentZone = /*#__PURE__*/Effect.flatMap(now, setZoneCurrent);
768
+ // =============================================================================
769
+ // mapping
770
+ // =============================================================================
771
+ /**
772
+ * Modify a `DateTime` by applying a function to a cloned `Date` instance.
773
+ *
774
+ * The `Date` will first have the time zone applied if possible, and then be
775
+ * converted back to a `DateTime` within the same time zone.
776
+ *
777
+ * Supports `disambiguation` when the new wall clock time is ambiguous.
778
+ *
779
+ * @since 3.6.0
780
+ * @category mapping
781
+ */
782
+ const mutate = exports.mutate = Internal.mutate;
783
+ /**
784
+ * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance.
785
+ *
786
+ * @since 3.6.0
787
+ * @category mapping
788
+ */
789
+ const mutateUtc = exports.mutateUtc = Internal.mutateUtc;
790
+ /**
791
+ * Transform a `DateTime` by applying a function to the number of milliseconds
792
+ * since the Unix epoch.
793
+ *
794
+ * @since 3.6.0
795
+ * @category mapping
796
+ * @example
797
+ * ```ts
798
+ * import { DateTime } from "effect"
799
+ *
800
+ * // add 10 milliseconds
801
+ * DateTime.unsafeMake(0).pipe(
802
+ * DateTime.mapEpochMillis((millis) => millis + 10)
803
+ * )
804
+ * ```
805
+ */
806
+ const mapEpochMillis = exports.mapEpochMillis = Internal.mapEpochMillis;
807
+ /**
808
+ * Using the time zone adjusted `Date`, apply a function to the `Date` and
809
+ * return the result.
810
+ *
811
+ * @since 3.6.0
812
+ * @category mapping
813
+ * @example
814
+ * ```ts
815
+ * import { DateTime } from "effect"
816
+ *
817
+ * // get the time zone adjusted date in milliseconds
818
+ * DateTime.unsafeMakeZoned(0, { timeZone: "Europe/London" }).pipe(
819
+ * DateTime.withDate((date) => date.getTime())
820
+ * )
821
+ * ```
822
+ */
823
+ const withDate = exports.withDate = Internal.withDate;
824
+ /**
825
+ * Using the time zone adjusted `Date`, apply a function to the `Date` and
826
+ * return the result.
827
+ *
828
+ * @since 3.6.0
829
+ * @category mapping
830
+ * @example
831
+ * ```ts
832
+ * import { DateTime } from "effect"
833
+ *
834
+ * // get the date in milliseconds
835
+ * DateTime.unsafeMake(0).pipe(
836
+ * DateTime.withDateUtc((date) => date.getTime())
837
+ * )
838
+ * ```
839
+ */
840
+ const withDateUtc = exports.withDateUtc = Internal.withDateUtc;
841
+ /**
842
+ * @since 3.6.0
843
+ * @category mapping
844
+ */
845
+ const match = exports.match = Internal.match;
846
+ // =============================================================================
847
+ // math
848
+ // =============================================================================
849
+ /**
850
+ * Add the given `Duration` to a `DateTime`.
851
+ *
852
+ * @since 3.6.0
853
+ * @category math
854
+ * @example
855
+ * ```ts
856
+ * import { DateTime } from "effect"
857
+ *
858
+ * // add 5 minutes
859
+ * DateTime.unsafeMake(0).pipe(
860
+ * DateTime.addDuration("5 minutes")
861
+ * )
862
+ * ```
863
+ */
864
+ const addDuration = exports.addDuration = Internal.addDuration;
865
+ /**
866
+ * Subtract the given `Duration` from a `DateTime`.
867
+ *
868
+ * @since 3.6.0
869
+ * @category math
870
+ * @example
871
+ * ```ts
872
+ * import { DateTime } from "effect"
873
+ *
874
+ * // subtract 5 minutes
875
+ * DateTime.unsafeMake(0).pipe(
876
+ * DateTime.subtractDuration("5 minutes")
877
+ * )
878
+ * ```
879
+ */
880
+ const subtractDuration = exports.subtractDuration = Internal.subtractDuration;
881
+ /**
882
+ * Add the given `amount` of `unit`'s to a `DateTime`.
883
+ *
884
+ * The time zone is taken into account when adding days, weeks, months, and
885
+ * years.
886
+ *
887
+ * @since 3.6.0
888
+ * @category math
889
+ * @example
890
+ * ```ts
891
+ * import { DateTime } from "effect"
892
+ *
893
+ * // add 5 minutes
894
+ * DateTime.unsafeMake(0).pipe(
895
+ * DateTime.add({ minutes: 5 })
896
+ * )
897
+ * ```
898
+ */
899
+ const add = exports.add = Internal.add;
900
+ /**
901
+ * Subtract the given `amount` of `unit`'s from a `DateTime`.
902
+ *
903
+ * @since 3.6.0
904
+ * @category math
905
+ * @example
906
+ * ```ts
907
+ * import { DateTime } from "effect"
908
+ *
909
+ * // subtract 5 minutes
910
+ * DateTime.unsafeMake(0).pipe(
911
+ * DateTime.subtract({ minutes: 5 })
912
+ * )
913
+ * ```
914
+ */
915
+ const subtract = exports.subtract = Internal.subtract;
916
+ /**
917
+ * Converts a `DateTime` to the start of the given `part`.
918
+ *
919
+ * If the part is `week`, the `weekStartsOn` option can be used to specify the
920
+ * day of the week that the week starts on. The default is 0 (Sunday).
921
+ *
922
+ * @since 3.6.0
923
+ * @category math
924
+ * @example
925
+ * ```ts
926
+ * import { DateTime } from "effect"
927
+ *
928
+ * // returns "2024-01-01T00:00:00Z"
929
+ * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe(
930
+ * DateTime.startOf("day"),
931
+ * DateTime.formatIso
932
+ * )
933
+ * ```
934
+ */
935
+ const startOf = exports.startOf = Internal.startOf;
936
+ /**
937
+ * Converts a `DateTime` to the end of the given `part`.
938
+ *
939
+ * If the part is `week`, the `weekStartsOn` option can be used to specify the
940
+ * day of the week that the week starts on. The default is 0 (Sunday).
941
+ *
942
+ * @since 3.6.0
943
+ * @category math
944
+ * @example
945
+ * ```ts
946
+ * import { DateTime } from "effect"
947
+ *
948
+ * // returns "2024-01-01T23:59:59.999Z"
949
+ * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe(
950
+ * DateTime.endOf("day"),
951
+ * DateTime.formatIso
952
+ * )
953
+ * ```
954
+ */
955
+ const endOf = exports.endOf = Internal.endOf;
956
+ /**
957
+ * Converts a `DateTime` to the nearest given `part`.
958
+ *
959
+ * If the part is `week`, the `weekStartsOn` option can be used to specify the
960
+ * day of the week that the week starts on. The default is 0 (Sunday).
961
+ *
962
+ * @since 3.6.0
963
+ * @category math
964
+ * @example
965
+ * ```ts
966
+ * import { DateTime } from "effect"
967
+ *
968
+ * // returns "2024-01-02T00:00:00Z"
969
+ * DateTime.unsafeMake("2024-01-01T12:01:00Z").pipe(
970
+ * DateTime.nearest("day"),
971
+ * DateTime.formatIso
972
+ * )
973
+ * ```
974
+ */
975
+ const nearest = exports.nearest = Internal.nearest;
976
+ // =============================================================================
977
+ // formatting
978
+ // =============================================================================
979
+ /**
980
+ * Format a `DateTime` as a string using the `DateTimeFormat` API.
981
+ *
982
+ * The `timeZone` option is set to the offset of the time zone.
983
+ *
984
+ * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to
985
+ * "UTC" and use the adjusted `Date`.
986
+ *
987
+ * @since 3.6.0
988
+ * @category formatting
989
+ */
990
+ const format = exports.format = Internal.format;
991
+ /**
992
+ * Format a `DateTime` as a string using the `DateTimeFormat` API.
993
+ *
994
+ * It will use the system's local time zone & locale.
995
+ *
996
+ * @since 3.6.0
997
+ * @category formatting
998
+ */
999
+ const formatLocal = exports.formatLocal = Internal.formatLocal;
1000
+ /**
1001
+ * Format a `DateTime` as a string using the `DateTimeFormat` API.
1002
+ *
1003
+ * This forces the time zone to be UTC.
1004
+ *
1005
+ * @since 3.6.0
1006
+ * @category formatting
1007
+ */
1008
+ const formatUtc = exports.formatUtc = Internal.formatUtc;
1009
+ /**
1010
+ * Format a `DateTime` as a string using the `DateTimeFormat` API.
1011
+ *
1012
+ * @since 3.6.0
1013
+ * @category formatting
1014
+ */
1015
+ const formatIntl = exports.formatIntl = Internal.formatIntl;
1016
+ /**
1017
+ * Format a `DateTime` as a UTC ISO string.
1018
+ *
1019
+ * @since 3.6.0
1020
+ * @category formatting
1021
+ */
1022
+ const formatIso = exports.formatIso = Internal.formatIso;
1023
+ /**
1024
+ * Format a `DateTime` as a time zone adjusted ISO date string.
1025
+ *
1026
+ * @since 3.6.0
1027
+ * @category formatting
1028
+ */
1029
+ const formatIsoDate = exports.formatIsoDate = Internal.formatIsoDate;
1030
+ /**
1031
+ * Format a `DateTime` as a UTC ISO date string.
1032
+ *
1033
+ * @since 3.6.0
1034
+ * @category formatting
1035
+ */
1036
+ const formatIsoDateUtc = exports.formatIsoDateUtc = Internal.formatIsoDateUtc;
1037
+ /**
1038
+ * Format a `DateTime.Zoned` as a ISO string with an offset.
1039
+ *
1040
+ * @since 3.6.0
1041
+ * @category formatting
1042
+ */
1043
+ const formatIsoOffset = exports.formatIsoOffset = Internal.formatIsoOffset;
1044
+ /**
1045
+ * Format a `DateTime.Zoned` as a string.
1046
+ *
1047
+ * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`.
1048
+ *
1049
+ * @since 3.6.0
1050
+ * @category formatting
1051
+ */
1052
+ const formatIsoZoned = exports.formatIsoZoned = Internal.formatIsoZoned;
1053
+ /**
1054
+ * Create a Layer from the given time zone.
1055
+ *
1056
+ * @since 3.6.0
1057
+ * @category current time zone
1058
+ */
1059
+ const layerCurrentZone = zone => Layer.succeed(CurrentTimeZone, zone);
1060
+ /**
1061
+ * Create a Layer from the given time zone offset.
1062
+ *
1063
+ * @since 3.6.0
1064
+ * @category current time zone
1065
+ */
1066
+ exports.layerCurrentZone = layerCurrentZone;
1067
+ const layerCurrentZoneOffset = offset => Layer.succeed(CurrentTimeZone, Internal.zoneMakeOffset(offset));
1068
+ /**
1069
+ * Create a Layer from the given IANA time zone identifier.
1070
+ *
1071
+ * @since 3.6.0
1072
+ * @category current time zone
1073
+ */
1074
+ exports.layerCurrentZoneOffset = layerCurrentZoneOffset;
1075
+ const layerCurrentZoneNamed = zoneId => Layer.effect(CurrentTimeZone, Internal.zoneMakeNamedEffect(zoneId));
1076
+ /**
1077
+ * Create a Layer from the systems local time zone.
1078
+ *
1079
+ * @since 3.6.0
1080
+ * @category current time zone
1081
+ */
1082
+ exports.layerCurrentZoneNamed = layerCurrentZoneNamed;
1083
+ const layerCurrentZoneLocal = exports.layerCurrentZoneLocal = /*#__PURE__*/Layer.sync(CurrentTimeZone, zoneMakeLocal);
1084
+ //# sourceMappingURL=DateTime.js.map
backend/node_modules/effect/dist/cjs/DateTime.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"DateTime.js","names":["Context","_interopRequireWildcard","require","Effect","_Function","Internal","Layer","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","TimeZoneTypeId","isDateTime","isTimeZone","isTimeZoneOffset","isTimeZoneNamed","isUtc","isZoned","Equivalence","Order","clamp","unsafeFromDate","unsafeMake","unsafeMakeZoned","makeZoned","make","makeZonedFromString","now","nowAsDate","unsafeNow","toUtc","setZone","setZoneOffset","zoneUnsafeMakeNamed","zoneMakeOffset","zoneMakeNamed","zoneMakeNamedEffect","zoneMakeLocal","zoneFromString","zoneToString","setZoneNamed","unsafeSetZoneNamed","distance","distanceDurationEither","distanceDuration","min","max","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","isFuture","unsafeIsFuture","isPast","unsafeIsPast","toDateUtc","toDate","zonedOffset","zonedOffsetIso","toEpochMillis","removeTime","toParts","toPartsUtc","getPartUtc","getPart","setParts","setPartsUtc","CurrentTimeZone","Tag","setZoneCurrent","self","map","zone","withCurrentZone","dual","effect","provideService","withCurrentZoneLocal","provideServiceEffect","sync","withCurrentZoneOffset","offset","withCurrentZoneNamed","nowInCurrentZone","flatMap","mutate","mutateUtc","mapEpochMillis","withDate","withDateUtc","match","addDuration","subtractDuration","add","subtract","startOf","endOf","nearest","format","formatLocal","formatUtc","formatIntl","formatIso","formatIsoDate","formatIsoDateUtc","formatIsoOffset","formatIsoZoned","layerCurrentZone","succeed","layerCurrentZoneOffset","layerCurrentZoneNamed","zoneId","layerCurrentZoneLocal"],"sources":["../../src/DateTime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,uBA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AAAvG,OAAA,CAAAuG,qBAAA,gBAAiC5H,KAAK,CAAC2F,IAAI,CAACZ,eAAe,EAAE/B,aAAa,CAAC","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Deferred.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Deferred.js","names":["core","_interopRequireWildcard","require","internal","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DeferredTypeId","exports","make","deferredMake","makeAs","deferredMakeAs","_await","await","deferredAwait","complete","deferredComplete","completeWith","deferredCompleteWith","done","deferredDone","fail","deferredFail","failSync","deferredFailSync","failCause","deferredFailCause","failCauseSync","deferredFailCauseSync","die","deferredDie","dieSync","deferredDieSync","interrupt","deferredInterrupt","interruptWith","deferredInterruptWith","isDone","deferredIsDone","poll","deferredPoll","succeed","deferredSucceed","sync","deferredSync","unsafeMake","deferredUnsafeMake","unsafeDone","deferredUnsafeDone"],"sources":["../../src/Deferred.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AAAkD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,G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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zip = exports.updateWith = exports.update = exports.transform = exports.readonlyArray = exports.patch = exports.orElseEither = exports.make = exports.hashSet = exports.hashMap = exports.environment = exports.empty = exports.diff = exports.combine = exports.chunk = exports.TypeId = void 0;
7
+ var Dual = _interopRequireWildcard(require("./Function.js"));
8
+ var internal = _interopRequireWildcard(require("./internal/differ.js"));
9
+ var ChunkPatch = _interopRequireWildcard(require("./internal/differ/chunkPatch.js"));
10
+ var ContextPatch = _interopRequireWildcard(require("./internal/differ/contextPatch.js"));
11
+ var HashMapPatch = _interopRequireWildcard(require("./internal/differ/hashMapPatch.js"));
12
+ var HashSetPatch = _interopRequireWildcard(require("./internal/differ/hashSetPatch.js"));
13
+ var OrPatch = _interopRequireWildcard(require("./internal/differ/orPatch.js"));
14
+ var ReadonlyArrayPatch = _interopRequireWildcard(require("./internal/differ/readonlyArrayPatch.js"));
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ /**
17
+ * @since 2.0.0
18
+ * @category symbol
19
+ */
20
+ const TypeId = exports.TypeId = internal.DifferTypeId;
21
+ const ChunkPatchTypeId = ChunkPatch.ChunkPatchTypeId;
22
+ const ContextPatchTypeId = ContextPatch.ContextPatchTypeId;
23
+ const HashMapPatchTypeId = HashMapPatch.HashMapPatchTypeId;
24
+ const HashSetPatchTypeId = HashSetPatch.HashSetPatchTypeId;
25
+ const OrPatchTypeId = OrPatch.OrPatchTypeId;
26
+ const ReadonlyArrayPatchTypeId = ReadonlyArrayPatch.ReadonlyArrayPatchTypeId;
27
+ /**
28
+ * An empty patch that describes no changes.
29
+ *
30
+ * @since 2.0.0
31
+ * @category patch
32
+ */
33
+ const empty = self => self.empty;
34
+ /**
35
+ * @since 2.0.0
36
+ * @category patch
37
+ */
38
+ exports.empty = empty;
39
+ const diff = exports.diff = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => self.diff(oldValue, newValue));
40
+ /**
41
+ * Combines two patches to produce a new patch that describes the updates of
42
+ * the first patch and then the updates of the second patch. The combine
43
+ * operation should be associative. In addition, if the combine operation is
44
+ * commutative then joining multiple fibers concurrently will result in
45
+ * deterministic `FiberRef` values.
46
+ *
47
+ * @since 2.0.0
48
+ * @category patch
49
+ */
50
+ const combine = exports.combine = /*#__PURE__*/Dual.dual(3, (self, first, second) => self.combine(first, second));
51
+ /**
52
+ * Applies a patch to an old value to produce a new value that is equal to the
53
+ * old value with the updates described by the patch.
54
+ *
55
+ * @since 2.0.0
56
+ * @category patch
57
+ */
58
+ const patch = exports.patch = /*#__PURE__*/Dual.dual(3, (self, patch, oldValue) => self.patch(patch, oldValue));
59
+ /**
60
+ * Constructs a new `Differ`.
61
+ *
62
+ * @since 2.0.0
63
+ * @category constructors
64
+ */
65
+ const make = exports.make = internal.make;
66
+ /**
67
+ * Constructs a differ that knows how to diff `Env` values.
68
+ *
69
+ * @since 2.0.0
70
+ * @category constructors
71
+ */
72
+ const environment = exports.environment = internal.environment;
73
+ /**
74
+ * Constructs a differ that knows how to diff a `Chunk` of values given a
75
+ * differ that knows how to diff the values.
76
+ *
77
+ * @since 2.0.0
78
+ * @category constructors
79
+ */
80
+ const chunk = exports.chunk = internal.chunk;
81
+ /**
82
+ * Constructs a differ that knows how to diff a `HashMap` of keys and values given
83
+ * a differ that knows how to diff the values.
84
+ *
85
+ * @since 2.0.0
86
+ * @category constructors
87
+ */
88
+ const hashMap = exports.hashMap = internal.hashMap;
89
+ /**
90
+ * Constructs a differ that knows how to diff a `HashSet` of values.
91
+ *
92
+ * @since 2.0.0
93
+ * @category constructors
94
+ */
95
+ const hashSet = exports.hashSet = internal.hashSet;
96
+ /**
97
+ * Combines this differ and the specified differ to produce a differ that
98
+ * knows how to diff the sum of their values.
99
+ *
100
+ * @since 2.0.0
101
+ */
102
+ const orElseEither = exports.orElseEither = internal.orElseEither;
103
+ /**
104
+ * Constructs a differ that knows how to diff a `ReadonlyArray` of values.
105
+ *
106
+ * @since 2.0.0
107
+ * @category constructors
108
+ */
109
+ const readonlyArray = exports.readonlyArray = internal.readonlyArray;
110
+ /**
111
+ * Transforms the type of values that this differ knows how to differ using
112
+ * the specified functions that map the new and old value types to each other.
113
+ *
114
+ * @since 2.0.0
115
+ */
116
+ const transform = exports.transform = internal.transform;
117
+ /**
118
+ * Constructs a differ that just diffs two values by returning a function that
119
+ * sets the value to the new value. This differ does not support combining
120
+ * multiple updates to the value compositionally and should only be used when
121
+ * there is no compositional way to update them.
122
+ *
123
+ * @since 2.0.0
124
+ */
125
+ const update = exports.update = internal.update;
126
+ /**
127
+ * A variant of `update` that allows specifying the function that will be used
128
+ * to combine old values with new values.
129
+ *
130
+ * @since 2.0.0
131
+ */
132
+ const updateWith = exports.updateWith = internal.updateWith;
133
+ /**
134
+ * Combines this differ and the specified differ to produce a new differ that
135
+ * knows how to diff the product of their values.
136
+ *
137
+ * @since 2.0.0
138
+ */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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zero = exports.weeks = exports.unsafeToNanos = exports.unsafeFormatIso = exports.unsafeDivide = exports.toWeeks = exports.toSeconds = exports.toNanos = exports.toMinutes = exports.toMillis = exports.toHrTime = exports.toHours = exports.toDays = exports.times = exports.sum = exports.subtract = exports.seconds = exports.parts = exports.nanos = exports.minutes = exports.min = exports.millis = exports.micros = exports.max = exports.matchWith = exports.match = exports.lessThanOrEqualTo = exports.lessThan = exports.isZero = exports.isFinite = exports.isDuration = exports.infinity = exports.hours = exports.greaterThanOrEqualTo = exports.greaterThan = exports.fromIso = exports.formatIso = exports.format = exports.equals = exports.divide = exports.decodeUnknown = exports.decode = exports.days = exports.clamp = exports.between = exports.Order = exports.Equivalence = void 0;
7
+ var Equal = _interopRequireWildcard(require("./Equal.js"));
8
+ var _Function = require("./Function.js");
9
+ var Hash = _interopRequireWildcard(require("./Hash.js"));
10
+ var _Inspectable = require("./Inspectable.js");
11
+ var Option = _interopRequireWildcard(require("./Option.js"));
12
+ var order = _interopRequireWildcard(require("./Order.js"));
13
+ var _Pipeable = require("./Pipeable.js");
14
+ var _Predicate = require("./Predicate.js");
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ /**
17
+ * @since 2.0.0
18
+ */
19
+
20
+ const TypeId = /*#__PURE__*/Symbol.for("effect/Duration");
21
+ const bigint0 = /*#__PURE__*/BigInt(0);
22
+ const bigint24 = /*#__PURE__*/BigInt(24);
23
+ const bigint60 = /*#__PURE__*/BigInt(60);
24
+ const bigint1e3 = /*#__PURE__*/BigInt(1_000);
25
+ const bigint1e6 = /*#__PURE__*/BigInt(1_000_000);
26
+ const bigint1e9 = /*#__PURE__*/BigInt(1_000_000_000);
27
+ const DURATION_REGEX = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
28
+ /**
29
+ * @since 2.0.0
30
+ */
31
+ const decode = input => {
32
+ if (isDuration(input)) {
33
+ return input;
34
+ } else if ((0, _Predicate.isNumber)(input)) {
35
+ return millis(input);
36
+ } else if ((0, _Predicate.isBigInt)(input)) {
37
+ return nanos(input);
38
+ } else if (Array.isArray(input) && input.length === 2 && input.every(_Predicate.isNumber)) {
39
+ if (input[0] === -Infinity || input[1] === -Infinity || Number.isNaN(input[0]) || Number.isNaN(input[1])) {
40
+ return zero;
41
+ }
42
+ if (input[0] === Infinity || input[1] === Infinity) {
43
+ return infinity;
44
+ }
45
+ return nanos(BigInt(Math.round(input[0] * 1_000_000_000)) + BigInt(Math.round(input[1])));
46
+ } else if ((0, _Predicate.isString)(input)) {
47
+ const match = DURATION_REGEX.exec(input);
48
+ if (match) {
49
+ const [_, valueStr, unit] = match;
50
+ const value = Number(valueStr);
51
+ switch (unit) {
52
+ case "nano":
53
+ case "nanos":
54
+ return nanos(BigInt(valueStr));
55
+ case "micro":
56
+ case "micros":
57
+ return micros(BigInt(valueStr));
58
+ case "milli":
59
+ case "millis":
60
+ return millis(value);
61
+ case "second":
62
+ case "seconds":
63
+ return seconds(value);
64
+ case "minute":
65
+ case "minutes":
66
+ return minutes(value);
67
+ case "hour":
68
+ case "hours":
69
+ return hours(value);
70
+ case "day":
71
+ case "days":
72
+ return days(value);
73
+ case "week":
74
+ case "weeks":
75
+ return weeks(value);
76
+ }
77
+ }
78
+ }
79
+ throw new Error("Invalid DurationInput");
80
+ };
81
+ /**
82
+ * @since 2.5.0
83
+ */
84
+ exports.decode = decode;
85
+ const decodeUnknown = exports.decodeUnknown = /*#__PURE__*/Option.liftThrowable(decode);
86
+ const zeroValue = {
87
+ _tag: "Millis",
88
+ millis: 0
89
+ };
90
+ const infinityValue = {
91
+ _tag: "Infinity"
92
+ };
93
+ const DurationProto = {
94
+ [TypeId]: TypeId,
95
+ [Hash.symbol]() {
96
+ return Hash.cached(this, Hash.structure(this.value));
97
+ },
98
+ [Equal.symbol](that) {
99
+ return isDuration(that) && equals(this, that);
100
+ },
101
+ toString() {
102
+ return `Duration(${format(this)})`;
103
+ },
104
+ toJSON() {
105
+ switch (this.value._tag) {
106
+ case "Millis":
107
+ return {
108
+ _id: "Duration",
109
+ _tag: "Millis",
110
+ millis: this.value.millis
111
+ };
112
+ case "Nanos":
113
+ return {
114
+ _id: "Duration",
115
+ _tag: "Nanos",
116
+ hrtime: toHrTime(this)
117
+ };
118
+ case "Infinity":
119
+ return {
120
+ _id: "Duration",
121
+ _tag: "Infinity"
122
+ };
123
+ }
124
+ },
125
+ [_Inspectable.NodeInspectSymbol]() {
126
+ return this.toJSON();
127
+ },
128
+ pipe() {
129
+ return (0, _Pipeable.pipeArguments)(this, arguments);
130
+ }
131
+ };
132
+ const make = input => {
133
+ const duration = Object.create(DurationProto);
134
+ if ((0, _Predicate.isNumber)(input)) {
135
+ if (isNaN(input) || input <= 0) {
136
+ duration.value = zeroValue;
137
+ } else if (!Number.isFinite(input)) {
138
+ duration.value = infinityValue;
139
+ } else if (!Number.isInteger(input)) {
140
+ duration.value = {
141
+ _tag: "Nanos",
142
+ nanos: BigInt(Math.round(input * 1_000_000))
143
+ };
144
+ } else {
145
+ duration.value = {
146
+ _tag: "Millis",
147
+ millis: input
148
+ };
149
+ }
150
+ } else if (input <= bigint0) {
151
+ duration.value = zeroValue;
152
+ } else {
153
+ duration.value = {
154
+ _tag: "Nanos",
155
+ nanos: input
156
+ };
157
+ }
158
+ return duration;
159
+ };
160
+ /**
161
+ * @since 2.0.0
162
+ * @category guards
163
+ */
164
+ const isDuration = u => (0, _Predicate.hasProperty)(u, TypeId);
165
+ /**
166
+ * @since 2.0.0
167
+ * @category guards
168
+ */
169
+ exports.isDuration = isDuration;
170
+ const isFinite = self => self.value._tag !== "Infinity";
171
+ /**
172
+ * @since 3.5.0
173
+ * @category guards
174
+ */
175
+ exports.isFinite = isFinite;
176
+ const isZero = self => {
177
+ switch (self.value._tag) {
178
+ case "Millis":
179
+ {
180
+ return self.value.millis === 0;
181
+ }
182
+ case "Nanos":
183
+ {
184
+ return self.value.nanos === bigint0;
185
+ }
186
+ case "Infinity":
187
+ {
188
+ return false;
189
+ }
190
+ }
191
+ };
192
+ /**
193
+ * @since 2.0.0
194
+ * @category constructors
195
+ */
196
+ exports.isZero = isZero;
197
+ const zero = exports.zero = /*#__PURE__*/make(0);
198
+ /**
199
+ * @since 2.0.0
200
+ * @category constructors
201
+ */
202
+ const infinity = exports.infinity = /*#__PURE__*/make(Infinity);
203
+ /**
204
+ * @since 2.0.0
205
+ * @category constructors
206
+ */
207
+ const nanos = nanos => make(nanos);
208
+ /**
209
+ * @since 2.0.0
210
+ * @category constructors
211
+ */
212
+ exports.nanos = nanos;
213
+ const micros = micros => make(micros * bigint1e3);
214
+ /**
215
+ * @since 2.0.0
216
+ * @category constructors
217
+ */
218
+ exports.micros = micros;
219
+ const millis = millis => make(millis);
220
+ /**
221
+ * @since 2.0.0
222
+ * @category constructors
223
+ */
224
+ exports.millis = millis;
225
+ const seconds = seconds => make(seconds * 1000);
226
+ /**
227
+ * @since 2.0.0
228
+ * @category constructors
229
+ */
230
+ exports.seconds = seconds;
231
+ const minutes = minutes => make(minutes * 60_000);
232
+ /**
233
+ * @since 2.0.0
234
+ * @category constructors
235
+ */
236
+ exports.minutes = minutes;
237
+ const hours = hours => make(hours * 3_600_000);
238
+ /**
239
+ * @since 2.0.0
240
+ * @category constructors
241
+ */
242
+ exports.hours = hours;
243
+ const days = days => make(days * 86_400_000);
244
+ /**
245
+ * @since 2.0.0
246
+ * @category constructors
247
+ */
248
+ exports.days = days;
249
+ const weeks = weeks => make(weeks * 604_800_000);
250
+ /**
251
+ * @since 2.0.0
252
+ * @category getters
253
+ */
254
+ exports.weeks = weeks;
255
+ const toMillis = self => match(self, {
256
+ onMillis: millis => millis,
257
+ onNanos: nanos => Number(nanos) / 1_000_000
258
+ });
259
+ /**
260
+ * @since 2.0.0
261
+ * @category getters
262
+ */
263
+ exports.toMillis = toMillis;
264
+ const toSeconds = self => match(self, {
265
+ onMillis: millis => millis / 1_000,
266
+ onNanos: nanos => Number(nanos) / 1_000_000_000
267
+ });
268
+ /**
269
+ * @since 3.8.0
270
+ * @category getters
271
+ */
272
+ exports.toSeconds = toSeconds;
273
+ const toMinutes = self => match(self, {
274
+ onMillis: millis => millis / 60_000,
275
+ onNanos: nanos => Number(nanos) / 60_000_000_000
276
+ });
277
+ /**
278
+ * @since 3.8.0
279
+ * @category getters
280
+ */
281
+ exports.toMinutes = toMinutes;
282
+ const toHours = self => match(self, {
283
+ onMillis: millis => millis / 3_600_000,
284
+ onNanos: nanos => Number(nanos) / 3_600_000_000_000
285
+ });
286
+ /**
287
+ * @since 3.8.0
288
+ * @category getters
289
+ */
290
+ exports.toHours = toHours;
291
+ const toDays = self => match(self, {
292
+ onMillis: millis => millis / 86_400_000,
293
+ onNanos: nanos => Number(nanos) / 86_400_000_000_000
294
+ });
295
+ /**
296
+ * @since 3.8.0
297
+ * @category getters
298
+ */
299
+ exports.toDays = toDays;
300
+ const toWeeks = self => match(self, {
301
+ onMillis: millis => millis / 604_800_000,
302
+ onNanos: nanos => Number(nanos) / 604_800_000_000_000
303
+ });
304
+ /**
305
+ * Get the duration in nanoseconds as a bigint.
306
+ *
307
+ * If the duration is infinite, returns `Option.none()`
308
+ *
309
+ * @since 2.0.0
310
+ * @category getters
311
+ */
312
+ exports.toWeeks = toWeeks;
313
+ const toNanos = self => {
314
+ const _self = decode(self);
315
+ switch (_self.value._tag) {
316
+ case "Infinity":
317
+ return Option.none();
318
+ case "Nanos":
319
+ return Option.some(_self.value.nanos);
320
+ case "Millis":
321
+ return Option.some(BigInt(Math.round(_self.value.millis * 1_000_000)));
322
+ }
323
+ };
324
+ /**
325
+ * Get the duration in nanoseconds as a bigint.
326
+ *
327
+ * If the duration is infinite, it throws an error.
328
+ *
329
+ * @since 2.0.0
330
+ * @category getters
331
+ */
332
+ exports.toNanos = toNanos;
333
+ const unsafeToNanos = self => {
334
+ const _self = decode(self);
335
+ switch (_self.value._tag) {
336
+ case "Infinity":
337
+ throw new Error("Cannot convert infinite duration to nanos");
338
+ case "Nanos":
339
+ return _self.value.nanos;
340
+ case "Millis":
341
+ return BigInt(Math.round(_self.value.millis * 1_000_000));
342
+ }
343
+ };
344
+ /**
345
+ * @since 2.0.0
346
+ * @category getters
347
+ */
348
+ exports.unsafeToNanos = unsafeToNanos;
349
+ const toHrTime = self => {
350
+ const _self = decode(self);
351
+ switch (_self.value._tag) {
352
+ case "Infinity":
353
+ return [Infinity, 0];
354
+ case "Nanos":
355
+ return [Number(_self.value.nanos / bigint1e9), Number(_self.value.nanos % bigint1e9)];
356
+ case "Millis":
357
+ return [Math.floor(_self.value.millis / 1000), Math.round(_self.value.millis % 1000 * 1_000_000)];
358
+ }
359
+ };
360
+ /**
361
+ * @since 2.0.0
362
+ * @category pattern matching
363
+ */
364
+ exports.toHrTime = toHrTime;
365
+ const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => {
366
+ const _self = decode(self);
367
+ switch (_self.value._tag) {
368
+ case "Nanos":
369
+ return options.onNanos(_self.value.nanos);
370
+ case "Infinity":
371
+ return options.onMillis(Infinity);
372
+ case "Millis":
373
+ return options.onMillis(_self.value.millis);
374
+ }
375
+ });
376
+ /**
377
+ * @since 2.0.0
378
+ * @category pattern matching
379
+ */
380
+ const matchWith = exports.matchWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, options) => {
381
+ const _self = decode(self);
382
+ const _that = decode(that);
383
+ if (_self.value._tag === "Infinity" || _that.value._tag === "Infinity") {
384
+ return options.onMillis(toMillis(_self), toMillis(_that));
385
+ } else if (_self.value._tag === "Nanos" || _that.value._tag === "Nanos") {
386
+ const selfNanos = _self.value._tag === "Nanos" ? _self.value.nanos : BigInt(Math.round(_self.value.millis * 1_000_000));
387
+ const thatNanos = _that.value._tag === "Nanos" ? _that.value.nanos : BigInt(Math.round(_that.value.millis * 1_000_000));
388
+ return options.onNanos(selfNanos, thatNanos);
389
+ }
390
+ return options.onMillis(_self.value.millis, _that.value.millis);
391
+ });
392
+ /**
393
+ * @category instances
394
+ * @since 2.0.0
395
+ */
396
+ const Order = exports.Order = /*#__PURE__*/order.make((self, that) => matchWith(self, that, {
397
+ onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
398
+ onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0
399
+ }));
400
+ /**
401
+ * Checks if a `Duration` is between a `minimum` and `maximum` value.
402
+ *
403
+ * @category predicates
404
+ * @since 2.0.0
405
+ */
406
+ const between = exports.between = /*#__PURE__*/order.between(/*#__PURE__*/order.mapInput(Order, decode));
407
+ /**
408
+ * @category instances
409
+ * @since 2.0.0
410
+ */
411
+ const Equivalence = (self, that) => matchWith(self, that, {
412
+ onMillis: (self, that) => self === that,
413
+ onNanos: (self, that) => self === that
414
+ });
415
+ exports.Equivalence = Equivalence;
416
+ const _min = /*#__PURE__*/order.min(Order);
417
+ /**
418
+ * @since 2.0.0
419
+ */
420
+ const min = exports.min = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => _min(decode(self), decode(that)));
421
+ const _max = /*#__PURE__*/order.max(Order);
422
+ /**
423
+ * @since 2.0.0
424
+ * @category order
425
+ */
426
+ const max = exports.max = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => _max(decode(self), decode(that)));
427
+ const _clamp = /*#__PURE__*/order.clamp(Order);
428
+ /**
429
+ * @since 2.0.0
430
+ * @category order
431
+ */
432
+ const clamp = exports.clamp = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => _clamp(decode(self), {
433
+ minimum: decode(options.minimum),
434
+ maximum: decode(options.maximum)
435
+ }));
436
+ /**
437
+ * @since 2.4.19
438
+ * @category math
439
+ */
440
+ const divide = exports.divide = /*#__PURE__*/(0, _Function.dual)(2, (self, by) => match(self, {
441
+ onMillis: millis => {
442
+ if (by === 0 || isNaN(by) || !Number.isFinite(by)) {
443
+ return Option.none();
444
+ }
445
+ return Option.some(make(millis / by));
446
+ },
447
+ onNanos: nanos => {
448
+ if (isNaN(by) || by <= 0 || !Number.isFinite(by)) {
449
+ return Option.none();
450
+ }
451
+ try {
452
+ return Option.some(make(nanos / BigInt(by)));
453
+ } catch {
454
+ return Option.none();
455
+ }
456
+ }
457
+ }));
458
+ /**
459
+ * @since 2.4.19
460
+ * @category math
461
+ */
462
+ const unsafeDivide = exports.unsafeDivide = /*#__PURE__*/(0, _Function.dual)(2, (self, by) => match(self, {
463
+ onMillis: millis => make(millis / by),
464
+ onNanos: nanos => {
465
+ if (isNaN(by) || by < 0 || Object.is(by, -0)) {
466
+ return zero;
467
+ } else if (Object.is(by, 0) || !Number.isFinite(by)) {
468
+ return infinity;
469
+ }
470
+ return make(nanos / BigInt(by));
471
+ }
472
+ }));
473
+ /**
474
+ * @since 2.0.0
475
+ * @category math
476
+ */
477
+ const times = exports.times = /*#__PURE__*/(0, _Function.dual)(2, (self, times) => match(self, {
478
+ onMillis: millis => make(millis * times),
479
+ onNanos: nanos => make(nanos * BigInt(times))
480
+ }));
481
+ /**
482
+ * @since 2.0.0
483
+ * @category math
484
+ */
485
+ const subtract = exports.subtract = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
486
+ onMillis: (self, that) => make(self - that),
487
+ onNanos: (self, that) => make(self - that)
488
+ }));
489
+ /**
490
+ * @since 2.0.0
491
+ * @category math
492
+ */
493
+ const sum = exports.sum = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
494
+ onMillis: (self, that) => make(self + that),
495
+ onNanos: (self, that) => make(self + that)
496
+ }));
497
+ /**
498
+ * @since 2.0.0
499
+ * @category predicates
500
+ */
501
+ const lessThan = exports.lessThan = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
502
+ onMillis: (self, that) => self < that,
503
+ onNanos: (self, that) => self < that
504
+ }));
505
+ /**
506
+ * @since 2.0.0
507
+ * @category predicates
508
+ */
509
+ const lessThanOrEqualTo = exports.lessThanOrEqualTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
510
+ onMillis: (self, that) => self <= that,
511
+ onNanos: (self, that) => self <= that
512
+ }));
513
+ /**
514
+ * @since 2.0.0
515
+ * @category predicates
516
+ */
517
+ const greaterThan = exports.greaterThan = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
518
+ onMillis: (self, that) => self > that,
519
+ onNanos: (self, that) => self > that
520
+ }));
521
+ /**
522
+ * @since 2.0.0
523
+ * @category predicates
524
+ */
525
+ const greaterThanOrEqualTo = exports.greaterThanOrEqualTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => matchWith(self, that, {
526
+ onMillis: (self, that) => self >= that,
527
+ onNanos: (self, that) => self >= that
528
+ }));
529
+ /**
530
+ * @since 2.0.0
531
+ * @category predicates
532
+ */
533
+ const equals = exports.equals = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => Equivalence(decode(self), decode(that)));
534
+ /**
535
+ * Converts a `Duration` to its parts.
536
+ *
537
+ * @since 3.8.0
538
+ * @category conversions
539
+ */
540
+ const parts = self => {
541
+ const duration = decode(self);
542
+ if (duration.value._tag === "Infinity") {
543
+ return {
544
+ days: Infinity,
545
+ hours: Infinity,
546
+ minutes: Infinity,
547
+ seconds: Infinity,
548
+ millis: Infinity,
549
+ nanos: Infinity
550
+ };
551
+ }
552
+ const nanos = unsafeToNanos(duration);
553
+ const ms = nanos / bigint1e6;
554
+ const sec = ms / bigint1e3;
555
+ const min = sec / bigint60;
556
+ const hr = min / bigint60;
557
+ const days = hr / bigint24;
558
+ return {
559
+ days: Number(days),
560
+ hours: Number(hr % bigint24),
561
+ minutes: Number(min % bigint60),
562
+ seconds: Number(sec % bigint60),
563
+ millis: Number(ms % bigint1e3),
564
+ nanos: Number(nanos % bigint1e6)
565
+ };
566
+ };
567
+ /**
568
+ * Converts a `Duration` to a human readable string.
569
+ *
570
+ * @since 2.0.0
571
+ * @category conversions
572
+ * @example
573
+ * ```ts
574
+ * import { Duration } from "effect"
575
+ *
576
+ * Duration.format(Duration.millis(1000)) // "1s"
577
+ * Duration.format(Duration.millis(1001)) // "1s 1ms"
578
+ * ```
579
+ */
580
+ exports.parts = parts;
581
+ const format = self => {
582
+ const duration = decode(self);
583
+ if (duration.value._tag === "Infinity") {
584
+ return "Infinity";
585
+ }
586
+ if (isZero(duration)) {
587
+ return "0";
588
+ }
589
+ const fragments = parts(duration);
590
+ const pieces = [];
591
+ if (fragments.days !== 0) {
592
+ pieces.push(`${fragments.days}d`);
593
+ }
594
+ if (fragments.hours !== 0) {
595
+ pieces.push(`${fragments.hours}h`);
596
+ }
597
+ if (fragments.minutes !== 0) {
598
+ pieces.push(`${fragments.minutes}m`);
599
+ }
600
+ if (fragments.seconds !== 0) {
601
+ pieces.push(`${fragments.seconds}s`);
602
+ }
603
+ if (fragments.millis !== 0) {
604
+ pieces.push(`${fragments.millis}ms`);
605
+ }
606
+ if (fragments.nanos !== 0) {
607
+ pieces.push(`${fragments.nanos}ns`);
608
+ }
609
+ return pieces.join(" ");
610
+ };
611
+ /**
612
+ * Formats a Duration into an ISO8601 duration string.
613
+ *
614
+ * Months are assumed to be 30 days and years are assumed to be 365 days.
615
+ *
616
+ * Milliseconds and nanoseconds are expressed as fractional seconds.
617
+ *
618
+ * @example
619
+ * ```ts
620
+ * import { Duration } from "effect"
621
+ *
622
+ * Duration.unsafeFormatIso(Duration.days(1)) // => "P1D"
623
+ * Duration.unsafeFormatIso(Duration.minutes(90)) // => "PT1H30M"
624
+ * Duration.unsafeFormatIso(Duration.millis(1500)) // => "PT1.5S"
625
+ * ```
626
+ *
627
+ * @throws `RangeError` If the duration is not finite.
628
+ *
629
+ * @since 3.13.0
630
+ * @category conversions
631
+ */
632
+ exports.format = format;
633
+ const unsafeFormatIso = self => {
634
+ const duration = decode(self);
635
+ if (!isFinite(duration)) {
636
+ throw new RangeError("Cannot format infinite duration");
637
+ }
638
+ const fragments = [];
639
+ const {
640
+ days,
641
+ hours,
642
+ millis,
643
+ minutes,
644
+ nanos,
645
+ seconds
646
+ } = parts(duration);
647
+ let rest = days;
648
+ if (rest >= 365) {
649
+ const years = Math.floor(rest / 365);
650
+ rest %= 365;
651
+ fragments.push(`${years}Y`);
652
+ }
653
+ if (rest >= 30) {
654
+ const months = Math.floor(rest / 30);
655
+ rest %= 30;
656
+ fragments.push(`${months}M`);
657
+ }
658
+ if (rest >= 7) {
659
+ const weeks = Math.floor(rest / 7);
660
+ rest %= 7;
661
+ fragments.push(`${weeks}W`);
662
+ }
663
+ if (rest > 0) {
664
+ fragments.push(`${rest}D`);
665
+ }
666
+ if (hours !== 0 || minutes !== 0 || seconds !== 0 || millis !== 0 || nanos !== 0) {
667
+ fragments.push("T");
668
+ if (hours !== 0) {
669
+ fragments.push(`${hours}H`);
670
+ }
671
+ if (minutes !== 0) {
672
+ fragments.push(`${minutes}M`);
673
+ }
674
+ if (seconds !== 0 || millis !== 0 || nanos !== 0) {
675
+ const total = BigInt(seconds) * bigint1e9 + BigInt(millis) * bigint1e6 + BigInt(nanos);
676
+ const str = (Number(total) / 1e9).toFixed(9).replace(/\.?0+$/, "");
677
+ fragments.push(`${str}S`);
678
+ }
679
+ }
680
+ return `P${fragments.join("") || "T0S"}`;
681
+ };
682
+ /**
683
+ * Formats a Duration into an ISO8601 duration string.
684
+ *
685
+ * Months are assumed to be 30 days and years are assumed to be 365 days.
686
+ *
687
+ * Returns `Option.none()` if the duration is infinite.
688
+ *
689
+ * @example
690
+ * ```ts
691
+ * import { Duration, Option } from "effect"
692
+ *
693
+ * Duration.formatIso(Duration.days(1)) // => Option.some("P1D")
694
+ * Duration.formatIso(Duration.minutes(90)) // => Option.some("PT1H30M")
695
+ * Duration.formatIso(Duration.millis(1500)) // => Option.some("PT1.5S")
696
+ * Duration.formatIso(Duration.infinity) // => Option.none()
697
+ * ```
698
+ *
699
+ * @since 3.13.0
700
+ * @category conversions
701
+ */
702
+ exports.unsafeFormatIso = unsafeFormatIso;
703
+ const formatIso = self => {
704
+ const duration = decode(self);
705
+ return isFinite(duration) ? Option.some(unsafeFormatIso(duration)) : Option.none();
706
+ };
707
+ /**
708
+ * Parses an ISO8601 duration string into a `Duration`.
709
+ *
710
+ * Months are assumed to be 30 days and years are assumed to be 365 days.
711
+ *
712
+ * @example
713
+ * ```ts
714
+ * import { Duration, Option } from "effect"
715
+ *
716
+ * Duration.fromIso("P1D") // => Option.some(Duration.days(1))
717
+ * Duration.fromIso("PT1H") // => Option.some(Duration.hours(1))
718
+ * Duration.fromIso("PT1M") // => Option.some(Duration.minutes(1))
719
+ * Duration.fromIso("PT1.5S") // => Option.some(Duration.seconds(1.5))
720
+ * ```
721
+ *
722
+ * @since 3.13.0
723
+ * @category conversions
724
+ */
725
+ exports.formatIso = formatIso;
726
+ const fromIso = iso => {
727
+ const result = DURATION_ISO_REGEX.exec(iso);
728
+ if (result == null) {
729
+ return Option.none();
730
+ }
731
+ const [years, months, weeks, days, hours, mins, secs] = result.slice(1, 8).map(_ => _ ? Number(_) : 0);
732
+ const value = years * 365 * 24 * 60 * 60 + months * 30 * 24 * 60 * 60 + weeks * 7 * 24 * 60 * 60 + days * 24 * 60 * 60 + hours * 60 * 60 + mins * 60 + secs;
733
+ return Option.some(seconds(value));
734
+ };
735
+ exports.fromIso = fromIso;
736
+ const DURATION_ISO_REGEX = /^P(?!$)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?!$)(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
737
+ //# sourceMappingURL=Duration.js.map
backend/node_modules/effect/dist/cjs/Duration.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Duration.js","names":["Equal","_interopRequireWildcard","require","_Function","Hash","_Inspectable","Option","order","_Pipeable","_Predicate","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","Symbol","for","bigint0","BigInt","bigint24","bigint60","bigint1e3","bigint1e6","bigint1e9","DURATION_REGEX","decode","input","isDuration","isNumber","millis","isBigInt","nanos","Array","isArray","length","every","Infinity","Number","isNaN","zero","infinity","Math","round","isString","match","exec","_","valueStr","unit","value","micros","seconds","minutes","hours","days","weeks","Error","exports","decodeUnknown","liftThrowable","zeroValue","_tag","infinityValue","DurationProto","symbol","cached","structure","that","equals","toString","format","toJSON","_id","hrtime","toHrTime","NodeInspectSymbol","pipe","pipeArguments","arguments","make","duration","create","isFinite","isInteger","u","hasProperty","self","isZero","toMillis","onMillis","onNanos","toSeconds","toMinutes","toHours","toDays","toWeeks","toNanos","_self","none","some","unsafeToNanos","floor","dual","options","matchWith","_that","selfNanos","thatNanos","Order","between","mapInput","Equivalence","_min","min","_max","max","_clamp","clamp","minimum","maximum","divide","by","unsafeDivide","is","times","subtract","sum","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","parts","ms","sec","hr","fragments","pieces","push","join","unsafeFormatIso","RangeError","rest","years","months","total","str","toFixed","replace","formatIso","fromIso","iso","result","DURATION_ISO_REGEX","mins","secs","slice","map"],"sources":["../../src/Duration.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,KAAA,GAAAN,uBAAA,CAAAC,OAAA;AAEA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAA0E,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA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CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,GAAG,CAAE9G,CAAC,IAAKA,CAAC,GAAGT,MAAM,CAACS,CAAC,CAAC,GAAG,CAAC,CAAC;EACxG,MAAMG,KAAK,GAAG6F,KAAK,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACtCC,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAC1BxF,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACxBD,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACnBD,KAAK,GAAG,EAAE,GAAG,EAAE,GACfoG,IAAI,GAAG,EAAE,GACTC,IAAI;EAEN,OAAOnK,MAAM,CAAC4G,IAAI,CAAChD,OAAO,CAACF,KAAK,CAAC,CAAC;AACpC,CAAC;AAAAQ,OAAA,CAAA4F,OAAA,GAAAA,OAAA;AAED,MAAMG,kBAAkB,GACtB,4GAA4G","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Effect.js ADDED
The diff for this file is too large to render. See raw diff
 
backend/node_modules/effect/dist/cjs/Effect.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Effect.js","names":["_Function","require","internalCause","_interopRequireWildcard","console_","_context","effect","core","defaultServices","circular","internalExecutionPlan","fiberRuntime","layer","option_","query","runtime_","schedule_","internalTracer","Random","Request","Scheduler","_Utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EffectTypeId","exports","isEffect","cachedWithTTL","cached","cachedInvalidateWithTTL","memoize","cachedFunction","once","all","allWith","allSuccesses","dropUntil","dropWhile","takeUntil","takeWhile","every","exists","filter","filterMap","findFirst","forEach","head","mergeAll","partition","reduce","reduceWhile","reduceRight","reduceEffect","replicate","replicateEffect","validateAll","validateFirst","async","asyncEffect","custom","withFiberRuntime","fail","failSync","failCause","failCauseSync","die","dieMessage","dieSync","gen","never","none","promise","succeed","succeedNone","succeedSome","suspend","sync","_void","void","yieldNow","_catch","catch","catchAll","catchAllCause","catchAllDefect","catchIf","catchSome","catchSomeCause","catchSomeDefect","catchTag","catchTags","cause","eventually","ignore","ignoreLogged","parallelErrors","sandbox","retry","retry_combined","withExecutionPlan","retryOrElse","retryOrElse_Effect","try_","try","tryMap","tryMapPromise","tryPromise","unsandbox","allowInterrupt","checkInterruptible","disconnect","interrupt","interruptWith","interruptible","interruptibleMask","onInterrupt","uninterruptible","uninterruptibleMask","liftPredicate","as","asSome","asSomeError","asVoid","flip","flipWith","map","mapAccum","mapBoth","mapError","mapErrorCause","merge","negate","acquireRelease","acquireReleaseInterruptible","acquireUseRelease","addFinalizer","ensuring","onError","onExit","parallelFinalizers","sequentialFinalizers","finalizersMask","scope","scopeWith","scopedWith","scoped","scopedEffect","using","withEarlyRelease","awaitAllChildren","daemonChildren","descriptor","descriptorWith","diffFiberRefs","ensuringChild","ensuringChildren","fiberId","fiberIdWith","fork","forkDaemon","forkAll","forkIn","forkScoped","forkWithErrorHandler","fromFiber","fromFiberEffect","supervised","transplant","withConcurrency","withScheduler","withSchedulingPriority","withMaxOpsBeforeYield","clock","clockWith","withClockScoped","withClock","console","consoleWith","withConsoleScoped","withConsole","delay","sleep","timed","timedWith","timeout","timeoutOption","timeoutFail","timeoutFailCause","timeoutTo","configProviderWith","withConfigProvider","withConfigProviderScoped","context","contextWith","contextWithEffect","mapInputContext","provide","effect_provide","provideService","provideServiceEffect","serviceFunction","serviceFunctionEffect","serviceFunctions","serviceConstants","serviceMembers","serviceOption","serviceOptional","updateService","Do","bind","bindAll","bindTo","let_","let","option","either","exit","intoDeferred","if_","if","filterOrDie","filterOrDieMessage","filterOrElse","filterOrFail","filterEffectOrElse","filterEffectOrFail","unless","unlessEffect","when","whenEffect","whenFiberRef","whenRef","flatMap","andThen","flatten","race","raceAll","raceFirst","raceWith","summarized","tap","tapBoth","tapDefect","tapError","tapErrorTag","tapErrorCause","forever","iterate","loop","repeat","repeat_combined","repeatN","repeatOrElse","repeatOrElse_Effect","schedule","schedule_Effect","scheduleForked","scheduleFrom","scheduleFrom_Effect","whileLoop","getFiberRefs","fiberRefs","inheritFiberRefs","locally","fiberRefLocally","locallyWith","fiberRefLocallyWith","locallyScoped","fiberRefLocallyScoped","locallyScopedWith","fiberRefLocallyScopedWith","patchFiberRefs","setFiberRefs","updateFiberRefs","isFailure","isSuccess","match","matchCause","matchCauseEffect","matchEffect","log","logWithLevel","level","message","logTrace","logDebug","logInfo","logWarning","logError","logFatal","withLogSpan","annotateLogs","annotateLogsScoped","logAnnotations","withUnhandledErrorLogLevel","whenLogLevel","orDie","orDieWith","orElse","orElseFail","orElseSucceed","firstSuccessOf","random","randomWith","withRandom","withRandomFixed","dual","values","fixed","withRandomScoped","runtime","getRuntimeFlags","runtimeFlags","patchRuntimeFlags","updateRuntimeFlags","withRuntimeFlagsPatch","withRuntimeFlags","withRuntimeFlagsPatchScoped","withRuntimeFlagsScoped","tagMetrics","labelMetrics","tagMetricsScoped","labelMetricsScoped","metricLabels","withMetric","unsafeMakeSemaphore","makeSemaphore","unsafeMakeLatch","makeLatch","runFork","unsafeForkEffect","runCallback","unsafeRunEffect","runPromise","unsafeRunPromiseEffect","runPromiseExit","unsafeRunPromiseExitEffect","runSync","unsafeRunSyncEffect","runSyncExit","unsafeRunSyncExitEffect","validate","validateWith","zip","zipOptions","zipLeft","zipLeftOptions","zipRight","zipRightOptions","zipWith","zipWithOptions","ap","self","that","a","blocked","runRequestBlock","step","request","args","isRequest","fromRequest","cacheRequestResult","cacheRequest","withRequestBatching","withRequestCaching","withRequestCache","tracer","tracerWith","withTracer","withTracerScoped","withTracerEnabled","withTracerTiming","annotateSpans","annotateCurrentSpan","currentSpan","currentPropagatedSpan","currentParentSpan","spanAnnotations","spanLinks","linkSpans","linkSpanCurrent","makeSpan","makeSpanScoped","useSpan","withSpan","functionWithSpan","withSpanScoped","withParentSpan","fromNullable","optionFromOptional","transposeOption","isNone","value","some","transposeMapOption","makeTagProxy","TagClass","cache","Map","Proxy","target","prop","receiver","Reflect","fn","s","cn","assign","apply","proto","setPrototypeOf","getPrototypeOf","Tag","id","limit","Error","stackTraceLimit","creationError","TagProto","key","body","stack","Service","maker","arguments","proxy","patchState","service","prototype","selfProto","_tag","hasDeps","dependencies","length","layerName","layerCache","isFunction","fromEffect","_","layerWithDepsCache","DefaultWithoutDependencies","nameOrBody","pipeables","errorDef","defineLength","errorCall","fnApply","spanName","spanOptions","DisablePropagation","name","options","configurable","fnError","undefined","isGeneratorFunction","fromIterator","error","x","sequential","captureStackTrace","stackDef","trim","split","stackCall","endStackDef","slice","join","includes","replace","endStackCall","opts","fnUntraced","ensureSuccessType","ensureErrorType","ensureRequirementsType"],"sources":["../../src/Effect.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;AAwBA,IAAAA,SAAA,GAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,uBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAH,uBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,uBAAA,CAAAF,OAAA;AACA,IAAAO,eAAA,GAAAL,uBAAA,CAAAF,OAAA;AACA,IAAAQ,QAAA,GAAAN,uBAAA,CAAAF,OAAA;AACA,IAAAS,qBAAA,GAAAP,uBAAA,CAAAF,OAAA;AACA,IAAAU,YAAA,GAAAR,uBAAA,CAAAF,OAAA;AACA,IAAAW,KAAA,GAAAT,uBAAA,CAAAF,OAAA;AACA,IAAAY,OAAA,GAAAV,uBAAA,CAAAF,OAAA;AACA,IAAAa,KAAA,GAAAX,uBAAA,CAAAF,OAAA;AACA,IAAAc,QAAA,GAAAZ,uBAAA,CAAAF,OAAA;AACA,IAAAe,SAAA,GAAAb,uBAAA,CAAAF,OAAA;AACA,IAAAgB,cAAA,GAAAd,uBAAA,C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AA,GAAAA,eAAA;AAaO,MAAMC,sBAAsB,GAAGA,CAAA,KAA8Bve,MAAwB,IAC1FA,MAAM;AAAAoC,OAAA,CAAAmc,sBAAA,GAAAA,sBAAA","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Effectable.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StructuralCommitPrototype = exports.StructuralClass = exports.StreamTypeId = exports.SinkTypeId = exports.EffectTypeId = exports.EffectPrototype = exports.CommitPrototype = exports.Class = exports.ChannelTypeId = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/effectable.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * @since 2.0.0
11
+ * @category type ids
12
+ */
13
+ const EffectTypeId = exports.EffectTypeId = internal.EffectTypeId;
14
+ /**
15
+ * @since 2.0.0
16
+ * @category type ids
17
+ */
18
+ const StreamTypeId = exports.StreamTypeId = internal.StreamTypeId;
19
+ /**
20
+ * @since 2.0.0
21
+ * @category type ids
22
+ */
23
+ const SinkTypeId = exports.SinkTypeId = internal.SinkTypeId;
24
+ /**
25
+ * @since 2.0.0
26
+ * @category type ids
27
+ */
28
+ const ChannelTypeId = exports.ChannelTypeId = internal.ChannelTypeId;
29
+ /**
30
+ * @since 2.0.0
31
+ * @category prototypes
32
+ */
33
+ const EffectPrototype = exports.EffectPrototype = internal.EffectPrototype;
34
+ /**
35
+ * @since 2.0.0
36
+ * @category prototypes
37
+ */
38
+ const CommitPrototype = exports.CommitPrototype = internal.CommitPrototype;
39
+ /**
40
+ * @since 2.0.0
41
+ * @category prototypes
42
+ */
43
+ const StructuralCommitPrototype = exports.StructuralCommitPrototype = internal.StructuralCommitPrototype;
44
+ const Base = internal.Base;
45
+ const StructuralBase = internal.StructuralBase;
46
+ /**
47
+ * @since 2.0.0
48
+ * @category constructors
49
+ */
50
+ class Class extends Base {}
51
+ /**
52
+ * @since 2.0.0
53
+ * @category constructors
54
+ */
55
+ exports.Class = Class;
56
+ class StructuralClass extends StructuralBase {}
57
+ exports.StructuralClass = StructuralClass;
58
+ //# sourceMappingURL=Effectable.js.map
backend/node_modules/effect/dist/cjs/Effectable.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Effectable.js","names":["internal","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EffectTypeId","exports","StreamTypeId","SinkTypeId","ChannelTypeId","EffectPrototype","CommitPrototype","StructuralCommitPrototype","Base","StructuralBase","Class","StructuralClass"],"sources":["../../src/Effectable.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.zipWith = exports.void = exports.try = exports.transposeOption = exports.transposeMapOption = exports.right = exports.orElse = exports.merge = exports.match = exports.mapLeft = exports.mapBoth = exports.map = exports.liftPredicate = exports.let = exports.left = exports.isRight = exports.isLeft = exports.isEither = exports.getRight = exports.getOrUndefined = exports.getOrThrowWith = exports.getOrThrow = exports.getOrNull = exports.getOrElse = exports.getLeft = exports.getEquivalence = exports.gen = exports.fromOption = exports.fromNullable = exports.flip = exports.flatMap = exports.filterOrLeft = exports.bindTo = exports.bind = exports.ap = exports.andThen = exports.all = exports.TypeId = exports.Do = void 0;
7
+ var Equivalence = _interopRequireWildcard(require("./Equivalence.js"));
8
+ var _Function = require("./Function.js");
9
+ var doNotation = _interopRequireWildcard(require("./internal/doNotation.js"));
10
+ var either = _interopRequireWildcard(require("./internal/either.js"));
11
+ var option_ = _interopRequireWildcard(require("./internal/option.js"));
12
+ var _Predicate = require("./Predicate.js");
13
+ var Gen = _interopRequireWildcard(require("./Utils.js"));
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ /**
16
+ * @since 2.0.0
17
+ */
18
+
19
+ /**
20
+ * @category symbols
21
+ * @since 2.0.0
22
+ */
23
+ const TypeId = exports.TypeId = either.TypeId;
24
+ /**
25
+ * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias
26
+ * of this structure.
27
+ *
28
+ * @category constructors
29
+ * @since 2.0.0
30
+ */
31
+ const right = exports.right = either.right;
32
+ const void_ = exports.void = /*#__PURE__*/right(void 0);
33
+ /**
34
+ * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this
35
+ * structure.
36
+ *
37
+ * @category constructors
38
+ * @since 2.0.0
39
+ */
40
+ const left = exports.left = either.left;
41
+ /**
42
+ * Takes a lazy default and a nullable value, if the value is not nully (`null` or `undefined`), turn it into a `Right`, if the value is nully use
43
+ * the provided default as a `Left`.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import * as assert from "node:assert"
48
+ * import { Either } from "effect"
49
+ *
50
+ * assert.deepStrictEqual(Either.fromNullable(1, () => 'fallback'), Either.right(1))
51
+ * assert.deepStrictEqual(Either.fromNullable(null, () => 'fallback'), Either.left('fallback'))
52
+ * ```
53
+ *
54
+ * @category constructors
55
+ * @since 2.0.0
56
+ */
57
+ const fromNullable = exports.fromNullable = /*#__PURE__*/(0, _Function.dual)(2, (self, onNullable) => self == null ? left(onNullable(self)) : right(self));
58
+ /**
59
+ * @example
60
+ * ```ts
61
+ * import * as assert from "node:assert"
62
+ * import { Either, Option } from "effect"
63
+ *
64
+ * assert.deepStrictEqual(Either.fromOption(Option.some(1), () => 'error'), Either.right(1))
65
+ * assert.deepStrictEqual(Either.fromOption(Option.none(), () => 'error'), Either.left('error'))
66
+ * ```
67
+ *
68
+ * @category constructors
69
+ * @since 2.0.0
70
+ */
71
+ const fromOption = exports.fromOption = either.fromOption;
72
+ const try_ = evaluate => {
73
+ if ((0, _Predicate.isFunction)(evaluate)) {
74
+ try {
75
+ return right(evaluate());
76
+ } catch (e) {
77
+ return left(e);
78
+ }
79
+ } else {
80
+ try {
81
+ return right(evaluate.try());
82
+ } catch (e) {
83
+ return left(evaluate.catch(e));
84
+ }
85
+ }
86
+ };
87
+ exports.try = try_;
88
+ /**
89
+ * Tests if a value is a `Either`.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * import * as assert from "node:assert"
94
+ * import { Either } from "effect"
95
+ *
96
+ * assert.deepStrictEqual(Either.isEither(Either.right(1)), true)
97
+ * assert.deepStrictEqual(Either.isEither(Either.left("a")), true)
98
+ * assert.deepStrictEqual(Either.isEither({ right: 1 }), false)
99
+ * ```
100
+ *
101
+ * @category guards
102
+ * @since 2.0.0
103
+ */
104
+ const isEither = exports.isEither = either.isEither;
105
+ /**
106
+ * Determine if a `Either` is a `Left`.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * import * as assert from "node:assert"
111
+ * import { Either } from "effect"
112
+ *
113
+ * assert.deepStrictEqual(Either.isLeft(Either.right(1)), false)
114
+ * assert.deepStrictEqual(Either.isLeft(Either.left("a")), true)
115
+ * ```
116
+ *
117
+ * @category guards
118
+ * @since 2.0.0
119
+ */
120
+ const isLeft = exports.isLeft = either.isLeft;
121
+ /**
122
+ * Determine if a `Either` is a `Right`.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * import * as assert from "node:assert"
127
+ * import { Either } from "effect"
128
+ *
129
+ * assert.deepStrictEqual(Either.isRight(Either.right(1)), true)
130
+ * assert.deepStrictEqual(Either.isRight(Either.left("a")), false)
131
+ * ```
132
+ *
133
+ * @category guards
134
+ * @since 2.0.0
135
+ */
136
+ const isRight = exports.isRight = either.isRight;
137
+ /**
138
+ * Converts a `Either` to an `Option` discarding the `Left`.
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * import * as assert from "node:assert"
143
+ * import { Either, Option } from "effect"
144
+ *
145
+ * assert.deepStrictEqual(Either.getRight(Either.right('ok')), Option.some('ok'))
146
+ * assert.deepStrictEqual(Either.getRight(Either.left('err')), Option.none())
147
+ * ```
148
+ *
149
+ * @category getters
150
+ * @since 2.0.0
151
+ */
152
+ const getRight = exports.getRight = either.getRight;
153
+ /**
154
+ * Converts a `Either` to an `Option` discarding the value.
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * import * as assert from "node:assert"
159
+ * import { Either, Option } from "effect"
160
+ *
161
+ * assert.deepStrictEqual(Either.getLeft(Either.right('ok')), Option.none())
162
+ * assert.deepStrictEqual(Either.getLeft(Either.left('err')), Option.some('err'))
163
+ * ```
164
+ *
165
+ * @category getters
166
+ * @since 2.0.0
167
+ */
168
+ const getLeft = exports.getLeft = either.getLeft;
169
+ /**
170
+ * @category equivalence
171
+ * @since 2.0.0
172
+ */
173
+ const getEquivalence = ({
174
+ left,
175
+ right
176
+ }) => Equivalence.make((x, y) => isLeft(x) ? isLeft(y) && left(x.left, y.left) : isRight(y) && right(x.right, y.right));
177
+ /**
178
+ * @category mapping
179
+ * @since 2.0.0
180
+ */
181
+ exports.getEquivalence = getEquivalence;
182
+ const mapBoth = exports.mapBoth = /*#__PURE__*/(0, _Function.dual)(2, (self, {
183
+ onLeft,
184
+ onRight
185
+ }) => isLeft(self) ? left(onLeft(self.left)) : right(onRight(self.right)));
186
+ /**
187
+ * Maps the `Left` side of an `Either` value to a new `Either` value.
188
+ *
189
+ * @category mapping
190
+ * @since 2.0.0
191
+ */
192
+ const mapLeft = exports.mapLeft = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isLeft(self) ? left(f(self.left)) : right(self.right));
193
+ /**
194
+ * Maps the `Right` side of an `Either` value to a new `Either` value.
195
+ *
196
+ * @category mapping
197
+ * @since 2.0.0
198
+ */
199
+ const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isRight(self) ? right(f(self.right)) : left(self.left));
200
+ /**
201
+ * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the `onLeft function,
202
+ * if the value is a `Right` the inner value is applied to the `onRight` function.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * import * as assert from "node:assert"
207
+ * import { pipe, Either } from "effect"
208
+ *
209
+ * const onLeft = (strings: ReadonlyArray<string>): string => `strings: ${strings.join(', ')}`
210
+ *
211
+ * const onRight = (value: number): string => `Ok: ${value}`
212
+ *
213
+ * assert.deepStrictEqual(pipe(Either.right(1), Either.match({ onLeft, onRight })), 'Ok: 1')
214
+ * assert.deepStrictEqual(
215
+ * pipe(Either.left(['string 1', 'string 2']), Either.match({ onLeft, onRight })),
216
+ * 'strings: string 1, string 2'
217
+ * )
218
+ * ```
219
+ *
220
+ * @category pattern matching
221
+ * @since 2.0.0
222
+ */
223
+ const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, {
224
+ onLeft,
225
+ onRight
226
+ }) => isLeft(self) ? onLeft(self.left) : onRight(self.right));
227
+ /**
228
+ * Transforms a `Predicate` function into a `Right` of the input value if the predicate returns `true`
229
+ * or `Left` of the result of the provided function if the predicate returns false
230
+ *
231
+ * @example
232
+ * ```ts
233
+ * import * as assert from "node:assert"
234
+ * import { pipe, Either } from "effect"
235
+ *
236
+ * const isPositive = (n: number): boolean => n > 0
237
+ * const isPositiveEither = Either.liftPredicate(isPositive, n => `${n} is not positive`)
238
+ *
239
+ * assert.deepStrictEqual(
240
+ * isPositiveEither(1),
241
+ * Either.right(1)
242
+ * )
243
+ * assert.deepStrictEqual(
244
+ * isPositiveEither(0),
245
+ * Either.left("0 is not positive")
246
+ * )
247
+ * ```
248
+ *
249
+ * @category lifting
250
+ * @since 3.4.0
251
+ */
252
+ const liftPredicate = exports.liftPredicate = /*#__PURE__*/(0, _Function.dual)(3, (a, predicate, orLeftWith) => predicate(a) ? right(a) : left(orLeftWith(a)));
253
+ /**
254
+ * Filter the right value with the provided function.
255
+ * If the predicate fails, set the left value with the result of the provided function.
256
+ *
257
+ * @example
258
+ * ```ts
259
+ * import * as assert from "node:assert"
260
+ * import { pipe, Either } from "effect"
261
+ *
262
+ * const isPositive = (n: number): boolean => n > 0
263
+ *
264
+ * assert.deepStrictEqual(
265
+ * pipe(
266
+ * Either.right(1),
267
+ * Either.filterOrLeft(isPositive, n => `${n} is not positive`)
268
+ * ),
269
+ * Either.right(1)
270
+ * )
271
+ * assert.deepStrictEqual(
272
+ * pipe(
273
+ * Either.right(0),
274
+ * Either.filterOrLeft(isPositive, n => `${n} is not positive`)
275
+ * ),
276
+ * Either.left("0 is not positive")
277
+ * )
278
+ * ```
279
+ *
280
+ * @since 2.0.0
281
+ * @category filtering & conditionals
282
+ */
283
+ const filterOrLeft = exports.filterOrLeft = /*#__PURE__*/(0, _Function.dual)(3, (self, predicate, orLeftWith) => flatMap(self, r => predicate(r) ? right(r) : left(orLeftWith(r))));
284
+ /**
285
+ * @category getters
286
+ * @since 2.0.0
287
+ */
288
+ const merge = exports.merge = /*#__PURE__*/match({
289
+ onLeft: _Function.identity,
290
+ onRight: _Function.identity
291
+ });
292
+ /**
293
+ * Returns the wrapped value if it's a `Right` or a default value if is a `Left`.
294
+ *
295
+ * @example
296
+ * ```ts
297
+ * import * as assert from "node:assert"
298
+ * import { Either } from "effect"
299
+ *
300
+ * assert.deepStrictEqual(Either.getOrElse(Either.right(1), (error) => error + "!"), 1)
301
+ * assert.deepStrictEqual(Either.getOrElse(Either.left("not a number"), (error) => error + "!"), "not a number!")
302
+ * ```
303
+ *
304
+ * @category getters
305
+ * @since 2.0.0
306
+ */
307
+ const getOrElse = exports.getOrElse = /*#__PURE__*/(0, _Function.dual)(2, (self, onLeft) => isLeft(self) ? onLeft(self.left) : self.right);
308
+ /**
309
+ * @example
310
+ * ```ts
311
+ * import * as assert from "node:assert"
312
+ * import { Either } from "effect"
313
+ *
314
+ * assert.deepStrictEqual(Either.getOrNull(Either.right(1)), 1)
315
+ * assert.deepStrictEqual(Either.getOrNull(Either.left("a")), null)
316
+ * ```
317
+ *
318
+ * @category getters
319
+ * @since 2.0.0
320
+ */
321
+ const getOrNull = exports.getOrNull = /*#__PURE__*/getOrElse(_Function.constNull);
322
+ /**
323
+ * @example
324
+ * ```ts
325
+ * import * as assert from "node:assert"
326
+ * import { Either } from "effect"
327
+ *
328
+ * assert.deepStrictEqual(Either.getOrUndefined(Either.right(1)), 1)
329
+ * assert.deepStrictEqual(Either.getOrUndefined(Either.left("a")), undefined)
330
+ * ```
331
+ *
332
+ * @category getters
333
+ * @since 2.0.0
334
+ */
335
+ const getOrUndefined = exports.getOrUndefined = /*#__PURE__*/getOrElse(_Function.constUndefined);
336
+ /**
337
+ * Extracts the value of an `Either` or throws if the `Either` is `Left`.
338
+ *
339
+ * If a default error is sufficient for your use case and you don't need to configure the thrown error, see {@link getOrThrow}.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * import * as assert from "node:assert"
344
+ * import { Either } from "effect"
345
+ *
346
+ * assert.deepStrictEqual(
347
+ * Either.getOrThrowWith(Either.right(1), () => new Error('Unexpected Left')),
348
+ * 1
349
+ * )
350
+ * assert.throws(() => Either.getOrThrowWith(Either.left("error"), () => new Error('Unexpected Left')))
351
+ * ```
352
+ *
353
+ * @category getters
354
+ * @since 2.0.0
355
+ */
356
+ const getOrThrowWith = exports.getOrThrowWith = /*#__PURE__*/(0, _Function.dual)(2, (self, onLeft) => {
357
+ if (isRight(self)) {
358
+ return self.right;
359
+ }
360
+ throw onLeft(self.left);
361
+ });
362
+ // TODO(4.0): by default should throw `L` (i.e getOrThrowWith with the identity function)
363
+ /**
364
+ * Extracts the value of an `Either` or throws if the `Either` is `Left`.
365
+ *
366
+ * The thrown error is a default error. To configure the error thrown, see {@link getOrThrowWith}.
367
+ *
368
+ * @example
369
+ * ```ts
370
+ * import * as assert from "node:assert"
371
+ * import { Either } from "effect"
372
+ *
373
+ * assert.deepStrictEqual(Either.getOrThrow(Either.right(1)), 1)
374
+ * assert.throws(() => Either.getOrThrow(Either.left("error")))
375
+ * ```
376
+ *
377
+ * @throws `Error("getOrThrow called on a Left")`
378
+ *
379
+ * @category getters
380
+ * @since 2.0.0
381
+ */
382
+ const getOrThrow = exports.getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a Left"));
383
+ /**
384
+ * Returns `self` if it is a `Right` or `that` otherwise.
385
+ *
386
+ * @category error handling
387
+ * @since 2.0.0
388
+ */
389
+ const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => isLeft(self) ? that(self.left) : right(self.right));
390
+ /**
391
+ * @category sequencing
392
+ * @since 2.0.0
393
+ */
394
+ const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => isLeft(self) ? left(self.left) : f(self.right));
395
+ /**
396
+ * Executes a sequence of two `Either`s. The second `Either` can be dependent on the result of the first `Either`.
397
+ *
398
+ * @category sequencing
399
+ * @since 2.0.0
400
+ */
401
+ const andThen = exports.andThen = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => flatMap(self, a => {
402
+ const b = (0, _Predicate.isFunction)(f) ? f(a) : f;
403
+ return isEither(b) ? b : right(b);
404
+ }));
405
+ /**
406
+ * @category zipping
407
+ * @since 2.0.0
408
+ */
409
+ const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(3, (self, that, f) => flatMap(self, r => map(that, r2 => f(r, r2))));
410
+ /**
411
+ * @category combining
412
+ * @since 2.0.0
413
+ */
414
+ const ap = exports.ap = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => zipWith(self, that, (f, a) => f(a)));
415
+ /**
416
+ * Takes a structure of `Either`s and returns an `Either` of values with the same structure.
417
+ *
418
+ * - If a tuple is supplied, then the returned `Either` will contain a tuple with the same length.
419
+ * - If a struct is supplied, then the returned `Either` will contain a struct with the same keys.
420
+ * - If an iterable is supplied, then the returned `Either` will contain an array.
421
+ *
422
+ * @example
423
+ * ```ts
424
+ * import * as assert from "node:assert"
425
+ * import { Either } from "effect"
426
+ *
427
+ * assert.deepStrictEqual(Either.all([Either.right(1), Either.right(2)]), Either.right([1, 2]))
428
+ * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.right("hello") }), Either.right({ right: 1, b: "hello" }))
429
+ * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.left("error") }), Either.left("error"))
430
+ * ```
431
+ *
432
+ * @category combining
433
+ * @since 2.0.0
434
+ */
435
+ // @ts-expect-error
436
+ const all = input => {
437
+ if (Symbol.iterator in input) {
438
+ const out = [];
439
+ for (const e of input) {
440
+ if (isLeft(e)) {
441
+ return e;
442
+ }
443
+ out.push(e.right);
444
+ }
445
+ return right(out);
446
+ }
447
+ const out = {};
448
+ for (const key of Object.keys(input)) {
449
+ const e = input[key];
450
+ if (isLeft(e)) {
451
+ return e;
452
+ }
453
+ out[key] = e.right;
454
+ }
455
+ return right(out);
456
+ };
457
+ /**
458
+ * Returns an `Either` that swaps the error/success cases. This allows you to
459
+ * use all methods on the error channel, possibly before flipping back.
460
+ *
461
+ * @since 2.0.0
462
+ * @category mapping
463
+ */
464
+ exports.all = all;
465
+ const flip = self => isLeft(self) ? right(self.left) : left(self.right);
466
+ exports.flip = flip;
467
+ const adapter = /*#__PURE__*/Gen.adapter();
468
+ /**
469
+ * @category generators
470
+ * @since 2.0.0
471
+ */
472
+ const gen = (...args) => {
473
+ const f = args.length === 1 ? args[0] : args[1].bind(args[0]);
474
+ const iterator = f(adapter);
475
+ let state = iterator.next();
476
+ while (!state.done) {
477
+ const current = Gen.isGenKind(state.value) ? state.value.value : Gen.yieldWrapGet(state.value);
478
+ if (isLeft(current)) {
479
+ return current;
480
+ }
481
+ state = iterator.next(current.right);
482
+ }
483
+ return right(state.value);
484
+ };
485
+ // -------------------------------------------------------------------------------------
486
+ // do notation
487
+ // -------------------------------------------------------------------------------------
488
+ /**
489
+ * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`.
490
+ *
491
+ * Here's how the do simulation works:
492
+ *
493
+ * 1. Start the do simulation using the `Do` value
494
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values
495
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
496
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
497
+ *
498
+ * @example
499
+ * ```ts
500
+ * import * as assert from "node:assert"
501
+ * import { Either, pipe } from "effect"
502
+ *
503
+ * const result = pipe(
504
+ * Either.Do,
505
+ * Either.bind("x", () => Either.right(2)),
506
+ * Either.bind("y", () => Either.right(3)),
507
+ * Either.let("sum", ({ x, y }) => x + y)
508
+ * )
509
+ * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 }))
510
+ * ```
511
+ *
512
+ * @see {@link bind}
513
+ * @see {@link bindTo}
514
+ * @see {@link let_ let}
515
+ *
516
+ * @category do notation
517
+ * @since 2.0.0
518
+ */
519
+ exports.gen = gen;
520
+ const Do = exports.Do = /*#__PURE__*/right({});
521
+ /**
522
+ * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`.
523
+ *
524
+ * Here's how the do simulation works:
525
+ *
526
+ * 1. Start the do simulation using the `Do` value
527
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values
528
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
529
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
530
+ *
531
+ * @example
532
+ * ```ts
533
+ * import * as assert from "node:assert"
534
+ * import { Either, pipe } from "effect"
535
+ *
536
+ * const result = pipe(
537
+ * Either.Do,
538
+ * Either.bind("x", () => Either.right(2)),
539
+ * Either.bind("y", () => Either.right(3)),
540
+ * Either.let("sum", ({ x, y }) => x + y)
541
+ * )
542
+ * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 }))
543
+ * ```
544
+ *
545
+ * @see {@link Do}
546
+ * @see {@link bindTo}
547
+ * @see {@link let_ let}
548
+ *
549
+ * @category do notation
550
+ * @since 2.0.0
551
+ */
552
+ const bind = exports.bind = /*#__PURE__*/doNotation.bind(map, flatMap);
553
+ /**
554
+ * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`.
555
+ *
556
+ * Here's how the do simulation works:
557
+ *
558
+ * 1. Start the do simulation using the `Do` value
559
+ * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values
560
+ * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope
561
+ * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values
562
+ *
563
+ * @example
564
+ * ```ts
565
+ * import * as assert from "node:assert"
566
+ * import { Either, pipe } from "effect"
567
+ *
568
+ * const result = pipe(
569
+ * Either.Do,
570
+ * Either.bind("x", () => Either.right(2)),
571
+ * Either.bind("y", () => Either.right(3)),
572
+ * Either.let("sum", ({ x, y }) => x + y)
573
+ * )
574
+ * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 }))
575
+ * ```
576
+ *
577
+ * @see {@link Do}
578
+ * @see {@link bind}
579
+ * @see {@link let_ let}
580
+ *
581
+ * @category do notation
582
+ * @since 2.0.0
583
+ */
584
+ const bindTo = exports.bindTo = /*#__PURE__*/doNotation.bindTo(map);
585
+ const let_ = exports.let = /*#__PURE__*/doNotation.let_(map);
586
+ /**
587
+ * Converts an `Option` of an `Either` into an `Either` of an `Option`.
588
+ *
589
+ * **Details**
590
+ *
591
+ * This function transforms an `Option<Either<A, E>>` into an
592
+ * `Either<Option<A>, E>`. If the `Option` is `None`, the resulting `Either`
593
+ * will be a `Right` with a `None` value. If the `Option` is `Some`, the
594
+ * inner `Either` will be executed, and its result wrapped in a `Some`.
595
+ *
596
+ * @example
597
+ * ```ts
598
+ * import { Effect, Either, Option } from "effect"
599
+ *
600
+ * // ┌─── Option<Either<number, never>>
601
+ * // ▼
602
+ * const maybe = Option.some(Either.right(42))
603
+ *
604
+ * // ┌─── Either<Option<number>, never, never>
605
+ * // ▼
606
+ * const result = Either.transposeOption(maybe)
607
+ *
608
+ * console.log(Effect.runSync(result))
609
+ * // Output: { _id: 'Option', _tag: 'Some', value: 42 }
610
+ * ```
611
+ *
612
+ * @since 3.14.0
613
+ * @category Optional Wrapping & Unwrapping
614
+ */
615
+ const transposeOption = self => {
616
+ return option_.isNone(self) ? right(option_.none) : map(self.value, option_.some);
617
+ };
618
+ /**
619
+ * Applies an `Either` on an `Option` and transposes the result.
620
+ *
621
+ * **Details**
622
+ *
623
+ * If the `Option` is `None`, the resulting `Either` will immediately succeed with a `Right` value of `None`.
624
+ * If the `Option` is `Some`, the transformation function will be applied to the inner value, and its result wrapped in a `Some`.
625
+ *
626
+ * @example
627
+ * ```ts
628
+ * import { Either, Option, pipe } from "effect"
629
+ *
630
+ * // ┌─── Either<Option<number>, never>>
631
+ * // ▼
632
+ * const noneResult = pipe(
633
+ * Option.none(),
634
+ * Either.transposeMapOption(() => Either.right(42)) // will not be executed
635
+ * )
636
+ * console.log(noneResult)
637
+ * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'None' } }
638
+ *
639
+ * // ┌─── Either<Option<number>, never>>
640
+ * // ▼
641
+ * const someRightResult = pipe(
642
+ * Option.some(42),
643
+ * Either.transposeMapOption((value) => Either.right(value * 2))
644
+ * )
645
+ * console.log(someRightResult)
646
+ * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'Some', value: 84 } }
647
+ * ```
648
+ *
649
+ * @since 3.15.0
650
+ * @category Optional Wrapping & Unwrapping
651
+ */
652
+ exports.transposeOption = transposeOption;
653
+ const transposeMapOption = exports.transposeMapOption = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => option_.isNone(self) ? right(option_.none) : map(f(self.value), option_.some));
654
+ //# sourceMappingURL=Either.js.map
backend/node_modules/effect/dist/cjs/Encoding.js ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isEncodeException = exports.isDecodeException = exports.encodeUriComponent = exports.encodeHex = exports.encodeBase64Url = exports.encodeBase64 = exports.decodeUriComponent = exports.decodeHexString = exports.decodeHex = exports.decodeBase64UrlString = exports.decodeBase64Url = exports.decodeBase64String = exports.decodeBase64 = exports.EncodeExceptionTypeId = exports.EncodeException = exports.DecodeExceptionTypeId = exports.DecodeException = void 0;
7
+ var Either = _interopRequireWildcard(require("./Either.js"));
8
+ var Base64 = _interopRequireWildcard(require("./internal/encoding/base64.js"));
9
+ var Base64Url = _interopRequireWildcard(require("./internal/encoding/base64Url.js"));
10
+ var Common = _interopRequireWildcard(require("./internal/encoding/common.js"));
11
+ var Hex = _interopRequireWildcard(require("./internal/encoding/hex.js"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * This module provides encoding & decoding functionality for:
15
+ *
16
+ * - base64 (RFC4648)
17
+ * - base64 (URL)
18
+ * - hex
19
+ *
20
+ * @since 2.0.0
21
+ */
22
+
23
+ /**
24
+ * Encodes the given value into a base64 (RFC4648) `string`.
25
+ *
26
+ * @category encoding
27
+ * @since 2.0.0
28
+ */
29
+ const encodeBase64 = input => typeof input === "string" ? Base64.encode(Common.encoder.encode(input)) : Base64.encode(input);
30
+ /**
31
+ * Decodes a base64 (RFC4648) encoded `string` into a `Uint8Array`.
32
+ *
33
+ * @category decoding
34
+ * @since 2.0.0
35
+ */
36
+ exports.encodeBase64 = encodeBase64;
37
+ const decodeBase64 = str => Base64.decode(str);
38
+ /**
39
+ * Decodes a base64 (RFC4648) encoded `string` into a UTF-8 `string`.
40
+ *
41
+ * @category decoding
42
+ * @since 2.0.0
43
+ */
44
+ exports.decodeBase64 = decodeBase64;
45
+ const decodeBase64String = str => Either.map(decodeBase64(str), _ => Common.decoder.decode(_));
46
+ /**
47
+ * Encodes the given value into a base64 (URL) `string`.
48
+ *
49
+ * @category encoding
50
+ * @since 2.0.0
51
+ */
52
+ exports.decodeBase64String = decodeBase64String;
53
+ const encodeBase64Url = input => typeof input === "string" ? Base64Url.encode(Common.encoder.encode(input)) : Base64Url.encode(input);
54
+ /**
55
+ * Decodes a base64 (URL) encoded `string` into a `Uint8Array`.
56
+ *
57
+ * @category decoding
58
+ * @since 2.0.0
59
+ */
60
+ exports.encodeBase64Url = encodeBase64Url;
61
+ const decodeBase64Url = str => Base64Url.decode(str);
62
+ /**
63
+ * Decodes a base64 (URL) encoded `string` into a UTF-8 `string`.
64
+ *
65
+ * @category decoding
66
+ * @since 2.0.0
67
+ */
68
+ exports.decodeBase64Url = decodeBase64Url;
69
+ const decodeBase64UrlString = str => Either.map(decodeBase64Url(str), _ => Common.decoder.decode(_));
70
+ /**
71
+ * Encodes the given value into a hex `string`.
72
+ *
73
+ * @category encoding
74
+ * @since 2.0.0
75
+ */
76
+ exports.decodeBase64UrlString = decodeBase64UrlString;
77
+ const encodeHex = input => typeof input === "string" ? Hex.encode(Common.encoder.encode(input)) : Hex.encode(input);
78
+ /**
79
+ * Decodes a hex encoded `string` into a `Uint8Array`.
80
+ *
81
+ * @category decoding
82
+ * @since 2.0.0
83
+ */
84
+ exports.encodeHex = encodeHex;
85
+ const decodeHex = str => Hex.decode(str);
86
+ /**
87
+ * Decodes a hex encoded `string` into a UTF-8 `string`.
88
+ *
89
+ * @category decoding
90
+ * @since 2.0.0
91
+ */
92
+ exports.decodeHex = decodeHex;
93
+ const decodeHexString = str => Either.map(decodeHex(str), _ => Common.decoder.decode(_));
94
+ /**
95
+ * Encodes a UTF-8 `string` into a URI component `string`.
96
+ *
97
+ * @category encoding
98
+ * @since 3.12.0
99
+ */
100
+ exports.decodeHexString = decodeHexString;
101
+ const encodeUriComponent = str => Either.try({
102
+ try: () => encodeURIComponent(str),
103
+ catch: e => EncodeException(str, e instanceof Error ? e.message : "Invalid input")
104
+ });
105
+ /**
106
+ * Decodes a URI component `string` into a UTF-8 `string`.
107
+ *
108
+ * @category decoding
109
+ * @since 3.12.0
110
+ */
111
+ exports.encodeUriComponent = encodeUriComponent;
112
+ const decodeUriComponent = str => Either.try({
113
+ try: () => decodeURIComponent(str),
114
+ catch: e => DecodeException(str, e instanceof Error ? e.message : "Invalid input")
115
+ });
116
+ /**
117
+ * @since 2.0.0
118
+ * @category symbols
119
+ */
120
+ exports.decodeUriComponent = decodeUriComponent;
121
+ const DecodeExceptionTypeId = exports.DecodeExceptionTypeId = Common.DecodeExceptionTypeId;
122
+ /**
123
+ * Creates a checked exception which occurs when decoding fails.
124
+ *
125
+ * @since 2.0.0
126
+ * @category errors
127
+ */
128
+ const DecodeException = exports.DecodeException = Common.DecodeException;
129
+ /**
130
+ * Returns `true` if the specified value is an `DecodeException`, `false` otherwise.
131
+ *
132
+ * @since 2.0.0
133
+ * @category refinements
134
+ */
135
+ const isDecodeException = exports.isDecodeException = Common.isDecodeException;
136
+ /**
137
+ * @since 3.12.0
138
+ * @category symbols
139
+ */
140
+ const EncodeExceptionTypeId = exports.EncodeExceptionTypeId = Common.EncodeExceptionTypeId;
141
+ /**
142
+ * Creates a checked exception which occurs when encoding fails.
143
+ *
144
+ * @since 3.12.0
145
+ * @category errors
146
+ */
147
+ const EncodeException = exports.EncodeException = Common.EncodeException;
148
+ /**
149
+ * Returns `true` if the specified value is an `EncodeException`, `false` otherwise.
150
+ *
151
+ * @since 3.12.0
152
+ * @category refinements
153
+ */
154
+ const isEncodeException = exports.isEncodeException = Common.isEncodeException;
155
+ //# sourceMappingURL=Encoding.js.map
backend/node_modules/effect/dist/cjs/Encoding.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Encoding.js","names":["Either","_interopRequireWildcard","require","Base64","Base64Url","Common","Hex","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","encodeBase64","input","encode","encoder","exports","decodeBase64","str","decode","decodeBase64String","map","_","decoder","encodeBase64Url","decodeBase64Url","decodeBase64UrlString","encodeHex","decodeHex","decodeHexString","encodeUriComponent","try","encodeURIComponent","catch","EncodeException","Error","message","decodeUriComponent","decodeURIComponent","Decode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AAG1C,CAAC,CAAC2C,OAAO,GAAG,eAAe;CACpF,CAAC;AAEJ;;;;AAAApB,OAAA,CAAAqB,kBAAA,GAAAA,kBAAA;AAIO,MAAMG,qBAAqB,GAAAxB,OAAA,CAAAwB,qBAAA,GAAkBjD,MAAM,CAACiD,qBAAqB;AAqBhF;;;;;;AAMO,MAAMD,eAAe,GAAAvB,OAAA,CAAAuB,eAAA,GAAyDhD,MAAM,CAACgD,eAAe;AAE3G;;;;;;AAMO,MAAME,iBAAiB,GAAAzB,OAAA,CAAAyB,iBAAA,GAAyClD,MAAM,CAACkD,iBAAiB;AAE/F;;;;AAIO,MAAMC,qBAAqB,GAAA1B,OAAA,CAAA0B,qBAAA,GAAkBnD,MAAM,CAACmD,qBAAqB;AAqBhF;;;;;;AAMO,MAAMR,eAAe,GAAAlB,OAAA,CAAAkB,eAAA,GAAyD3C,MAAM,CAAC2C,eAAe;AAE3G;;;;;;AAMO,MAAMS,iBAAiB,GAAA3B,OAAA,CAAA2B,iBAAA,GAAyCpD,MAAM,CAACoD,iBAAiB","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Equal.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.equals = equals;
7
+ exports.symbol = exports.isEqual = exports.equivalence = void 0;
8
+ var Hash = _interopRequireWildcard(require("./Hash.js"));
9
+ var _Predicate = require("./Predicate.js");
10
+ var _Utils = require("./Utils.js");
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ /**
13
+ * @since 2.0.0
14
+ * @category symbols
15
+ */
16
+ const symbol = exports.symbol = /*#__PURE__*/Symbol.for("effect/Equal");
17
+ function equals() {
18
+ if (arguments.length === 1) {
19
+ return self => compareBoth(self, arguments[0]);
20
+ }
21
+ return compareBoth(arguments[0], arguments[1]);
22
+ }
23
+ function compareBoth(self, that) {
24
+ if (self === that) {
25
+ return true;
26
+ }
27
+ const selfType = typeof self;
28
+ if (selfType !== typeof that) {
29
+ return false;
30
+ }
31
+ if (selfType === "object" || selfType === "function") {
32
+ if (self !== null && that !== null) {
33
+ if (isEqual(self) && isEqual(that)) {
34
+ if (Hash.hash(self) === Hash.hash(that) && self[symbol](that)) {
35
+ return true;
36
+ } else {
37
+ return _Utils.structuralRegionState.enabled && _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false;
38
+ }
39
+ } else if (self instanceof Date && that instanceof Date) {
40
+ const t1 = self.getTime();
41
+ const t2 = that.getTime();
42
+ return t1 === t2 || Number.isNaN(t1) && Number.isNaN(t2);
43
+ } else if (self instanceof URL && that instanceof URL) {
44
+ return self.href === that.href;
45
+ }
46
+ }
47
+ if (_Utils.structuralRegionState.enabled) {
48
+ if (self === null || that === null) {
49
+ return false;
50
+ }
51
+ if (Array.isArray(self) && Array.isArray(that)) {
52
+ return self.length === that.length && self.every((v, i) => compareBoth(v, that[i]));
53
+ }
54
+ if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(that) === Object.prototype) {
55
+ const keysSelf = Object.keys(self);
56
+ const keysThat = Object.keys(that);
57
+ if (keysSelf.length === keysThat.length) {
58
+ for (const key of keysSelf) {
59
+ // @ts-expect-error
60
+ if (!(key in that && compareBoth(self[key], that[key]))) {
61
+ return _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false;
62
+ }
63
+ }
64
+ return true;
65
+ }
66
+ }
67
+ return _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false;
68
+ }
69
+ }
70
+ return _Utils.structuralRegionState.enabled && _Utils.structuralRegionState.tester ? _Utils.structuralRegionState.tester(self, that) : false;
71
+ }
72
+ /**
73
+ * @since 2.0.0
74
+ * @category guards
75
+ */
76
+ const isEqual = u => (0, _Predicate.hasProperty)(u, symbol);
77
+ /**
78
+ * @since 2.0.0
79
+ * @category instances
80
+ */
81
+ exports.isEqual = isEqual;
82
+ const equivalence = () => equals;
83
+ exports.equivalence = equivalence;
84
+ //# sourceMappingURL=Equal.js.map
backend/node_modules/effect/dist/cjs/Equal.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"Equal.js","names":["Hash","_interopRequireWildcard","require","_Predicate","_Utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","symbol","exports","Symbol","for","equals","arguments","length","self","compareBoth","that","selfType","isEqual","hash","structuralRegionState","enabled","tester","Date","t1","getTime","t2","Number","isNaN","URL","href","Array","isArray","every","v","getPrototypeOf","prototype","keysSelf","keys","keysThat","key","u","hasProperty","equivalence"],"sources":["../../src/Equal.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAIA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAkD,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAA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,IAAI,CAAC,GACxC,KAAK;AACX;AAEA;;;;AAIO,MAAME,OAAO,GAAIuB,CAAU,IAAiB,IAAAC,sBAAW,EAACD,CAAC,EAAElC,MAAM,CAAC;AAEzE;;;;AAAAC,OAAA,CAAAU,OAAA,GAAAA,OAAA;AAIO,MAAMyB,WAAW,GAA4BA,CAAA,KAAMhC,MAAM;AAAAH,OAAA,CAAAmC,WAAA,GAAAA,WAAA","ignoreList":[]}
backend/node_modules/effect/dist/cjs/Equivalence.js ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.tuple = exports.symbol = exports.struct = exports.string = exports.strict = exports.productMany = exports.product = exports.number = exports.mapInput = exports.make = exports.combineMany = exports.combineAll = exports.combine = exports.boolean = exports.bigint = exports.array = exports.all = exports.Date = void 0;
7
+ var _Function = require("./Function.js");
8
+ /**
9
+ * This module provides an implementation of the `Equivalence` type class, which defines a binary relation
10
+ * that is reflexive, symmetric, and transitive. In other words, it defines a notion of equivalence between values of a certain type.
11
+ * These properties are also known in mathematics as an "equivalence relation".
12
+ *
13
+ * @since 2.0.0
14
+ */
15
+
16
+ /**
17
+ * @category constructors
18
+ * @since 2.0.0
19
+ */
20
+ const make = isEquivalent => (self, that) => self === that || isEquivalent(self, that);
21
+ exports.make = make;
22
+ const isStrictEquivalent = (x, y) => x === y;
23
+ /**
24
+ * Return an `Equivalence` that uses strict equality (===) to compare values.
25
+ *
26
+ * @since 2.0.0
27
+ * @category constructors
28
+ */
29
+ const strict = () => isStrictEquivalent;
30
+ /**
31
+ * @category instances
32
+ * @since 2.0.0
33
+ */
34
+ exports.strict = strict;
35
+ const string = exports.string = /*#__PURE__*/strict();
36
+ /**
37
+ * @category instances
38
+ * @since 2.0.0
39
+ */
40
+ const number = exports.number = /*#__PURE__*/strict();
41
+ /**
42
+ * @category instances
43
+ * @since 2.0.0
44
+ */
45
+ const boolean = exports.boolean = /*#__PURE__*/strict();
46
+ /**
47
+ * @category instances
48
+ * @since 2.0.0
49
+ */
50
+ const bigint = exports.bigint = /*#__PURE__*/strict();
51
+ /**
52
+ * @category instances
53
+ * @since 2.0.0
54
+ */
55
+ const symbol = exports.symbol = /*#__PURE__*/strict();
56
+ /**
57
+ * @category combining
58
+ * @since 2.0.0
59
+ */
60
+ const combine = exports.combine = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make((x, y) => self(x, y) && that(x, y)));
61
+ /**
62
+ * @category combining
63
+ * @since 2.0.0
64
+ */
65
+ const combineMany = exports.combineMany = /*#__PURE__*/(0, _Function.dual)(2, (self, collection) => make((x, y) => {
66
+ if (!self(x, y)) {
67
+ return false;
68
+ }
69
+ for (const equivalence of collection) {
70
+ if (!equivalence(x, y)) {
71
+ return false;
72
+ }
73
+ }
74
+ return true;
75
+ }));
76
+ const isAlwaysEquivalent = (_x, _y) => true;
77
+ /**
78
+ * @category combining
79
+ * @since 2.0.0
80
+ */
81
+ const combineAll = collection => combineMany(isAlwaysEquivalent, collection);
82
+ /**
83
+ * @category mapping
84
+ * @since 2.0.0
85
+ */
86
+ exports.combineAll = combineAll;
87
+ const mapInput = exports.mapInput = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => make((x, y) => self(f(x), f(y))));
88
+ /**
89
+ * @category instances
90
+ * @since 2.0.0
91
+ */
92
+ const Date = exports.Date = /*#__PURE__*/mapInput(number, date => date.getTime());
93
+ /**
94
+ * @category combining
95
+ * @since 2.0.0
96
+ */
97
+ const product = exports.product = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => make(([xa, xb], [ya, yb]) => self(xa, ya) && that(xb, yb)));
98
+ /**
99
+ * @category combining
100
+ * @since 2.0.0
101
+ */
102
+ const all = collection => {
103
+ return make((x, y) => {
104
+ const len = Math.min(x.length, y.length);
105
+ let collectionLength = 0;
106
+ for (const equivalence of collection) {
107
+ if (collectionLength >= len) {
108
+ break;
109
+ }
110
+ if (!equivalence(x[collectionLength], y[collectionLength])) {
111
+ return false;
112
+ }
113
+ collectionLength++;
114
+ }
115
+ return true;
116
+ });
117
+ };
118
+ /**
119
+ * @category combining
120
+ * @since 2.0.0
121
+ */
122
+ exports.all = all;
123
+ const productMany = (self, collection) => {
124
+ const equivalence = all(collection);
125
+ return make((x, y) => !self(x[0], y[0]) ? false : equivalence(x.slice(1), y.slice(1)));
126
+ };
127
+ /**
128
+ * Similar to `Promise.all` but operates on `Equivalence`s.
129
+ *
130
+ * ```ts skip-type-checking
131
+ * [Equivalence<A>, Equivalence<B>, ...] -> Equivalence<[A, B, ...]>
132
+ * ```
133
+ *
134
+ * Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple
135
+ * by applying each `Equivalence` to the corresponding element of the tuple.
136
+ *
137
+ * @category combinators
138
+ * @since 2.0.0
139
+ */
140
+ exports.productMany = productMany;
141
+ const tuple = (...elements) => all(elements);
142
+ /**
143
+ * Creates a new `Equivalence` for an array of values based on a given `Equivalence` for the elements of the array.
144
+ *
145
+ * @category combinators
146
+ * @since 2.0.0
147
+ */
148
+ exports.tuple = tuple;
149
+ const array = item => make((self, that) => {
150
+ if (self.length !== that.length) {
151
+ return false;
152
+ }
153
+ for (let i = 0; i < self.length; i++) {
154
+ const isEq = item(self[i], that[i]);
155
+ if (!isEq) {
156
+ return false;
157
+ }
158
+ }
159
+ return true;
160
+ });
161
+ /**
162
+ * Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct
163
+ * by applying each `Equivalence` to the corresponding property of the struct.
164
+ *
165
+ * @category combinators
166
+ * @since 2.0.0
167
+ */
168
+ exports.array = array;
169
+ const struct = fields => {
170
+ const keys = Object.keys(fields);
171
+ return make((self, that) => {
172
+ for (const key of keys) {
173
+ if (!fields[key](self[key], that[key])) {
174
+ return false;
175
+ }
176
+ }
177
+ return true;
178
+ });
179
+ };
180
+ exports.struct = struct;
181
+ //# sourceMappingURL=Equivalence.js.map
backend/node_modules/effect/dist/cjs/ExecutionPlan.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"ExecutionPlan.js","names":["Effect","_interopRequireWildcard","require","internal","Layer","_Pipeable","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TypeId","exports","isExecutionPlan","make","steps","makeProto","map","options","attempts","Error","schedule","while","input","suspend","result","succeed","undefined","provide","Proto","withRequirements","self","contextWith","context","step","isLayer","succeedContext","pipe","pipeArguments","arguments","create","merge","plans","flatMap","plan"],"sources":["../../src/ExecutionPlan.ts"],"sourcesContent":[null],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAA6C,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CA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AMU,KAAK,GAAGA,CACnB,GAAGC,KAAY,KAMX1B,SAAS,CAAC0B,KAAK,CAACC,OAAO,CAAEC,IAAI,IAAKA,IAAI,CAAC7B,KAAK,CAAQ,CAAC;AAAAH,OAAA,CAAA6B,KAAA,GAAAA,KAAA","ignoreList":[]}
backend/node_modules/effect/dist/cjs/ExecutionStrategy.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sequential = exports.parallelN = exports.parallel = exports.match = exports.isSequential = exports.isParallelN = exports.isParallel = void 0;
7
+ var internal = _interopRequireWildcard(require("./internal/executionStrategy.js"));
8
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
+ /**
10
+ * Execute effects sequentially.
11
+ *
12
+ * @since 2.0.0
13
+ * @category constructors
14
+ */
15
+ const sequential = exports.sequential = internal.sequential;
16
+ /**
17
+ * Execute effects in parallel.
18
+ *
19
+ * @since 2.0.0
20
+ * @category constructors
21
+ */
22
+ const parallel = exports.parallel = internal.parallel;
23
+ /**
24
+ * Execute effects in parallel, up to the specified number of concurrent fibers.
25
+ *
26
+ * @since 2.0.0
27
+ * @category constructors
28
+ */
29
+ const parallelN = exports.parallelN = internal.parallelN;
30
+ /**
31
+ * Returns `true` if the specified `ExecutionStrategy` is an instance of
32
+ * `Sequential`, `false` otherwise.
33
+ *
34
+ * @since 2.0.0
35
+ * @category refinements
36
+ */
37
+ const isSequential = exports.isSequential = internal.isSequential;
38
+ /**
39
+ * Returns `true` if the specified `ExecutionStrategy` is an instance of
40
+ * `Sequential`, `false` otherwise.
41
+ *
42
+ * @since 2.0.0
43
+ * @category refinements
44
+ */
45
+ const isParallel = exports.isParallel = internal.isParallel;
46
+ /**
47
+ * Returns `true` if the specified `ExecutionStrategy` is an instance of
48
+ * `Sequential`, `false` otherwise.
49
+ *
50
+ * @since 2.0.0
51
+ * @category refinements
52
+ */
53
+ const isParallelN = exports.isParallelN = internal.isParallelN;
54
+ /**
55
+ * Folds over the specified `ExecutionStrategy` using the provided case
56
+ * functions.
57
+ *
58
+ * @since 2.0.0
59
+ * @category folding
60
+ */
61
+ const match = exports.match = internal.match;
62
+ //# sourceMappingURL=ExecutionStrategy.js.map