@brytdesigns/shopify-ajax-cart-api 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/effect/index.d.ts +375 -102
- package/dist/effect/schema.js +86 -20
- package/dist/effect/schema.js.map +1 -1
- package/dist/esm/index.js +543 -461
- package/dist/esm/index.js.map +1 -1
- package/dist/main/effect/schema.js +86 -20
- package/dist/main/effect/schema.js.map +1 -1
- package/dist/main/index.d.ts +726 -213
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -935,6 +935,16 @@ var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false
|
|
|
935
935
|
var make3 = (...elements) => elements;
|
|
936
936
|
|
|
937
937
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/Record.js
|
|
938
|
+
var empty = () => ({});
|
|
939
|
+
var fromEntries = Object.fromEntries;
|
|
940
|
+
var collect = /* @__PURE__ */ dual(2, (self, f) => {
|
|
941
|
+
const out = [];
|
|
942
|
+
for (const key of keys(self)) {
|
|
943
|
+
out.push(f(key, self[key]));
|
|
944
|
+
}
|
|
945
|
+
return out;
|
|
946
|
+
});
|
|
947
|
+
var toEntries = /* @__PURE__ */ collect((key, value2) => [key, value2]);
|
|
938
948
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
939
949
|
const out = {
|
|
940
950
|
...self
|
|
@@ -944,6 +954,15 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
944
954
|
}
|
|
945
955
|
return out;
|
|
946
956
|
});
|
|
957
|
+
var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
958
|
+
const out = empty();
|
|
959
|
+
for (const key of keys(self)) {
|
|
960
|
+
if (predicate(self[key], key)) {
|
|
961
|
+
out[key] = self[key];
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
return out;
|
|
965
|
+
});
|
|
947
966
|
var keys = (self) => Object.keys(self);
|
|
948
967
|
|
|
949
968
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/Array.js
|
|
@@ -1053,7 +1072,7 @@ var unionWith = /* @__PURE__ */ dual(3, (self, that, isEquivalent) => {
|
|
|
1053
1072
|
return b;
|
|
1054
1073
|
});
|
|
1055
1074
|
var union = /* @__PURE__ */ dual(2, (self, that) => unionWith(self, that, _equivalence2));
|
|
1056
|
-
var
|
|
1075
|
+
var empty2 = () => [];
|
|
1057
1076
|
var of = (a) => [a];
|
|
1058
1077
|
var map4 = /* @__PURE__ */ dual(2, (self, f) => self.map(f));
|
|
1059
1078
|
var flatMap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
@@ -1081,7 +1100,7 @@ var filterMap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
1081
1100
|
}
|
|
1082
1101
|
return out;
|
|
1083
1102
|
});
|
|
1084
|
-
var
|
|
1103
|
+
var filter3 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1085
1104
|
const as6 = fromIterable(self);
|
|
1086
1105
|
const out = [];
|
|
1087
1106
|
for (let i = 0; i < as6.length; i++) {
|
|
@@ -1217,7 +1236,7 @@ var isChunk = (u) => hasProperty(u, TypeId3);
|
|
|
1217
1236
|
var _empty = /* @__PURE__ */ makeChunk({
|
|
1218
1237
|
_tag: "IEmpty"
|
|
1219
1238
|
});
|
|
1220
|
-
var
|
|
1239
|
+
var empty3 = () => _empty;
|
|
1221
1240
|
var make4 = (...as6) => unsafeFromNonEmptyArray(as6);
|
|
1222
1241
|
var of2 = (a) => makeChunk({
|
|
1223
1242
|
_tag: "ISingleton",
|
|
@@ -1298,7 +1317,7 @@ var reverseChunk = (self) => {
|
|
|
1298
1317
|
};
|
|
1299
1318
|
var reverse2 = reverseChunk;
|
|
1300
1319
|
var get2 = /* @__PURE__ */ dual(2, (self, index) => index < 0 || index >= self.length ? none2() : some2(unsafeGet2(self, index)));
|
|
1301
|
-
var unsafeFromArray = (self) => self.length === 0 ?
|
|
1320
|
+
var unsafeFromArray = (self) => self.length === 0 ? empty3() : self.length === 1 ? of2(self[0]) : makeChunk({
|
|
1302
1321
|
_tag: "IArray",
|
|
1303
1322
|
array: self
|
|
1304
1323
|
});
|
|
@@ -1450,7 +1469,7 @@ var appendAll2 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
1450
1469
|
}
|
|
1451
1470
|
}
|
|
1452
1471
|
});
|
|
1453
|
-
var
|
|
1472
|
+
var filter4 = /* @__PURE__ */ dual(2, (self, predicate) => unsafeFromArray(filter3(self, predicate)));
|
|
1454
1473
|
var isEmpty = (self) => self.length === 0;
|
|
1455
1474
|
var isNonEmpty = (self) => self.length > 0;
|
|
1456
1475
|
var head2 = /* @__PURE__ */ get2(0);
|
|
@@ -1890,9 +1909,9 @@ var visitLazyChildren = (len, children2, i, f, cont) => {
|
|
|
1890
1909
|
return applyCont(cont);
|
|
1891
1910
|
};
|
|
1892
1911
|
var _empty2 = /* @__PURE__ */ makeImpl(false, 0, /* @__PURE__ */ new EmptyNode(), 0);
|
|
1893
|
-
var
|
|
1912
|
+
var empty4 = () => _empty2;
|
|
1894
1913
|
var fromIterable3 = (entries2) => {
|
|
1895
|
-
const map22 = beginMutation(
|
|
1914
|
+
const map22 = beginMutation(empty4());
|
|
1896
1915
|
for (const entry of entries2) {
|
|
1897
1916
|
set(map22, entry[0], entry[1]);
|
|
1898
1917
|
}
|
|
@@ -1975,7 +1994,7 @@ var modifyHash = /* @__PURE__ */ dual(4, (self, key, hash2, f) => {
|
|
|
1975
1994
|
return pipe(self, setTree(newRoot, size12.value));
|
|
1976
1995
|
});
|
|
1977
1996
|
var remove2 = /* @__PURE__ */ dual(2, (self, key) => modifyAt(self, key, none2));
|
|
1978
|
-
var map6 = /* @__PURE__ */ dual(2, (self, f) => reduce3(self,
|
|
1997
|
+
var map6 = /* @__PURE__ */ dual(2, (self, f) => reduce3(self, empty4(), (map22, value2, key) => set(map22, key, f(value2, key))));
|
|
1979
1998
|
var forEach = /* @__PURE__ */ dual(2, (self, f) => reduce3(self, void 0, (_, value2, key) => f(value2, key)));
|
|
1980
1999
|
var reduce3 = /* @__PURE__ */ dual(3, (self, zero2, f) => {
|
|
1981
2000
|
const root = self._root;
|
|
@@ -2043,17 +2062,17 @@ var makeImpl2 = (keyMap) => {
|
|
|
2043
2062
|
return set10;
|
|
2044
2063
|
};
|
|
2045
2064
|
var isHashSet = (u) => hasProperty(u, HashSetTypeId);
|
|
2046
|
-
var _empty3 = /* @__PURE__ */ makeImpl2(/* @__PURE__ */
|
|
2047
|
-
var
|
|
2065
|
+
var _empty3 = /* @__PURE__ */ makeImpl2(/* @__PURE__ */ empty4());
|
|
2066
|
+
var empty5 = () => _empty3;
|
|
2048
2067
|
var fromIterable4 = (elements) => {
|
|
2049
|
-
const set10 = beginMutation2(
|
|
2068
|
+
const set10 = beginMutation2(empty5());
|
|
2050
2069
|
for (const value2 of elements) {
|
|
2051
2070
|
add(set10, value2);
|
|
2052
2071
|
}
|
|
2053
2072
|
return endMutation2(set10);
|
|
2054
2073
|
};
|
|
2055
2074
|
var make6 = (...elements) => {
|
|
2056
|
-
const set10 = beginMutation2(
|
|
2075
|
+
const set10 = beginMutation2(empty5());
|
|
2057
2076
|
for (const value2 of elements) {
|
|
2058
2077
|
add(set10, value2);
|
|
2059
2078
|
}
|
|
@@ -2078,7 +2097,7 @@ var difference2 = /* @__PURE__ */ dual(2, (self, that) => mutate2(self, (set10)
|
|
|
2078
2097
|
remove3(set10, value2);
|
|
2079
2098
|
}
|
|
2080
2099
|
}));
|
|
2081
|
-
var union2 = /* @__PURE__ */ dual(2, (self, that) => mutate2(
|
|
2100
|
+
var union2 = /* @__PURE__ */ dual(2, (self, that) => mutate2(empty5(), (set10) => {
|
|
2082
2101
|
forEach2(self, (value2) => add(set10, value2));
|
|
2083
2102
|
for (const value2 of that) {
|
|
2084
2103
|
add(set10, value2);
|
|
@@ -2088,7 +2107,7 @@ var forEach2 = /* @__PURE__ */ dual(2, (self, f) => forEach(self._keyMap, (_, k)
|
|
|
2088
2107
|
var reduce4 = /* @__PURE__ */ dual(3, (self, zero2, f) => reduce3(self._keyMap, zero2, (z, _, a) => f(z, a)));
|
|
2089
2108
|
|
|
2090
2109
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/HashSet.js
|
|
2091
|
-
var
|
|
2110
|
+
var empty6 = empty5;
|
|
2092
2111
|
var fromIterable5 = fromIterable4;
|
|
2093
2112
|
var make7 = make6;
|
|
2094
2113
|
var has3 = has2;
|
|
@@ -2167,7 +2186,7 @@ var proto = {
|
|
|
2167
2186
|
return this.toJSON();
|
|
2168
2187
|
}
|
|
2169
2188
|
};
|
|
2170
|
-
var
|
|
2189
|
+
var empty7 = /* @__PURE__ */ (() => {
|
|
2171
2190
|
const o = /* @__PURE__ */ Object.create(proto);
|
|
2172
2191
|
o._tag = OP_EMPTY;
|
|
2173
2192
|
return o;
|
|
@@ -2230,9 +2249,9 @@ var isEmpty3 = (self) => {
|
|
|
2230
2249
|
};
|
|
2231
2250
|
var isInterrupted = (self) => isSome2(interruptOption(self));
|
|
2232
2251
|
var isInterruptedOnly = (self) => reduceWithContext(void 0, IsInterruptedOnlyCauseReducer)(self);
|
|
2233
|
-
var failures = (self) => reverse2(reduce6(self,
|
|
2234
|
-
var defects = (self) => reverse2(reduce6(self,
|
|
2235
|
-
var interruptors = (self) => reduce6(self,
|
|
2252
|
+
var failures = (self) => reverse2(reduce6(self, empty3(), (list, cause2) => cause2._tag === OP_FAIL ? some2(pipe(list, prepend2(cause2.error))) : none2()));
|
|
2253
|
+
var defects = (self) => reverse2(reduce6(self, empty3(), (list, cause2) => cause2._tag === OP_DIE ? some2(pipe(list, prepend2(cause2.defect))) : none2()));
|
|
2254
|
+
var interruptors = (self) => reduce6(self, empty6(), (set10, cause2) => cause2._tag === OP_INTERRUPT ? some2(pipe(set10, add2(cause2.fiberId))) : none2());
|
|
2236
2255
|
var failureOption = (self) => find(self, (cause2) => cause2._tag === OP_FAIL ? some2(cause2.error) : none2());
|
|
2237
2256
|
var failureOrCause = (self) => {
|
|
2238
2257
|
const option2 = failureOption(self);
|
|
@@ -2247,15 +2266,15 @@ var failureOrCause = (self) => {
|
|
|
2247
2266
|
};
|
|
2248
2267
|
var interruptOption = (self) => find(self, (cause2) => cause2._tag === OP_INTERRUPT ? some2(cause2.fiberId) : none2());
|
|
2249
2268
|
var stripFailures = (self) => match3(self, {
|
|
2250
|
-
onEmpty:
|
|
2251
|
-
onFail: () =>
|
|
2269
|
+
onEmpty: empty7,
|
|
2270
|
+
onFail: () => empty7,
|
|
2252
2271
|
onDie: die,
|
|
2253
2272
|
onInterrupt: interrupt,
|
|
2254
2273
|
onSequential: sequential,
|
|
2255
2274
|
onParallel: parallel
|
|
2256
2275
|
});
|
|
2257
2276
|
var electFailures = (self) => match3(self, {
|
|
2258
|
-
onEmpty:
|
|
2277
|
+
onEmpty: empty7,
|
|
2259
2278
|
onFail: die,
|
|
2260
2279
|
onDie: die,
|
|
2261
2280
|
onInterrupt: interrupt,
|
|
@@ -2264,7 +2283,7 @@ var electFailures = (self) => match3(self, {
|
|
|
2264
2283
|
});
|
|
2265
2284
|
var map9 = /* @__PURE__ */ dual(2, (self, f) => flatMap5(self, (e) => fail(f(e))));
|
|
2266
2285
|
var flatMap5 = /* @__PURE__ */ dual(2, (self, f) => match3(self, {
|
|
2267
|
-
onEmpty:
|
|
2286
|
+
onEmpty: empty7,
|
|
2268
2287
|
onFail: (error) => f(error),
|
|
2269
2288
|
onDie: (defect) => die(defect),
|
|
2270
2289
|
onInterrupt: (fiberId2) => interrupt(fiberId2),
|
|
@@ -2275,11 +2294,11 @@ var causeEquals = (left3, right3) => {
|
|
|
2275
2294
|
let leftStack = of2(left3);
|
|
2276
2295
|
let rightStack = of2(right3);
|
|
2277
2296
|
while (isNonEmpty(leftStack) && isNonEmpty(rightStack)) {
|
|
2278
|
-
const [leftParallel, leftSequential] = pipe(headNonEmpty2(leftStack), reduce6([
|
|
2297
|
+
const [leftParallel, leftSequential] = pipe(headNonEmpty2(leftStack), reduce6([empty6(), empty3()], ([parallel4, sequential4], cause2) => {
|
|
2279
2298
|
const [par2, seq2] = evaluateCause(cause2);
|
|
2280
2299
|
return some2([pipe(parallel4, union3(par2)), pipe(sequential4, appendAll2(seq2))]);
|
|
2281
2300
|
}));
|
|
2282
|
-
const [rightParallel, rightSequential] = pipe(headNonEmpty2(rightStack), reduce6([
|
|
2301
|
+
const [rightParallel, rightSequential] = pipe(headNonEmpty2(rightStack), reduce6([empty6(), empty3()], ([parallel4, sequential4], cause2) => {
|
|
2283
2302
|
const [par2, seq2] = evaluateCause(cause2);
|
|
2284
2303
|
return some2([pipe(parallel4, union3(par2)), pipe(sequential4, appendAll2(seq2))]);
|
|
2285
2304
|
}));
|
|
@@ -2292,11 +2311,11 @@ var causeEquals = (left3, right3) => {
|
|
|
2292
2311
|
return true;
|
|
2293
2312
|
};
|
|
2294
2313
|
var flattenCause = (cause2) => {
|
|
2295
|
-
return flattenCauseLoop(of2(cause2),
|
|
2314
|
+
return flattenCauseLoop(of2(cause2), empty3());
|
|
2296
2315
|
};
|
|
2297
2316
|
var flattenCauseLoop = (causes, flattened) => {
|
|
2298
2317
|
while (1) {
|
|
2299
|
-
const [parallel4, sequential4] = pipe(causes, reduce([
|
|
2318
|
+
const [parallel4, sequential4] = pipe(causes, reduce([empty6(), empty3()], ([parallel5, sequential5], cause2) => {
|
|
2300
2319
|
const [par2, seq2] = evaluateCause(cause2);
|
|
2301
2320
|
return [pipe(parallel5, union3(par2)), pipe(sequential5, appendAll2(seq2))];
|
|
2302
2321
|
}));
|
|
@@ -2336,8 +2355,8 @@ var find = /* @__PURE__ */ dual(2, (self, pf) => {
|
|
|
2336
2355
|
var evaluateCause = (self) => {
|
|
2337
2356
|
let cause2 = self;
|
|
2338
2357
|
const stack = [];
|
|
2339
|
-
let _parallel =
|
|
2340
|
-
let _sequential =
|
|
2358
|
+
let _parallel = empty6();
|
|
2359
|
+
let _sequential = empty3();
|
|
2341
2360
|
while (cause2 !== void 0) {
|
|
2342
2361
|
switch (cause2._tag) {
|
|
2343
2362
|
case OP_EMPTY: {
|
|
@@ -2794,7 +2813,7 @@ var isContext = (u) => hasProperty(u, TypeId4);
|
|
|
2794
2813
|
var isTag = (u) => hasProperty(u, TagTypeId);
|
|
2795
2814
|
var isReference = (u) => hasProperty(u, ReferenceTypeId);
|
|
2796
2815
|
var _empty4 = /* @__PURE__ */ makeContext(/* @__PURE__ */ new Map());
|
|
2797
|
-
var
|
|
2816
|
+
var empty8 = () => _empty4;
|
|
2798
2817
|
var make8 = (tag2, service2) => makeContext(/* @__PURE__ */ new Map([[tag2.key, service2]]));
|
|
2799
2818
|
var add3 = /* @__PURE__ */ dual(3, (self, tag2, service2) => {
|
|
2800
2819
|
const map22 = new Map(self.unsafeMap);
|
|
@@ -2839,7 +2858,7 @@ var merge2 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
2839
2858
|
var GenericTag = makeGenericTag;
|
|
2840
2859
|
var isContext2 = isContext;
|
|
2841
2860
|
var isTag2 = isTag;
|
|
2842
|
-
var
|
|
2861
|
+
var empty9 = empty8;
|
|
2843
2862
|
var make9 = make8;
|
|
2844
2863
|
var add4 = add3;
|
|
2845
2864
|
var get5 = get4;
|
|
@@ -3272,7 +3291,7 @@ var combineAll = (fiberIds) => {
|
|
|
3272
3291
|
var ids = (self) => {
|
|
3273
3292
|
switch (self._tag) {
|
|
3274
3293
|
case OP_NONE: {
|
|
3275
|
-
return
|
|
3294
|
+
return empty6();
|
|
3276
3295
|
}
|
|
3277
3296
|
case OP_RUNTIME: {
|
|
3278
3297
|
return make7(self.id);
|
|
@@ -3302,7 +3321,7 @@ var threadName2 = threadName;
|
|
|
3302
3321
|
var unsafeMake2 = unsafeMake;
|
|
3303
3322
|
|
|
3304
3323
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/HashMap.js
|
|
3305
|
-
var
|
|
3324
|
+
var empty10 = empty4;
|
|
3306
3325
|
var fromIterable6 = fromIterable3;
|
|
3307
3326
|
var isEmpty4 = isEmpty2;
|
|
3308
3327
|
var get7 = get3;
|
|
@@ -3424,7 +3443,7 @@ var isNil = (self) => self._tag === "Nil";
|
|
|
3424
3443
|
var isCons = (self) => self._tag === "Cons";
|
|
3425
3444
|
var nil = () => _Nil;
|
|
3426
3445
|
var cons = (head7, tail) => makeCons(head7, tail);
|
|
3427
|
-
var
|
|
3446
|
+
var empty11 = nil;
|
|
3428
3447
|
var of3 = (value2) => makeCons(value2, _Nil);
|
|
3429
3448
|
var appendAll3 = /* @__PURE__ */ dual(2, (self, that) => prependAll(that, self));
|
|
3430
3449
|
var prepend3 = /* @__PURE__ */ dual(2, (self, element) => cons(element, self));
|
|
@@ -3456,7 +3475,7 @@ var reduce8 = /* @__PURE__ */ dual(3, (self, zero2, f) => {
|
|
|
3456
3475
|
return acc;
|
|
3457
3476
|
});
|
|
3458
3477
|
var reverse3 = (self) => {
|
|
3459
|
-
let result =
|
|
3478
|
+
let result = empty11();
|
|
3460
3479
|
let these = self;
|
|
3461
3480
|
while (!isNil(these)) {
|
|
3462
3481
|
result = prepend3(result, these.head);
|
|
@@ -3491,7 +3510,7 @@ var EmptyProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Pat
|
|
|
3491
3510
|
_tag: "Empty"
|
|
3492
3511
|
});
|
|
3493
3512
|
var _empty5 = /* @__PURE__ */ Object.create(EmptyProto);
|
|
3494
|
-
var
|
|
3513
|
+
var empty12 = () => _empty5;
|
|
3495
3514
|
var AndThenProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(PatchProto), {
|
|
3496
3515
|
_tag: "AndThen"
|
|
3497
3516
|
});
|
|
@@ -3529,7 +3548,7 @@ var makeUpdateService = (key, update6) => {
|
|
|
3529
3548
|
};
|
|
3530
3549
|
var diff = (oldValue, newValue) => {
|
|
3531
3550
|
const missingServices = new Map(oldValue.unsafeMap);
|
|
3532
|
-
let patch11 =
|
|
3551
|
+
let patch11 = empty12();
|
|
3533
3552
|
for (const [tag2, newService] of newValue.unsafeMap.entries()) {
|
|
3534
3553
|
if (missingServices.has(tag2)) {
|
|
3535
3554
|
const old = missingServices.get(tag2);
|
|
@@ -3618,7 +3637,7 @@ var EmptyProto2 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Pa
|
|
|
3618
3637
|
_tag: "Empty"
|
|
3619
3638
|
});
|
|
3620
3639
|
var _empty6 = /* @__PURE__ */ Object.create(EmptyProto2);
|
|
3621
|
-
var
|
|
3640
|
+
var empty13 = () => _empty6;
|
|
3622
3641
|
var AndThenProto2 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(PatchProto2), {
|
|
3623
3642
|
_tag: "AndThen"
|
|
3624
3643
|
});
|
|
@@ -3645,7 +3664,7 @@ var makeRemove = (value2) => {
|
|
|
3645
3664
|
return o;
|
|
3646
3665
|
};
|
|
3647
3666
|
var diff2 = (oldValue, newValue) => {
|
|
3648
|
-
const [removed, patch11] = reduce5([oldValue,
|
|
3667
|
+
const [removed, patch11] = reduce5([oldValue, empty13()], ([set10, patch12], value2) => {
|
|
3649
3668
|
if (has3(value2)(set10)) {
|
|
3650
3669
|
return [remove4(value2)(set10), patch12];
|
|
3651
3670
|
}
|
|
@@ -3702,7 +3721,7 @@ var EmptyProto3 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Pa
|
|
|
3702
3721
|
_tag: "Empty"
|
|
3703
3722
|
});
|
|
3704
3723
|
var _empty7 = /* @__PURE__ */ Object.create(EmptyProto3);
|
|
3705
|
-
var
|
|
3724
|
+
var empty14 = () => _empty7;
|
|
3706
3725
|
var AndThenProto3 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(PatchProto3), {
|
|
3707
3726
|
_tag: "AndThen"
|
|
3708
3727
|
});
|
|
@@ -3740,7 +3759,7 @@ var makeUpdate = (index, patch11) => {
|
|
|
3740
3759
|
};
|
|
3741
3760
|
var diff3 = (options3) => {
|
|
3742
3761
|
let i = 0;
|
|
3743
|
-
let patch11 =
|
|
3762
|
+
let patch11 = empty14();
|
|
3744
3763
|
while (i < options3.oldValue.length && i < options3.newValue.length) {
|
|
3745
3764
|
const oldElement = options3.oldValue[i];
|
|
3746
3765
|
const newElement = options3.newValue[i];
|
|
@@ -3820,19 +3839,19 @@ var make14 = (params) => {
|
|
|
3820
3839
|
return differ3;
|
|
3821
3840
|
};
|
|
3822
3841
|
var environment = () => make14({
|
|
3823
|
-
empty:
|
|
3842
|
+
empty: empty12(),
|
|
3824
3843
|
combine: (first2, second) => combine4(second)(first2),
|
|
3825
3844
|
diff: (oldValue, newValue) => diff(oldValue, newValue),
|
|
3826
3845
|
patch: (patch11, oldValue) => patch(oldValue)(patch11)
|
|
3827
3846
|
});
|
|
3828
3847
|
var hashSet = () => make14({
|
|
3829
|
-
empty:
|
|
3848
|
+
empty: empty13(),
|
|
3830
3849
|
combine: (first2, second) => combine5(second)(first2),
|
|
3831
3850
|
diff: (oldValue, newValue) => diff2(oldValue, newValue),
|
|
3832
3851
|
patch: (patch11, oldValue) => patch2(oldValue)(patch11)
|
|
3833
3852
|
});
|
|
3834
3853
|
var readonlyArray = (differ3) => make14({
|
|
3835
|
-
empty:
|
|
3854
|
+
empty: empty14(),
|
|
3836
3855
|
combine: (first2, second) => combine6(first2, second),
|
|
3837
3856
|
diff: (oldValue, newValue) => diff3({
|
|
3838
3857
|
oldValue,
|
|
@@ -3868,7 +3887,7 @@ var BIT_SHIFT = 8;
|
|
|
3868
3887
|
var active = (patch11) => patch11 & BIT_MASK;
|
|
3869
3888
|
var enabled = (patch11) => patch11 >> BIT_SHIFT & BIT_MASK;
|
|
3870
3889
|
var make15 = (active2, enabled2) => (active2 & BIT_MASK) + ((enabled2 & active2 & BIT_MASK) << BIT_SHIFT);
|
|
3871
|
-
var
|
|
3890
|
+
var empty15 = /* @__PURE__ */ make15(0, 0);
|
|
3872
3891
|
var enable = (flag) => make15(flag, flag);
|
|
3873
3892
|
var disable = (flag) => make15(flag, 0);
|
|
3874
3893
|
var exclude = /* @__PURE__ */ dual(2, (self, flag) => make15(active(self) & ~flag, enabled(self)));
|
|
@@ -3894,7 +3913,7 @@ var windDown = (self) => isEnabled(self, WindDown);
|
|
|
3894
3913
|
var diff4 = /* @__PURE__ */ dual(2, (self, that) => make15(self ^ that, that));
|
|
3895
3914
|
var patch4 = /* @__PURE__ */ dual(2, (self, patch11) => self & (invert(active(patch11)) | enabled(patch11)) | active(patch11) & enabled(patch11));
|
|
3896
3915
|
var differ = /* @__PURE__ */ make14({
|
|
3897
|
-
empty:
|
|
3916
|
+
empty: empty15,
|
|
3898
3917
|
diff: (oldValue, newValue) => diff4(oldValue, newValue),
|
|
3899
3918
|
combine: (first2, second) => andThen(second)(first2),
|
|
3900
3919
|
patch: (_patch, oldValue) => patch4(oldValue, _patch)
|
|
@@ -3918,9 +3937,9 @@ var seq = (self, that) => ({
|
|
|
3918
3937
|
});
|
|
3919
3938
|
var flatten2 = (self) => {
|
|
3920
3939
|
let current = of3(self);
|
|
3921
|
-
let updated =
|
|
3940
|
+
let updated = empty11();
|
|
3922
3941
|
while (1) {
|
|
3923
|
-
const [parallel4, sequential4] = reduce8(current, [parallelCollectionEmpty(),
|
|
3942
|
+
const [parallel4, sequential4] = reduce8(current, [parallelCollectionEmpty(), empty11()], ([parallel5, sequential5], blockedRequest) => {
|
|
3924
3943
|
const [par2, seq2] = step(blockedRequest);
|
|
3925
3944
|
return [parallelCollectionCombine(parallel5, par2), appendAll3(sequential5, seq2)];
|
|
3926
3945
|
});
|
|
@@ -3935,8 +3954,8 @@ var flatten2 = (self) => {
|
|
|
3935
3954
|
var step = (requests) => {
|
|
3936
3955
|
let current = requests;
|
|
3937
3956
|
let parallel4 = parallelCollectionEmpty();
|
|
3938
|
-
let stack =
|
|
3939
|
-
let sequential4 =
|
|
3957
|
+
let stack = empty11();
|
|
3958
|
+
let sequential4 = empty11();
|
|
3940
3959
|
while (1) {
|
|
3941
3960
|
switch (current._tag) {
|
|
3942
3961
|
case "Empty": {
|
|
@@ -4019,7 +4038,7 @@ var ParallelImpl = class {
|
|
|
4019
4038
|
this.map = map22;
|
|
4020
4039
|
}
|
|
4021
4040
|
};
|
|
4022
|
-
var parallelCollectionEmpty = () => new ParallelImpl(
|
|
4041
|
+
var parallelCollectionEmpty = () => new ParallelImpl(empty10());
|
|
4023
4042
|
var parallelCollectionAdd = (self, blockedRequest) => new ParallelImpl(modifyAt2(self.map, blockedRequest.dataSource, (_) => orElseSome(map2(_, append2(blockedRequest.blockedRequest)), () => of2(blockedRequest.blockedRequest))));
|
|
4024
4043
|
var parallelCollectionCombine = (self, that) => new ParallelImpl(reduce7(self.map, that.map, (map22, value2, key) => set3(map22, key, match2(get7(map22, key), {
|
|
4025
4044
|
onNone: () => value2,
|
|
@@ -4042,7 +4061,7 @@ var SequentialImpl = class {
|
|
|
4042
4061
|
};
|
|
4043
4062
|
var sequentialCollectionMake = (map22) => new SequentialImpl(map22);
|
|
4044
4063
|
var sequentialCollectionCombine = (self, that) => new SequentialImpl(reduce7(that.map, self.map, (map22, value2, key) => set3(map22, key, match2(get7(map22, key), {
|
|
4045
|
-
onNone: () =>
|
|
4064
|
+
onNone: () => empty3(),
|
|
4046
4065
|
onSome: (a) => appendAll2(a, value2)
|
|
4047
4066
|
}))));
|
|
4048
4067
|
var sequentialCollectionKeys = (self) => Array.from(keys3(self.map));
|
|
@@ -4734,29 +4753,29 @@ var fiberRefUnsafeMakeRuntimeFlags = (initial) => fiberRefUnsafeMakePatch(initia
|
|
|
4734
4753
|
differ,
|
|
4735
4754
|
fork: differ.empty
|
|
4736
4755
|
});
|
|
4737
|
-
var currentContext = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentContext"), () => fiberRefUnsafeMakeContext(
|
|
4756
|
+
var currentContext = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentContext"), () => fiberRefUnsafeMakeContext(empty9()));
|
|
4738
4757
|
var currentSchedulingPriority = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentSchedulingPriority"), () => fiberRefUnsafeMake(0));
|
|
4739
4758
|
var currentMaxOpsBeforeYield = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"), () => fiberRefUnsafeMake(2048));
|
|
4740
|
-
var currentLogAnnotations = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentLogAnnotation"), () => fiberRefUnsafeMake(
|
|
4759
|
+
var currentLogAnnotations = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentLogAnnotation"), () => fiberRefUnsafeMake(empty10()));
|
|
4741
4760
|
var currentLogLevel = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentLogLevel"), () => fiberRefUnsafeMake(logLevelInfo));
|
|
4742
|
-
var currentLogSpan = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentLogSpan"), () => fiberRefUnsafeMake(
|
|
4761
|
+
var currentLogSpan = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentLogSpan"), () => fiberRefUnsafeMake(empty11()));
|
|
4743
4762
|
var withSchedulingPriority = /* @__PURE__ */ dual(2, (self, scheduler) => fiberRefLocally(self, currentSchedulingPriority, scheduler));
|
|
4744
4763
|
var currentConcurrency = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentConcurrency"), () => fiberRefUnsafeMake("unbounded"));
|
|
4745
4764
|
var currentRequestBatching = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentRequestBatching"), () => fiberRefUnsafeMake(true));
|
|
4746
4765
|
var currentUnhandledErrorLogLevel = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"), () => fiberRefUnsafeMake(some2(logLevelDebug)));
|
|
4747
|
-
var currentMetricLabels = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentMetricLabels"), () => fiberRefUnsafeMakeReadonlyArray(
|
|
4766
|
+
var currentMetricLabels = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentMetricLabels"), () => fiberRefUnsafeMakeReadonlyArray(empty2()));
|
|
4748
4767
|
var currentForkScopeOverride = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentForkScopeOverride"), () => fiberRefUnsafeMake(none2(), {
|
|
4749
4768
|
fork: () => none2(),
|
|
4750
4769
|
join: (parent, _) => parent
|
|
4751
4770
|
}));
|
|
4752
|
-
var currentInterruptedCause = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentInterruptedCause"), () => fiberRefUnsafeMake(
|
|
4753
|
-
fork: () =>
|
|
4771
|
+
var currentInterruptedCause = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentInterruptedCause"), () => fiberRefUnsafeMake(empty7, {
|
|
4772
|
+
fork: () => empty7,
|
|
4754
4773
|
join: (parent, _) => parent
|
|
4755
4774
|
}));
|
|
4756
4775
|
var currentTracerEnabled = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerEnabled"), () => fiberRefUnsafeMake(true));
|
|
4757
4776
|
var currentTracerTimingEnabled = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerTiming"), () => fiberRefUnsafeMake(true));
|
|
4758
|
-
var currentTracerSpanAnnotations = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"), () => fiberRefUnsafeMake(
|
|
4759
|
-
var currentTracerSpanLinks = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerSpanLinks"), () => fiberRefUnsafeMake(
|
|
4777
|
+
var currentTracerSpanAnnotations = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"), () => fiberRefUnsafeMake(empty10()));
|
|
4778
|
+
var currentTracerSpanLinks = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/FiberRef/currentTracerSpanLinks"), () => fiberRefUnsafeMake(empty3()));
|
|
4760
4779
|
var ScopeTypeId = /* @__PURE__ */ Symbol.for("effect/Scope");
|
|
4761
4780
|
var CloseableScopeTypeId = /* @__PURE__ */ Symbol.for("effect/CloseableScope");
|
|
4762
4781
|
var scopeAddFinalizer = (self, finalizer2) => self.addFinalizer(() => asVoid(finalizer2));
|
|
@@ -5287,7 +5306,7 @@ var prefixed = /* @__PURE__ */ dual(2, (self, prefix) => {
|
|
|
5287
5306
|
});
|
|
5288
5307
|
|
|
5289
5308
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/configProvider/pathPatch.js
|
|
5290
|
-
var
|
|
5309
|
+
var empty16 = {
|
|
5291
5310
|
_tag: "Empty"
|
|
5292
5311
|
};
|
|
5293
5312
|
var patch5 = /* @__PURE__ */ dual(2, (path, patch11) => {
|
|
@@ -5363,8 +5382,8 @@ var makeFlat = (options3) => ({
|
|
|
5363
5382
|
enumerateChildren: options3.enumerateChildren
|
|
5364
5383
|
});
|
|
5365
5384
|
var fromFlat = (flat) => make20({
|
|
5366
|
-
load: (config) => flatMap7(fromFlatLoop(flat,
|
|
5367
|
-
onNone: () => fail2(MissingData(
|
|
5385
|
+
load: (config) => flatMap7(fromFlatLoop(flat, empty2(), config, false), (chunk2) => match2(head(chunk2), {
|
|
5386
|
+
onNone: () => fail2(MissingData(empty2(), `Expected a single value having structure: ${config}`)),
|
|
5368
5387
|
onSome: succeed
|
|
5369
5388
|
})),
|
|
5370
5389
|
flattened: flat
|
|
@@ -5405,7 +5424,7 @@ var fromEnv = (options3) => {
|
|
|
5405
5424
|
return fromFlat(makeFlat({
|
|
5406
5425
|
load,
|
|
5407
5426
|
enumerateChildren,
|
|
5408
|
-
patch:
|
|
5427
|
+
patch: empty16
|
|
5409
5428
|
}));
|
|
5410
5429
|
};
|
|
5411
5430
|
var extend = (leftDef, rightDef, left3, right3) => {
|
|
@@ -5473,7 +5492,7 @@ var fromFlatLoop = (flat, prefix, config, split2) => {
|
|
|
5473
5492
|
return pipe(forEachSequential(indices, (index) => fromFlatLoop(flat, append(prefix, `[${index}]`), op.config, true)), map11((chunkChunk) => {
|
|
5474
5493
|
const flattened = flatten(chunkChunk);
|
|
5475
5494
|
if (flattened.length === 0) {
|
|
5476
|
-
return of(
|
|
5495
|
+
return of(empty2());
|
|
5477
5496
|
}
|
|
5478
5497
|
return of(flattened);
|
|
5479
5498
|
}));
|
|
@@ -5483,7 +5502,7 @@ var fromFlatLoop = (flat, prefix, config, split2) => {
|
|
|
5483
5502
|
return suspend(() => pipe(patch5(prefix, flat.patch), flatMap7((prefix2) => pipe(flat.enumerateChildren(prefix2), flatMap7((keys6) => {
|
|
5484
5503
|
return pipe(keys6, forEachSequential((key) => fromFlatLoop(flat, concat(prefix2, of(key)), op.valueConfig, split2)), map11((matrix) => {
|
|
5485
5504
|
if (matrix.length === 0) {
|
|
5486
|
-
return of(
|
|
5505
|
+
return of(empty10());
|
|
5487
5506
|
}
|
|
5488
5507
|
return pipe(transpose(matrix), map4((values3) => fromIterable6(zip(fromIterable(keys6), values3))));
|
|
5489
5508
|
}));
|
|
@@ -5529,7 +5548,7 @@ var transpose = (array3) => {
|
|
|
5529
5548
|
return Object.keys(array3[0]).map((column) => array3.map((row) => row[column]));
|
|
5530
5549
|
};
|
|
5531
5550
|
var indicesFrom = (quotedIndices) => pipe(forEachSequential(quotedIndices, parseQuotedIndex), mapBoth2({
|
|
5532
|
-
onFailure: () =>
|
|
5551
|
+
onFailure: () => empty2(),
|
|
5533
5552
|
onSuccess: sort(Order)
|
|
5534
5553
|
}), either2, map11(merge));
|
|
5535
5554
|
var QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/;
|
|
@@ -5784,7 +5803,7 @@ var DisablePropagation = /* @__PURE__ */ Reference2()("effect/Tracer/DisableProp
|
|
|
5784
5803
|
});
|
|
5785
5804
|
|
|
5786
5805
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/defaultServices.js
|
|
5787
|
-
var liveServices = /* @__PURE__ */ pipe(/* @__PURE__ */
|
|
5806
|
+
var liveServices = /* @__PURE__ */ pipe(/* @__PURE__ */ empty9(), /* @__PURE__ */ add4(clockTag, /* @__PURE__ */ make18()), /* @__PURE__ */ add4(consoleTag, defaultConsole), /* @__PURE__ */ add4(randomTag, /* @__PURE__ */ make21(/* @__PURE__ */ Math.random())), /* @__PURE__ */ add4(configProviderTag, /* @__PURE__ */ fromEnv()), /* @__PURE__ */ add4(tracerTag, nativeTracer));
|
|
5788
5807
|
var currentServices = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/DefaultServices/currentServices"), () => fiberRefUnsafeMakeContext(liveServices));
|
|
5789
5808
|
var sleep = (duration) => {
|
|
5790
5809
|
const decodedDuration = decode(duration);
|
|
@@ -5833,7 +5852,7 @@ var parallelN2 = parallelN;
|
|
|
5833
5852
|
function unsafeMake3(fiberRefLocals) {
|
|
5834
5853
|
return new FiberRefsImpl(fiberRefLocals);
|
|
5835
5854
|
}
|
|
5836
|
-
function
|
|
5855
|
+
function empty17() {
|
|
5837
5856
|
return unsafeMake3(/* @__PURE__ */ new Map());
|
|
5838
5857
|
}
|
|
5839
5858
|
var FiberRefsSym = /* @__PURE__ */ Symbol.for("effect/FiberRefs");
|
|
@@ -6000,7 +6019,7 @@ var updateManyAs = /* @__PURE__ */ dual(2, (self, {
|
|
|
6000
6019
|
var get9 = get8;
|
|
6001
6020
|
var getOrDefault2 = getOrDefault;
|
|
6002
6021
|
var updateManyAs2 = updateManyAs;
|
|
6003
|
-
var
|
|
6022
|
+
var empty18 = empty17;
|
|
6004
6023
|
|
|
6005
6024
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/fiberRefs/patch.js
|
|
6006
6025
|
var OP_EMPTY2 = "Empty";
|
|
@@ -6008,12 +6027,12 @@ var OP_ADD = "Add";
|
|
|
6008
6027
|
var OP_REMOVE = "Remove";
|
|
6009
6028
|
var OP_UPDATE = "Update";
|
|
6010
6029
|
var OP_AND_THEN = "AndThen";
|
|
6011
|
-
var
|
|
6030
|
+
var empty19 = {
|
|
6012
6031
|
_tag: OP_EMPTY2
|
|
6013
6032
|
};
|
|
6014
6033
|
var diff5 = (oldValue, newValue) => {
|
|
6015
6034
|
const missingLocals = new Map(oldValue.locals);
|
|
6016
|
-
let patch11 =
|
|
6035
|
+
let patch11 = empty19;
|
|
6017
6036
|
for (const [fiberRef, pairs] of newValue.locals.entries()) {
|
|
6018
6037
|
const newValue2 = headNonEmpty(pairs)[1];
|
|
6019
6038
|
const old = missingLocals.get(fiberRef);
|
|
@@ -6916,7 +6935,7 @@ var logWithLevel = (level) => (...message) => {
|
|
|
6916
6935
|
}
|
|
6917
6936
|
}
|
|
6918
6937
|
if (cause2 === void 0) {
|
|
6919
|
-
cause2 =
|
|
6938
|
+
cause2 = empty7;
|
|
6920
6939
|
}
|
|
6921
6940
|
return withFiberRuntime((fiberState) => {
|
|
6922
6941
|
fiberState.log(message, cause2, levelOption);
|
|
@@ -7007,7 +7026,7 @@ var unsafeMakeSpan = (fiber, name, options3) => {
|
|
|
7007
7026
|
span2 = noopSpan({
|
|
7008
7027
|
name,
|
|
7009
7028
|
parent,
|
|
7010
|
-
context: add4(options3.context ??
|
|
7029
|
+
context: add4(options3.context ?? empty9(), DisablePropagation, true)
|
|
7011
7030
|
});
|
|
7012
7031
|
} else {
|
|
7013
7032
|
const services = fiber.getFiberRef(currentServices);
|
|
@@ -7017,8 +7036,8 @@ var unsafeMakeSpan = (fiber, name, options3) => {
|
|
|
7017
7036
|
const fiberRefs3 = fiber.getFiberRefs();
|
|
7018
7037
|
const annotationsFromEnv = get9(fiberRefs3, currentTracerSpanAnnotations);
|
|
7019
7038
|
const linksFromEnv = get9(fiberRefs3, currentTracerSpanLinks);
|
|
7020
|
-
const links = linksFromEnv._tag === "Some" ? options3.links !== void 0 ? [...toReadonlyArray(linksFromEnv.value), ...options3.links ?? []] : toReadonlyArray(linksFromEnv.value) : options3.links ??
|
|
7021
|
-
span2 = tracer2.span(name, parent, options3.context ??
|
|
7039
|
+
const links = linksFromEnv._tag === "Some" ? options3.links !== void 0 ? [...toReadonlyArray(linksFromEnv.value), ...options3.links ?? []] : toReadonlyArray(linksFromEnv.value) : options3.links ?? empty2();
|
|
7040
|
+
span2 = tracer2.span(name, parent, options3.context ?? empty9(), links, timingEnabled ? clock3.unsafeCurrentTimeNanos() : bigint02, options3.kind ?? "internal");
|
|
7022
7041
|
if (annotationsFromEnv._tag === "Some") {
|
|
7023
7042
|
forEach3(annotationsFromEnv.value, (value2, key) => span2.attribute(key, value2));
|
|
7024
7043
|
}
|
|
@@ -7588,7 +7607,7 @@ var BucketIterator = class {
|
|
|
7588
7607
|
return result;
|
|
7589
7608
|
}
|
|
7590
7609
|
};
|
|
7591
|
-
var
|
|
7610
|
+
var empty20 = () => {
|
|
7592
7611
|
const self = Object.create(MutableHashMapProto);
|
|
7593
7612
|
self.referential = /* @__PURE__ */ new Map();
|
|
7594
7613
|
self.buckets = /* @__PURE__ */ new Map();
|
|
@@ -7965,7 +7984,7 @@ var summary3 = (key) => {
|
|
|
7965
7984
|
var calculateQuantiles = (error, sortedQuantiles, sortedSamples) => {
|
|
7966
7985
|
const sampleCount = sortedSamples.length;
|
|
7967
7986
|
if (!isNonEmptyReadonlyArray(sortedQuantiles)) {
|
|
7968
|
-
return
|
|
7987
|
+
return empty2();
|
|
7969
7988
|
}
|
|
7970
7989
|
const head7 = sortedQuantiles[0];
|
|
7971
7990
|
const tail = sortedQuantiles.slice(1);
|
|
@@ -8104,7 +8123,7 @@ var MetricRegistrySymbolKey = "effect/MetricRegistry";
|
|
|
8104
8123
|
var MetricRegistryTypeId = /* @__PURE__ */ Symbol.for(MetricRegistrySymbolKey);
|
|
8105
8124
|
var MetricRegistryImpl = class {
|
|
8106
8125
|
[MetricRegistryTypeId] = MetricRegistryTypeId;
|
|
8107
|
-
map = /* @__PURE__ */
|
|
8126
|
+
map = /* @__PURE__ */ empty20();
|
|
8108
8127
|
snapshot() {
|
|
8109
8128
|
const result = [];
|
|
8110
8129
|
for (const [key, hook] of this.map) {
|
|
@@ -8386,7 +8405,7 @@ var OP_EMPTY3 = "Empty";
|
|
|
8386
8405
|
var OP_ADD_SUPERVISOR = "AddSupervisor";
|
|
8387
8406
|
var OP_REMOVE_SUPERVISOR = "RemoveSupervisor";
|
|
8388
8407
|
var OP_AND_THEN2 = "AndThen";
|
|
8389
|
-
var
|
|
8408
|
+
var empty23 = {
|
|
8390
8409
|
_tag: OP_EMPTY3
|
|
8391
8410
|
};
|
|
8392
8411
|
var combine8 = (self, that) => {
|
|
@@ -8440,7 +8459,7 @@ var removeSupervisor = (self, that) => {
|
|
|
8440
8459
|
};
|
|
8441
8460
|
var toSet2 = (self) => {
|
|
8442
8461
|
if (equals(self, none7)) {
|
|
8443
|
-
return
|
|
8462
|
+
return empty6();
|
|
8444
8463
|
} else {
|
|
8445
8464
|
if (isZip(self)) {
|
|
8446
8465
|
return pipe(toSet2(self.left), union3(toSet2(self.right)));
|
|
@@ -8451,22 +8470,22 @@ var toSet2 = (self) => {
|
|
|
8451
8470
|
};
|
|
8452
8471
|
var diff7 = (oldValue, newValue) => {
|
|
8453
8472
|
if (equals(oldValue, newValue)) {
|
|
8454
|
-
return
|
|
8473
|
+
return empty23;
|
|
8455
8474
|
}
|
|
8456
8475
|
const oldSupervisors = toSet2(oldValue);
|
|
8457
8476
|
const newSupervisors = toSet2(newValue);
|
|
8458
|
-
const added = pipe(newSupervisors, difference3(oldSupervisors), reduce5(
|
|
8477
|
+
const added = pipe(newSupervisors, difference3(oldSupervisors), reduce5(empty23, (patch11, supervisor) => combine8(patch11, {
|
|
8459
8478
|
_tag: OP_ADD_SUPERVISOR,
|
|
8460
8479
|
supervisor
|
|
8461
8480
|
})));
|
|
8462
|
-
const removed = pipe(oldSupervisors, difference3(newSupervisors), reduce5(
|
|
8481
|
+
const removed = pipe(oldSupervisors, difference3(newSupervisors), reduce5(empty23, (patch11, supervisor) => combine8(patch11, {
|
|
8463
8482
|
_tag: OP_REMOVE_SUPERVISOR,
|
|
8464
8483
|
supervisor
|
|
8465
8484
|
})));
|
|
8466
8485
|
return combine8(added, removed);
|
|
8467
8486
|
};
|
|
8468
8487
|
var differ2 = /* @__PURE__ */ make33({
|
|
8469
|
-
empty:
|
|
8488
|
+
empty: empty23,
|
|
8470
8489
|
patch: patch8,
|
|
8471
8490
|
combine: combine8,
|
|
8472
8491
|
diff: diff7
|
|
@@ -10011,7 +10030,7 @@ var scopeExtend = /* @__PURE__ */ dual(2, (effect3, scope4) => mapInputContext(
|
|
|
10011
10030
|
var scopeUse = /* @__PURE__ */ dual(2, (effect3, scope4) => pipe(effect3, scopeExtend(scope4), onExit((exit4) => scope4.close(exit4))));
|
|
10012
10031
|
var fiberRefUnsafeMakeSupervisor = (initial) => fiberRefUnsafeMakePatch(initial, {
|
|
10013
10032
|
differ: differ2,
|
|
10014
|
-
fork:
|
|
10033
|
+
fork: empty23
|
|
10015
10034
|
});
|
|
10016
10035
|
var fiberRefLocallyScoped = /* @__PURE__ */ dual(2, (self, value2) => asVoid(acquireRelease(flatMap7(fiberRefGet(self), (oldValue) => as(fiberRefSet(self, value2), oldValue)), (oldValue) => fiberRefSet(self, oldValue))));
|
|
10017
10036
|
var fiberRefLocallyScopedWith = /* @__PURE__ */ dual(2, (self, f) => fiberRefGetWith(self, (a) => fiberRefLocallyScoped(self, f(a))));
|
|
@@ -10134,14 +10153,14 @@ var pretty2 = pretty;
|
|
|
10134
10153
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/schedule/interval.js
|
|
10135
10154
|
var IntervalSymbolKey = "effect/ScheduleInterval";
|
|
10136
10155
|
var IntervalTypeId = /* @__PURE__ */ Symbol.for(IntervalSymbolKey);
|
|
10137
|
-
var
|
|
10156
|
+
var empty25 = {
|
|
10138
10157
|
[IntervalTypeId]: IntervalTypeId,
|
|
10139
10158
|
startMillis: 0,
|
|
10140
10159
|
endMillis: 0
|
|
10141
10160
|
};
|
|
10142
10161
|
var make34 = (startMillis, endMillis) => {
|
|
10143
10162
|
if (startMillis > endMillis) {
|
|
10144
|
-
return
|
|
10163
|
+
return empty25;
|
|
10145
10164
|
}
|
|
10146
10165
|
return {
|
|
10147
10166
|
[IntervalTypeId]: IntervalTypeId,
|
|
@@ -10171,7 +10190,7 @@ var after = (startMilliseconds) => {
|
|
|
10171
10190
|
};
|
|
10172
10191
|
|
|
10173
10192
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/ScheduleInterval.js
|
|
10174
|
-
var
|
|
10193
|
+
var empty26 = empty25;
|
|
10175
10194
|
var lessThan3 = lessThan2;
|
|
10176
10195
|
var isEmpty7 = isEmpty6;
|
|
10177
10196
|
var intersect2 = intersect;
|
|
@@ -10186,7 +10205,7 @@ var make36 = (intervals) => {
|
|
|
10186
10205
|
intervals
|
|
10187
10206
|
};
|
|
10188
10207
|
};
|
|
10189
|
-
var intersect3 = /* @__PURE__ */ dual(2, (self, that) => intersectLoop(self.intervals, that.intervals,
|
|
10208
|
+
var intersect3 = /* @__PURE__ */ dual(2, (self, that) => intersectLoop(self.intervals, that.intervals, empty3()));
|
|
10190
10209
|
var intersectLoop = (_left, _right, _acc) => {
|
|
10191
10210
|
let left3 = _left;
|
|
10192
10211
|
let right3 = _right;
|
|
@@ -10204,10 +10223,10 @@ var intersectLoop = (_left, _right, _acc) => {
|
|
|
10204
10223
|
return make36(reverse2(acc));
|
|
10205
10224
|
};
|
|
10206
10225
|
var start = (self) => {
|
|
10207
|
-
return pipe(self.intervals, head2, getOrElse(() =>
|
|
10226
|
+
return pipe(self.intervals, head2, getOrElse(() => empty26)).startMillis;
|
|
10208
10227
|
};
|
|
10209
10228
|
var end = (self) => {
|
|
10210
|
-
return pipe(self.intervals, head2, getOrElse(() =>
|
|
10229
|
+
return pipe(self.intervals, head2, getOrElse(() => empty26)).endMillis;
|
|
10211
10230
|
};
|
|
10212
10231
|
var lessThan4 = /* @__PURE__ */ dual(2, (self, that) => start(self) < start(that));
|
|
10213
10232
|
var isNonEmpty3 = (self) => {
|
|
@@ -10857,9 +10876,9 @@ var make39 = (options3) => new RuntimeImpl(options3.context, options3.runtimeFla
|
|
|
10857
10876
|
var runtime2 = () => withFiberRuntime((state, status2) => succeed(new RuntimeImpl(state.getFiberRef(currentContext), status2.runtimeFlags, state.getFiberRefs())));
|
|
10858
10877
|
var defaultRuntimeFlags = /* @__PURE__ */ make16(Interruption, CooperativeYielding, RuntimeMetrics);
|
|
10859
10878
|
var defaultRuntime = /* @__PURE__ */ make39({
|
|
10860
|
-
context: /* @__PURE__ */
|
|
10879
|
+
context: /* @__PURE__ */ empty9(),
|
|
10861
10880
|
runtimeFlags: defaultRuntimeFlags,
|
|
10862
|
-
fiberRefs: /* @__PURE__ */
|
|
10881
|
+
fiberRefs: /* @__PURE__ */ empty18()
|
|
10863
10882
|
});
|
|
10864
10883
|
var unsafeForkEffect = /* @__PURE__ */ unsafeFork3(defaultRuntime);
|
|
10865
10884
|
var unsafeRunPromiseEffect = /* @__PURE__ */ unsafeRunPromise(defaultRuntime);
|
|
@@ -11035,7 +11054,7 @@ var mergeAll2 = (...layers) => {
|
|
|
11035
11054
|
}
|
|
11036
11055
|
return final;
|
|
11037
11056
|
};
|
|
11038
|
-
var scopedDiscard = (effect3) => scopedContext(pipe(effect3, as(
|
|
11057
|
+
var scopedDiscard = (effect3) => scopedContext(pipe(effect3, as(empty9())));
|
|
11039
11058
|
var scopedContext = (effect3) => {
|
|
11040
11059
|
const scoped5 = Object.create(proto3);
|
|
11041
11060
|
scoped5._op_layer = OP_SCOPED;
|
|
@@ -11045,7 +11064,7 @@ var scopedContext = (effect3) => {
|
|
|
11045
11064
|
var succeedContext = (context5) => {
|
|
11046
11065
|
return fromEffectContext(succeed(context5));
|
|
11047
11066
|
};
|
|
11048
|
-
var
|
|
11067
|
+
var empty28 = /* @__PURE__ */ succeedContext(/* @__PURE__ */ empty9());
|
|
11049
11068
|
var suspend3 = (evaluate2) => {
|
|
11050
11069
|
const suspend8 = Object.create(proto3);
|
|
11051
11070
|
suspend8._op_layer = OP_SUSPEND;
|
|
@@ -11151,7 +11170,7 @@ var makeNode = (value2) => ({
|
|
|
11151
11170
|
prev: void 0,
|
|
11152
11171
|
next: void 0
|
|
11153
11172
|
});
|
|
11154
|
-
var
|
|
11173
|
+
var empty29 = () => {
|
|
11155
11174
|
const list = Object.create(MutableListProto);
|
|
11156
11175
|
list.head = void 0;
|
|
11157
11176
|
list.tail = void 0;
|
|
@@ -11232,7 +11251,7 @@ var MutableQueueProto = {
|
|
|
11232
11251
|
};
|
|
11233
11252
|
var make40 = (capacity3) => {
|
|
11234
11253
|
const queue = Object.create(MutableQueueProto);
|
|
11235
|
-
queue.queue =
|
|
11254
|
+
queue.queue = empty29();
|
|
11236
11255
|
queue.capacity = capacity3;
|
|
11237
11256
|
return queue;
|
|
11238
11257
|
};
|
|
@@ -11252,7 +11271,7 @@ var offer = /* @__PURE__ */ dual(2, (self, value2) => {
|
|
|
11252
11271
|
var offerAll = /* @__PURE__ */ dual(2, (self, values3) => {
|
|
11253
11272
|
const iterator = values3[Symbol.iterator]();
|
|
11254
11273
|
let next;
|
|
11255
|
-
let remainder2 =
|
|
11274
|
+
let remainder2 = empty3();
|
|
11256
11275
|
let offering = true;
|
|
11257
11276
|
while (offering && (next = iterator.next()) && !next.done) {
|
|
11258
11277
|
offering = offer(next.value)(self);
|
|
@@ -11270,7 +11289,7 @@ var poll2 = /* @__PURE__ */ dual(2, (self, def) => {
|
|
|
11270
11289
|
return shift(self.queue);
|
|
11271
11290
|
});
|
|
11272
11291
|
var pollUpTo = /* @__PURE__ */ dual(2, (self, n) => {
|
|
11273
|
-
let result =
|
|
11292
|
+
let result = empty3();
|
|
11274
11293
|
let count2 = 0;
|
|
11275
11294
|
while (count2 < n) {
|
|
11276
11295
|
const element = poll2(EmptyMutableQueue)(self);
|
|
@@ -11370,7 +11389,7 @@ var pretty4 = /* @__PURE__ */ replace(defaultLogger, prettyLogger2);
|
|
|
11370
11389
|
|
|
11371
11390
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/Layer.js
|
|
11372
11391
|
var effect = fromEffect3;
|
|
11373
|
-
var
|
|
11392
|
+
var empty30 = empty28;
|
|
11374
11393
|
var mergeAll4 = mergeAll2;
|
|
11375
11394
|
|
|
11376
11395
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/redacted.js
|
|
@@ -12304,9 +12323,9 @@ var Refinement = class {
|
|
|
12304
12323
|
* @since 3.10.0
|
|
12305
12324
|
*/
|
|
12306
12325
|
_tag = "Refinement";
|
|
12307
|
-
constructor(from,
|
|
12326
|
+
constructor(from, filter12, annotations2 = {}) {
|
|
12308
12327
|
this.from = from;
|
|
12309
|
-
this.filter =
|
|
12328
|
+
this.filter = filter12;
|
|
12310
12329
|
this.annotations = annotations2;
|
|
12311
12330
|
}
|
|
12312
12331
|
/**
|
|
@@ -14445,14 +14464,14 @@ var intersectUnionMembers = (xs, ys, path) => flatMap2(xs, (x) => flatMap2(ys, (
|
|
|
14445
14464
|
}));
|
|
14446
14465
|
var extend3 = /* @__PURE__ */ dual(2, (self, that) => make43(extendAST(self.ast, that.ast, [])));
|
|
14447
14466
|
var RefineSchemaId = /* @__PURE__ */ Symbol.for("effect/SchemaId/Refine");
|
|
14448
|
-
function makeRefineClass(from,
|
|
14467
|
+
function makeRefineClass(from, filter12, ast) {
|
|
14449
14468
|
return class RefineClass extends make43(ast) {
|
|
14450
14469
|
static annotations(annotations2) {
|
|
14451
14470
|
return makeRefineClass(this.from, this.filter, mergeSchemaAnnotations(this.ast, annotations2));
|
|
14452
14471
|
}
|
|
14453
14472
|
static [RefineSchemaId] = from;
|
|
14454
14473
|
static from = from;
|
|
14455
|
-
static filter =
|
|
14474
|
+
static filter = filter12;
|
|
14456
14475
|
static make = (a, options3) => {
|
|
14457
14476
|
return getDisableValidationMakeOption(options3) ? a : validateSync(this)(a);
|
|
14458
14477
|
};
|
|
@@ -14486,13 +14505,13 @@ var toFilterParseIssue = (out, ast, input) => {
|
|
|
14486
14505
|
}
|
|
14487
14506
|
return none2();
|
|
14488
14507
|
};
|
|
14489
|
-
function
|
|
14508
|
+
function filter9(predicate, annotations2) {
|
|
14490
14509
|
return (self) => {
|
|
14491
|
-
function
|
|
14510
|
+
function filter12(input, options3, ast2) {
|
|
14492
14511
|
return toFilterParseIssue(predicate(input, options3, ast2), ast2, input);
|
|
14493
14512
|
}
|
|
14494
|
-
const ast = new Refinement(self.ast,
|
|
14495
|
-
return makeRefineClass(self,
|
|
14513
|
+
const ast = new Refinement(self.ast, filter12, toASTAnnotations(annotations2));
|
|
14514
|
+
return makeRefineClass(self, filter12, ast);
|
|
14496
14515
|
};
|
|
14497
14516
|
}
|
|
14498
14517
|
function makeTransformationClass(from, to, ast) {
|
|
@@ -14511,7 +14530,7 @@ var transform2 = /* @__PURE__ */ dual((args2) => isSchema(args2[0]) && isSchema(
|
|
|
14511
14530
|
encode: (toI, _options, _ast, toA) => succeed8(options3.encode(toI, toA))
|
|
14512
14531
|
}));
|
|
14513
14532
|
var MinLengthSchemaId2 = MinLengthSchemaId;
|
|
14514
|
-
var minLength = (minLength2, annotations2) => (self) => self.pipe(
|
|
14533
|
+
var minLength = (minLength2, annotations2) => (self) => self.pipe(filter9((a) => a.length >= minLength2, {
|
|
14515
14534
|
schemaId: MinLengthSchemaId2,
|
|
14516
14535
|
title: `minLength(${minLength2})`,
|
|
14517
14536
|
description: `a string at least ${minLength2} character(s) long`,
|
|
@@ -14523,7 +14542,7 @@ var minLength = (minLength2, annotations2) => (self) => self.pipe(filter8((a) =>
|
|
|
14523
14542
|
var StartsWithSchemaId = /* @__PURE__ */ Symbol.for("effect/SchemaId/StartsWith");
|
|
14524
14543
|
var startsWith = (startsWith2, annotations2) => (self) => {
|
|
14525
14544
|
const formatted = JSON.stringify(startsWith2);
|
|
14526
|
-
return self.pipe(
|
|
14545
|
+
return self.pipe(filter9((a) => a.startsWith(startsWith2), {
|
|
14527
14546
|
schemaId: StartsWithSchemaId,
|
|
14528
14547
|
[StartsWithSchemaId]: {
|
|
14529
14548
|
startsWith: startsWith2
|
|
@@ -14766,343 +14785,49 @@ var filterLevelOrNever = (level, effect3) => gen2(function* () {
|
|
|
14766
14785
|
});
|
|
14767
14786
|
var makeNamespacedLogSpan = (prefix) => (label) => withLogSpan2(`${prefix}:${label}`);
|
|
14768
14787
|
|
|
14769
|
-
//
|
|
14770
|
-
var
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
);
|
|
14776
|
-
var
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14788
|
+
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/queue.js
|
|
14789
|
+
var EnqueueSymbolKey = "effect/QueueEnqueue";
|
|
14790
|
+
var EnqueueTypeId = /* @__PURE__ */ Symbol.for(EnqueueSymbolKey);
|
|
14791
|
+
var DequeueSymbolKey = "effect/QueueDequeue";
|
|
14792
|
+
var DequeueTypeId = /* @__PURE__ */ Symbol.for(DequeueSymbolKey);
|
|
14793
|
+
var QueueStrategySymbolKey = "effect/QueueStrategy";
|
|
14794
|
+
var QueueStrategyTypeId = /* @__PURE__ */ Symbol.for(QueueStrategySymbolKey);
|
|
14795
|
+
var BackingQueueSymbolKey = "effect/BackingQueue";
|
|
14796
|
+
var BackingQueueTypeId = /* @__PURE__ */ Symbol.for(BackingQueueSymbolKey);
|
|
14797
|
+
var queueStrategyVariance = {
|
|
14798
|
+
/* c8 ignore next */
|
|
14799
|
+
_A: (_) => _
|
|
14800
|
+
};
|
|
14801
|
+
var backingQueueVariance = {
|
|
14802
|
+
/* c8 ignore next */
|
|
14803
|
+
_A: (_) => _
|
|
14804
|
+
};
|
|
14805
|
+
var enqueueVariance = {
|
|
14806
|
+
/* c8 ignore next */
|
|
14807
|
+
_In: (_) => _
|
|
14808
|
+
};
|
|
14809
|
+
var dequeueVariance = {
|
|
14810
|
+
/* c8 ignore next */
|
|
14811
|
+
_Out: (_) => _
|
|
14812
|
+
};
|
|
14813
|
+
var QueueImpl = class extends Class2 {
|
|
14814
|
+
queue;
|
|
14815
|
+
takers;
|
|
14816
|
+
shutdownHook;
|
|
14817
|
+
shutdownFlag;
|
|
14818
|
+
strategy;
|
|
14819
|
+
[EnqueueTypeId] = enqueueVariance;
|
|
14820
|
+
[DequeueTypeId] = dequeueVariance;
|
|
14821
|
+
constructor(queue, takers, shutdownHook, shutdownFlag, strategy) {
|
|
14822
|
+
super();
|
|
14823
|
+
this.queue = queue;
|
|
14824
|
+
this.takers = takers;
|
|
14825
|
+
this.shutdownHook = shutdownHook;
|
|
14826
|
+
this.shutdownFlag = shutdownFlag;
|
|
14827
|
+
this.strategy = strategy;
|
|
14798
14828
|
}
|
|
14799
|
-
)
|
|
14800
|
-
|
|
14801
|
-
target_selection: Literal2("all", "entitled", "explicit"),
|
|
14802
|
-
target_type: Literal2("line_item", "shipping_line"),
|
|
14803
|
-
title: NonEmptyString,
|
|
14804
|
-
total_allocated_amount: Number$,
|
|
14805
|
-
type: Literal2("", "automatic", "discount_code", "manual", "script"),
|
|
14806
|
-
value: Union2(Number$, NumberFromString),
|
|
14807
|
-
value_type: Literal2("fixed_amount", "percentage"),
|
|
14808
|
-
description: NullOr(String$)
|
|
14809
|
-
});
|
|
14810
|
-
var Discount = Struct({
|
|
14811
|
-
amount: Number$,
|
|
14812
|
-
title: String$
|
|
14813
|
-
});
|
|
14814
|
-
var CurrencyCode = String$;
|
|
14815
|
-
var Image = Struct({
|
|
14816
|
-
aspect_ratio: Number$,
|
|
14817
|
-
alt: String$,
|
|
14818
|
-
height: Number$,
|
|
14819
|
-
url: String$,
|
|
14820
|
-
width: Number$
|
|
14821
|
-
});
|
|
14822
|
-
var OptionWithValue = Struct({
|
|
14823
|
-
name: String$,
|
|
14824
|
-
value: String$
|
|
14825
|
-
});
|
|
14826
|
-
var QuantityRule = Struct({
|
|
14827
|
-
min: Number$,
|
|
14828
|
-
max: NullOr(Number$),
|
|
14829
|
-
increment: Number$
|
|
14830
|
-
});
|
|
14831
|
-
var SellingPlanAllocationPriceAdjustment = Struct({
|
|
14832
|
-
position: Number$,
|
|
14833
|
-
price: Number$
|
|
14834
|
-
});
|
|
14835
|
-
var SellingPlanPriceAdjustment = Struct({
|
|
14836
|
-
order_count: NullOr(Number$),
|
|
14837
|
-
position: Number$,
|
|
14838
|
-
value: Number$,
|
|
14839
|
-
value_type: Literal2("percentage", "fixed_amount", "price")
|
|
14840
|
-
});
|
|
14841
|
-
var SellingPlanOption = Struct({
|
|
14842
|
-
name: String$,
|
|
14843
|
-
position: Number$,
|
|
14844
|
-
value: String$
|
|
14845
|
-
});
|
|
14846
|
-
var SellingPlan = Struct({
|
|
14847
|
-
id: Resource_exports.ID,
|
|
14848
|
-
name: String$,
|
|
14849
|
-
description: NullOr(String$),
|
|
14850
|
-
options: Array$(SellingPlanOption),
|
|
14851
|
-
recurring_deliveries: optionalWith(Boolean$, {
|
|
14852
|
-
default: () => false
|
|
14853
|
-
}),
|
|
14854
|
-
fixed_selling_plan: optionalWith(Boolean$, {
|
|
14855
|
-
default: () => false
|
|
14856
|
-
}),
|
|
14857
|
-
price_adjustments: Array$(SellingPlanPriceAdjustment)
|
|
14858
|
-
});
|
|
14859
|
-
var SellingPlanAllocation = Struct({
|
|
14860
|
-
price_adjustments: Array$(SellingPlanAllocationPriceAdjustment),
|
|
14861
|
-
price: Number$,
|
|
14862
|
-
compare_at_price: Number$,
|
|
14863
|
-
per_delivery_price: Number$,
|
|
14864
|
-
selling_plan: SellingPlan
|
|
14865
|
-
});
|
|
14866
|
-
var LineLevelDiscountAllocation = Struct({
|
|
14867
|
-
amount: Number$,
|
|
14868
|
-
discount_application: DiscountApplication
|
|
14869
|
-
});
|
|
14870
|
-
var CartLevelDiscountApplicationUpdate = transform2(
|
|
14871
|
-
Struct({
|
|
14872
|
-
discount_application: DiscountApplication
|
|
14873
|
-
}),
|
|
14874
|
-
DiscountApplication,
|
|
14875
|
-
{
|
|
14876
|
-
decode: (application) => application.discount_application,
|
|
14877
|
-
encode: (discountApplication) => ({
|
|
14878
|
-
discount_application: discountApplication
|
|
14879
|
-
}),
|
|
14880
|
-
strict: false
|
|
14881
|
-
}
|
|
14882
|
-
);
|
|
14883
|
-
var CartLevelDiscountApplication = Union2(
|
|
14884
|
-
DiscountApplication,
|
|
14885
|
-
CartLevelDiscountApplicationUpdate
|
|
14886
|
-
);
|
|
14887
|
-
var UnitPriceMeasurement = Struct({
|
|
14888
|
-
measured_type: Literal2("volume", "weight", "dimension"),
|
|
14889
|
-
quantity_unit: String$,
|
|
14890
|
-
quantity_value: Number$,
|
|
14891
|
-
reference_unit: String$,
|
|
14892
|
-
reference_value: Number$
|
|
14893
|
-
});
|
|
14894
|
-
var LineItem = Struct({
|
|
14895
|
-
id: Resource_exports.ID,
|
|
14896
|
-
properties: optionalWith(NullOr(Attributes), {
|
|
14897
|
-
default: () => ({})
|
|
14898
|
-
}),
|
|
14899
|
-
properties_array: optionalWith(NullOr(AttributesArray), {
|
|
14900
|
-
default: () => []
|
|
14901
|
-
}),
|
|
14902
|
-
quantity: Number$,
|
|
14903
|
-
variant_id: Resource_exports.ID,
|
|
14904
|
-
key: String$,
|
|
14905
|
-
title: String$,
|
|
14906
|
-
price: Number$,
|
|
14907
|
-
original_price: Number$,
|
|
14908
|
-
discounted_price: Number$,
|
|
14909
|
-
line_price: Number$,
|
|
14910
|
-
original_line_price: Number$,
|
|
14911
|
-
total_discount: Number$,
|
|
14912
|
-
discounts: optionalWith(Array$(Discount), { default: () => [] }),
|
|
14913
|
-
sku: NullOr(String$),
|
|
14914
|
-
grams: Number$,
|
|
14915
|
-
vendor: String$,
|
|
14916
|
-
taxable: Boolean$,
|
|
14917
|
-
product_id: Resource_exports.ID,
|
|
14918
|
-
product_has_only_default_variant: Boolean$,
|
|
14919
|
-
gift_card: Boolean$,
|
|
14920
|
-
final_line_price: Number$,
|
|
14921
|
-
final_price: Number$,
|
|
14922
|
-
url: String$,
|
|
14923
|
-
featured_image: optional(Image),
|
|
14924
|
-
image: String$,
|
|
14925
|
-
handle: String$,
|
|
14926
|
-
requires_shipping: Boolean$,
|
|
14927
|
-
product_type: String$,
|
|
14928
|
-
product_title: String$,
|
|
14929
|
-
product_description: String$,
|
|
14930
|
-
variant_title: NullOr(String$),
|
|
14931
|
-
variant_options: Array$(String$),
|
|
14932
|
-
options_with_values: Array$(OptionWithValue),
|
|
14933
|
-
line_level_discount_allocations: Array$(LineLevelDiscountAllocation),
|
|
14934
|
-
line_level_total_discount: Number$,
|
|
14935
|
-
quantity_rule: optional(QuantityRule),
|
|
14936
|
-
has_components: optionalWith(Boolean$, { default: () => false }),
|
|
14937
|
-
unit_price: optional(Number$),
|
|
14938
|
-
unit_price_measurement: optional(UnitPriceMeasurement),
|
|
14939
|
-
selling_plan_allocation: optionalWith(
|
|
14940
|
-
NullOr(SellingPlanAllocation),
|
|
14941
|
-
{ default: () => null }
|
|
14942
|
-
)
|
|
14943
|
-
});
|
|
14944
|
-
var Cart = Struct({
|
|
14945
|
-
token: String$,
|
|
14946
|
-
note: NullOr(String$),
|
|
14947
|
-
attributes: optionalWith(Attributes, {
|
|
14948
|
-
default: () => ({})
|
|
14949
|
-
}),
|
|
14950
|
-
attributes_array: optionalWith(AttributesArray, { default: () => [] }),
|
|
14951
|
-
discounts: optionalWith(Array$(Discount), { default: () => [] }),
|
|
14952
|
-
discount_codes: optionalWith(
|
|
14953
|
-
Array$(
|
|
14954
|
-
Struct({ code: String$, applicable: Boolean$ })
|
|
14955
|
-
),
|
|
14956
|
-
{ default: () => [] }
|
|
14957
|
-
),
|
|
14958
|
-
original_total_price: Number$,
|
|
14959
|
-
total_price: Number$,
|
|
14960
|
-
total_discount: Number$,
|
|
14961
|
-
total_weight: Number$,
|
|
14962
|
-
item_count: Number$,
|
|
14963
|
-
items: Array$(LineItem),
|
|
14964
|
-
requires_shipping: Boolean$,
|
|
14965
|
-
currency: CurrencyCode,
|
|
14966
|
-
items_subtotal_price: Number$,
|
|
14967
|
-
cart_level_discount_applications: Array$(CartLevelDiscountApplication)
|
|
14968
|
-
});
|
|
14969
|
-
var AddItemInput = Struct({
|
|
14970
|
-
id: Resource_exports.ID,
|
|
14971
|
-
quantity: optionalWith(Number$, { default: () => 1 }),
|
|
14972
|
-
properties: optionalWith(BaseAttributes, { default: () => ({}) }),
|
|
14973
|
-
selling_plan: optional(Resource_exports.ID)
|
|
14974
|
-
});
|
|
14975
|
-
var BaseInput = extend3(Ajax_exports.Sections.Input);
|
|
14976
|
-
var CartAddInput = Struct({
|
|
14977
|
-
items: Array$(AddItemInput)
|
|
14978
|
-
}).pipe(BaseInput);
|
|
14979
|
-
var CartAddOutput = Struct({
|
|
14980
|
-
items: Array$(LineItem)
|
|
14981
|
-
});
|
|
14982
|
-
var UpdateItemRecordInput = Record({
|
|
14983
|
-
key: String$,
|
|
14984
|
-
value: Number$
|
|
14985
|
-
});
|
|
14986
|
-
var DiscountCodeInput = Array$(String$);
|
|
14987
|
-
var DiscountCodeTransformed = String$;
|
|
14988
|
-
var CartUpdateInput = Struct({
|
|
14989
|
-
updates: optional(
|
|
14990
|
-
Union2(UpdateItemRecordInput, Array$(Number$))
|
|
14991
|
-
),
|
|
14992
|
-
note: optional(NullOr(String$)),
|
|
14993
|
-
attributes: optional(Attributes),
|
|
14994
|
-
discount: optional(
|
|
14995
|
-
transform2(DiscountCodeInput, DiscountCodeTransformed, {
|
|
14996
|
-
decode: (input) => input.join(","),
|
|
14997
|
-
encode: (input) => input.split(",")
|
|
14998
|
-
})
|
|
14999
|
-
)
|
|
15000
|
-
}).pipe(BaseInput);
|
|
15001
|
-
var ItemAddedChangelog = Struct({
|
|
15002
|
-
variant_id: Number$,
|
|
15003
|
-
quantity: Number$
|
|
15004
|
-
});
|
|
15005
|
-
var CartUpdateOutput = Struct({
|
|
15006
|
-
...Cart.fields,
|
|
15007
|
-
items_changelog: Struct({
|
|
15008
|
-
added: Array$(ItemAddedChangelog)
|
|
15009
|
-
})
|
|
15010
|
-
});
|
|
15011
|
-
var CartChangeItemOptionalInput = Struct({
|
|
15012
|
-
quantity: optional(Number$),
|
|
15013
|
-
properties: optional(
|
|
15014
|
-
Record({
|
|
15015
|
-
key: String$,
|
|
15016
|
-
value: NullOr(String$)
|
|
15017
|
-
})
|
|
15018
|
-
),
|
|
15019
|
-
selling_plan: optional(NullOr(Resource_exports.ID))
|
|
15020
|
-
}).pipe(BaseInput);
|
|
15021
|
-
var LineItemChange = Struct({
|
|
15022
|
-
product_id: Number$,
|
|
15023
|
-
variant_id: Number$,
|
|
15024
|
-
id: String$,
|
|
15025
|
-
image: String$,
|
|
15026
|
-
price: String$,
|
|
15027
|
-
presentment_price: Number$,
|
|
15028
|
-
quantity: Number$,
|
|
15029
|
-
title: String$,
|
|
15030
|
-
product_title: String$,
|
|
15031
|
-
variant_title: String$,
|
|
15032
|
-
vendor: String$,
|
|
15033
|
-
product_type: String$,
|
|
15034
|
-
sku: String$,
|
|
15035
|
-
url: String$,
|
|
15036
|
-
untranslated_product_title: String$,
|
|
15037
|
-
untranslated_variant_title: String$,
|
|
15038
|
-
view_key: String$
|
|
15039
|
-
});
|
|
15040
|
-
var CartChangeInput = Union2(
|
|
15041
|
-
extend3(CartChangeItemOptionalInput)(
|
|
15042
|
-
Struct({
|
|
15043
|
-
id: String$
|
|
15044
|
-
})
|
|
15045
|
-
),
|
|
15046
|
-
extend3(CartChangeItemOptionalInput)(
|
|
15047
|
-
Struct({
|
|
15048
|
-
line: Number$
|
|
15049
|
-
})
|
|
15050
|
-
)
|
|
15051
|
-
);
|
|
15052
|
-
var CartChangeOutput = Struct({
|
|
15053
|
-
...Cart.fields,
|
|
15054
|
-
items_added: Array$(LineItemChange),
|
|
15055
|
-
items_removed: Array$(LineItemChange)
|
|
15056
|
-
});
|
|
15057
|
-
var CartClearInput = Ajax_exports.Sections.Input;
|
|
15058
|
-
var CartGetInput = Ajax_exports.Sections.Input;
|
|
15059
|
-
mutable2(
|
|
15060
|
-
Array$(NonEmptyString)
|
|
15061
|
-
);
|
|
15062
|
-
|
|
15063
|
-
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/queue.js
|
|
15064
|
-
var EnqueueSymbolKey = "effect/QueueEnqueue";
|
|
15065
|
-
var EnqueueTypeId = /* @__PURE__ */ Symbol.for(EnqueueSymbolKey);
|
|
15066
|
-
var DequeueSymbolKey = "effect/QueueDequeue";
|
|
15067
|
-
var DequeueTypeId = /* @__PURE__ */ Symbol.for(DequeueSymbolKey);
|
|
15068
|
-
var QueueStrategySymbolKey = "effect/QueueStrategy";
|
|
15069
|
-
var QueueStrategyTypeId = /* @__PURE__ */ Symbol.for(QueueStrategySymbolKey);
|
|
15070
|
-
var BackingQueueSymbolKey = "effect/BackingQueue";
|
|
15071
|
-
var BackingQueueTypeId = /* @__PURE__ */ Symbol.for(BackingQueueSymbolKey);
|
|
15072
|
-
var queueStrategyVariance = {
|
|
15073
|
-
/* c8 ignore next */
|
|
15074
|
-
_A: (_) => _
|
|
15075
|
-
};
|
|
15076
|
-
var backingQueueVariance = {
|
|
15077
|
-
/* c8 ignore next */
|
|
15078
|
-
_A: (_) => _
|
|
15079
|
-
};
|
|
15080
|
-
var enqueueVariance = {
|
|
15081
|
-
/* c8 ignore next */
|
|
15082
|
-
_In: (_) => _
|
|
15083
|
-
};
|
|
15084
|
-
var dequeueVariance = {
|
|
15085
|
-
/* c8 ignore next */
|
|
15086
|
-
_Out: (_) => _
|
|
15087
|
-
};
|
|
15088
|
-
var QueueImpl = class extends Class2 {
|
|
15089
|
-
queue;
|
|
15090
|
-
takers;
|
|
15091
|
-
shutdownHook;
|
|
15092
|
-
shutdownFlag;
|
|
15093
|
-
strategy;
|
|
15094
|
-
[EnqueueTypeId] = enqueueVariance;
|
|
15095
|
-
[DequeueTypeId] = dequeueVariance;
|
|
15096
|
-
constructor(queue, takers, shutdownHook, shutdownFlag, strategy) {
|
|
15097
|
-
super();
|
|
15098
|
-
this.queue = queue;
|
|
15099
|
-
this.takers = takers;
|
|
15100
|
-
this.shutdownHook = shutdownHook;
|
|
15101
|
-
this.shutdownFlag = shutdownFlag;
|
|
15102
|
-
this.strategy = strategy;
|
|
15103
|
-
}
|
|
15104
|
-
pipe() {
|
|
15105
|
-
return pipeArguments(this, arguments);
|
|
14829
|
+
pipe() {
|
|
14830
|
+
return pipeArguments(this, arguments);
|
|
15106
14831
|
}
|
|
15107
14832
|
commit() {
|
|
15108
14833
|
return this.take;
|
|
@@ -15194,7 +14919,7 @@ var QueueImpl = class extends Class2 {
|
|
|
15194
14919
|
return interrupt2;
|
|
15195
14920
|
}
|
|
15196
14921
|
const values3 = fromIterable(iterable);
|
|
15197
|
-
const pTakers = this.queue.length() === 0 ? fromIterable(unsafePollN(this.takers, values3.length)) :
|
|
14922
|
+
const pTakers = this.queue.length() === 0 ? fromIterable(unsafePollN(this.takers, values3.length)) : empty2;
|
|
15198
14923
|
const [forTakers, remaining] = pipe(values3, splitAt(pTakers.length));
|
|
15199
14924
|
for (let i = 0; i < pTakers.length; i++) {
|
|
15200
14925
|
const taker = pTakers[i];
|
|
@@ -15247,7 +14972,7 @@ var QueueImpl = class extends Class2 {
|
|
|
15247
14972
|
}));
|
|
15248
14973
|
}
|
|
15249
14974
|
takeBetween(min3, max5) {
|
|
15250
|
-
return suspend(() => takeRemainderLoop(this, min3, max5,
|
|
14975
|
+
return suspend(() => takeRemainderLoop(this, min3, max5, empty3()));
|
|
15251
14976
|
}
|
|
15252
14977
|
};
|
|
15253
14978
|
var takeRemainderLoop = (self, min3, max5, acc) => {
|
|
@@ -15363,7 +15088,7 @@ var BackPressureStrategy = class {
|
|
|
15363
15088
|
}
|
|
15364
15089
|
}
|
|
15365
15090
|
unsafeRemove(deferred) {
|
|
15366
|
-
unsafeOfferAll(this.putters, pipe(unsafePollAll(this.putters),
|
|
15091
|
+
unsafeOfferAll(this.putters, pipe(unsafePollAll(this.putters), filter4(([, _]) => _ !== deferred)));
|
|
15367
15092
|
}
|
|
15368
15093
|
};
|
|
15369
15094
|
var DroppingStrategy = class {
|
|
@@ -15395,7 +15120,7 @@ var unsafePollN = (queue, max5) => {
|
|
|
15395
15120
|
return pipe(queue, pollUpTo(max5));
|
|
15396
15121
|
};
|
|
15397
15122
|
var unsafeRemove = (queue, a) => {
|
|
15398
|
-
unsafeOfferAll(queue, pipe(unsafePollAll(queue),
|
|
15123
|
+
unsafeOfferAll(queue, pipe(unsafePollAll(queue), filter4((b) => a !== b)));
|
|
15399
15124
|
};
|
|
15400
15125
|
var unsafeCompleteTakers = (strategy, queue, takers) => {
|
|
15401
15126
|
let keepPolling = true;
|
|
@@ -16951,9 +16676,6 @@ var ChannelException = (error) => ({
|
|
|
16951
16676
|
});
|
|
16952
16677
|
var isChannelException = (u) => hasProperty(u, ChannelExceptionTypeId);
|
|
16953
16678
|
|
|
16954
|
-
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/Runtime.js
|
|
16955
|
-
var runFork3 = unsafeFork3;
|
|
16956
|
-
|
|
16957
16679
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/sink.js
|
|
16958
16680
|
var SinkTypeId2 = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
16959
16681
|
var sinkVariance2 = {
|
|
@@ -16989,6 +16711,9 @@ var forEachChunk = (f) => {
|
|
|
16989
16711
|
var fromEffect6 = (effect3) => new SinkImpl(fromEffect4(effect3));
|
|
16990
16712
|
var toChannel = (self) => isEffect2(self) ? toChannel(fromEffect6(self)) : self.channel;
|
|
16991
16713
|
|
|
16714
|
+
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/Runtime.js
|
|
16715
|
+
var runFork3 = unsafeFork3;
|
|
16716
|
+
|
|
16992
16717
|
// ../../../node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/esm/internal/stream.js
|
|
16993
16718
|
var StreamSymbolKey = "effect/Stream";
|
|
16994
16719
|
var StreamTypeId2 = /* @__PURE__ */ Symbol.for(StreamSymbolKey);
|
|
@@ -17123,6 +16848,363 @@ var fromReadableStream2 = fromReadableStream;
|
|
|
17123
16848
|
var suspend7 = suspend6;
|
|
17124
16849
|
var toReadableStreamEffect2 = toReadableStreamEffect;
|
|
17125
16850
|
|
|
16851
|
+
// src/effect/schema.ts
|
|
16852
|
+
var BaseAttributeValue = Union2(
|
|
16853
|
+
Null,
|
|
16854
|
+
String$,
|
|
16855
|
+
Boolean$,
|
|
16856
|
+
Number$
|
|
16857
|
+
);
|
|
16858
|
+
var BaseAttributes = Record({
|
|
16859
|
+
key: String$,
|
|
16860
|
+
value: BaseAttributeValue
|
|
16861
|
+
});
|
|
16862
|
+
var BasePrivateAttributes = transform2(BaseAttributes, BaseAttributes, {
|
|
16863
|
+
decode: filter2((value2, key) => key.startsWith("_")),
|
|
16864
|
+
encode: identity
|
|
16865
|
+
});
|
|
16866
|
+
var BasePublicAttributes = transform2(BaseAttributes, BaseAttributes, {
|
|
16867
|
+
decode: filter2((value2, key) => !key.startsWith("_")),
|
|
16868
|
+
encode: identity
|
|
16869
|
+
});
|
|
16870
|
+
var BasePrivateAttributesArray = transform2(
|
|
16871
|
+
BasePrivateAttributes,
|
|
16872
|
+
Array$(
|
|
16873
|
+
Struct({ key: String$, value: BaseAttributeValue })
|
|
16874
|
+
),
|
|
16875
|
+
{
|
|
16876
|
+
decode: (record2) => toEntries(record2).map(([key, value2]) => ({ key, value: value2 })),
|
|
16877
|
+
encode: (array3) => fromEntries(
|
|
16878
|
+
pipe(
|
|
16879
|
+
array3,
|
|
16880
|
+
map4(({ key, value: value2 }) => [key, value2])
|
|
16881
|
+
)
|
|
16882
|
+
)
|
|
16883
|
+
}
|
|
16884
|
+
);
|
|
16885
|
+
transform2(
|
|
16886
|
+
BasePrivateAttributes,
|
|
16887
|
+
Array$(
|
|
16888
|
+
Struct({ key: String$, value: BaseAttributeValue })
|
|
16889
|
+
),
|
|
16890
|
+
{
|
|
16891
|
+
decode: (record2) => toEntries(record2).map(([key, value2]) => ({ key, value: value2 })),
|
|
16892
|
+
encode: (array3) => fromEntries(
|
|
16893
|
+
pipe(
|
|
16894
|
+
array3,
|
|
16895
|
+
map4(({ key, value: value2 }) => [key, value2])
|
|
16896
|
+
)
|
|
16897
|
+
)
|
|
16898
|
+
}
|
|
16899
|
+
);
|
|
16900
|
+
var Attributes = transform2(
|
|
16901
|
+
BaseAttributes,
|
|
16902
|
+
Struct({
|
|
16903
|
+
private: Struct({
|
|
16904
|
+
array: BasePrivateAttributesArray,
|
|
16905
|
+
record: BasePrivateAttributes
|
|
16906
|
+
}),
|
|
16907
|
+
public: Struct({
|
|
16908
|
+
array: BasePublicAttributes,
|
|
16909
|
+
record: BasePublicAttributes
|
|
16910
|
+
})
|
|
16911
|
+
}),
|
|
16912
|
+
{
|
|
16913
|
+
decode: (attributes) => ({
|
|
16914
|
+
private: {
|
|
16915
|
+
array: attributes,
|
|
16916
|
+
record: attributes
|
|
16917
|
+
},
|
|
16918
|
+
public: {
|
|
16919
|
+
array: attributes,
|
|
16920
|
+
record: attributes
|
|
16921
|
+
}
|
|
16922
|
+
}),
|
|
16923
|
+
encode: (attributes) => ({
|
|
16924
|
+
...attributes.private.record,
|
|
16925
|
+
...attributes.public.record
|
|
16926
|
+
})
|
|
16927
|
+
}
|
|
16928
|
+
);
|
|
16929
|
+
var DiscountApplication = Struct({
|
|
16930
|
+
target_selection: Literal2("all", "entitled", "explicit"),
|
|
16931
|
+
target_type: Literal2("line_item", "shipping_line"),
|
|
16932
|
+
title: NonEmptyString,
|
|
16933
|
+
total_allocated_amount: Number$,
|
|
16934
|
+
type: Literal2("", "automatic", "discount_code", "manual", "script"),
|
|
16935
|
+
value: Union2(Number$, NumberFromString),
|
|
16936
|
+
value_type: Literal2("fixed_amount", "percentage"),
|
|
16937
|
+
description: NullOr(String$)
|
|
16938
|
+
});
|
|
16939
|
+
var Discount = Struct({
|
|
16940
|
+
amount: Number$,
|
|
16941
|
+
title: String$
|
|
16942
|
+
});
|
|
16943
|
+
var CurrencyCode = String$;
|
|
16944
|
+
var Image = Struct({
|
|
16945
|
+
aspect_ratio: Number$,
|
|
16946
|
+
alt: String$,
|
|
16947
|
+
height: Number$,
|
|
16948
|
+
url: String$,
|
|
16949
|
+
width: Number$
|
|
16950
|
+
});
|
|
16951
|
+
var OptionWithValue = Struct({
|
|
16952
|
+
name: String$,
|
|
16953
|
+
value: String$
|
|
16954
|
+
});
|
|
16955
|
+
var QuantityRule = Struct({
|
|
16956
|
+
min: Number$,
|
|
16957
|
+
max: NullOr(Number$),
|
|
16958
|
+
increment: Number$
|
|
16959
|
+
});
|
|
16960
|
+
var SellingPlanAllocationPriceAdjustment = Struct({
|
|
16961
|
+
position: Number$,
|
|
16962
|
+
price: Number$
|
|
16963
|
+
});
|
|
16964
|
+
var SellingPlanPriceAdjustment = Struct({
|
|
16965
|
+
order_count: NullOr(Number$),
|
|
16966
|
+
position: Number$,
|
|
16967
|
+
value: Number$,
|
|
16968
|
+
value_type: Literal2("percentage", "fixed_amount", "price")
|
|
16969
|
+
});
|
|
16970
|
+
var SellingPlanOption = Struct({
|
|
16971
|
+
name: String$,
|
|
16972
|
+
position: Number$,
|
|
16973
|
+
value: String$
|
|
16974
|
+
});
|
|
16975
|
+
var SellingPlan = Struct({
|
|
16976
|
+
id: Resource_exports.ID,
|
|
16977
|
+
name: String$,
|
|
16978
|
+
description: NullOr(String$),
|
|
16979
|
+
options: Array$(SellingPlanOption),
|
|
16980
|
+
recurring_deliveries: optionalWith(Boolean$, {
|
|
16981
|
+
default: () => false
|
|
16982
|
+
}),
|
|
16983
|
+
fixed_selling_plan: optionalWith(Boolean$, {
|
|
16984
|
+
default: () => false
|
|
16985
|
+
}),
|
|
16986
|
+
price_adjustments: Array$(SellingPlanPriceAdjustment)
|
|
16987
|
+
});
|
|
16988
|
+
var SellingPlanAllocation = Struct({
|
|
16989
|
+
price_adjustments: Array$(SellingPlanAllocationPriceAdjustment),
|
|
16990
|
+
price: Number$,
|
|
16991
|
+
compare_at_price: Number$,
|
|
16992
|
+
per_delivery_price: Number$,
|
|
16993
|
+
selling_plan: SellingPlan
|
|
16994
|
+
});
|
|
16995
|
+
var LineLevelDiscountAllocation = Struct({
|
|
16996
|
+
amount: Number$,
|
|
16997
|
+
discount_application: DiscountApplication
|
|
16998
|
+
});
|
|
16999
|
+
var CartLevelDiscountApplicationUpdate = transform2(
|
|
17000
|
+
Struct({
|
|
17001
|
+
discount_application: DiscountApplication
|
|
17002
|
+
}),
|
|
17003
|
+
DiscountApplication,
|
|
17004
|
+
{
|
|
17005
|
+
decode: (application) => application.discount_application,
|
|
17006
|
+
encode: (discountApplication) => ({
|
|
17007
|
+
discount_application: discountApplication
|
|
17008
|
+
}),
|
|
17009
|
+
strict: false
|
|
17010
|
+
}
|
|
17011
|
+
);
|
|
17012
|
+
var CartLevelDiscountApplication = Union2(
|
|
17013
|
+
DiscountApplication,
|
|
17014
|
+
CartLevelDiscountApplicationUpdate
|
|
17015
|
+
);
|
|
17016
|
+
var UnitPriceMeasurement = Struct({
|
|
17017
|
+
measured_type: Literal2("volume", "weight", "dimension"),
|
|
17018
|
+
quantity_unit: String$,
|
|
17019
|
+
quantity_value: Number$,
|
|
17020
|
+
reference_unit: String$,
|
|
17021
|
+
reference_value: Number$
|
|
17022
|
+
});
|
|
17023
|
+
var LineItem = Struct({
|
|
17024
|
+
id: Resource_exports.ID,
|
|
17025
|
+
properties: optionalWith(Attributes, {
|
|
17026
|
+
default: () => ({
|
|
17027
|
+
private: {
|
|
17028
|
+
array: [],
|
|
17029
|
+
record: {}
|
|
17030
|
+
},
|
|
17031
|
+
public: {
|
|
17032
|
+
array: [],
|
|
17033
|
+
record: {}
|
|
17034
|
+
}
|
|
17035
|
+
}),
|
|
17036
|
+
nullable: true
|
|
17037
|
+
}),
|
|
17038
|
+
quantity: Number$,
|
|
17039
|
+
variant_id: Resource_exports.ID,
|
|
17040
|
+
key: String$,
|
|
17041
|
+
title: String$,
|
|
17042
|
+
price: Number$,
|
|
17043
|
+
original_price: Number$,
|
|
17044
|
+
discounted_price: Number$,
|
|
17045
|
+
line_price: Number$,
|
|
17046
|
+
original_line_price: Number$,
|
|
17047
|
+
total_discount: Number$,
|
|
17048
|
+
discounts: optionalWith(Array$(Discount), { default: () => [] }),
|
|
17049
|
+
sku: NullOr(String$),
|
|
17050
|
+
grams: Number$,
|
|
17051
|
+
vendor: String$,
|
|
17052
|
+
taxable: Boolean$,
|
|
17053
|
+
product_id: Resource_exports.ID,
|
|
17054
|
+
product_has_only_default_variant: Boolean$,
|
|
17055
|
+
gift_card: Boolean$,
|
|
17056
|
+
final_line_price: Number$,
|
|
17057
|
+
final_price: Number$,
|
|
17058
|
+
url: String$,
|
|
17059
|
+
featured_image: optional(Image),
|
|
17060
|
+
image: String$,
|
|
17061
|
+
handle: String$,
|
|
17062
|
+
requires_shipping: Boolean$,
|
|
17063
|
+
product_type: String$,
|
|
17064
|
+
product_title: String$,
|
|
17065
|
+
product_description: String$,
|
|
17066
|
+
variant_title: NullOr(String$),
|
|
17067
|
+
variant_options: Array$(String$),
|
|
17068
|
+
options_with_values: Array$(OptionWithValue),
|
|
17069
|
+
line_level_discount_allocations: Array$(LineLevelDiscountAllocation),
|
|
17070
|
+
line_level_total_discount: Number$,
|
|
17071
|
+
quantity_rule: optional(QuantityRule),
|
|
17072
|
+
has_components: optionalWith(Boolean$, { default: () => false }),
|
|
17073
|
+
unit_price: optional(Number$),
|
|
17074
|
+
unit_price_measurement: optional(UnitPriceMeasurement),
|
|
17075
|
+
selling_plan_allocation: optionalWith(
|
|
17076
|
+
NullOr(SellingPlanAllocation),
|
|
17077
|
+
{ default: () => null }
|
|
17078
|
+
)
|
|
17079
|
+
});
|
|
17080
|
+
var Cart = Struct({
|
|
17081
|
+
token: String$,
|
|
17082
|
+
note: NullOr(String$),
|
|
17083
|
+
attributes: optionalWith(Attributes, {
|
|
17084
|
+
default: () => ({
|
|
17085
|
+
private: {
|
|
17086
|
+
array: [],
|
|
17087
|
+
record: {}
|
|
17088
|
+
},
|
|
17089
|
+
public: {
|
|
17090
|
+
array: [],
|
|
17091
|
+
record: {}
|
|
17092
|
+
}
|
|
17093
|
+
}),
|
|
17094
|
+
nullable: true
|
|
17095
|
+
}),
|
|
17096
|
+
discounts: optionalWith(Array$(Discount), { default: () => [] }),
|
|
17097
|
+
discount_codes: optionalWith(
|
|
17098
|
+
Array$(
|
|
17099
|
+
Struct({ code: String$, applicable: Boolean$ })
|
|
17100
|
+
),
|
|
17101
|
+
{ default: () => [] }
|
|
17102
|
+
),
|
|
17103
|
+
original_total_price: Number$,
|
|
17104
|
+
total_price: Number$,
|
|
17105
|
+
total_discount: Number$,
|
|
17106
|
+
total_weight: Number$,
|
|
17107
|
+
item_count: Number$,
|
|
17108
|
+
items: Array$(LineItem),
|
|
17109
|
+
requires_shipping: Boolean$,
|
|
17110
|
+
currency: CurrencyCode,
|
|
17111
|
+
items_subtotal_price: Number$,
|
|
17112
|
+
cart_level_discount_applications: Array$(CartLevelDiscountApplication)
|
|
17113
|
+
});
|
|
17114
|
+
var AddItemInput = Struct({
|
|
17115
|
+
id: Resource_exports.ID,
|
|
17116
|
+
quantity: optionalWith(Number$, { default: () => 1 }),
|
|
17117
|
+
properties: optionalWith(BaseAttributes, { default: () => ({}) }),
|
|
17118
|
+
selling_plan: optional(Resource_exports.ID)
|
|
17119
|
+
});
|
|
17120
|
+
var BaseInput = extend3(Ajax_exports.Sections.Input);
|
|
17121
|
+
var CartAddInput = Struct({
|
|
17122
|
+
items: Array$(AddItemInput)
|
|
17123
|
+
}).pipe(BaseInput);
|
|
17124
|
+
var CartAddOutput = Struct({
|
|
17125
|
+
items: Array$(LineItem)
|
|
17126
|
+
});
|
|
17127
|
+
var UpdateItemRecordInput = Record({
|
|
17128
|
+
key: String$,
|
|
17129
|
+
value: Number$
|
|
17130
|
+
});
|
|
17131
|
+
var DiscountCodeInput = Array$(String$);
|
|
17132
|
+
var DiscountCodeTransformed = String$;
|
|
17133
|
+
var CartUpdateInput = Struct({
|
|
17134
|
+
updates: optional(
|
|
17135
|
+
Union2(UpdateItemRecordInput, Array$(Number$))
|
|
17136
|
+
),
|
|
17137
|
+
note: optional(NullOr(String$)),
|
|
17138
|
+
attributes: optional(Attributes),
|
|
17139
|
+
discount: optional(
|
|
17140
|
+
transform2(DiscountCodeInput, DiscountCodeTransformed, {
|
|
17141
|
+
decode: (input) => input.join(","),
|
|
17142
|
+
encode: (input) => input.split(",")
|
|
17143
|
+
})
|
|
17144
|
+
)
|
|
17145
|
+
}).pipe(BaseInput);
|
|
17146
|
+
var ItemAddedChangelog = Struct({
|
|
17147
|
+
variant_id: Number$,
|
|
17148
|
+
quantity: Number$
|
|
17149
|
+
});
|
|
17150
|
+
var CartUpdateOutput = Struct({
|
|
17151
|
+
...Cart.fields,
|
|
17152
|
+
items_changelog: Struct({
|
|
17153
|
+
added: Array$(ItemAddedChangelog)
|
|
17154
|
+
})
|
|
17155
|
+
});
|
|
17156
|
+
var CartChangeItemOptionalInput = Struct({
|
|
17157
|
+
quantity: optional(Number$),
|
|
17158
|
+
properties: optional(
|
|
17159
|
+
Record({
|
|
17160
|
+
key: String$,
|
|
17161
|
+
value: NullOr(String$)
|
|
17162
|
+
})
|
|
17163
|
+
),
|
|
17164
|
+
selling_plan: optional(NullOr(Resource_exports.ID))
|
|
17165
|
+
}).pipe(BaseInput);
|
|
17166
|
+
var LineItemChange = Struct({
|
|
17167
|
+
product_id: Number$,
|
|
17168
|
+
variant_id: Number$,
|
|
17169
|
+
id: String$,
|
|
17170
|
+
image: String$,
|
|
17171
|
+
price: String$,
|
|
17172
|
+
presentment_price: Number$,
|
|
17173
|
+
quantity: Number$,
|
|
17174
|
+
title: String$,
|
|
17175
|
+
product_title: String$,
|
|
17176
|
+
variant_title: String$,
|
|
17177
|
+
vendor: String$,
|
|
17178
|
+
product_type: String$,
|
|
17179
|
+
sku: String$,
|
|
17180
|
+
url: String$,
|
|
17181
|
+
untranslated_product_title: String$,
|
|
17182
|
+
untranslated_variant_title: String$,
|
|
17183
|
+
view_key: String$
|
|
17184
|
+
});
|
|
17185
|
+
var CartChangeInput = Union2(
|
|
17186
|
+
extend3(CartChangeItemOptionalInput)(
|
|
17187
|
+
Struct({
|
|
17188
|
+
id: String$
|
|
17189
|
+
})
|
|
17190
|
+
),
|
|
17191
|
+
extend3(CartChangeItemOptionalInput)(
|
|
17192
|
+
Struct({
|
|
17193
|
+
line: Number$
|
|
17194
|
+
})
|
|
17195
|
+
)
|
|
17196
|
+
);
|
|
17197
|
+
var CartChangeOutput = Struct({
|
|
17198
|
+
...Cart.fields,
|
|
17199
|
+
items_added: Array$(LineItemChange),
|
|
17200
|
+
items_removed: Array$(LineItemChange)
|
|
17201
|
+
});
|
|
17202
|
+
var CartClearInput = Ajax_exports.Sections.Input;
|
|
17203
|
+
var CartGetInput = Ajax_exports.Sections.Input;
|
|
17204
|
+
mutable2(
|
|
17205
|
+
Array$(NonEmptyString)
|
|
17206
|
+
);
|
|
17207
|
+
|
|
17126
17208
|
// ../../../node_modules/.pnpm/@effect+platform@0.82.4_effect@3.15.2/node_modules/@effect/platform/dist/esm/Error.js
|
|
17127
17209
|
var TypeIdError = (typeId, tag2) => {
|
|
17128
17210
|
class Base3 extends Error3 {
|
|
@@ -17325,10 +17407,10 @@ var Proto3 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null),
|
|
|
17325
17407
|
}
|
|
17326
17408
|
});
|
|
17327
17409
|
var make49 = (input) => Object.assign(Object.create(Proto3), input);
|
|
17328
|
-
var
|
|
17410
|
+
var empty32 = /* @__PURE__ */ Object.create(Proto3);
|
|
17329
17411
|
var fromInput2 = (input) => {
|
|
17330
17412
|
if (input === void 0) {
|
|
17331
|
-
return
|
|
17413
|
+
return empty32;
|
|
17332
17414
|
} else if (Symbol.iterator in input) {
|
|
17333
17415
|
const out2 = Object.create(Proto3);
|
|
17334
17416
|
for (const [k, v] of input) {
|
|
@@ -17473,11 +17555,11 @@ var fromInputNested = (input) => {
|
|
|
17473
17555
|
}
|
|
17474
17556
|
return out;
|
|
17475
17557
|
};
|
|
17476
|
-
var
|
|
17558
|
+
var empty33 = [];
|
|
17477
17559
|
var setAll4 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
17478
17560
|
const toSet3 = fromInput3(input);
|
|
17479
17561
|
const keys6 = toSet3.map(([k]) => k);
|
|
17480
|
-
return appendAll(
|
|
17562
|
+
return appendAll(filter3(self, ([k]) => keys6.includes(k)), toSet3);
|
|
17481
17563
|
});
|
|
17482
17564
|
var makeUrl = (url, params, hash2) => {
|
|
17483
17565
|
try {
|
|
@@ -17569,7 +17651,7 @@ var EmptyImpl = class extends BodyBase {
|
|
|
17569
17651
|
};
|
|
17570
17652
|
}
|
|
17571
17653
|
};
|
|
17572
|
-
var
|
|
17654
|
+
var empty34 = /* @__PURE__ */ new EmptyImpl();
|
|
17573
17655
|
var Uint8ArrayImpl = class extends BodyBase {
|
|
17574
17656
|
body;
|
|
17575
17657
|
contentType;
|
|
@@ -17635,8 +17717,8 @@ function makeInternal(method, url, urlParams, hash2, headers, body) {
|
|
|
17635
17717
|
self.body = body;
|
|
17636
17718
|
return self;
|
|
17637
17719
|
}
|
|
17638
|
-
var
|
|
17639
|
-
var make50 = (method) => (url, options3) => modify4(
|
|
17720
|
+
var empty35 = /* @__PURE__ */ makeInternal("GET", "", empty33, /* @__PURE__ */ none2(), empty32, empty34);
|
|
17721
|
+
var make50 = (method) => (url, options3) => modify4(empty35, {
|
|
17640
17722
|
method,
|
|
17641
17723
|
url,
|
|
17642
17724
|
...options3 ?? void 0
|
|
@@ -18276,7 +18358,7 @@ var update5 = make57;
|
|
|
18276
18358
|
// src/index.ts
|
|
18277
18359
|
var validateCart = (cart) => runSync(decodeUnknown2(Cart)(cart));
|
|
18278
18360
|
var createAjaxCartApi = ({ debug = false }) => {
|
|
18279
|
-
let baseLayer =
|
|
18361
|
+
let baseLayer = empty30;
|
|
18280
18362
|
let minimumLogLevel2 = None3;
|
|
18281
18363
|
let loggerLayer = pretty4;
|
|
18282
18364
|
if (debug) {
|