@foldkit/devtools-mcp 0.16.1 → 0.17.0-canary.18121cd75a3b
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/server.js +1764 -809
- package/package.json +5 -5
package/dist/server.js
CHANGED
|
@@ -1208,8 +1208,8 @@ var require_util = __commonJS({
|
|
|
1208
1208
|
})(Type || (exports.Type = Type = {}));
|
|
1209
1209
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1210
1210
|
if (dataProp instanceof codegen_1.Name) {
|
|
1211
|
-
const
|
|
1212
|
-
return jsPropertySyntax ?
|
|
1211
|
+
const isNumber3 = dataPropType === Type.Num;
|
|
1212
|
+
return jsPropertySyntax ? isNumber3 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber3 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
1213
1213
|
}
|
|
1214
1214
|
return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
|
|
1215
1215
|
}
|
|
@@ -2259,11 +2259,11 @@ var require_resolve = __commonJS({
|
|
|
2259
2259
|
return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
|
|
2260
2260
|
}
|
|
2261
2261
|
exports.normalizeId = normalizeId;
|
|
2262
|
-
function
|
|
2262
|
+
function resolveUrl2(resolver, baseId, id2) {
|
|
2263
2263
|
id2 = normalizeId(id2);
|
|
2264
2264
|
return resolver.resolve(baseId, id2);
|
|
2265
2265
|
}
|
|
2266
|
-
exports.resolveUrl =
|
|
2266
|
+
exports.resolveUrl = resolveUrl2;
|
|
2267
2267
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
2268
2268
|
function getSchemaRefs(schema, baseId) {
|
|
2269
2269
|
if (typeof schema == "boolean")
|
|
@@ -2991,7 +2991,7 @@ var require_compile = __commonJS({
|
|
|
2991
2991
|
const schOrFunc = root.refs[ref];
|
|
2992
2992
|
if (schOrFunc)
|
|
2993
2993
|
return schOrFunc;
|
|
2994
|
-
let _sch =
|
|
2994
|
+
let _sch = resolve3.call(this, root, ref);
|
|
2995
2995
|
if (_sch === void 0) {
|
|
2996
2996
|
const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
|
|
2997
2997
|
const { schemaId } = this.opts;
|
|
@@ -3018,7 +3018,7 @@ var require_compile = __commonJS({
|
|
|
3018
3018
|
function sameSchemaEnv(s1, s2) {
|
|
3019
3019
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function resolve3(root, ref) {
|
|
3022
3022
|
let sch;
|
|
3023
3023
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
3024
3024
|
ref = sch;
|
|
@@ -3649,7 +3649,7 @@ var require_fast_uri = __commonJS({
|
|
|
3649
3649
|
}
|
|
3650
3650
|
return uri;
|
|
3651
3651
|
}
|
|
3652
|
-
function
|
|
3652
|
+
function resolve3(baseURI, relativeURI, options) {
|
|
3653
3653
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3654
3654
|
const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
3655
3655
|
schemelessOptions.skipEscape = true;
|
|
@@ -3907,7 +3907,7 @@ var require_fast_uri = __commonJS({
|
|
|
3907
3907
|
var fastUri = {
|
|
3908
3908
|
SCHEMES,
|
|
3909
3909
|
normalize: normalize2,
|
|
3910
|
-
resolve:
|
|
3910
|
+
resolve: resolve3,
|
|
3911
3911
|
resolveComponent,
|
|
3912
3912
|
equal,
|
|
3913
3913
|
serialize,
|
|
@@ -9315,7 +9315,7 @@ var require_websocket = __commonJS({
|
|
|
9315
9315
|
* not to skip UTF-8 validation for text and close messages
|
|
9316
9316
|
* @private
|
|
9317
9317
|
*/
|
|
9318
|
-
setSocket(socket,
|
|
9318
|
+
setSocket(socket, head4, options) {
|
|
9319
9319
|
const receiver = new Receiver2({
|
|
9320
9320
|
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
9321
9321
|
binaryType: this.binaryType,
|
|
@@ -9342,7 +9342,7 @@ var require_websocket = __commonJS({
|
|
|
9342
9342
|
sender.onerror = senderOnError;
|
|
9343
9343
|
if (socket.setTimeout) socket.setTimeout(0);
|
|
9344
9344
|
if (socket.setNoDelay) socket.setNoDelay();
|
|
9345
|
-
if (
|
|
9345
|
+
if (head4.length > 0) socket.unshift(head4);
|
|
9346
9346
|
socket.on("close", socketOnClose);
|
|
9347
9347
|
socket.on("data", socketOnData);
|
|
9348
9348
|
socket.on("end", socketOnEnd);
|
|
@@ -9803,7 +9803,7 @@ var require_websocket = __commonJS({
|
|
|
9803
9803
|
);
|
|
9804
9804
|
}
|
|
9805
9805
|
});
|
|
9806
|
-
req.on("upgrade", (res, socket,
|
|
9806
|
+
req.on("upgrade", (res, socket, head4) => {
|
|
9807
9807
|
websocket.emit("upgrade", res);
|
|
9808
9808
|
if (websocket.readyState !== WebSocket2.CONNECTING) return;
|
|
9809
9809
|
req = websocket._req = null;
|
|
@@ -9863,7 +9863,7 @@ var require_websocket = __commonJS({
|
|
|
9863
9863
|
}
|
|
9864
9864
|
websocket._extensions[PerMessageDeflate2.extensionName] = perMessageDeflate;
|
|
9865
9865
|
}
|
|
9866
|
-
websocket.setSocket(socket,
|
|
9866
|
+
websocket.setSocket(socket, head4, {
|
|
9867
9867
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
9868
9868
|
generateMask: opts.generateMask,
|
|
9869
9869
|
maxBufferedChunks: opts.maxBufferedChunks,
|
|
@@ -10282,8 +10282,8 @@ var require_websocket_server = __commonJS({
|
|
|
10282
10282
|
this._removeListeners = addListeners(this._server, {
|
|
10283
10283
|
listening: this.emit.bind(this, "listening"),
|
|
10284
10284
|
error: this.emit.bind(this, "error"),
|
|
10285
|
-
upgrade: (req, socket,
|
|
10286
|
-
this.handleUpgrade(req, socket,
|
|
10285
|
+
upgrade: (req, socket, head4) => {
|
|
10286
|
+
this.handleUpgrade(req, socket, head4, emitConnection);
|
|
10287
10287
|
}
|
|
10288
10288
|
});
|
|
10289
10289
|
}
|
|
@@ -10378,7 +10378,7 @@ var require_websocket_server = __commonJS({
|
|
|
10378
10378
|
* @param {Function} cb Callback
|
|
10379
10379
|
* @public
|
|
10380
10380
|
*/
|
|
10381
|
-
handleUpgrade(req, socket,
|
|
10381
|
+
handleUpgrade(req, socket, head4, cb) {
|
|
10382
10382
|
socket.on("error", socketOnError);
|
|
10383
10383
|
const key = req.headers["sec-websocket-key"];
|
|
10384
10384
|
const upgrade = req.headers.upgrade;
|
|
@@ -10457,7 +10457,7 @@ var require_websocket_server = __commonJS({
|
|
|
10457
10457
|
protocols,
|
|
10458
10458
|
req,
|
|
10459
10459
|
socket,
|
|
10460
|
-
|
|
10460
|
+
head4,
|
|
10461
10461
|
cb
|
|
10462
10462
|
);
|
|
10463
10463
|
});
|
|
@@ -10465,7 +10465,7 @@ var require_websocket_server = __commonJS({
|
|
|
10465
10465
|
}
|
|
10466
10466
|
if (!this.options.verifyClient(info2)) return abortHandshake(socket, 401);
|
|
10467
10467
|
}
|
|
10468
|
-
this.completeUpgrade(extensions, key, protocols, req, socket,
|
|
10468
|
+
this.completeUpgrade(extensions, key, protocols, req, socket, head4, cb);
|
|
10469
10469
|
}
|
|
10470
10470
|
/**
|
|
10471
10471
|
* Upgrade the connection to WebSocket.
|
|
@@ -10480,7 +10480,7 @@ var require_websocket_server = __commonJS({
|
|
|
10480
10480
|
* @throws {Error} If called more than once with the same socket
|
|
10481
10481
|
* @private
|
|
10482
10482
|
*/
|
|
10483
|
-
completeUpgrade(extensions, key, protocols, req, socket,
|
|
10483
|
+
completeUpgrade(extensions, key, protocols, req, socket, head4, cb) {
|
|
10484
10484
|
if (!socket.readable || !socket.writable) return socket.destroy();
|
|
10485
10485
|
if (socket[kWebSocket]) {
|
|
10486
10486
|
throw new Error(
|
|
@@ -10514,7 +10514,7 @@ var require_websocket_server = __commonJS({
|
|
|
10514
10514
|
this.emit("headers", headers, req);
|
|
10515
10515
|
socket.write(headers.concat("\r\n").join("\r\n"));
|
|
10516
10516
|
socket.removeListener("error", socketOnError);
|
|
10517
|
-
ws.setSocket(socket,
|
|
10517
|
+
ws.setSocket(socket, head4, {
|
|
10518
10518
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
10519
10519
|
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
10520
10520
|
maxFragments: this.options.maxFragments,
|
|
@@ -10575,7 +10575,7 @@ var require_websocket_server = __commonJS({
|
|
|
10575
10575
|
}
|
|
10576
10576
|
});
|
|
10577
10577
|
|
|
10578
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10578
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Pipeable.js
|
|
10579
10579
|
var pipeArguments = (self, args2) => {
|
|
10580
10580
|
switch (args2.length) {
|
|
10581
10581
|
case 0:
|
|
@@ -10619,7 +10619,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
10619
10619
|
return PipeableBase;
|
|
10620
10620
|
})();
|
|
10621
10621
|
|
|
10622
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10622
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Function.js
|
|
10623
10623
|
var dual = function(arity, body) {
|
|
10624
10624
|
if (typeof arity === "function") {
|
|
10625
10625
|
return function() {
|
|
@@ -10692,7 +10692,7 @@ function memoizeIdempotent(f) {
|
|
|
10692
10692
|
};
|
|
10693
10693
|
}
|
|
10694
10694
|
|
|
10695
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10695
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
|
|
10696
10696
|
var Array_exports = {};
|
|
10697
10697
|
__export(Array_exports, {
|
|
10698
10698
|
Array: () => Array2,
|
|
@@ -10830,7 +10830,7 @@ __export(Array_exports, {
|
|
|
10830
10830
|
zipWith: () => zipWith2
|
|
10831
10831
|
});
|
|
10832
10832
|
|
|
10833
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10833
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/equal.js
|
|
10834
10834
|
var getAllObjectKeys = (obj) => {
|
|
10835
10835
|
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
10836
10836
|
if (obj.constructor === Object) return keys4;
|
|
@@ -10853,7 +10853,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
10853
10853
|
};
|
|
10854
10854
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
10855
10855
|
|
|
10856
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10856
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Predicate.js
|
|
10857
10857
|
function isString(input) {
|
|
10858
10858
|
return typeof input === "string";
|
|
10859
10859
|
}
|
|
@@ -10911,7 +10911,7 @@ function isIterable(input) {
|
|
|
10911
10911
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
10912
10912
|
}
|
|
10913
10913
|
|
|
10914
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
10914
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Hash.js
|
|
10915
10915
|
var symbol = "~effect/interfaces/Hash";
|
|
10916
10916
|
var hash = (self) => {
|
|
10917
10917
|
switch (typeof self) {
|
|
@@ -11025,17 +11025,17 @@ var hashSet = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string("Set"), hash);
|
|
|
11025
11025
|
var randomHashCache = /* @__PURE__ */ new WeakMap();
|
|
11026
11026
|
var hashCache = /* @__PURE__ */ new WeakMap();
|
|
11027
11027
|
var visitedObjects = /* @__PURE__ */ new WeakSet();
|
|
11028
|
-
function withVisitedTracking(obj,
|
|
11028
|
+
function withVisitedTracking(obj, fn5) {
|
|
11029
11029
|
if (visitedObjects.has(obj)) {
|
|
11030
11030
|
return string("[Circular]");
|
|
11031
11031
|
}
|
|
11032
11032
|
visitedObjects.add(obj);
|
|
11033
|
-
const result5 =
|
|
11033
|
+
const result5 = fn5();
|
|
11034
11034
|
visitedObjects.delete(obj);
|
|
11035
11035
|
return result5;
|
|
11036
11036
|
}
|
|
11037
11037
|
|
|
11038
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11038
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equal.js
|
|
11039
11039
|
var symbol2 = "~effect/interfaces/Equal";
|
|
11040
11040
|
function equals() {
|
|
11041
11041
|
if (arguments.length === 1) {
|
|
@@ -11061,7 +11061,7 @@ function compareBoth(self, that) {
|
|
|
11061
11061
|
}
|
|
11062
11062
|
return withCache(self, that, compareObjects);
|
|
11063
11063
|
}
|
|
11064
|
-
function withVisitedTracking2(self, that,
|
|
11064
|
+
function withVisitedTracking2(self, that, fn5) {
|
|
11065
11065
|
const hasLeft = visitedLeft.has(self);
|
|
11066
11066
|
const hasRight = visitedRight.has(that);
|
|
11067
11067
|
if (hasLeft && hasRight) {
|
|
@@ -11072,7 +11072,7 @@ function withVisitedTracking2(self, that, fn3) {
|
|
|
11072
11072
|
}
|
|
11073
11073
|
visitedLeft.add(self);
|
|
11074
11074
|
visitedRight.add(that);
|
|
11075
|
-
const result5 =
|
|
11075
|
+
const result5 = fn5();
|
|
11076
11076
|
visitedLeft.delete(self);
|
|
11077
11077
|
visitedRight.delete(that);
|
|
11078
11078
|
return result5;
|
|
@@ -11232,7 +11232,7 @@ var byReferenceUnsafe = (obj) => {
|
|
|
11232
11232
|
return obj;
|
|
11233
11233
|
};
|
|
11234
11234
|
|
|
11235
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11235
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Reducer.js
|
|
11236
11236
|
function make(combine2, initialValue, combineAll2) {
|
|
11237
11237
|
return {
|
|
11238
11238
|
combine: combine2,
|
|
@@ -11247,7 +11247,7 @@ function make(combine2, initialValue, combineAll2) {
|
|
|
11247
11247
|
};
|
|
11248
11248
|
}
|
|
11249
11249
|
|
|
11250
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11250
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equivalence.js
|
|
11251
11251
|
var make2 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
11252
11252
|
var isStrictEquivalent = (x, y) => x === y;
|
|
11253
11253
|
var strictEqual = () => isStrictEquivalent;
|
|
@@ -11261,10 +11261,10 @@ function Array_(item) {
|
|
|
11261
11261
|
});
|
|
11262
11262
|
}
|
|
11263
11263
|
|
|
11264
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11264
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/array.js
|
|
11265
11265
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
11266
11266
|
|
|
11267
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11267
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/doNotation.js
|
|
11268
11268
|
var let_ = (map14) => dual(3, (self, name, f) => map14(self, (a) => ({
|
|
11269
11269
|
...a,
|
|
11270
11270
|
[name]: f(a)
|
|
@@ -11277,7 +11277,7 @@ var bind = (map14, flatMap8) => dual(3, (self, name, f) => flatMap8(self, (a) =>
|
|
|
11277
11277
|
[name]: b
|
|
11278
11278
|
}))));
|
|
11279
11279
|
|
|
11280
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11280
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/record.js
|
|
11281
11281
|
function assignProperty(self, key, value5) {
|
|
11282
11282
|
if (key === "__proto__") {
|
|
11283
11283
|
Object.defineProperty(self, key, {
|
|
@@ -11299,7 +11299,7 @@ function assignProperties(self, source) {
|
|
|
11299
11299
|
}
|
|
11300
11300
|
}
|
|
11301
11301
|
|
|
11302
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11302
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
|
|
11303
11303
|
var Option_exports = {};
|
|
11304
11304
|
__export(Option_exports, {
|
|
11305
11305
|
Do: () => Do,
|
|
@@ -11364,7 +11364,7 @@ __export(Option_exports, {
|
|
|
11364
11364
|
zipWith: () => zipWith
|
|
11365
11365
|
});
|
|
11366
11366
|
|
|
11367
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11367
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Combiner.js
|
|
11368
11368
|
function make3(combine2) {
|
|
11369
11369
|
return {
|
|
11370
11370
|
combine: combine2
|
|
@@ -11377,7 +11377,7 @@ function max(order) {
|
|
|
11377
11377
|
return make3((self, that) => order(self, that) === 1 ? self : that);
|
|
11378
11378
|
}
|
|
11379
11379
|
|
|
11380
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11380
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Redactable.js
|
|
11381
11381
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
11382
11382
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
11383
11383
|
function redact(u) {
|
|
@@ -11399,7 +11399,7 @@ var emptyContext = {
|
|
|
11399
11399
|
}
|
|
11400
11400
|
};
|
|
11401
11401
|
|
|
11402
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11402
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Formatter.js
|
|
11403
11403
|
function format(input, options) {
|
|
11404
11404
|
const space = options?.space ?? 0;
|
|
11405
11405
|
const ancestors = /* @__PURE__ */ new WeakSet();
|
|
@@ -11500,7 +11500,7 @@ function formatJson(input, options) {
|
|
|
11500
11500
|
}, options?.space) ?? "null";
|
|
11501
11501
|
}
|
|
11502
11502
|
|
|
11503
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11503
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Inspectable.js
|
|
11504
11504
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
11505
11505
|
var toJson = (input) => {
|
|
11506
11506
|
try {
|
|
@@ -11567,7 +11567,7 @@ var Class2 = class {
|
|
|
11567
11567
|
}
|
|
11568
11568
|
};
|
|
11569
11569
|
|
|
11570
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11570
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Utils.js
|
|
11571
11571
|
var SingleShotGen = class _SingleShotGen {
|
|
11572
11572
|
called = false;
|
|
11573
11573
|
self;
|
|
@@ -11627,7 +11627,7 @@ var pickInternalCall = () => {
|
|
|
11627
11627
|
};
|
|
11628
11628
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
11629
11629
|
|
|
11630
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11630
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/core.js
|
|
11631
11631
|
var EffectTypeId = `~effect/Effect`;
|
|
11632
11632
|
var ExitTypeId = `~effect/Exit`;
|
|
11633
11633
|
var effectVariance = {
|
|
@@ -11988,7 +11988,7 @@ var done = (value5) => {
|
|
|
11988
11988
|
return exitFail(Done(value5));
|
|
11989
11989
|
};
|
|
11990
11990
|
|
|
11991
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
11991
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/option.js
|
|
11992
11992
|
var TypeId = "~effect/data/Option";
|
|
11993
11993
|
var CommonProto = {
|
|
11994
11994
|
[TypeId]: {
|
|
@@ -12054,7 +12054,7 @@ var some = (value5) => {
|
|
|
12054
12054
|
return a;
|
|
12055
12055
|
};
|
|
12056
12056
|
|
|
12057
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12057
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/result.js
|
|
12058
12058
|
var TypeId2 = "~effect/data/Result";
|
|
12059
12059
|
var CommonProto2 = {
|
|
12060
12060
|
[TypeId2]: {
|
|
@@ -12124,7 +12124,7 @@ var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
|
|
|
12124
12124
|
var getSuccess = (self) => isFailure(self) ? none : some(self.success);
|
|
12125
12125
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
|
|
12126
12126
|
|
|
12127
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12127
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Order.js
|
|
12128
12128
|
function make4(compare) {
|
|
12129
12129
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
12130
12130
|
}
|
|
@@ -12172,7 +12172,7 @@ var max2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ?
|
|
|
12172
12172
|
var clamp = (O) => dual(2, (self, options) => min2(O)(options.maximum, max2(O)(options.minimum, self)));
|
|
12173
12173
|
var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum));
|
|
12174
12174
|
|
|
12175
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12175
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
|
|
12176
12176
|
var none2 = () => none;
|
|
12177
12177
|
var some2 = some;
|
|
12178
12178
|
var isOption2 = isOption;
|
|
@@ -12350,7 +12350,7 @@ function makeReducerFailFast(reducer2) {
|
|
|
12350
12350
|
});
|
|
12351
12351
|
}
|
|
12352
12352
|
|
|
12353
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12353
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Result.js
|
|
12354
12354
|
var succeed2 = succeed;
|
|
12355
12355
|
var fail2 = fail;
|
|
12356
12356
|
var fromOption2 = fromOption;
|
|
@@ -12407,10 +12407,10 @@ var all2 = (input) => {
|
|
|
12407
12407
|
return succeed2(out);
|
|
12408
12408
|
};
|
|
12409
12409
|
|
|
12410
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12410
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tuple.js
|
|
12411
12411
|
var make5 = (...elements) => elements;
|
|
12412
12412
|
|
|
12413
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12413
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Iterable.js
|
|
12414
12414
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
12415
12415
|
let i = 0;
|
|
12416
12416
|
for (const a of self) {
|
|
@@ -12453,7 +12453,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
|
|
|
12453
12453
|
}
|
|
12454
12454
|
}));
|
|
12455
12455
|
|
|
12456
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12456
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Record.js
|
|
12457
12457
|
var collect = /* @__PURE__ */ dual(2, (self, f) => {
|
|
12458
12458
|
const out = [];
|
|
12459
12459
|
for (const key of keys(self)) {
|
|
@@ -12473,7 +12473,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
12473
12473
|
});
|
|
12474
12474
|
var keys = (self) => Object.keys(self);
|
|
12475
12475
|
|
|
12476
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
12476
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
|
|
12477
12477
|
var Array2 = globalThis.Array;
|
|
12478
12478
|
var make6 = (...elements) => elements;
|
|
12479
12479
|
var allocate = (n) => new Array2(n);
|
|
@@ -12503,7 +12503,7 @@ var matchRight = /* @__PURE__ */ dual(2, (self, {
|
|
|
12503
12503
|
onEmpty,
|
|
12504
12504
|
onNonEmpty
|
|
12505
12505
|
}) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
|
|
12506
|
-
var prepend = /* @__PURE__ */ dual(2, (self,
|
|
12506
|
+
var prepend = /* @__PURE__ */ dual(2, (self, head4) => [head4, ...self]);
|
|
12507
12507
|
var prependAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(that).concat(fromIterable2(self)));
|
|
12508
12508
|
var append = /* @__PURE__ */ dual(2, (self, last2) => [...self, last2]);
|
|
12509
12509
|
var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(self).concat(fromIterable2(that)));
|
|
@@ -13178,7 +13178,7 @@ var countBy = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
13178
13178
|
return count2;
|
|
13179
13179
|
});
|
|
13180
13180
|
|
|
13181
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
13181
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/BigDecimal.js
|
|
13182
13182
|
var FINITE_INT_REGEXP = /^[+-]?\d+$/;
|
|
13183
13183
|
var TypeId3 = "~effect/BigDecimal";
|
|
13184
13184
|
var BigDecimalProto = {
|
|
@@ -13373,9 +13373,9 @@ var toExponential = (n) => {
|
|
|
13373
13373
|
}
|
|
13374
13374
|
const normalized = normalize(n);
|
|
13375
13375
|
const digits = `${abs(normalized).value}`;
|
|
13376
|
-
const
|
|
13376
|
+
const head4 = digits.slice(0, 1);
|
|
13377
13377
|
const tail2 = digits.slice(1);
|
|
13378
|
-
let output = `${isNegative(normalized) ? "-" : ""}${
|
|
13378
|
+
let output = `${isNegative(normalized) ? "-" : ""}${head4}`;
|
|
13379
13379
|
if (tail2 !== "") {
|
|
13380
13380
|
output += `.${tail2}`;
|
|
13381
13381
|
}
|
|
@@ -13407,17 +13407,153 @@ var floor = /* @__PURE__ */ dual(isBigDecimalArgs, (self, scale2 = 0) => {
|
|
|
13407
13407
|
return truncated;
|
|
13408
13408
|
});
|
|
13409
13409
|
|
|
13410
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
13410
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Boolean.js
|
|
13411
13411
|
var Boolean2 = globalThis.Boolean;
|
|
13412
13412
|
var ReducerOr = /* @__PURE__ */ make((a, b) => a || b, false);
|
|
13413
13413
|
|
|
13414
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
13414
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
|
|
13415
|
+
var SchemaAST_exports = {};
|
|
13416
|
+
__export(SchemaAST_exports, {
|
|
13417
|
+
Any: () => Any,
|
|
13418
|
+
Arrays: () => Arrays,
|
|
13419
|
+
Base: () => Base2,
|
|
13420
|
+
BigInt: () => BigInt4,
|
|
13421
|
+
Boolean: () => Boolean3,
|
|
13422
|
+
Context: () => Context,
|
|
13423
|
+
Declaration: () => Declaration,
|
|
13424
|
+
Enum: () => Enum,
|
|
13425
|
+
FINITE_PATTERN: () => FINITE_PATTERN,
|
|
13426
|
+
Filter: () => Filter2,
|
|
13427
|
+
FilterGroup: () => FilterGroup,
|
|
13428
|
+
IndexSignature: () => IndexSignature,
|
|
13429
|
+
Json: () => Json,
|
|
13430
|
+
Link: () => Link,
|
|
13431
|
+
Literal: () => Literal,
|
|
13432
|
+
MutableJson: () => MutableJson,
|
|
13433
|
+
Never: () => Never,
|
|
13434
|
+
Null: () => Null,
|
|
13435
|
+
Number: () => Number5,
|
|
13436
|
+
ObjectKeyword: () => ObjectKeyword,
|
|
13437
|
+
Objects: () => Objects,
|
|
13438
|
+
PropertySignature: () => PropertySignature,
|
|
13439
|
+
STRING_PATTERN: () => STRING_PATTERN,
|
|
13440
|
+
String: () => String4,
|
|
13441
|
+
Suspend: () => Suspend,
|
|
13442
|
+
Symbol: () => Symbol2,
|
|
13443
|
+
TemplateLiteral: () => TemplateLiteral,
|
|
13444
|
+
Undefined: () => Undefined,
|
|
13445
|
+
Union: () => Union,
|
|
13446
|
+
UniqueSymbol: () => UniqueSymbol,
|
|
13447
|
+
Unknown: () => Unknown,
|
|
13448
|
+
Void: () => Void,
|
|
13449
|
+
annotate: () => annotate,
|
|
13450
|
+
annotateKey: () => annotateKey,
|
|
13451
|
+
any: () => any,
|
|
13452
|
+
appendChecks: () => appendChecks,
|
|
13453
|
+
applyToLastLink: () => applyToLastLink,
|
|
13454
|
+
applyToSelfOrLastLinkEncoding: () => applyToSelfOrLastLinkEncoding,
|
|
13455
|
+
applyToSelfOrLastLinkEncodingIdempotent: () => applyToSelfOrLastLinkEncodingIdempotent,
|
|
13456
|
+
bigInt: () => bigInt,
|
|
13457
|
+
bigIntString: () => bigIntString,
|
|
13458
|
+
boolean: () => boolean,
|
|
13459
|
+
brand: () => brand,
|
|
13460
|
+
collectIssues: () => collectIssues,
|
|
13461
|
+
collectSentinels: () => collectSentinels,
|
|
13462
|
+
containsUndefined: () => containsUndefined,
|
|
13463
|
+
decodeTo: () => decodeTo,
|
|
13464
|
+
defaultParseOptions: () => defaultParseOptions,
|
|
13465
|
+
enumsToLiterals: () => enumsToLiterals,
|
|
13466
|
+
finite: () => finite,
|
|
13467
|
+
flip: () => flip3,
|
|
13468
|
+
getAST: () => getAST,
|
|
13469
|
+
getCandidates: () => getCandidates,
|
|
13470
|
+
getConstructorDescriptor: () => getConstructorDescriptor,
|
|
13471
|
+
getContextOwner: () => getContextOwner,
|
|
13472
|
+
getIndexSignatureKeys: () => getIndexSignatureKeys,
|
|
13473
|
+
getLastEncoding: () => getLastEncoding,
|
|
13474
|
+
isAST: () => isAST,
|
|
13475
|
+
isAny: () => isAny,
|
|
13476
|
+
isArrays: () => isArrays,
|
|
13477
|
+
isBigInt: () => isBigInt2,
|
|
13478
|
+
isBoolean: () => isBoolean2,
|
|
13479
|
+
isDeclaration: () => isDeclaration,
|
|
13480
|
+
isEnum: () => isEnum,
|
|
13481
|
+
isFinite: () => isFinite2,
|
|
13482
|
+
isJson: () => isJson,
|
|
13483
|
+
isLiteral: () => isLiteral,
|
|
13484
|
+
isMutable: () => isMutable,
|
|
13485
|
+
isNever: () => isNever2,
|
|
13486
|
+
isNull: () => isNull2,
|
|
13487
|
+
isNumber: () => isNumber2,
|
|
13488
|
+
isObjectKeyword: () => isObjectKeyword2,
|
|
13489
|
+
isObjects: () => isObjects,
|
|
13490
|
+
isOptional: () => isOptional,
|
|
13491
|
+
isPattern: () => isPattern,
|
|
13492
|
+
isString: () => isString2,
|
|
13493
|
+
isStringBigInt: () => isStringBigInt,
|
|
13494
|
+
isStringFinite: () => isStringFinite,
|
|
13495
|
+
isStringSymbol: () => isStringSymbol,
|
|
13496
|
+
isStringTree: () => isStringTree,
|
|
13497
|
+
isSuspend: () => isSuspend,
|
|
13498
|
+
isSymbol: () => isSymbol2,
|
|
13499
|
+
isTemplateLiteral: () => isTemplateLiteral,
|
|
13500
|
+
isUndefined: () => isUndefined2,
|
|
13501
|
+
isUnion: () => isUnion,
|
|
13502
|
+
isUniqueSymbol: () => isUniqueSymbol,
|
|
13503
|
+
isUnknown: () => isUnknown2,
|
|
13504
|
+
isVoid: () => isVoid,
|
|
13505
|
+
makeFilter: () => makeFilter,
|
|
13506
|
+
makeFilterByGuard: () => makeFilterByGuard,
|
|
13507
|
+
mapLink: () => mapLink,
|
|
13508
|
+
mapOrSame: () => mapOrSame,
|
|
13509
|
+
memoizeThunk: () => memoizeThunk,
|
|
13510
|
+
middlewareDecoding: () => middlewareDecoding,
|
|
13511
|
+
middlewareEncoding: () => middlewareEncoding,
|
|
13512
|
+
mutableKey: () => mutableKey,
|
|
13513
|
+
never: () => never3,
|
|
13514
|
+
null: () => null_,
|
|
13515
|
+
number: () => number2,
|
|
13516
|
+
objectKeyword: () => objectKeyword,
|
|
13517
|
+
objectKeywordToJson: () => objectKeywordToJson,
|
|
13518
|
+
optional: () => optional,
|
|
13519
|
+
optionalKey: () => optionalKey,
|
|
13520
|
+
parameterFromString: () => parameterFromString,
|
|
13521
|
+
record: () => record,
|
|
13522
|
+
replaceChecks: () => replaceChecks,
|
|
13523
|
+
replaceContext: () => replaceContext,
|
|
13524
|
+
replaceContextLastLink: () => replaceContextLastLink,
|
|
13525
|
+
replaceEncoding: () => replaceEncoding,
|
|
13526
|
+
resolve: () => resolve2,
|
|
13527
|
+
resolveAt: () => resolveAt2,
|
|
13528
|
+
resolveDescription: () => resolveDescription2,
|
|
13529
|
+
resolveIdentifier: () => resolveIdentifier2,
|
|
13530
|
+
resolveTitle: () => resolveTitle2,
|
|
13531
|
+
runChecks: () => runChecks,
|
|
13532
|
+
string: () => string2,
|
|
13533
|
+
struct: () => struct,
|
|
13534
|
+
structWithRest: () => structWithRest,
|
|
13535
|
+
symbol: () => symbol3,
|
|
13536
|
+
symbolString: () => symbolString,
|
|
13537
|
+
toEncoded: () => toEncoded,
|
|
13538
|
+
toType: () => toType,
|
|
13539
|
+
tuple: () => tuple,
|
|
13540
|
+
tupleWithRest: () => tupleWithRest,
|
|
13541
|
+
undefined: () => undefined_3,
|
|
13542
|
+
union: () => union2,
|
|
13543
|
+
unknown: () => unknown,
|
|
13544
|
+
unknownToJson: () => unknownToJson,
|
|
13545
|
+
unknownToStringTree: () => unknownToStringTree,
|
|
13546
|
+
void: () => void_5,
|
|
13547
|
+
withConstructorDefault: () => withConstructorDefault
|
|
13548
|
+
});
|
|
13549
|
+
|
|
13550
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effectable.js
|
|
13415
13551
|
var Prototype2 = (options) => makePrimitiveProto({
|
|
13416
13552
|
op: options.label,
|
|
13417
13553
|
[evaluate]: options.evaluate
|
|
13418
13554
|
});
|
|
13419
13555
|
|
|
13420
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
13556
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Context.js
|
|
13421
13557
|
var ServiceTypeId = "~effect/Context/Service";
|
|
13422
13558
|
var Service = function() {
|
|
13423
13559
|
function KeyClass() {
|
|
@@ -13517,13 +13653,13 @@ var lookup = (self, key) => {
|
|
|
13517
13653
|
};
|
|
13518
13654
|
var makeUnsafe = (mapUnsafe) => makeImpl(void 0, mapUnsafe, void 0, 0);
|
|
13519
13655
|
var Proto = {
|
|
13656
|
+
get mapUnsafe() {
|
|
13657
|
+
return flatten3(this);
|
|
13658
|
+
},
|
|
13520
13659
|
...PipeInspectableProto,
|
|
13521
13660
|
[TypeId4]: {
|
|
13522
13661
|
_Services: (_) => _
|
|
13523
13662
|
},
|
|
13524
|
-
get mapUnsafe() {
|
|
13525
|
-
return flatten3(this);
|
|
13526
|
-
},
|
|
13527
13663
|
toJSON() {
|
|
13528
13664
|
return {
|
|
13529
13665
|
_id: "Context",
|
|
@@ -13619,7 +13755,7 @@ var mergeAll = (...ctxs) => {
|
|
|
13619
13755
|
};
|
|
13620
13756
|
var Reference = Service;
|
|
13621
13757
|
|
|
13622
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
13758
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Duration.js
|
|
13623
13759
|
var Duration_exports = {};
|
|
13624
13760
|
__export(Duration_exports, {
|
|
13625
13761
|
CombinerMax: () => CombinerMax,
|
|
@@ -14207,7 +14343,7 @@ var ReducerSum = /* @__PURE__ */ make(sum2, zero2);
|
|
|
14207
14343
|
var CombinerMax = /* @__PURE__ */ max(Order2);
|
|
14208
14344
|
var CombinerMin = /* @__PURE__ */ min(Order2);
|
|
14209
14345
|
|
|
14210
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14346
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Filter.js
|
|
14211
14347
|
var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
14212
14348
|
const leftOut = left(input);
|
|
14213
14349
|
if (isFailure2(leftOut)) return fail2(input);
|
|
@@ -14216,7 +14352,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
|
14216
14352
|
return rightOut;
|
|
14217
14353
|
});
|
|
14218
14354
|
|
|
14219
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14355
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scheduler.js
|
|
14220
14356
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
14221
14357
|
fiberCached: true,
|
|
14222
14358
|
defaultValue: () => new MixedScheduler()
|
|
@@ -14353,7 +14489,199 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
14353
14489
|
defaultValue: () => false
|
|
14354
14490
|
});
|
|
14355
14491
|
|
|
14356
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14492
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Data.js
|
|
14493
|
+
var Class3 = class extends Class {
|
|
14494
|
+
constructor(props) {
|
|
14495
|
+
super();
|
|
14496
|
+
if (props) {
|
|
14497
|
+
assignProperties(this, props);
|
|
14498
|
+
}
|
|
14499
|
+
}
|
|
14500
|
+
};
|
|
14501
|
+
var TaggedError2 = TaggedError;
|
|
14502
|
+
|
|
14503
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Encoding.js
|
|
14504
|
+
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
14505
|
+
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
14506
|
+
/**
|
|
14507
|
+
* Marks this value as an encoding or decoding error for runtime guards.
|
|
14508
|
+
*
|
|
14509
|
+
* **When to use**
|
|
14510
|
+
*
|
|
14511
|
+
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
14512
|
+
*
|
|
14513
|
+
* @since 4.0.0
|
|
14514
|
+
*/
|
|
14515
|
+
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
14516
|
+
};
|
|
14517
|
+
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
14518
|
+
var decodeBase64 = (str) => {
|
|
14519
|
+
const stripped = stripCrlf(str);
|
|
14520
|
+
const length2 = stripped.length;
|
|
14521
|
+
if (length2 % 4 !== 0) {
|
|
14522
|
+
return fail2(new EncodingError({
|
|
14523
|
+
kind: "Decode",
|
|
14524
|
+
module: "Base64",
|
|
14525
|
+
input: stripped,
|
|
14526
|
+
message: `Length must be a multiple of 4, but is ${length2}`
|
|
14527
|
+
}));
|
|
14528
|
+
}
|
|
14529
|
+
const index2 = stripped.indexOf("=");
|
|
14530
|
+
if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
|
|
14531
|
+
return fail2(new EncodingError({
|
|
14532
|
+
kind: "Decode",
|
|
14533
|
+
module: "Base64",
|
|
14534
|
+
input: stripped,
|
|
14535
|
+
message: `Found a '=' character, but it is not at the end`
|
|
14536
|
+
}));
|
|
14537
|
+
}
|
|
14538
|
+
try {
|
|
14539
|
+
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
14540
|
+
const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
|
|
14541
|
+
for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
|
|
14542
|
+
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
14543
|
+
result5[j] = buffer >> 16;
|
|
14544
|
+
result5[j + 1] = buffer >> 8 & 255;
|
|
14545
|
+
result5[j + 2] = buffer & 255;
|
|
14546
|
+
}
|
|
14547
|
+
return succeed2(result5);
|
|
14548
|
+
} catch (e) {
|
|
14549
|
+
return fail2(new EncodingError({
|
|
14550
|
+
kind: "Decode",
|
|
14551
|
+
module: "Base64",
|
|
14552
|
+
input: stripped,
|
|
14553
|
+
message: e instanceof Error ? e.message : "Invalid input"
|
|
14554
|
+
}));
|
|
14555
|
+
}
|
|
14556
|
+
};
|
|
14557
|
+
var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
|
|
14558
|
+
var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
|
|
14559
|
+
var decodeBase64Url = (str) => {
|
|
14560
|
+
const stripped = stripCrlf(str);
|
|
14561
|
+
const length2 = stripped.length;
|
|
14562
|
+
if (length2 % 4 === 1) {
|
|
14563
|
+
return fail2(new EncodingError({
|
|
14564
|
+
module: "Base64Url",
|
|
14565
|
+
kind: "Decode",
|
|
14566
|
+
input: stripped,
|
|
14567
|
+
message: `Length should be a multiple of 4, but is ${length2}`
|
|
14568
|
+
}));
|
|
14569
|
+
}
|
|
14570
|
+
if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
|
|
14571
|
+
return fail2(new EncodingError({
|
|
14572
|
+
module: "Base64Url",
|
|
14573
|
+
kind: "Decode",
|
|
14574
|
+
input: stripped,
|
|
14575
|
+
message: "Invalid input"
|
|
14576
|
+
}));
|
|
14577
|
+
}
|
|
14578
|
+
let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
|
|
14579
|
+
sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
|
|
14580
|
+
return decodeBase64(sanitized);
|
|
14581
|
+
};
|
|
14582
|
+
var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
|
|
14583
|
+
var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
|
|
14584
|
+
var randomHex = (length2) => {
|
|
14585
|
+
let result5 = "";
|
|
14586
|
+
for (let i = length2 >>> 3; i > 0; i--) {
|
|
14587
|
+
const word = Math.random() * 4294967296 >>> 0;
|
|
14588
|
+
result5 += byteToHex[word >>> 24] + byteToHex[word >>> 16 & 255] + byteToHex[word >>> 8 & 255] + byteToHex[word & 255];
|
|
14589
|
+
}
|
|
14590
|
+
return result5;
|
|
14591
|
+
};
|
|
14592
|
+
var decodeHex = (str) => {
|
|
14593
|
+
const bytes = new TextEncoder().encode(str);
|
|
14594
|
+
if (bytes.length % 2 !== 0) {
|
|
14595
|
+
return fail2(new EncodingError({
|
|
14596
|
+
module: "Hex",
|
|
14597
|
+
kind: "Decode",
|
|
14598
|
+
input: str,
|
|
14599
|
+
message: `Length must be a multiple of 2, but is ${bytes.length}`
|
|
14600
|
+
}));
|
|
14601
|
+
}
|
|
14602
|
+
try {
|
|
14603
|
+
const length2 = bytes.length / 2;
|
|
14604
|
+
const result5 = new Uint8Array(length2);
|
|
14605
|
+
for (let i = 0; i < length2; i++) {
|
|
14606
|
+
const a = fromHexChar(bytes[i * 2]);
|
|
14607
|
+
const b = fromHexChar(bytes[i * 2 + 1]);
|
|
14608
|
+
result5[i] = a << 4 | b;
|
|
14609
|
+
}
|
|
14610
|
+
return succeed2(result5);
|
|
14611
|
+
} catch (e) {
|
|
14612
|
+
return fail2(new EncodingError({
|
|
14613
|
+
module: "Hex",
|
|
14614
|
+
kind: "Decode",
|
|
14615
|
+
input: str,
|
|
14616
|
+
message: e instanceof Error ? e.message : "Invalid input"
|
|
14617
|
+
}));
|
|
14618
|
+
}
|
|
14619
|
+
};
|
|
14620
|
+
var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
|
|
14621
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
14622
|
+
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
14623
|
+
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
14624
|
+
var base64EncodeUint8Array = (bytes) => {
|
|
14625
|
+
const length2 = bytes.length;
|
|
14626
|
+
let result5 = "";
|
|
14627
|
+
let i;
|
|
14628
|
+
for (i = 2; i < length2; i += 3) {
|
|
14629
|
+
result5 += base64abc[bytes[i - 2] >> 2];
|
|
14630
|
+
result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
14631
|
+
result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
14632
|
+
result5 += base64abc[bytes[i] & 63];
|
|
14633
|
+
}
|
|
14634
|
+
if (i === length2 + 1) {
|
|
14635
|
+
result5 += base64abc[bytes[i - 2] >> 2];
|
|
14636
|
+
result5 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
14637
|
+
result5 += "==";
|
|
14638
|
+
}
|
|
14639
|
+
if (i === length2) {
|
|
14640
|
+
result5 += base64abc[bytes[i - 2] >> 2];
|
|
14641
|
+
result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
14642
|
+
result5 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
14643
|
+
result5 += "=";
|
|
14644
|
+
}
|
|
14645
|
+
return result5;
|
|
14646
|
+
};
|
|
14647
|
+
function getBase64Code(charCode) {
|
|
14648
|
+
if (charCode >= base64codes.length) {
|
|
14649
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
14650
|
+
}
|
|
14651
|
+
const code = base64codes[charCode];
|
|
14652
|
+
if (code === 255) {
|
|
14653
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
14654
|
+
}
|
|
14655
|
+
return code;
|
|
14656
|
+
}
|
|
14657
|
+
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
14658
|
+
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
14659
|
+
var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
14660
|
+
var byteToHex = [];
|
|
14661
|
+
for (let i = 0; i < 256; i++) {
|
|
14662
|
+
byteToHex.push(i.toString(16).padStart(2, "0"));
|
|
14663
|
+
}
|
|
14664
|
+
var hexEncodeUint8Array = (bytes) => {
|
|
14665
|
+
let result5 = "";
|
|
14666
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
14667
|
+
result5 += byteToHex[bytes[i]];
|
|
14668
|
+
}
|
|
14669
|
+
return result5;
|
|
14670
|
+
};
|
|
14671
|
+
var fromHexChar = (byte) => {
|
|
14672
|
+
if (48 <= byte && byte <= 57) {
|
|
14673
|
+
return byte - 48;
|
|
14674
|
+
}
|
|
14675
|
+
if (97 <= byte && byte <= 102) {
|
|
14676
|
+
return byte - 97 + 10;
|
|
14677
|
+
}
|
|
14678
|
+
if (65 <= byte && byte <= 70) {
|
|
14679
|
+
return byte - 65 + 10;
|
|
14680
|
+
}
|
|
14681
|
+
throw new TypeError("Invalid input");
|
|
14682
|
+
};
|
|
14683
|
+
|
|
14684
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tracer.js
|
|
14357
14685
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
14358
14686
|
var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
|
|
14359
14687
|
fiberCached: true
|
|
@@ -14403,8 +14731,8 @@ var NativeSpan = class {
|
|
|
14403
14731
|
startTime: options.startTime
|
|
14404
14732
|
};
|
|
14405
14733
|
this.attributes = /* @__PURE__ */ new Map();
|
|
14406
|
-
this.traceId = getOrUndefined(options.parent)?.traceId ??
|
|
14407
|
-
this.spanId =
|
|
14734
|
+
this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHex(32);
|
|
14735
|
+
this.spanId = randomHex(16);
|
|
14408
14736
|
}
|
|
14409
14737
|
end(endTime, exit3) {
|
|
14410
14738
|
this.status = {
|
|
@@ -14424,22 +14752,11 @@ var NativeSpan = class {
|
|
|
14424
14752
|
this.links.push(...links);
|
|
14425
14753
|
}
|
|
14426
14754
|
};
|
|
14427
|
-
var randomHexString = /* @__PURE__ */ (function() {
|
|
14428
|
-
const characters = "abcdef0123456789";
|
|
14429
|
-
const charactersLength = characters.length;
|
|
14430
|
-
return function(length2) {
|
|
14431
|
-
let result5 = "";
|
|
14432
|
-
for (let i = 0; i < length2; i++) {
|
|
14433
|
-
result5 += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
14434
|
-
}
|
|
14435
|
-
return result5;
|
|
14436
|
-
};
|
|
14437
|
-
})();
|
|
14438
14755
|
|
|
14439
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14756
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/metric.js
|
|
14440
14757
|
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
14441
14758
|
|
|
14442
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14759
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/references.js
|
|
14443
14760
|
var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
|
|
14444
14761
|
defaultValue: () => /* @__PURE__ */ new Set()
|
|
14445
14762
|
});
|
|
@@ -14474,7 +14791,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
14474
14791
|
defaultValue: () => []
|
|
14475
14792
|
});
|
|
14476
14793
|
|
|
14477
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14794
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
14478
14795
|
var isStackTraceLimitWritable = () => {
|
|
14479
14796
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
14480
14797
|
if (desc === void 0) {
|
|
@@ -14491,7 +14808,7 @@ var setStackTraceLimit = (value5) => {
|
|
|
14491
14808
|
}
|
|
14492
14809
|
};
|
|
14493
14810
|
|
|
14494
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14811
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/tracer.js
|
|
14495
14812
|
var addSpanStackTrace = (options) => {
|
|
14496
14813
|
if (options?.captureStackTrace === false) {
|
|
14497
14814
|
return options;
|
|
@@ -14522,7 +14839,7 @@ var makeStackCleaner = (line) => (stack) => {
|
|
|
14522
14839
|
};
|
|
14523
14840
|
var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
|
|
14524
14841
|
|
|
14525
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
14842
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/effect.js
|
|
14526
14843
|
var Interrupt = class extends ReasonBase {
|
|
14527
14844
|
fiberId;
|
|
14528
14845
|
constructor(fiberId3, annotations = constEmptyAnnotations) {
|
|
@@ -14825,6 +15142,7 @@ var FiberImpl = class {
|
|
|
14825
15142
|
}
|
|
14826
15143
|
this._observers.push(cb);
|
|
14827
15144
|
return () => {
|
|
15145
|
+
if (this._exit) return;
|
|
14828
15146
|
const index2 = this._observers.indexOf(cb);
|
|
14829
15147
|
if (index2 >= 0) {
|
|
14830
15148
|
this._observers.splice(index2, 1);
|
|
@@ -15217,7 +15535,7 @@ var callback = (register) => callbackOptions(register, register.length >= 2);
|
|
|
15217
15535
|
var never = /* @__PURE__ */ callback(constVoid);
|
|
15218
15536
|
var gen2 = (...args2) => suspend(() => fromIteratorUnsafe(args2.length === 1 ? args2[0]() : args2[1].call(args2[0].self)));
|
|
15219
15537
|
var fnUntraced = (body, ...pipeables) => {
|
|
15220
|
-
const
|
|
15538
|
+
const fn5 = pipeables.length === 0 ? function() {
|
|
15221
15539
|
return suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
|
|
15222
15540
|
} : function() {
|
|
15223
15541
|
let effect = suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
|
|
@@ -15226,9 +15544,9 @@ var fnUntraced = (body, ...pipeables) => {
|
|
|
15226
15544
|
}
|
|
15227
15545
|
return effect;
|
|
15228
15546
|
};
|
|
15229
|
-
return defineFunctionLength(body.length,
|
|
15547
|
+
return defineFunctionLength(body.length, fn5);
|
|
15230
15548
|
};
|
|
15231
|
-
var defineFunctionLength = (length2,
|
|
15549
|
+
var defineFunctionLength = (length2, fn5) => Object.defineProperty(fn5, "length", {
|
|
15232
15550
|
value: length2,
|
|
15233
15551
|
configurable: true
|
|
15234
15552
|
});
|
|
@@ -15247,7 +15565,7 @@ var fn = function() {
|
|
|
15247
15565
|
return makeFn(name, arguments[0], defError, Array.prototype.slice.call(arguments, 1), nameFirst, spanOptions);
|
|
15248
15566
|
};
|
|
15249
15567
|
var makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
|
|
15250
|
-
const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.
|
|
15568
|
+
const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
|
|
15251
15569
|
return defineFunctionLength(body.length, function(...args2) {
|
|
15252
15570
|
let result5 = suspend(() => {
|
|
15253
15571
|
const iter = body.apply(this, arguments);
|
|
@@ -15811,17 +16129,20 @@ var scopeCloseUnsafe = (self, exit_) => {
|
|
|
15811
16129
|
self.state = closed;
|
|
15812
16130
|
return;
|
|
15813
16131
|
}
|
|
15814
|
-
const
|
|
15815
|
-
finalizers
|
|
15816
|
-
} = self.state;
|
|
16132
|
+
const state = self.state;
|
|
15817
16133
|
self.state = closed;
|
|
15818
|
-
if (
|
|
16134
|
+
if (state.finalizer !== void 0) {
|
|
16135
|
+
return state.finalizer(exit_);
|
|
16136
|
+
}
|
|
16137
|
+
const finalizers = state.finalizers;
|
|
16138
|
+
if (finalizers === void 0 || finalizers.size === 0) {
|
|
15819
16139
|
return;
|
|
15820
16140
|
} else if (finalizers.size === 1) {
|
|
15821
16141
|
return finalizers.values().next().value(exit_);
|
|
15822
16142
|
}
|
|
15823
16143
|
return scopeCloseFinalizers(self, finalizers, exit_);
|
|
15824
16144
|
};
|
|
16145
|
+
var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause(causeCombine(exit_.cause, cause)));
|
|
15825
16146
|
var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced(function* (self, finalizers, exit_) {
|
|
15826
16147
|
let exits = [];
|
|
15827
16148
|
const fibers = [];
|
|
@@ -15864,15 +16185,34 @@ var scopeAddFinalizerUnsafe = (scope3, key, finalizer) => {
|
|
|
15864
16185
|
if (scope3.state._tag === "Empty") {
|
|
15865
16186
|
scope3.state = {
|
|
15866
16187
|
_tag: "Open",
|
|
15867
|
-
|
|
16188
|
+
finalizerKey: key,
|
|
16189
|
+
finalizer,
|
|
16190
|
+
finalizers: void 0
|
|
15868
16191
|
};
|
|
15869
16192
|
} else if (scope3.state._tag === "Open") {
|
|
15870
|
-
scope3.state
|
|
16193
|
+
const state = scope3.state;
|
|
16194
|
+
if (state.finalizer !== void 0) {
|
|
16195
|
+
state.finalizers = /* @__PURE__ */ new Map([[state.finalizerKey, state.finalizer]]);
|
|
16196
|
+
state.finalizerKey = void 0;
|
|
16197
|
+
state.finalizer = void 0;
|
|
16198
|
+
state.finalizers.set(key, finalizer);
|
|
16199
|
+
} else if (state.finalizers === void 0) {
|
|
16200
|
+
state.finalizerKey = key;
|
|
16201
|
+
state.finalizer = finalizer;
|
|
16202
|
+
} else {
|
|
16203
|
+
state.finalizers.set(key, finalizer);
|
|
16204
|
+
}
|
|
15871
16205
|
}
|
|
15872
16206
|
};
|
|
15873
16207
|
var scopeRemoveFinalizerUnsafe = (scope3, key) => {
|
|
15874
16208
|
if (scope3.state._tag === "Open") {
|
|
15875
|
-
scope3.state
|
|
16209
|
+
const state = scope3.state;
|
|
16210
|
+
if (state.finalizerKey === key) {
|
|
16211
|
+
state.finalizerKey = void 0;
|
|
16212
|
+
state.finalizer = void 0;
|
|
16213
|
+
} else if (state.finalizers !== void 0) {
|
|
16214
|
+
state.finalizers.delete(key);
|
|
16215
|
+
}
|
|
15876
16216
|
}
|
|
15877
16217
|
};
|
|
15878
16218
|
var scopeMakeUnsafe = (finalizerStrategy = "sequential") => ({
|
|
@@ -15921,7 +16261,7 @@ var onExitPrimitive = /* @__PURE__ */ makePrimitive({
|
|
|
15921
16261
|
[contE](cause, _, exit3) {
|
|
15922
16262
|
exit3 ??= exitFailCause(cause);
|
|
15923
16263
|
const eff = this[args][1](exit3);
|
|
15924
|
-
return eff ? flatMap4(eff, (_2) => exit3) : exit3;
|
|
16264
|
+
return eff ? flatMap4(combineFinalizerCause(exit3, eff), (_2) => exit3) : exit3;
|
|
15925
16265
|
}
|
|
15926
16266
|
});
|
|
15927
16267
|
var onExit = /* @__PURE__ */ dual(2, onExitPrimitive);
|
|
@@ -16137,6 +16477,10 @@ var forEach2 = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (
|
|
|
16137
16477
|
});
|
|
16138
16478
|
return eff ? as2(eff, out) : succeed3(out);
|
|
16139
16479
|
}));
|
|
16480
|
+
var head2 = (self) => flatMap4(self, (elements) => {
|
|
16481
|
+
const result5 = elements[Symbol.iterator]().next();
|
|
16482
|
+
return result5.done ? fail3(new NoSuchElementError()) : succeed3(result5.value);
|
|
16483
|
+
});
|
|
16140
16484
|
var forEachSequential = (iterable, f, options) => suspend(() => {
|
|
16141
16485
|
const out = options?.discard ? void 0 : [];
|
|
16142
16486
|
const iterator = iterable[Symbol.iterator]();
|
|
@@ -16172,7 +16516,7 @@ var iterateEagerImpl = (options) => {
|
|
|
16172
16516
|
if (concurrency === 1) {
|
|
16173
16517
|
return runSequential(state, items, 0, end);
|
|
16174
16518
|
}
|
|
16175
|
-
const orderedStep = opts?.orderedStep === true
|
|
16519
|
+
const orderedStep = opts?.orderedStep === true;
|
|
16176
16520
|
let done4 = false;
|
|
16177
16521
|
let parentFiber;
|
|
16178
16522
|
let fibers;
|
|
@@ -16456,8 +16800,8 @@ var runPromiseExitWith = (context3) => {
|
|
|
16456
16800
|
const runFork3 = runForkWith(context3);
|
|
16457
16801
|
return (effect, options) => {
|
|
16458
16802
|
const fiber3 = runFork3(effect, options);
|
|
16459
|
-
return new Promise((
|
|
16460
|
-
fiber3.addObserver((exit3) =>
|
|
16803
|
+
return new Promise((resolve3) => {
|
|
16804
|
+
fiber3.addObserver((exit3) => resolve3(exit3));
|
|
16461
16805
|
});
|
|
16462
16806
|
};
|
|
16463
16807
|
};
|
|
@@ -16625,7 +16969,7 @@ var makeSpanUnsafe = (fiber3, name, options) => {
|
|
|
16625
16969
|
const annotationsFromEnv = fiber3.getRef(TracerSpanAnnotations);
|
|
16626
16970
|
const linksFromEnv = fiber3.getRef(TracerSpanLinks);
|
|
16627
16971
|
const level = options?.level ?? fiber3.getRef(CurrentTraceLevel);
|
|
16628
|
-
const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.slice();
|
|
16972
|
+
const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.length === 0 ? [] : linksFromEnv.slice();
|
|
16629
16973
|
span2 = tracer3.span({
|
|
16630
16974
|
name,
|
|
16631
16975
|
parent,
|
|
@@ -16636,12 +16980,12 @@ var makeSpanUnsafe = (fiber3, name, options) => {
|
|
|
16636
16980
|
root: options?.root ?? isNone2(parent),
|
|
16637
16981
|
sampled: options?.sampled ?? (isSome2(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber3.getRef(MinimumTraceLevel), level))
|
|
16638
16982
|
});
|
|
16639
|
-
for (const
|
|
16640
|
-
span2.attribute(key,
|
|
16983
|
+
for (const key in annotationsFromEnv) {
|
|
16984
|
+
span2.attribute(key, annotationsFromEnv[key]);
|
|
16641
16985
|
}
|
|
16642
16986
|
if (options?.attributes !== void 0) {
|
|
16643
|
-
for (const
|
|
16644
|
-
span2.attribute(key,
|
|
16987
|
+
for (const key in options.attributes) {
|
|
16988
|
+
span2.attribute(key, options.attributes[key]);
|
|
16645
16989
|
}
|
|
16646
16990
|
}
|
|
16647
16991
|
}
|
|
@@ -17083,7 +17427,7 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
|
|
|
17083
17427
|
reporters.forEach((reporter) => reporter.report(opts));
|
|
17084
17428
|
};
|
|
17085
17429
|
|
|
17086
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17430
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Cause.js
|
|
17087
17431
|
var isCause2 = isCause;
|
|
17088
17432
|
var isReason = isCauseReason;
|
|
17089
17433
|
var isFailReason2 = isFailReason;
|
|
@@ -17093,13 +17437,12 @@ var makeFailReason = (error3) => new Fail(error3);
|
|
|
17093
17437
|
var makeDieReason = (defect) => new Die(defect);
|
|
17094
17438
|
var makeInterruptReason2 = makeInterruptReason;
|
|
17095
17439
|
var map6 = causeMap;
|
|
17096
|
-
var findError2 = findError;
|
|
17097
17440
|
var pretty = causePretty;
|
|
17098
17441
|
var isDone2 = isDone;
|
|
17099
17442
|
var done2 = done;
|
|
17100
17443
|
var IllegalArgumentError2 = IllegalArgumentError;
|
|
17101
17444
|
|
|
17102
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17445
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
17103
17446
|
var Effect_exports = {};
|
|
17104
17447
|
__export(Effect_exports, {
|
|
17105
17448
|
Do: () => Do4,
|
|
@@ -17183,6 +17526,7 @@ __export(Effect_exports, {
|
|
|
17183
17526
|
fromOption: () => fromOption5,
|
|
17184
17527
|
fromResult: () => fromResult2,
|
|
17185
17528
|
gen: () => gen3,
|
|
17529
|
+
head: () => head3,
|
|
17186
17530
|
ignore: () => ignore2,
|
|
17187
17531
|
ignoreCause: () => ignoreCause2,
|
|
17188
17532
|
interrupt: () => interrupt4,
|
|
@@ -17331,7 +17675,7 @@ __export(Effect_exports, {
|
|
|
17331
17675
|
zipWith: () => zipWith4
|
|
17332
17676
|
});
|
|
17333
17677
|
|
|
17334
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17678
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Exit.js
|
|
17335
17679
|
var Exit_exports = {};
|
|
17336
17680
|
__export(Exit_exports, {
|
|
17337
17681
|
asVoid: () => asVoid3,
|
|
@@ -17344,7 +17688,7 @@ __export(Exit_exports, {
|
|
|
17344
17688
|
filterSuccess: () => filterSuccess,
|
|
17345
17689
|
filterValue: () => filterValue,
|
|
17346
17690
|
findDefect: () => findDefect2,
|
|
17347
|
-
findError: () =>
|
|
17691
|
+
findError: () => findError2,
|
|
17348
17692
|
findErrorOption: () => findErrorOption2,
|
|
17349
17693
|
getCause: () => getCause,
|
|
17350
17694
|
getSuccess: () => getSuccess3,
|
|
@@ -17378,7 +17722,7 @@ var filterSuccess = exitFilterSuccess;
|
|
|
17378
17722
|
var filterValue = exitFilterValue;
|
|
17379
17723
|
var filterFailure = exitFilterFailure;
|
|
17380
17724
|
var filterCause = exitFilterCause;
|
|
17381
|
-
var
|
|
17725
|
+
var findError2 = exitFindError;
|
|
17382
17726
|
var findDefect2 = exitFindDefect;
|
|
17383
17727
|
var match6 = exitMatch;
|
|
17384
17728
|
var map7 = exitMap;
|
|
@@ -17390,7 +17734,7 @@ var getSuccess3 = exitGetSuccess;
|
|
|
17390
17734
|
var getCause = exitGetCause;
|
|
17391
17735
|
var findErrorOption2 = exitFindErrorOption;
|
|
17392
17736
|
|
|
17393
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17737
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Deferred.js
|
|
17394
17738
|
var Deferred_exports = {};
|
|
17395
17739
|
__export(Deferred_exports, {
|
|
17396
17740
|
await: () => _await,
|
|
@@ -17467,25 +17811,26 @@ var doneUnsafe = (self, effect) => {
|
|
|
17467
17811
|
if (self.effect) return false;
|
|
17468
17812
|
self.effect = effect;
|
|
17469
17813
|
if (self.resumes) {
|
|
17470
|
-
|
|
17471
|
-
self.resumes[i](effect);
|
|
17472
|
-
}
|
|
17814
|
+
const resumes = self.resumes;
|
|
17473
17815
|
self.resumes = void 0;
|
|
17816
|
+
for (let i = 0; i < resumes.length; i++) {
|
|
17817
|
+
resumes[i](effect);
|
|
17818
|
+
}
|
|
17474
17819
|
}
|
|
17475
17820
|
return true;
|
|
17476
17821
|
};
|
|
17477
17822
|
var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap4(exit(restore(self)), (exit3) => done3(deferred, exit3))));
|
|
17478
17823
|
|
|
17479
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17824
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/References.js
|
|
17480
17825
|
var CurrentLogAnnotations2 = CurrentLogAnnotations;
|
|
17481
17826
|
var CurrentLogSpans2 = CurrentLogSpans;
|
|
17482
17827
|
|
|
17483
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17828
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scope.js
|
|
17484
17829
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
17485
17830
|
var forkUnsafe2 = scopeForkUnsafe;
|
|
17486
17831
|
var close = scopeClose;
|
|
17487
17832
|
|
|
17488
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17833
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Layer.js
|
|
17489
17834
|
var TypeId7 = "~effect/Layer";
|
|
17490
17835
|
var MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
17491
17836
|
var memoMapReuse = (entry, scope3) => {
|
|
@@ -17580,7 +17925,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
|
|
|
17580
17925
|
var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap4(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context3) => self.build(memoMap, scope3).pipe(provideContext(context3), map5((merged) => f(merged, context3)))));
|
|
17581
17926
|
var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
|
|
17582
17927
|
|
|
17583
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17928
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/ExecutionPlan.js
|
|
17584
17929
|
var TypeId8 = "~effect/ExecutionPlan";
|
|
17585
17930
|
var Proto2 = {
|
|
17586
17931
|
[TypeId8]: TypeId8,
|
|
@@ -17607,7 +17952,7 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
|
|
|
17607
17952
|
})
|
|
17608
17953
|
});
|
|
17609
17954
|
|
|
17610
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17955
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
|
|
17611
17956
|
var Schedule_exports = {};
|
|
17612
17957
|
__export(Schedule_exports, {
|
|
17613
17958
|
CurrentMetadata: () => CurrentMetadata2,
|
|
@@ -17643,18 +17988,7 @@ __export(Schedule_exports, {
|
|
|
17643
17988
|
windowed: () => windowed
|
|
17644
17989
|
});
|
|
17645
17990
|
|
|
17646
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
17647
|
-
var Class3 = class extends Class {
|
|
17648
|
-
constructor(props) {
|
|
17649
|
-
super();
|
|
17650
|
-
if (props) {
|
|
17651
|
-
assignProperties(this, props);
|
|
17652
|
-
}
|
|
17653
|
-
}
|
|
17654
|
-
};
|
|
17655
|
-
var TaggedError2 = TaggedError;
|
|
17656
|
-
|
|
17657
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/dateTime.js
|
|
17991
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/dateTime.js
|
|
17658
17992
|
var TypeId9 = "~effect/time/DateTime";
|
|
17659
17993
|
var TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
17660
17994
|
var Proto3 = {
|
|
@@ -18060,7 +18394,7 @@ var formatIsoOffset = (self) => {
|
|
|
18060
18394
|
};
|
|
18061
18395
|
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
18062
18396
|
|
|
18063
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
18397
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Number.js
|
|
18064
18398
|
var Number3 = globalThis.Number;
|
|
18065
18399
|
var Order4 = Number2;
|
|
18066
18400
|
var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
|
|
@@ -18102,13 +18436,13 @@ function toScientificInteger(n) {
|
|
|
18102
18436
|
var ReducerMax = /* @__PURE__ */ make((a, b) => Math.max(a, b), -Infinity);
|
|
18103
18437
|
var ReducerMin = /* @__PURE__ */ make((a, b) => Math.min(a, b), Infinity);
|
|
18104
18438
|
|
|
18105
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
18439
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/String.js
|
|
18106
18440
|
var String2 = globalThis.String;
|
|
18107
18441
|
var toLowerCase = (self) => self.toLowerCase();
|
|
18108
18442
|
var trim = (self) => self.trim();
|
|
18109
18443
|
var isNonEmpty = (self) => self.length > 0;
|
|
18110
18444
|
|
|
18111
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
18445
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Cron.js
|
|
18112
18446
|
var TypeId10 = "~effect/time/Cron";
|
|
18113
18447
|
function toPojo(cron2) {
|
|
18114
18448
|
const out = {
|
|
@@ -18627,7 +18961,7 @@ function aliasOrValue(field, aliases) {
|
|
|
18627
18961
|
}
|
|
18628
18962
|
var decimalRegex = /^\d+$/;
|
|
18629
18963
|
|
|
18630
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
18964
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/random.js
|
|
18631
18965
|
var Random = /* @__PURE__ */ Reference("effect/Random", {
|
|
18632
18966
|
defaultValue: () => ({
|
|
18633
18967
|
nextIntUnsafe() {
|
|
@@ -18639,10 +18973,26 @@ var Random = /* @__PURE__ */ Reference("effect/Random", {
|
|
|
18639
18973
|
})
|
|
18640
18974
|
});
|
|
18641
18975
|
|
|
18642
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
18976
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Pull.js
|
|
18643
18977
|
var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
18644
|
-
var
|
|
18645
|
-
var
|
|
18978
|
+
var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
|
|
18979
|
+
var filterDone = (cause) => {
|
|
18980
|
+
let done4;
|
|
18981
|
+
let hasFailure = false;
|
|
18982
|
+
for (const reason of cause.reasons) {
|
|
18983
|
+
if (isDoneFailure(reason)) {
|
|
18984
|
+
done4 ??= reason.error;
|
|
18985
|
+
} else if (reason._tag !== "Interrupt") {
|
|
18986
|
+
hasFailure = true;
|
|
18987
|
+
}
|
|
18988
|
+
}
|
|
18989
|
+
if (done4 === void 0) return fail2(cause);
|
|
18990
|
+
return hasFailure ? fail2(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed2(done4);
|
|
18991
|
+
};
|
|
18992
|
+
var filterDoneLeftover = (cause) => {
|
|
18993
|
+
const done4 = filterDone(cause);
|
|
18994
|
+
return isFailure2(done4) ? done4 : succeed2(done4.success.value);
|
|
18995
|
+
};
|
|
18646
18996
|
var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
|
|
18647
18997
|
onSuccess: options.onSuccess,
|
|
18648
18998
|
onFailure: (cause) => {
|
|
@@ -18651,7 +19001,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
|
|
|
18651
19001
|
}
|
|
18652
19002
|
}));
|
|
18653
19003
|
|
|
18654
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19004
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
|
|
18655
19005
|
var TypeId11 = "~effect/Schedule";
|
|
18656
19006
|
var randomNext = /* @__PURE__ */ Random.useSync((random2) => random2.nextDoubleUnsafe());
|
|
18657
19007
|
var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
|
|
@@ -18941,11 +19291,11 @@ var constIdentity = /* @__PURE__ */ fromStep(/* @__PURE__ */ succeed3((_now, inp
|
|
|
18941
19291
|
var identity_ = () => constIdentity;
|
|
18942
19292
|
var setInputType = () => (self) => self;
|
|
18943
19293
|
|
|
18944
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19294
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/layer.js
|
|
18945
19295
|
var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
|
|
18946
19296
|
var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
|
|
18947
19297
|
|
|
18948
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19298
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schedule.js
|
|
18949
19299
|
var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse4) => flatMap4(toStepWithMetadata(schedule2), (step) => {
|
|
18950
19300
|
let meta3 = CurrentMetadata2.defaultValue();
|
|
18951
19301
|
return catch_(forever(tap2(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta3)), step), (meta_) => sync(() => {
|
|
@@ -19016,7 +19366,7 @@ var buildFromOptions = (options) => {
|
|
|
19016
19366
|
return schedule2;
|
|
19017
19367
|
};
|
|
19018
19368
|
|
|
19019
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19369
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/executionPlan.js
|
|
19020
19370
|
var makeEventEmitter = (onEvent, currentMetadata) => {
|
|
19021
19371
|
let lastStepIndex = -1;
|
|
19022
19372
|
let stepAttempt = 0;
|
|
@@ -19121,7 +19471,7 @@ var scheduleFromStep = (step, first) => {
|
|
|
19121
19471
|
};
|
|
19122
19472
|
var scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
19123
19473
|
|
|
19124
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19474
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Request.js
|
|
19125
19475
|
var TypeId12 = "~effect/Request";
|
|
19126
19476
|
var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
19127
19477
|
/* c8 ignore next */
|
|
@@ -19137,7 +19487,7 @@ var RequestPrototype = {
|
|
|
19137
19487
|
};
|
|
19138
19488
|
var makeEntry = (options) => options;
|
|
19139
19489
|
|
|
19140
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19490
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/request.js
|
|
19141
19491
|
var request = /* @__PURE__ */ dual(2, (self, resolver) => {
|
|
19142
19492
|
const withResolver = (resolver2) => callback((resume) => {
|
|
19143
19493
|
const entry = addEntry(resolver2, self, resume, getCurrentFiber());
|
|
@@ -19247,7 +19597,7 @@ function runBatch(batch) {
|
|
|
19247
19597
|
return batch.run;
|
|
19248
19598
|
}
|
|
19249
19599
|
|
|
19250
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19600
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Metric.js
|
|
19251
19601
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
19252
19602
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
19253
19603
|
defaultValue: () => ({})
|
|
@@ -19347,7 +19697,7 @@ function attributesToRecord(attributes) {
|
|
|
19347
19697
|
return attributes;
|
|
19348
19698
|
}
|
|
19349
19699
|
|
|
19350
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19700
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
19351
19701
|
var TypeId14 = EffectTypeId;
|
|
19352
19702
|
var isEffect2 = isEffect;
|
|
19353
19703
|
var all4 = all3;
|
|
@@ -19357,6 +19707,7 @@ var validate2 = validate;
|
|
|
19357
19707
|
var findFirst4 = findFirst3;
|
|
19358
19708
|
var findFirstFilter2 = findFirstFilter;
|
|
19359
19709
|
var forEach3 = forEach2;
|
|
19710
|
+
var head3 = head2;
|
|
19360
19711
|
var whileLoop2 = whileLoop;
|
|
19361
19712
|
var promise2 = promise;
|
|
19362
19713
|
var tryPromise2 = tryPromise;
|
|
@@ -19680,9 +20031,9 @@ var txRetry = /* @__PURE__ */ flatMap5(Transaction, (state) => {
|
|
|
19680
20031
|
state.retry = true;
|
|
19681
20032
|
return interrupt4;
|
|
19682
20033
|
});
|
|
19683
|
-
var effectify = (
|
|
20034
|
+
var effectify = (fn5, onError3, onSyncError) => (...args2) => callback2((resume) => {
|
|
19684
20035
|
try {
|
|
19685
|
-
|
|
20036
|
+
fn5(...args2, (err, result5) => {
|
|
19686
20037
|
if (err) {
|
|
19687
20038
|
resume(fail6(onError3 ? onError3(err, args2) : err));
|
|
19688
20039
|
} else {
|
|
@@ -19703,7 +20054,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
19703
20054
|
var catchEager2 = catchEager;
|
|
19704
20055
|
var fnUntracedEager2 = fnUntracedEager;
|
|
19705
20056
|
|
|
19706
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20057
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/annotations.js
|
|
19707
20058
|
function resolve(ast) {
|
|
19708
20059
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
19709
20060
|
}
|
|
@@ -19718,6 +20069,7 @@ var jsonSchemaAnnotationKeys = ["title", "description", "default", "examples", "
|
|
|
19718
20069
|
var resolveIdentifier = /* @__PURE__ */ resolveAt("identifier");
|
|
19719
20070
|
var resolveIdentifierFallback = /* @__PURE__ */ resolveAt(IDENTIFIER_FALLBACK_KEY);
|
|
19720
20071
|
var resolveTitle = /* @__PURE__ */ resolveAt("title");
|
|
20072
|
+
var resolveDescription = /* @__PURE__ */ resolveAt("description");
|
|
19721
20073
|
var resolveBrands = /* @__PURE__ */ resolveAt("brands");
|
|
19722
20074
|
var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
19723
20075
|
const identifier2 = resolve(ast)?.identifier;
|
|
@@ -19726,7 +20078,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
19726
20078
|
});
|
|
19727
20079
|
var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitrary", "brands", "toJsonSchema", "toCode", "toArbitrary", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso"]);
|
|
19728
20080
|
|
|
19729
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20081
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/parser.js
|
|
19730
20082
|
var missing = /* @__PURE__ */ Symbol();
|
|
19731
20083
|
var succeed7 = succeed4;
|
|
19732
20084
|
var missingExit = /* @__PURE__ */ succeed7(missing);
|
|
@@ -19734,7 +20086,7 @@ var sameExit = /* @__PURE__ */ succeed7(missing);
|
|
|
19734
20086
|
var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
|
|
19735
20087
|
var fromOptionExit = (option5) => option5._tag === "None" ? missingExit : succeed7(option5.value);
|
|
19736
20088
|
|
|
19737
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20089
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaIssue.js
|
|
19738
20090
|
var TypeId15 = "~effect/SchemaIssue/Issue";
|
|
19739
20091
|
function isIssue(u) {
|
|
19740
20092
|
return hasProperty(u, TypeId15) && u[TypeId15] === TypeId15;
|
|
@@ -20077,7 +20429,7 @@ function findMessage(issue2) {
|
|
|
20077
20429
|
if (typeof message === "string") return message;
|
|
20078
20430
|
}
|
|
20079
20431
|
|
|
20080
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20432
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/cause.js
|
|
20081
20433
|
function getSchemaIssue(cause) {
|
|
20082
20434
|
let issue2;
|
|
20083
20435
|
for (const reason of cause.reasons) {
|
|
@@ -20098,7 +20450,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
20098
20450
|
return issue2;
|
|
20099
20451
|
}
|
|
20100
20452
|
|
|
20101
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20453
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/DateTime.js
|
|
20102
20454
|
var isDateTime2 = isDateTime;
|
|
20103
20455
|
var isTimeZone2 = isTimeZone;
|
|
20104
20456
|
var isTimeZoneOffset2 = isTimeZoneOffset;
|
|
@@ -20122,177 +20474,7 @@ var toEpochMillis2 = toEpochMillis;
|
|
|
20122
20474
|
var formatIso2 = formatIso;
|
|
20123
20475
|
var formatIsoZoned2 = formatIsoZoned;
|
|
20124
20476
|
|
|
20125
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20126
|
-
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
20127
|
-
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
20128
|
-
/**
|
|
20129
|
-
* Marks this value as an encoding or decoding error for runtime guards.
|
|
20130
|
-
*
|
|
20131
|
-
* **When to use**
|
|
20132
|
-
*
|
|
20133
|
-
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
20134
|
-
*
|
|
20135
|
-
* @since 4.0.0
|
|
20136
|
-
*/
|
|
20137
|
-
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
20138
|
-
};
|
|
20139
|
-
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
20140
|
-
var decodeBase64 = (str) => {
|
|
20141
|
-
const stripped = stripCrlf(str);
|
|
20142
|
-
const length2 = stripped.length;
|
|
20143
|
-
if (length2 % 4 !== 0) {
|
|
20144
|
-
return fail2(new EncodingError({
|
|
20145
|
-
kind: "Decode",
|
|
20146
|
-
module: "Base64",
|
|
20147
|
-
input: stripped,
|
|
20148
|
-
message: `Length must be a multiple of 4, but is ${length2}`
|
|
20149
|
-
}));
|
|
20150
|
-
}
|
|
20151
|
-
const index2 = stripped.indexOf("=");
|
|
20152
|
-
if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
|
|
20153
|
-
return fail2(new EncodingError({
|
|
20154
|
-
kind: "Decode",
|
|
20155
|
-
module: "Base64",
|
|
20156
|
-
input: stripped,
|
|
20157
|
-
message: `Found a '=' character, but it is not at the end`
|
|
20158
|
-
}));
|
|
20159
|
-
}
|
|
20160
|
-
try {
|
|
20161
|
-
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
20162
|
-
const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
|
|
20163
|
-
for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
|
|
20164
|
-
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
20165
|
-
result5[j] = buffer >> 16;
|
|
20166
|
-
result5[j + 1] = buffer >> 8 & 255;
|
|
20167
|
-
result5[j + 2] = buffer & 255;
|
|
20168
|
-
}
|
|
20169
|
-
return succeed2(result5);
|
|
20170
|
-
} catch (e) {
|
|
20171
|
-
return fail2(new EncodingError({
|
|
20172
|
-
kind: "Decode",
|
|
20173
|
-
module: "Base64",
|
|
20174
|
-
input: stripped,
|
|
20175
|
-
message: e instanceof Error ? e.message : "Invalid input"
|
|
20176
|
-
}));
|
|
20177
|
-
}
|
|
20178
|
-
};
|
|
20179
|
-
var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
|
|
20180
|
-
var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
|
|
20181
|
-
var decodeBase64Url = (str) => {
|
|
20182
|
-
const stripped = stripCrlf(str);
|
|
20183
|
-
const length2 = stripped.length;
|
|
20184
|
-
if (length2 % 4 === 1) {
|
|
20185
|
-
return fail2(new EncodingError({
|
|
20186
|
-
module: "Base64Url",
|
|
20187
|
-
kind: "Decode",
|
|
20188
|
-
input: stripped,
|
|
20189
|
-
message: `Length should be a multiple of 4, but is ${length2}`
|
|
20190
|
-
}));
|
|
20191
|
-
}
|
|
20192
|
-
if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
|
|
20193
|
-
return fail2(new EncodingError({
|
|
20194
|
-
module: "Base64Url",
|
|
20195
|
-
kind: "Decode",
|
|
20196
|
-
input: stripped,
|
|
20197
|
-
message: "Invalid input"
|
|
20198
|
-
}));
|
|
20199
|
-
}
|
|
20200
|
-
let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
|
|
20201
|
-
sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
|
|
20202
|
-
return decodeBase64(sanitized);
|
|
20203
|
-
};
|
|
20204
|
-
var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
|
|
20205
|
-
var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
|
|
20206
|
-
var decodeHex = (str) => {
|
|
20207
|
-
const bytes = new TextEncoder().encode(str);
|
|
20208
|
-
if (bytes.length % 2 !== 0) {
|
|
20209
|
-
return fail2(new EncodingError({
|
|
20210
|
-
module: "Hex",
|
|
20211
|
-
kind: "Decode",
|
|
20212
|
-
input: str,
|
|
20213
|
-
message: `Length must be a multiple of 2, but is ${bytes.length}`
|
|
20214
|
-
}));
|
|
20215
|
-
}
|
|
20216
|
-
try {
|
|
20217
|
-
const length2 = bytes.length / 2;
|
|
20218
|
-
const result5 = new Uint8Array(length2);
|
|
20219
|
-
for (let i = 0; i < length2; i++) {
|
|
20220
|
-
const a = fromHexChar(bytes[i * 2]);
|
|
20221
|
-
const b = fromHexChar(bytes[i * 2 + 1]);
|
|
20222
|
-
result5[i] = a << 4 | b;
|
|
20223
|
-
}
|
|
20224
|
-
return succeed2(result5);
|
|
20225
|
-
} catch (e) {
|
|
20226
|
-
return fail2(new EncodingError({
|
|
20227
|
-
module: "Hex",
|
|
20228
|
-
kind: "Decode",
|
|
20229
|
-
input: str,
|
|
20230
|
-
message: e instanceof Error ? e.message : "Invalid input"
|
|
20231
|
-
}));
|
|
20232
|
-
}
|
|
20233
|
-
};
|
|
20234
|
-
var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
|
|
20235
|
-
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
20236
|
-
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
20237
|
-
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
20238
|
-
var base64EncodeUint8Array = (bytes) => {
|
|
20239
|
-
const length2 = bytes.length;
|
|
20240
|
-
let result5 = "";
|
|
20241
|
-
let i;
|
|
20242
|
-
for (i = 2; i < length2; i += 3) {
|
|
20243
|
-
result5 += base64abc[bytes[i - 2] >> 2];
|
|
20244
|
-
result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
20245
|
-
result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
20246
|
-
result5 += base64abc[bytes[i] & 63];
|
|
20247
|
-
}
|
|
20248
|
-
if (i === length2 + 1) {
|
|
20249
|
-
result5 += base64abc[bytes[i - 2] >> 2];
|
|
20250
|
-
result5 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
20251
|
-
result5 += "==";
|
|
20252
|
-
}
|
|
20253
|
-
if (i === length2) {
|
|
20254
|
-
result5 += base64abc[bytes[i - 2] >> 2];
|
|
20255
|
-
result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
20256
|
-
result5 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
20257
|
-
result5 += "=";
|
|
20258
|
-
}
|
|
20259
|
-
return result5;
|
|
20260
|
-
};
|
|
20261
|
-
function getBase64Code(charCode) {
|
|
20262
|
-
if (charCode >= base64codes.length) {
|
|
20263
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
20264
|
-
}
|
|
20265
|
-
const code = base64codes[charCode];
|
|
20266
|
-
if (code === 255) {
|
|
20267
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
20268
|
-
}
|
|
20269
|
-
return code;
|
|
20270
|
-
}
|
|
20271
|
-
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
20272
|
-
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
20273
|
-
var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
20274
|
-
var hexEncodeUint8Array = (bytes) => {
|
|
20275
|
-
let result5 = "";
|
|
20276
|
-
for (let i = 0; i < bytes.length; ++i) {
|
|
20277
|
-
result5 += bytesToHex[bytes[i]];
|
|
20278
|
-
}
|
|
20279
|
-
return result5;
|
|
20280
|
-
};
|
|
20281
|
-
var fromHexChar = (byte) => {
|
|
20282
|
-
if (48 <= byte && byte <= 57) {
|
|
20283
|
-
return byte - 48;
|
|
20284
|
-
}
|
|
20285
|
-
if (97 <= byte && byte <= 102) {
|
|
20286
|
-
return byte - 97 + 10;
|
|
20287
|
-
}
|
|
20288
|
-
if (65 <= byte && byte <= 70) {
|
|
20289
|
-
return byte - 65 + 10;
|
|
20290
|
-
}
|
|
20291
|
-
throw new TypeError("Invalid input");
|
|
20292
|
-
};
|
|
20293
|
-
var bytesToHex = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
20294
|
-
|
|
20295
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaGetter.js
|
|
20477
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaGetter.js
|
|
20296
20478
|
var Getter = class _Getter extends Class {
|
|
20297
20479
|
run;
|
|
20298
20480
|
constructor(run2) {
|
|
@@ -20579,7 +20761,7 @@ function collectBracketPathEntries(isLeaf) {
|
|
|
20579
20761
|
};
|
|
20580
20762
|
}
|
|
20581
20763
|
|
|
20582
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
20764
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaTransformation.js
|
|
20583
20765
|
var Middleware = class _Middleware {
|
|
20584
20766
|
_tag = "Middleware";
|
|
20585
20767
|
decode;
|
|
@@ -20820,14 +21002,30 @@ var dateTimeZonedFromString = /* @__PURE__ */ transformOrFail2({
|
|
|
20820
21002
|
encode: (zoned) => succeed6(formatIsoZoned2(zoned))
|
|
20821
21003
|
});
|
|
20822
21004
|
|
|
20823
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
21005
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
|
|
20824
21006
|
function makeGuard(tag4) {
|
|
20825
21007
|
return (ast) => ast._tag === tag4;
|
|
20826
21008
|
}
|
|
21009
|
+
function isAST(u) {
|
|
21010
|
+
return hasProperty(u, TypeId17) && u[TypeId17] === TypeId17;
|
|
21011
|
+
}
|
|
20827
21012
|
var isDeclaration = /* @__PURE__ */ makeGuard("Declaration");
|
|
21013
|
+
var isNull2 = /* @__PURE__ */ makeGuard("Null");
|
|
21014
|
+
var isUndefined2 = /* @__PURE__ */ makeGuard("Undefined");
|
|
21015
|
+
var isVoid = /* @__PURE__ */ makeGuard("Void");
|
|
20828
21016
|
var isNever2 = /* @__PURE__ */ makeGuard("Never");
|
|
21017
|
+
var isUnknown2 = /* @__PURE__ */ makeGuard("Unknown");
|
|
21018
|
+
var isAny = /* @__PURE__ */ makeGuard("Any");
|
|
21019
|
+
var isString2 = /* @__PURE__ */ makeGuard("String");
|
|
21020
|
+
var isNumber2 = /* @__PURE__ */ makeGuard("Number");
|
|
21021
|
+
var isBoolean2 = /* @__PURE__ */ makeGuard("Boolean");
|
|
21022
|
+
var isBigInt2 = /* @__PURE__ */ makeGuard("BigInt");
|
|
21023
|
+
var isSymbol2 = /* @__PURE__ */ makeGuard("Symbol");
|
|
20829
21024
|
var isLiteral = /* @__PURE__ */ makeGuard("Literal");
|
|
20830
21025
|
var isUniqueSymbol = /* @__PURE__ */ makeGuard("UniqueSymbol");
|
|
21026
|
+
var isObjectKeyword2 = /* @__PURE__ */ makeGuard("ObjectKeyword");
|
|
21027
|
+
var isEnum = /* @__PURE__ */ makeGuard("Enum");
|
|
21028
|
+
var isTemplateLiteral = /* @__PURE__ */ makeGuard("TemplateLiteral");
|
|
20831
21029
|
var isArrays = /* @__PURE__ */ makeGuard("Arrays");
|
|
20832
21030
|
var isObjects = /* @__PURE__ */ makeGuard("Objects");
|
|
20833
21031
|
var isUnion = /* @__PURE__ */ makeGuard("Union");
|
|
@@ -20876,11 +21074,17 @@ var Declaration = class _Declaration extends Base2 {
|
|
|
20876
21074
|
typeParameters;
|
|
20877
21075
|
run;
|
|
20878
21076
|
encodingChecks;
|
|
20879
|
-
|
|
21077
|
+
/**
|
|
21078
|
+
* Parser factory {@link flip} swaps in, so a declaration can behave
|
|
21079
|
+
* differently when encoding. `undefined` reuses {@link run}.
|
|
21080
|
+
*/
|
|
21081
|
+
encodingRun;
|
|
21082
|
+
constructor(typeParameters, run2, annotations, checks, encoding, context3, encodingChecks, encodingRun) {
|
|
20880
21083
|
super(annotations, checks, encoding, context3);
|
|
20881
21084
|
this.typeParameters = typeParameters;
|
|
20882
21085
|
this.run = run2;
|
|
20883
21086
|
this.encodingChecks = encodingChecks;
|
|
21087
|
+
this.encodingRun = encodingRun;
|
|
20884
21088
|
}
|
|
20885
21089
|
/** @internal */
|
|
20886
21090
|
getParser() {
|
|
@@ -20890,17 +21094,17 @@ var Declaration = class _Declaration extends Base2 {
|
|
|
20890
21094
|
return (run2 ??= this.run(this.typeParameters))(input, this, options);
|
|
20891
21095
|
};
|
|
20892
21096
|
}
|
|
20893
|
-
_rebuild(recur3, checks, encodingChecks) {
|
|
21097
|
+
_rebuild(recur3, checks, encodingChecks, run2, encodingRun) {
|
|
20894
21098
|
const tps = mapOrSame(this.typeParameters, recur3);
|
|
20895
|
-
return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Declaration(tps,
|
|
21099
|
+
return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks && run2 === this.run && encodingRun === this.encodingRun ? this : new _Declaration(tps, run2, this.annotations, checks, void 0, this.context, encodingChecks, encodingRun);
|
|
20896
21100
|
}
|
|
20897
21101
|
/** @internal */
|
|
20898
21102
|
recur(recur3) {
|
|
20899
|
-
return this._rebuild(recur3, this.checks, this.encodingChecks);
|
|
21103
|
+
return this._rebuild(recur3, this.checks, this.encodingChecks, this.run, this.encodingRun);
|
|
20900
21104
|
}
|
|
20901
21105
|
/** @internal */
|
|
20902
21106
|
flip(recur3) {
|
|
20903
|
-
return this._rebuild(recur3, this.encodingChecks, this.checks);
|
|
21107
|
+
return this._rebuild(recur3, this.encodingChecks, this.checks, this.encodingRun ?? this.run, this.run);
|
|
20904
21108
|
}
|
|
20905
21109
|
/** @internal */
|
|
20906
21110
|
getExpected() {
|
|
@@ -21207,7 +21411,7 @@ var Number5 = class extends Base2 {
|
|
|
21207
21411
|
if (this.checks && (hasCheck(this.checks, "effect/schema/isFinite") || hasCheck(this.checks, "effect/schema/isInt"))) {
|
|
21208
21412
|
return this;
|
|
21209
21413
|
}
|
|
21210
|
-
return replaceEncoding(this, [numberToJson
|
|
21414
|
+
return replaceEncoding(this, [numberToJson]);
|
|
21211
21415
|
}
|
|
21212
21416
|
/** @internal */
|
|
21213
21417
|
toCodecStringTree() {
|
|
@@ -21224,10 +21428,6 @@ var Number5 = class extends Base2 {
|
|
|
21224
21428
|
function hasCheck(checks, id2) {
|
|
21225
21429
|
return checks.some((check3) => check3.annotations?.representation?.id === id2 || check3._tag === "FilterGroup" && hasCheck(check3.checks, id2));
|
|
21226
21430
|
}
|
|
21227
|
-
function numberToJson(checks) {
|
|
21228
|
-
const encodedFinite = !checks ? finite : appendChecks(finite, checks);
|
|
21229
|
-
return new Link(new Union([encodedFinite, nonFiniteLiterals], "anyOf"), new Transformation(Number4(), transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
|
|
21230
|
-
}
|
|
21231
21431
|
var number2 = /* @__PURE__ */ new Number5();
|
|
21232
21432
|
var Boolean3 = class extends Base2 {
|
|
21233
21433
|
_tag = "Boolean";
|
|
@@ -21571,13 +21771,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
21571
21771
|
onItem: (s, [key, index2]) => parseIndex(s, key, index2),
|
|
21572
21772
|
step: (_s, _, exit3) => exit3._tag === "Failure" ? exit3 : void 0
|
|
21573
21773
|
}) : void 0;
|
|
21574
|
-
|
|
21575
|
-
if (input === missing) {
|
|
21576
|
-
return missing;
|
|
21577
|
-
}
|
|
21578
|
-
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
21579
|
-
return yield* fail6(new InvalidType(ast, input, options));
|
|
21580
|
-
}
|
|
21774
|
+
const compileMembers = () => {
|
|
21581
21775
|
if (!properties) {
|
|
21582
21776
|
properties = ast.propertySignatures.map((ps) => ({
|
|
21583
21777
|
parser: compileConstructorDefault2(ps.type),
|
|
@@ -21590,6 +21784,16 @@ var Objects = class _Objects extends Base2 {
|
|
|
21590
21784
|
parserValue: compileConstructorDefault2(is5.type)
|
|
21591
21785
|
})) : void 0;
|
|
21592
21786
|
}
|
|
21787
|
+
return properties;
|
|
21788
|
+
};
|
|
21789
|
+
const fallback = fnUntracedEager2(function* (input, options) {
|
|
21790
|
+
if (input === missing) {
|
|
21791
|
+
return missing;
|
|
21792
|
+
}
|
|
21793
|
+
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
21794
|
+
return yield* fail6(new InvalidType(ast, input, options));
|
|
21795
|
+
}
|
|
21796
|
+
compileMembers();
|
|
21593
21797
|
const record4 = input;
|
|
21594
21798
|
const out = {};
|
|
21595
21799
|
const state = {
|
|
@@ -21671,6 +21875,57 @@ var Objects = class _Objects extends Base2 {
|
|
|
21671
21875
|
}
|
|
21672
21876
|
return out;
|
|
21673
21877
|
});
|
|
21878
|
+
if (indexCount) return fallback;
|
|
21879
|
+
const resume = (state, index2, pending) => {
|
|
21880
|
+
const property = properties[index2];
|
|
21881
|
+
return flatMap5(exit2(pending), (exit3) => {
|
|
21882
|
+
const terminal = stepProperty(state, property, exit3);
|
|
21883
|
+
if (terminal) return terminal;
|
|
21884
|
+
const done4 = () => succeed7(state.out);
|
|
21885
|
+
const eff = parseProperties(state, properties.slice(index2 + 1));
|
|
21886
|
+
return eff ? flatMapEager2(eff, done4) : done4();
|
|
21887
|
+
});
|
|
21888
|
+
};
|
|
21889
|
+
return (input, options) => {
|
|
21890
|
+
if (input === missing) return missingExit;
|
|
21891
|
+
if (options.errors === "all" || options.onExcessProperty !== void 0 || options.propertyOrder === "original" || options.concurrency !== void 0) {
|
|
21892
|
+
return fallback(input, options);
|
|
21893
|
+
}
|
|
21894
|
+
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
21895
|
+
return fail6(new InvalidType(ast, input, options));
|
|
21896
|
+
}
|
|
21897
|
+
const props = compileMembers();
|
|
21898
|
+
const record4 = input;
|
|
21899
|
+
const out = {};
|
|
21900
|
+
const state = {
|
|
21901
|
+
ast,
|
|
21902
|
+
input: record4,
|
|
21903
|
+
out,
|
|
21904
|
+
issues: void 0,
|
|
21905
|
+
options
|
|
21906
|
+
};
|
|
21907
|
+
try {
|
|
21908
|
+
for (let index2 = 0; index2 < props.length; index2++) {
|
|
21909
|
+
const property = props[index2];
|
|
21910
|
+
const name = property.name;
|
|
21911
|
+
const hasKey = Object.hasOwn(record4, name);
|
|
21912
|
+
const value5 = hasKey ? record4[name] : missing;
|
|
21913
|
+
const exit3 = property.parser(value5, options);
|
|
21914
|
+
if (!effectIsExit(exit3)) {
|
|
21915
|
+
return resume(state, index2, exit3);
|
|
21916
|
+
}
|
|
21917
|
+
if (exit3 === sameExit) {
|
|
21918
|
+
if (hasKey) assignProperty(out, name, value5);
|
|
21919
|
+
continue;
|
|
21920
|
+
}
|
|
21921
|
+
const terminal = stepProperty(state, property, exit3);
|
|
21922
|
+
if (terminal) return terminal;
|
|
21923
|
+
}
|
|
21924
|
+
} catch (error3) {
|
|
21925
|
+
return die4(error3);
|
|
21926
|
+
}
|
|
21927
|
+
return succeed7(out);
|
|
21928
|
+
};
|
|
21674
21929
|
}
|
|
21675
21930
|
_rebuild(recur3, recurParameter, checks, encodingChecks) {
|
|
21676
21931
|
const props = mapOrSame(this.propertySignatures, (ps) => {
|
|
@@ -21698,6 +21953,28 @@ var Objects = class _Objects extends Base2 {
|
|
|
21698
21953
|
return "object";
|
|
21699
21954
|
}
|
|
21700
21955
|
};
|
|
21956
|
+
function stepProperty(s, p, exit3) {
|
|
21957
|
+
if (exit3._tag === "Failure") {
|
|
21958
|
+
return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
|
|
21959
|
+
}
|
|
21960
|
+
if (exit3 === sameExit) return;
|
|
21961
|
+
const value5 = exit3[args];
|
|
21962
|
+
if (value5 !== missing) {
|
|
21963
|
+
assignProperty(s.out, p.name, value5);
|
|
21964
|
+
return;
|
|
21965
|
+
}
|
|
21966
|
+
delete s.out[p.name];
|
|
21967
|
+
if (!isOptional(p.type)) {
|
|
21968
|
+
const issue2 = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
|
|
21969
|
+
if (s.options.errors === "all") {
|
|
21970
|
+
if (s.issues) s.issues.push(issue2);
|
|
21971
|
+
else s.issues = [issue2];
|
|
21972
|
+
return;
|
|
21973
|
+
} else {
|
|
21974
|
+
return fail4(new Composite(s.ast, [issue2], s.input, s.options));
|
|
21975
|
+
}
|
|
21976
|
+
}
|
|
21977
|
+
}
|
|
21701
21978
|
var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
21702
21979
|
onItem(s, p) {
|
|
21703
21980
|
if (!Object.hasOwn(s.input, p.name)) {
|
|
@@ -21707,28 +21984,7 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
|
21707
21984
|
assignProperty(s.out, p.name, value5);
|
|
21708
21985
|
return p.parser(value5, s.options);
|
|
21709
21986
|
},
|
|
21710
|
-
step
|
|
21711
|
-
if (exit3._tag === "Failure") {
|
|
21712
|
-
return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
|
|
21713
|
-
}
|
|
21714
|
-
if (exit3 === sameExit) return;
|
|
21715
|
-
const value5 = exit3[args];
|
|
21716
|
-
if (value5 !== missing) {
|
|
21717
|
-
assignProperty(s.out, p.name, value5);
|
|
21718
|
-
return;
|
|
21719
|
-
}
|
|
21720
|
-
delete s.out[p.name];
|
|
21721
|
-
if (!isOptional(p.type)) {
|
|
21722
|
-
const issue2 = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
|
|
21723
|
-
if (s.options.errors === "all") {
|
|
21724
|
-
if (s.issues) s.issues.push(issue2);
|
|
21725
|
-
else s.issues = [issue2];
|
|
21726
|
-
return;
|
|
21727
|
-
} else {
|
|
21728
|
-
return fail4(new Composite(s.ast, [issue2], s.input, s.options));
|
|
21729
|
-
}
|
|
21730
|
-
}
|
|
21731
|
-
}
|
|
21987
|
+
step: stepProperty
|
|
21732
21988
|
});
|
|
21733
21989
|
function combineChecks(a, b) {
|
|
21734
21990
|
if (!a) return b;
|
|
@@ -22252,6 +22508,7 @@ function isFinite2(annotations) {
|
|
|
22252
22508
|
});
|
|
22253
22509
|
}
|
|
22254
22510
|
var finite = /* @__PURE__ */ appendChecks(number2, [/* @__PURE__ */ isFinite2()]);
|
|
22511
|
+
var numberToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([finite, nonFiniteLiterals], "anyOf"), /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number4(), /* @__PURE__ */ transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
|
|
22255
22512
|
function isPattern(regExp, annotations) {
|
|
22256
22513
|
const source = regExp.source;
|
|
22257
22514
|
const pattern = new globalThis.RegExp(source, regExp.flags);
|
|
@@ -22354,6 +22611,12 @@ function applyToLastLink(f) {
|
|
|
22354
22611
|
function replaceContextLastLink(ast, context3) {
|
|
22355
22612
|
return applyToLastLink((ast2) => replaceContext(ast2, context3))(ast);
|
|
22356
22613
|
}
|
|
22614
|
+
function applyToSelfOrLastLinkEncoding(f) {
|
|
22615
|
+
function out(ast) {
|
|
22616
|
+
return ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, out)) : f(ast);
|
|
22617
|
+
}
|
|
22618
|
+
return memoize(out);
|
|
22619
|
+
}
|
|
22357
22620
|
function applyToSelfOrLastLinkEncodingIdempotent(f, options) {
|
|
22358
22621
|
function out(ast) {
|
|
22359
22622
|
if (ast.encoding) {
|
|
@@ -22726,6 +22989,11 @@ function getConstructorDescriptor(ast) {
|
|
|
22726
22989
|
const getDescriptor = ast.annotations?.[CONSTRUCTOR_ANNOTATION_KEY];
|
|
22727
22990
|
return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
|
|
22728
22991
|
}
|
|
22992
|
+
var resolve2 = resolve;
|
|
22993
|
+
var resolveAt2 = resolveAt;
|
|
22994
|
+
var resolveIdentifier2 = resolveIdentifier;
|
|
22995
|
+
var resolveTitle2 = resolveTitle;
|
|
22996
|
+
var resolveDescription2 = resolveDescription;
|
|
22729
22997
|
function isJsonLeaf(u) {
|
|
22730
22998
|
return u === null || typeof u === "string" || typeof u === "boolean" || typeof u === "number" && globalThis.Number.isFinite(u);
|
|
22731
22999
|
}
|
|
@@ -22810,7 +23078,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options)
|
|
|
22810
23078
|
});
|
|
22811
23079
|
var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
|
|
22812
23080
|
|
|
22813
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23081
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Chunk.js
|
|
22814
23082
|
var TypeId18 = "~effect/collections/Chunk";
|
|
22815
23083
|
function copy2(src, srcPos, dest, destPos, len) {
|
|
22816
23084
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
|
|
@@ -22994,7 +23262,7 @@ var getUnsafe3 = /* @__PURE__ */ dual(2, (self, index2) => {
|
|
|
22994
23262
|
});
|
|
22995
23263
|
var size = (self) => self.length;
|
|
22996
23264
|
|
|
22997
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23265
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Fiber.js
|
|
22998
23266
|
var Fiber_exports = {};
|
|
22999
23267
|
__export(Fiber_exports, {
|
|
23000
23268
|
await: () => await_,
|
|
@@ -23021,7 +23289,7 @@ var isFiber = (u) => hasProperty(u, FiberTypeId);
|
|
|
23021
23289
|
var getCurrent = getCurrentFiber;
|
|
23022
23290
|
var runIn = fiberRunIn;
|
|
23023
23291
|
|
|
23024
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23292
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/MutableRef.js
|
|
23025
23293
|
var TypeId19 = "~effect/MutableRef";
|
|
23026
23294
|
var MutableRefProto = {
|
|
23027
23295
|
[TypeId19]: TypeId19,
|
|
@@ -23043,7 +23311,7 @@ var set = /* @__PURE__ */ dual(2, (self, value5) => {
|
|
|
23043
23311
|
return self;
|
|
23044
23312
|
});
|
|
23045
23313
|
|
|
23046
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23314
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schema.js
|
|
23047
23315
|
var Schema_exports = {};
|
|
23048
23316
|
__export(Schema_exports, {
|
|
23049
23317
|
Any: () => Any2,
|
|
@@ -23094,12 +23362,15 @@ __export(Schema_exports, {
|
|
|
23094
23362
|
FiniteFromString: () => FiniteFromString,
|
|
23095
23363
|
FormData: () => FormData2,
|
|
23096
23364
|
FormDataReviver: () => FormDataReviver,
|
|
23365
|
+
Graph: () => Graph,
|
|
23366
|
+
GraphReviver: () => GraphReviver,
|
|
23097
23367
|
HashMap: () => HashMap,
|
|
23098
23368
|
HashMapReviver: () => HashMapReviver,
|
|
23099
23369
|
HashSet: () => HashSet,
|
|
23100
23370
|
HashSetReviver: () => HashSetReviver,
|
|
23101
23371
|
Int: () => Int,
|
|
23102
23372
|
Json: () => Json2,
|
|
23373
|
+
JsonObject: () => JsonObject,
|
|
23103
23374
|
JsonReviver: () => JsonReviver,
|
|
23104
23375
|
Literal: () => Literal2,
|
|
23105
23376
|
Literals: () => Literals,
|
|
@@ -23337,7 +23608,7 @@ __export(Schema_exports, {
|
|
|
23337
23608
|
isUppercased: () => isUppercased,
|
|
23338
23609
|
isUppercasedReviver: () => isUppercasedReviver,
|
|
23339
23610
|
link: () => link,
|
|
23340
|
-
make: () =>
|
|
23611
|
+
make: () => make25,
|
|
23341
23612
|
makeFilter: () => makeFilter2,
|
|
23342
23613
|
makeFilterGroup: () => makeFilterGroup,
|
|
23343
23614
|
makeIsBetween: () => makeIsBetween,
|
|
@@ -23393,7 +23664,157 @@ __export(Schema_exports, {
|
|
|
23393
23664
|
withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
|
|
23394
23665
|
});
|
|
23395
23666
|
|
|
23396
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23667
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/graph.js
|
|
23668
|
+
var TypeId20 = "~effect/collections/Graph";
|
|
23669
|
+
var toImpl = (graph) => graph;
|
|
23670
|
+
var edgeEquals = (type3, self, that) => (type3 === "directed" ? self.source === that.source && self.target === that.target : self.source === that.source && self.target === that.target || self.source === that.target && self.target === that.source) && equals(self.data, that.data);
|
|
23671
|
+
var edgeHash = (type3, edge) => type3 === "directed" ? hash(edge) : optimize(hash(edge.data) ^ hash(edge.source) + hash(edge.target));
|
|
23672
|
+
var ProtoGraph = {
|
|
23673
|
+
[TypeId20]: {
|
|
23674
|
+
_N: (_) => _,
|
|
23675
|
+
_E: (_) => _
|
|
23676
|
+
},
|
|
23677
|
+
[Symbol.iterator]() {
|
|
23678
|
+
return this.nodes[Symbol.iterator]();
|
|
23679
|
+
},
|
|
23680
|
+
[NodeInspectSymbol]() {
|
|
23681
|
+
return this.toJSON();
|
|
23682
|
+
},
|
|
23683
|
+
[symbol2](that) {
|
|
23684
|
+
if (hasProperty(that, TypeId20)) {
|
|
23685
|
+
const thatImpl = toImpl(that);
|
|
23686
|
+
if (this.nodes.size !== thatImpl.nodes.size || this.edges.size !== thatImpl.edges.size || this.type !== thatImpl.type) {
|
|
23687
|
+
return false;
|
|
23688
|
+
}
|
|
23689
|
+
for (const [nodeIndex, nodeData] of this.nodes) {
|
|
23690
|
+
if (!thatImpl.nodes.has(nodeIndex) || !equals(nodeData, thatImpl.nodes.get(nodeIndex))) {
|
|
23691
|
+
return false;
|
|
23692
|
+
}
|
|
23693
|
+
}
|
|
23694
|
+
for (const [edgeIndex, edgeData] of this.edges) {
|
|
23695
|
+
const otherEdge = thatImpl.edges.get(edgeIndex);
|
|
23696
|
+
if (otherEdge === void 0 || !edgeEquals(this.type, edgeData, otherEdge)) {
|
|
23697
|
+
return false;
|
|
23698
|
+
}
|
|
23699
|
+
}
|
|
23700
|
+
return true;
|
|
23701
|
+
}
|
|
23702
|
+
return false;
|
|
23703
|
+
},
|
|
23704
|
+
[symbol]() {
|
|
23705
|
+
let hash3 = string("Graph");
|
|
23706
|
+
hash3 = hash3 ^ string(this.type);
|
|
23707
|
+
hash3 = hash3 ^ number(this.nodes.size);
|
|
23708
|
+
hash3 = hash3 ^ number(this.edges.size);
|
|
23709
|
+
for (const [nodeIndex, nodeData] of this.nodes) {
|
|
23710
|
+
hash3 = hash3 ^ hash(nodeIndex) + hash(nodeData);
|
|
23711
|
+
}
|
|
23712
|
+
for (const [edgeIndex, edgeData] of this.edges) {
|
|
23713
|
+
hash3 = hash3 ^ hash(edgeIndex) + edgeHash(this.type, edgeData);
|
|
23714
|
+
}
|
|
23715
|
+
return hash3;
|
|
23716
|
+
},
|
|
23717
|
+
toJSON() {
|
|
23718
|
+
return {
|
|
23719
|
+
_id: "Graph",
|
|
23720
|
+
nodeCount: this.nodes.size,
|
|
23721
|
+
edgeCount: this.edges.size,
|
|
23722
|
+
type: this.type
|
|
23723
|
+
};
|
|
23724
|
+
},
|
|
23725
|
+
toString() {
|
|
23726
|
+
return `Graph(${this.type}, ${this.nodes.size}, ${this.edges.size})`;
|
|
23727
|
+
},
|
|
23728
|
+
pipe() {
|
|
23729
|
+
return pipeArguments(this, arguments);
|
|
23730
|
+
}
|
|
23731
|
+
};
|
|
23732
|
+
var make17 = (type3, mutable2) => {
|
|
23733
|
+
const graph = Object.create(ProtoGraph);
|
|
23734
|
+
graph.type = type3;
|
|
23735
|
+
graph.mutable = mutable2;
|
|
23736
|
+
graph.transforming = false;
|
|
23737
|
+
graph.nodes = /* @__PURE__ */ new Map();
|
|
23738
|
+
graph.edges = /* @__PURE__ */ new Map();
|
|
23739
|
+
graph.adjacency = /* @__PURE__ */ new Map();
|
|
23740
|
+
graph.reverseAdjacency = /* @__PURE__ */ new Map();
|
|
23741
|
+
graph.nextNodeIndex = 0;
|
|
23742
|
+
graph.nextEdgeIndex = 0;
|
|
23743
|
+
graph.acyclic = some2(true);
|
|
23744
|
+
return graph;
|
|
23745
|
+
};
|
|
23746
|
+
var snapshot = (graph) => {
|
|
23747
|
+
const impl = toImpl(graph);
|
|
23748
|
+
return {
|
|
23749
|
+
type: graph.type,
|
|
23750
|
+
nodes: Array.from(impl.nodes, ([index2, data]) => ({
|
|
23751
|
+
index: index2,
|
|
23752
|
+
data
|
|
23753
|
+
})).sort((a, b) => a.index - b.index),
|
|
23754
|
+
edges: Array.from(impl.edges, ([index2, edge]) => ({
|
|
23755
|
+
index: index2,
|
|
23756
|
+
source: edge.source,
|
|
23757
|
+
target: edge.target,
|
|
23758
|
+
data: edge.data
|
|
23759
|
+
})).sort((a, b) => a.index - b.index)
|
|
23760
|
+
};
|
|
23761
|
+
};
|
|
23762
|
+
var hydrate = (snapshot2) => {
|
|
23763
|
+
const graph = make17(snapshot2.type, false);
|
|
23764
|
+
for (const node of snapshot2.nodes) {
|
|
23765
|
+
graph.nodes.set(node.index, node.data);
|
|
23766
|
+
graph.adjacency.set(node.index, []);
|
|
23767
|
+
graph.reverseAdjacency.set(node.index, []);
|
|
23768
|
+
}
|
|
23769
|
+
for (const edge of snapshot2.edges) {
|
|
23770
|
+
graph.edges.set(edge.index, {
|
|
23771
|
+
source: edge.source,
|
|
23772
|
+
target: edge.target,
|
|
23773
|
+
data: edge.data
|
|
23774
|
+
});
|
|
23775
|
+
graph.adjacency.get(edge.source).push(edge.index);
|
|
23776
|
+
graph.reverseAdjacency.get(edge.target).push(edge.index);
|
|
23777
|
+
if (snapshot2.type === "undirected") {
|
|
23778
|
+
graph.adjacency.get(edge.target).push(edge.index);
|
|
23779
|
+
graph.reverseAdjacency.get(edge.source).push(edge.index);
|
|
23780
|
+
}
|
|
23781
|
+
}
|
|
23782
|
+
graph.nextNodeIndex = snapshot2.nodes.length === 0 ? 0 : snapshot2.nodes[snapshot2.nodes.length - 1].index + 1;
|
|
23783
|
+
graph.nextEdgeIndex = snapshot2.edges.length === 0 ? 0 : snapshot2.edges[snapshot2.edges.length - 1].index + 1;
|
|
23784
|
+
graph.acyclic = none2();
|
|
23785
|
+
return graph;
|
|
23786
|
+
};
|
|
23787
|
+
|
|
23788
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Graph.js
|
|
23789
|
+
var TypeId21 = TypeId20;
|
|
23790
|
+
var isGraph = (u) => hasProperty(u, TypeId21);
|
|
23791
|
+
var EdgeIdentity = class _EdgeIdentity {
|
|
23792
|
+
type;
|
|
23793
|
+
source;
|
|
23794
|
+
target;
|
|
23795
|
+
identity;
|
|
23796
|
+
constructor(type3, source, target, identity2) {
|
|
23797
|
+
this.type = type3;
|
|
23798
|
+
this.source = source;
|
|
23799
|
+
this.target = target;
|
|
23800
|
+
this.identity = identity2;
|
|
23801
|
+
}
|
|
23802
|
+
[symbol2](that) {
|
|
23803
|
+
if (!(that instanceof _EdgeIdentity) || this.type !== that.type || !equals(this.identity, that.identity)) {
|
|
23804
|
+
return false;
|
|
23805
|
+
}
|
|
23806
|
+
if (this.type === "directed") {
|
|
23807
|
+
return equals(this.source, that.source) && equals(this.target, that.target);
|
|
23808
|
+
}
|
|
23809
|
+
return equals(this.source, that.source) && equals(this.target, that.target) || equals(this.source, that.target) && equals(this.target, that.source);
|
|
23810
|
+
}
|
|
23811
|
+
[symbol]() {
|
|
23812
|
+
const hash3 = hash(this.identity);
|
|
23813
|
+
return this.type === "directed" ? combine(hash(this.target))(combine(hash(this.source))(hash3)) : optimize(hash3 ^ hash(this.source) + hash(this.target));
|
|
23814
|
+
}
|
|
23815
|
+
};
|
|
23816
|
+
|
|
23817
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashMap.js
|
|
23397
23818
|
var HashMap_exports = {};
|
|
23398
23819
|
__export(HashMap_exports, {
|
|
23399
23820
|
beginMutation: () => beginMutation2,
|
|
@@ -23417,7 +23838,7 @@ __export(HashMap_exports, {
|
|
|
23417
23838
|
isEmpty: () => isEmpty2,
|
|
23418
23839
|
isHashMap: () => isHashMap2,
|
|
23419
23840
|
keys: () => keys3,
|
|
23420
|
-
make: () =>
|
|
23841
|
+
make: () => make19,
|
|
23421
23842
|
map: () => map11,
|
|
23422
23843
|
modify: () => modify3,
|
|
23423
23844
|
modifyAt: () => modifyAt2,
|
|
@@ -23436,7 +23857,7 @@ __export(HashMap_exports, {
|
|
|
23436
23857
|
values: () => values2
|
|
23437
23858
|
});
|
|
23438
23859
|
|
|
23439
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
23860
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/hashMap.js
|
|
23440
23861
|
var HashMapTypeId = "~effect/collections/HashMap";
|
|
23441
23862
|
var SHIFT = 5;
|
|
23442
23863
|
var BUCKET_SIZE = 1 << SHIFT;
|
|
@@ -23998,7 +24419,7 @@ var HashMapImpl = class {
|
|
|
23998
24419
|
var emptyNode = /* @__PURE__ */ new EmptyNode();
|
|
23999
24420
|
var isHashMap = (u) => hasProperty(u, HashMapTypeId);
|
|
24000
24421
|
var empty5 = () => new HashMapImpl(false, 0, emptyNode, 0);
|
|
24001
|
-
var
|
|
24422
|
+
var make18 = (...entries3) => fromIterable4(entries3);
|
|
24002
24423
|
var fromIterable4 = (entries3) => {
|
|
24003
24424
|
let root = emptyNode;
|
|
24004
24425
|
let size6 = 0;
|
|
@@ -24279,10 +24700,10 @@ var every2 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
24279
24700
|
return true;
|
|
24280
24701
|
});
|
|
24281
24702
|
|
|
24282
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
24703
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashMap.js
|
|
24283
24704
|
var isHashMap2 = isHashMap;
|
|
24284
24705
|
var empty6 = empty5;
|
|
24285
|
-
var
|
|
24706
|
+
var make19 = make18;
|
|
24286
24707
|
var fromIterable5 = fromIterable4;
|
|
24287
24708
|
var isEmpty2 = isEmpty;
|
|
24288
24709
|
var get4 = get3;
|
|
@@ -24319,7 +24740,7 @@ var findFirst6 = findFirst5;
|
|
|
24319
24740
|
var some5 = some4;
|
|
24320
24741
|
var every3 = every2;
|
|
24321
24742
|
|
|
24322
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
24743
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/hashSet.js
|
|
24323
24744
|
var HashSetTypeId = "~effect/collections/HashSet";
|
|
24324
24745
|
var HashSetProto = {
|
|
24325
24746
|
[symbol]() {
|
|
@@ -24373,12 +24794,12 @@ var every4 = (self, predicate) => {
|
|
|
24373
24794
|
return true;
|
|
24374
24795
|
};
|
|
24375
24796
|
|
|
24376
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
24797
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/HashSet.js
|
|
24377
24798
|
var fromIterable7 = fromIterable6;
|
|
24378
24799
|
var isHashSet2 = isHashSet;
|
|
24379
24800
|
var size5 = size4;
|
|
24380
24801
|
|
|
24381
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
24802
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaParser.js
|
|
24382
24803
|
function makeEffect(schema) {
|
|
24383
24804
|
const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
|
|
24384
24805
|
return (input, options) => {
|
|
@@ -24401,7 +24822,7 @@ function makeOption(schema) {
|
|
|
24401
24822
|
return none2();
|
|
24402
24823
|
};
|
|
24403
24824
|
}
|
|
24404
|
-
function
|
|
24825
|
+
function make21(schema) {
|
|
24405
24826
|
const parser = makeEffect(schema);
|
|
24406
24827
|
return (input, options) => {
|
|
24407
24828
|
const exit3 = runSyncExit2(parser(input, options));
|
|
@@ -24676,8 +25097,8 @@ function makeParser(ast, compile, compileConstructorDefault2, constructorDefault
|
|
|
24676
25097
|
};
|
|
24677
25098
|
}
|
|
24678
25099
|
|
|
24679
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
24680
|
-
var
|
|
25100
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/schema.js
|
|
25101
|
+
var TypeId22 = "~effect/Schema/Schema";
|
|
24681
25102
|
function makeDeclarationReviver(id2, payloadSchema, revive) {
|
|
24682
25103
|
return {
|
|
24683
25104
|
id: id2,
|
|
@@ -24693,7 +25114,7 @@ function makeFilterReviver(id2, payloadSchema, revive) {
|
|
|
24693
25114
|
};
|
|
24694
25115
|
}
|
|
24695
25116
|
var SchemaProto = {
|
|
24696
|
-
[
|
|
25117
|
+
[TypeId22]: TypeId22,
|
|
24697
25118
|
pipe() {
|
|
24698
25119
|
return pipeArguments(this, arguments);
|
|
24699
25120
|
},
|
|
@@ -24707,21 +25128,21 @@ var SchemaProto = {
|
|
|
24707
25128
|
return this.rebuild(appendChecks(this.ast, checks));
|
|
24708
25129
|
}
|
|
24709
25130
|
};
|
|
24710
|
-
function
|
|
25131
|
+
function make22(ast, options) {
|
|
24711
25132
|
function Schema() {
|
|
24712
25133
|
}
|
|
24713
25134
|
const self = Object.defineProperties(Object.setPrototypeOf(Schema, SchemaProto), Object.getOwnPropertyDescriptors({
|
|
24714
25135
|
...options
|
|
24715
25136
|
}));
|
|
24716
25137
|
self.ast = ast;
|
|
24717
|
-
self.rebuild = (ast2) =>
|
|
25138
|
+
self.rebuild = (ast2) => make22(ast2, options);
|
|
24718
25139
|
self.makeEffect = makeEffect(self);
|
|
24719
|
-
self.make =
|
|
25140
|
+
self.make = make21(self);
|
|
24720
25141
|
self.makeOption = makeOption(self);
|
|
24721
25142
|
return self;
|
|
24722
25143
|
}
|
|
24723
25144
|
|
|
24724
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25145
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Struct.js
|
|
24725
25146
|
var pick = /* @__PURE__ */ dual(2, (self, keys4) => {
|
|
24726
25147
|
return buildStruct(self, (k, v) => keys4.includes(k) ? [k, v] : void 0);
|
|
24727
25148
|
});
|
|
@@ -24764,7 +25185,7 @@ function makeCombiner(combiners, options) {
|
|
|
24764
25185
|
});
|
|
24765
25186
|
}
|
|
24766
25187
|
|
|
24767
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25188
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/UndefinedOr.js
|
|
24768
25189
|
function makeReducer2(combiner2) {
|
|
24769
25190
|
return make((self, that) => {
|
|
24770
25191
|
if (self === void 0) return that;
|
|
@@ -24773,7 +25194,7 @@ function makeReducer2(combiner2) {
|
|
|
24773
25194
|
}, void 0);
|
|
24774
25195
|
}
|
|
24775
25196
|
|
|
24776
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25197
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/errors.js
|
|
24777
25198
|
function errorWithPath(message, path) {
|
|
24778
25199
|
if (path.length > 0) {
|
|
24779
25200
|
message += `
|
|
@@ -24782,7 +25203,7 @@ function errorWithPath(message, path) {
|
|
|
24782
25203
|
return new Error(message);
|
|
24783
25204
|
}
|
|
24784
25205
|
|
|
24785
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25206
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toArbitrary.js
|
|
24786
25207
|
var arbitraryMemoMap = /* @__PURE__ */ new WeakMap();
|
|
24787
25208
|
var suspendDepthIdentifierMap = /* @__PURE__ */ new WeakMap();
|
|
24788
25209
|
var emptyRecursionStack = [];
|
|
@@ -25224,10 +25645,10 @@ function base(ast, path) {
|
|
|
25224
25645
|
}
|
|
25225
25646
|
let out = fc.tuple(...elementArbitraries).map(getSomes);
|
|
25226
25647
|
if (isReadonlyArrayNonEmpty(rest)) {
|
|
25227
|
-
const [
|
|
25648
|
+
const [head4, ...tail2] = rest;
|
|
25228
25649
|
const restCtx = ast.elements.length === 0 ? ctx : reset;
|
|
25229
25650
|
const minRestLength = Math.max(0, minLength - length2 - tail2.length);
|
|
25230
|
-
const headArbitrary = minRestLength === 0 ? void 0 :
|
|
25651
|
+
const headArbitrary = minRestLength === 0 ? void 0 : head4.arbitrary.terminal(fc, reset, recursionStack);
|
|
25231
25652
|
if (minRestLength > 0 && headArbitrary === void 0) {
|
|
25232
25653
|
return void 0;
|
|
25233
25654
|
}
|
|
@@ -25265,10 +25686,10 @@ function base(ast, path) {
|
|
|
25265
25686
|
});
|
|
25266
25687
|
let out = fc.tuple(...elementArbitraries).map((elements2) => getSomes(takeWhile(elements2, isSome2)));
|
|
25267
25688
|
if (isReadonlyArrayNonEmpty(rest)) {
|
|
25268
|
-
const [
|
|
25689
|
+
const [head4, ...tail2] = rest.map(({
|
|
25269
25690
|
arbitrary
|
|
25270
25691
|
}) => arbitrary(fc, reset, recursionStack));
|
|
25271
|
-
const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset,
|
|
25692
|
+
const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset, head4);
|
|
25272
25693
|
out = appendArray(fc, out, len, restArbitrary);
|
|
25273
25694
|
if (tail2.length > 0) {
|
|
25274
25695
|
const t = fc.tuple(...tail2);
|
|
@@ -25444,7 +25865,7 @@ function base(ast, path) {
|
|
|
25444
25865
|
}
|
|
25445
25866
|
}
|
|
25446
25867
|
|
|
25447
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25868
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toEquivalence.js
|
|
25448
25869
|
var toEquivalence = /* @__PURE__ */ memoize((ast) => {
|
|
25449
25870
|
return recur2(ast, []);
|
|
25450
25871
|
});
|
|
@@ -25492,9 +25913,9 @@ function recur2(ast, path) {
|
|
|
25492
25913
|
}
|
|
25493
25914
|
}
|
|
25494
25915
|
if (rest.length > 0) {
|
|
25495
|
-
const [
|
|
25916
|
+
const [head4, ...tail2] = rest;
|
|
25496
25917
|
for (; i < len2 - tail2.length; i++) {
|
|
25497
|
-
if (!
|
|
25918
|
+
if (!head4(a[i], b[i])) {
|
|
25498
25919
|
return false;
|
|
25499
25920
|
}
|
|
25500
25921
|
}
|
|
@@ -25567,7 +25988,7 @@ function recur2(ast, path) {
|
|
|
25567
25988
|
}
|
|
25568
25989
|
}
|
|
25569
25990
|
|
|
25570
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25991
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonPointer.js
|
|
25571
25992
|
function escapeToken(token) {
|
|
25572
25993
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
25573
25994
|
}
|
|
@@ -25575,73 +25996,23 @@ function unescapeToken(token) {
|
|
|
25575
25996
|
return token.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
25576
25997
|
}
|
|
25577
25998
|
|
|
25578
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
25579
|
-
var
|
|
25580
|
-
var
|
|
25581
|
-
|
|
25582
|
-
|
|
25583
|
-
|
|
25584
|
-
var ARRAY_SUBSCHEMA_KEYWORDS = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf"]);
|
|
25999
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonSchema.js
|
|
26000
|
+
var META_SCHEMA_URI_DRAFT_07 = "http://json-schema.org/draft-07/schema#";
|
|
26001
|
+
var META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
26002
|
+
function isMetaSchemaUri(value5, uri) {
|
|
26003
|
+
return value5 === uri || value5 === (uri.endsWith("#") ? uri.slice(0, -1) : `${uri}#`);
|
|
26004
|
+
}
|
|
25585
26005
|
function toDocumentDraft07(document) {
|
|
25586
26006
|
return {
|
|
25587
26007
|
dialect: "draft-07",
|
|
25588
|
-
|
|
25589
|
-
definitions: map3(document.definitions, toSchemaDraft07)
|
|
26008
|
+
...convertDocument(document, draft07Adapter)
|
|
25590
26009
|
};
|
|
25591
26010
|
}
|
|
25592
|
-
function toSchemaDraft07(schema) {
|
|
25593
|
-
return transformSchema(schema, (src) => {
|
|
25594
|
-
rewriteSchemaRef(src, (ref) => ref.replace(RE_DEFS, "#/definitions"));
|
|
25595
|
-
const out = {};
|
|
25596
|
-
let prefixItems = void 0;
|
|
25597
|
-
let items = void 0;
|
|
25598
|
-
for (const k of Object.keys(src)) {
|
|
25599
|
-
const v = src[k];
|
|
25600
|
-
if (k === "required" && Array.isArray(v) && v.length === 0) continue;
|
|
25601
|
-
if (DRAFT_07_COPY_KEYWORDS.has(k)) {
|
|
25602
|
-
out[k] = v;
|
|
25603
|
-
continue;
|
|
25604
|
-
}
|
|
25605
|
-
if (MAP_SUBSCHEMA_KEYWORDS.has(k) || ARRAY_SUBSCHEMA_KEYWORDS.has(k) || DRAFT_07_SINGLE_SUBSCHEMA_KEYWORDS.has(k)) {
|
|
25606
|
-
out[k] = v;
|
|
25607
|
-
continue;
|
|
25608
|
-
}
|
|
25609
|
-
switch (k) {
|
|
25610
|
-
// Tuple handling (2020-12 form)
|
|
25611
|
-
case "prefixItems":
|
|
25612
|
-
prefixItems = v;
|
|
25613
|
-
break;
|
|
25614
|
-
case "items":
|
|
25615
|
-
items = v;
|
|
25616
|
-
break;
|
|
25617
|
-
default:
|
|
25618
|
-
break;
|
|
25619
|
-
}
|
|
25620
|
-
}
|
|
25621
|
-
if (prefixItems !== void 0) {
|
|
25622
|
-
if (Array.isArray(prefixItems)) {
|
|
25623
|
-
out.items = prefixItems;
|
|
25624
|
-
if (items !== void 0) out.additionalItems = items;
|
|
25625
|
-
} else {
|
|
25626
|
-
out.items = prefixItems;
|
|
25627
|
-
}
|
|
25628
|
-
} else if (items !== void 0) {
|
|
25629
|
-
out.items = items;
|
|
25630
|
-
}
|
|
25631
|
-
const $ref = out.$ref;
|
|
25632
|
-
if (typeof $ref === "string" && Object.keys(out).length > 1) {
|
|
25633
|
-
delete out.$ref;
|
|
25634
|
-
out.allOf = [{
|
|
25635
|
-
$ref
|
|
25636
|
-
}, ...Array.isArray(out.allOf) ? out.allOf : []];
|
|
25637
|
-
}
|
|
25638
|
-
return out;
|
|
25639
|
-
});
|
|
25640
|
-
}
|
|
25641
26011
|
function transformSchema(node, transform4) {
|
|
25642
|
-
return walk(node);
|
|
25643
|
-
function walk(node2) {
|
|
26012
|
+
return walk(node, false, true);
|
|
26013
|
+
function walk(node2, inheritedResource, isRoot = false) {
|
|
25644
26014
|
if (!isObject(node2)) return node2;
|
|
26015
|
+
const inEmbeddedResource = inheritedResource || !isRoot && createsResource(node2.$id);
|
|
25645
26016
|
const out = {};
|
|
25646
26017
|
for (const key of Object.keys(node2)) {
|
|
25647
26018
|
const value5 = node2[key];
|
|
@@ -25651,13 +26022,13 @@ function transformSchema(node, transform4) {
|
|
|
25651
26022
|
case "properties":
|
|
25652
26023
|
case "patternProperties":
|
|
25653
26024
|
case "dependentSchemas":
|
|
25654
|
-
transformed = mapObject(value5, walk) ?? value5;
|
|
26025
|
+
transformed = mapObject(value5, (value6) => walk(value6, inEmbeddedResource)) ?? value5;
|
|
25655
26026
|
break;
|
|
25656
26027
|
case "allOf":
|
|
25657
26028
|
case "anyOf":
|
|
25658
26029
|
case "oneOf":
|
|
25659
26030
|
case "prefixItems":
|
|
25660
|
-
transformed = Array.isArray(value5) ? value5.map(walk) : value5;
|
|
26031
|
+
transformed = Array.isArray(value5) ? value5.map((value6) => walk(value6, inEmbeddedResource)) : value5;
|
|
25661
26032
|
break;
|
|
25662
26033
|
case "not":
|
|
25663
26034
|
case "additionalProperties":
|
|
@@ -25670,35 +26041,341 @@ function transformSchema(node, transform4) {
|
|
|
25670
26041
|
case "then":
|
|
25671
26042
|
case "else":
|
|
25672
26043
|
case "contentSchema":
|
|
25673
|
-
transformed = walk(value5);
|
|
26044
|
+
transformed = walk(value5, inEmbeddedResource);
|
|
25674
26045
|
}
|
|
25675
26046
|
assignProperty(out, key, transformed);
|
|
25676
26047
|
}
|
|
25677
|
-
|
|
26048
|
+
transform4(out, inEmbeddedResource);
|
|
26049
|
+
return out;
|
|
25678
26050
|
}
|
|
25679
26051
|
}
|
|
25680
26052
|
function rewriteRefs(schema, rewrite) {
|
|
25681
|
-
return transformSchema(schema, (schema2) =>
|
|
26053
|
+
return transformSchema(schema, (schema2) => {
|
|
26054
|
+
rewriteSchemaRef(schema2, rewrite);
|
|
26055
|
+
});
|
|
25682
26056
|
}
|
|
25683
26057
|
function rewriteSchemaRef(schema, rewrite) {
|
|
25684
26058
|
if (typeof schema.$ref === "string") {
|
|
25685
|
-
assignProperty(schema, "$ref", rewrite(schema.$ref));
|
|
26059
|
+
assignProperty(schema, "$ref", rewrite(schema.$ref, "$ref"));
|
|
26060
|
+
}
|
|
26061
|
+
if (typeof schema.$dynamicRef === "string") {
|
|
26062
|
+
assignProperty(schema, "$dynamicRef", rewrite(schema.$dynamicRef, "$dynamicRef"));
|
|
25686
26063
|
}
|
|
25687
|
-
return schema;
|
|
25688
26064
|
}
|
|
25689
26065
|
function mapObject(value5, f) {
|
|
25690
|
-
|
|
26066
|
+
if (!isObject(value5)) return void 0;
|
|
26067
|
+
const out = {};
|
|
26068
|
+
for (const key of Object.keys(value5)) {
|
|
26069
|
+
assignProperty(out, key, f(value5[key], key));
|
|
26070
|
+
}
|
|
26071
|
+
return out;
|
|
26072
|
+
}
|
|
26073
|
+
function runConverter(adapter, options, use) {
|
|
26074
|
+
const locations = /* @__PURE__ */ new Map();
|
|
26075
|
+
const references = [];
|
|
26076
|
+
let rootUri = ROOT_URI;
|
|
26077
|
+
function convert(root, sourcePath = [], targetPath = []) {
|
|
26078
|
+
if (sourcePath.length === 0 && options?.trackIds) {
|
|
26079
|
+
const id2 = isObject(root) ? getResourceId(root) : void 0;
|
|
26080
|
+
rootUri = resolveResourceUri(id2, ROOT_URI) ?? ROOT_URI;
|
|
26081
|
+
}
|
|
26082
|
+
return loop(root, sourcePath, targetPath, {
|
|
26083
|
+
sourceRoot: [],
|
|
26084
|
+
targetRoot: [],
|
|
26085
|
+
uri: rootUri
|
|
26086
|
+
});
|
|
26087
|
+
}
|
|
26088
|
+
function finish() {
|
|
26089
|
+
for (const [out2, value5, sourceResource] of references) {
|
|
26090
|
+
let reference = value5;
|
|
26091
|
+
const resolved = resolveUrl(value5, sourceResource);
|
|
26092
|
+
if (resolved !== void 0) {
|
|
26093
|
+
const sourcePointer = parsePointerFragment(resolved.hash);
|
|
26094
|
+
resolved.hash = "";
|
|
26095
|
+
if (sourcePointer !== void 0) {
|
|
26096
|
+
const targetPath = locations.get(locationKey(resolved.href, sourcePointer));
|
|
26097
|
+
if (targetPath !== void 0) reference = relocateReference(value5, targetPath);
|
|
26098
|
+
}
|
|
26099
|
+
}
|
|
26100
|
+
assignProperty(out2, "$ref", reference);
|
|
26101
|
+
}
|
|
26102
|
+
}
|
|
26103
|
+
const out = use(convert);
|
|
26104
|
+
finish();
|
|
26105
|
+
return out;
|
|
26106
|
+
function loop(node, sourcePath, targetPath, resourceScope) {
|
|
26107
|
+
if (typeof node === "boolean") {
|
|
26108
|
+
recordLocations(sourcePath, targetPath, resourceScope);
|
|
26109
|
+
return options?.booleanAdapter?.(node) ?? node;
|
|
26110
|
+
}
|
|
26111
|
+
if (!isObject(node)) return node;
|
|
26112
|
+
let currentResourceScope = resourceScope;
|
|
26113
|
+
const id2 = getResourceId(node);
|
|
26114
|
+
if (sourcePath.length > 0 && options?.trackIds && createsResource(id2)) {
|
|
26115
|
+
const uri = resolveResourceUri(id2, resourceScope.uri);
|
|
26116
|
+
if (uri !== void 0) {
|
|
26117
|
+
currentResourceScope = {
|
|
26118
|
+
parent: resourceScope,
|
|
26119
|
+
sourceRoot: sourcePath,
|
|
26120
|
+
targetRoot: targetPath,
|
|
26121
|
+
uri
|
|
26122
|
+
};
|
|
26123
|
+
}
|
|
26124
|
+
}
|
|
26125
|
+
recordLocations(sourcePath, targetPath, currentResourceScope);
|
|
26126
|
+
const currentResource = currentResourceScope.uri;
|
|
26127
|
+
const context3 = {
|
|
26128
|
+
isDocumentRoot: sourcePath.length === 0,
|
|
26129
|
+
schema(value5, sourceKey, targetKey = sourceKey) {
|
|
26130
|
+
return loop(value5, [...sourcePath, sourceKey], [...targetPath, targetKey], currentResourceScope);
|
|
26131
|
+
},
|
|
26132
|
+
schemaAt(value5, sourceSuffix, targetSuffix) {
|
|
26133
|
+
return loop(value5, [...sourcePath, ...sourceSuffix], [...targetPath, ...targetSuffix], currentResourceScope);
|
|
26134
|
+
},
|
|
26135
|
+
schemaArray(value5, sourceKey, targetKey = sourceKey) {
|
|
26136
|
+
return Array.isArray(value5) ? value5.map((item, index2) => loop(item, [...sourcePath, sourceKey, String(index2)], [...targetPath, targetKey, String(index2)], currentResourceScope)) : value5;
|
|
26137
|
+
},
|
|
26138
|
+
schemaMap(value5, sourceKey, targetKey = sourceKey) {
|
|
26139
|
+
if (!isObject(value5)) return value5;
|
|
26140
|
+
return mapObject(value5, (item, key) => loop(item, [...sourcePath, sourceKey, key], [...targetPath, targetKey, key], currentResourceScope));
|
|
26141
|
+
},
|
|
26142
|
+
reference(out2, value5) {
|
|
26143
|
+
if (typeof value5 === "string") {
|
|
26144
|
+
references.push([out2, value5, currentResource]);
|
|
26145
|
+
} else {
|
|
26146
|
+
assignProperty(out2, "$ref", value5);
|
|
26147
|
+
}
|
|
26148
|
+
}
|
|
26149
|
+
};
|
|
26150
|
+
return adapter(node, context3);
|
|
26151
|
+
}
|
|
26152
|
+
function getResourceId(schema) {
|
|
26153
|
+
return options?.ignoreRefSiblings === true && typeof schema.$ref === "string" ? void 0 : schema.$id;
|
|
26154
|
+
}
|
|
26155
|
+
function recordLocations(sourcePath, targetPath, scope3) {
|
|
26156
|
+
if (scope3.parent !== void 0) recordLocations(sourcePath, targetPath, scope3.parent);
|
|
26157
|
+
locations.set(locationKey(scope3.uri, sourcePath.slice(scope3.sourceRoot.length)), targetPath.slice(scope3.targetRoot.length));
|
|
26158
|
+
}
|
|
26159
|
+
}
|
|
26160
|
+
var ROOT_URI = "https://effect.invalid/.json-schema/";
|
|
26161
|
+
function resolveUrl(value5, base2) {
|
|
26162
|
+
return URL.canParse(value5, base2) ? new URL(value5, base2) : void 0;
|
|
26163
|
+
}
|
|
26164
|
+
function resolveResourceUri(value5, base2) {
|
|
26165
|
+
if (typeof value5 !== "string") return void 0;
|
|
26166
|
+
const url2 = resolveUrl(value5, base2);
|
|
26167
|
+
if (url2 === void 0) return void 0;
|
|
26168
|
+
url2.hash = "";
|
|
26169
|
+
return url2.href;
|
|
26170
|
+
}
|
|
26171
|
+
function parsePointerFragment(hash3) {
|
|
26172
|
+
if (hash3.length === 0) return [];
|
|
26173
|
+
let pointer;
|
|
26174
|
+
try {
|
|
26175
|
+
pointer = decodeURIComponent(hash3.slice(1));
|
|
26176
|
+
} catch {
|
|
26177
|
+
return void 0;
|
|
26178
|
+
}
|
|
26179
|
+
if (!pointer.startsWith("/")) return void 0;
|
|
26180
|
+
return /~(?:[^01]|$)/.test(pointer) ? void 0 : pointer.slice(1).split("/").map(unescapeToken);
|
|
26181
|
+
}
|
|
26182
|
+
function relocateReference(reference, targetPath) {
|
|
26183
|
+
const index2 = reference.indexOf("#");
|
|
26184
|
+
if (index2 === -1 && targetPath.length === 0) return reference;
|
|
26185
|
+
const uri = index2 === -1 ? reference : reference.slice(0, index2);
|
|
26186
|
+
return `${uri}${formatPointerFragment(targetPath)}`;
|
|
26187
|
+
}
|
|
26188
|
+
function formatPointerFragment(path) {
|
|
26189
|
+
return path.length === 0 ? "#" : `#/${path.map((token) => encodeURI(escapeToken(token)).replace(/#/g, "%23")).join("/")}`;
|
|
26190
|
+
}
|
|
26191
|
+
function locationKey(resource, pointer) {
|
|
26192
|
+
return `${resource}\0${JSON.stringify(pointer)}`;
|
|
26193
|
+
}
|
|
26194
|
+
function createsResource(id2) {
|
|
26195
|
+
return typeof id2 === "string" && id2.length > 0 && id2[0] !== "#";
|
|
26196
|
+
}
|
|
26197
|
+
function convertDocument(document, adapter, options) {
|
|
26198
|
+
return runConverter(adapter, {
|
|
26199
|
+
...options,
|
|
26200
|
+
trackIds: true
|
|
26201
|
+
}, (convert) => ({
|
|
26202
|
+
schema: convert(document.schema),
|
|
26203
|
+
definitions: mapObject(document.definitions, (definition, key) => convert(definition, ["$defs", key], ["definitions", key]))
|
|
26204
|
+
}));
|
|
26205
|
+
}
|
|
26206
|
+
var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set(["properties", "patternProperties"]);
|
|
26207
|
+
var SCHEMA_ARRAY_KEYWORDS = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf"]);
|
|
26208
|
+
var JSON_SCHEMA_SINGLE_KEYWORDS = /* @__PURE__ */ new Set(["not", "additionalProperties", "propertyNames", "contains", "if", "then", "else", "contentSchema"]);
|
|
26209
|
+
function convertSubschemaKeyword(out, key, value5, context3, singleKeywords, mapKeywords = SCHEMA_MAP_KEYWORDS) {
|
|
26210
|
+
let converted;
|
|
26211
|
+
if (mapKeywords.has(key)) converted = context3.schemaMap(value5, key);
|
|
26212
|
+
else if (SCHEMA_ARRAY_KEYWORDS.has(key)) converted = context3.schemaArray(value5, key);
|
|
26213
|
+
else if (singleKeywords.has(key)) converted = context3.schema(value5, key);
|
|
26214
|
+
else return false;
|
|
26215
|
+
assignProperty(out, key, converted);
|
|
26216
|
+
return true;
|
|
26217
|
+
}
|
|
26218
|
+
var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];
|
|
26219
|
+
var DRAFT_07_TO_2020_COLLISIONS = [...PRE_2020_TO_2020_COLLISIONS, "deprecated"];
|
|
26220
|
+
var OPEN_API_30_TO_2020_COLLISIONS = [...PRE_2020_TO_2020_COLLISIONS, "$comment", "$id", "$schema", "const", "contains", "contentEncoding", "contentMediaType", "else", "examples", "if", "patternProperties", "propertyNames", "then"];
|
|
26221
|
+
var ANCHOR_REGEXP = /^[A-Za-z_][-A-Za-z0-9._]*$/;
|
|
26222
|
+
var LEGACY_ID_FRAGMENT_REGEXP = /^[A-Za-z][-A-Za-z0-9._:]*$/;
|
|
26223
|
+
function unsupported(keyword, dialect, details) {
|
|
26224
|
+
throw new Error(`Cannot convert JSON Schema keyword "${keyword}" to ${dialect}: ${details}`);
|
|
26225
|
+
}
|
|
26226
|
+
function rejectKeywordCollisions(source, keywords, targetDialect, sourceDialect) {
|
|
26227
|
+
for (const keyword of keywords) {
|
|
26228
|
+
if (Object.hasOwn(source, keyword)) {
|
|
26229
|
+
unsupported(keyword, targetDialect, `it is not active in ${sourceDialect} but would become active in the target`);
|
|
26230
|
+
}
|
|
26231
|
+
}
|
|
26232
|
+
}
|
|
26233
|
+
var DRAFT_07_TARGET_COLLISIONS = ["additionalItems", "definitions", "dependencies"];
|
|
26234
|
+
function convertMetaSchemaKeyword(out, value5, context3, targetUri, targetDialect) {
|
|
26235
|
+
if (context3.isDocumentRoot) {
|
|
26236
|
+
assignProperty(out, "$schema", isMetaSchemaUri(value5, META_SCHEMA_URI_DRAFT_2020_12) ? targetUri : value5);
|
|
26237
|
+
} else if (!isMetaSchemaUri(value5, META_SCHEMA_URI_DRAFT_2020_12)) {
|
|
26238
|
+
unsupported("$schema", targetDialect, "an embedded resource cannot declare a different dialect");
|
|
26239
|
+
}
|
|
26240
|
+
}
|
|
26241
|
+
function draft07Adapter(source, context3) {
|
|
26242
|
+
rejectKeywordCollisions(source, DRAFT_07_TARGET_COLLISIONS, "Draft-07", "Draft 2020-12");
|
|
26243
|
+
const out = {};
|
|
26244
|
+
let reference = void 0;
|
|
26245
|
+
let prefixItems = void 0;
|
|
26246
|
+
let items = void 0;
|
|
26247
|
+
for (const key of Object.keys(source)) {
|
|
26248
|
+
const value5 = source[key];
|
|
26249
|
+
if (convertSubschemaKeyword(out, key, value5, context3, JSON_SCHEMA_SINGLE_KEYWORDS)) continue;
|
|
26250
|
+
switch (key) {
|
|
26251
|
+
case "$ref":
|
|
26252
|
+
reference = value5;
|
|
26253
|
+
break;
|
|
26254
|
+
case "$schema":
|
|
26255
|
+
convertMetaSchemaKeyword(out, value5, context3, META_SCHEMA_URI_DRAFT_07, "Draft-07");
|
|
26256
|
+
break;
|
|
26257
|
+
case "$id":
|
|
26258
|
+
case "$anchor":
|
|
26259
|
+
break;
|
|
26260
|
+
case "$defs":
|
|
26261
|
+
assignProperty(out, "definitions", context3.schemaMap(value5, key, "definitions"));
|
|
26262
|
+
break;
|
|
26263
|
+
case "prefixItems":
|
|
26264
|
+
prefixItems = value5;
|
|
26265
|
+
break;
|
|
26266
|
+
case "items":
|
|
26267
|
+
items = value5;
|
|
26268
|
+
break;
|
|
26269
|
+
case "dependentRequired":
|
|
26270
|
+
case "dependentSchemas":
|
|
26271
|
+
case "minContains":
|
|
26272
|
+
case "maxContains":
|
|
26273
|
+
break;
|
|
26274
|
+
case "$dynamicRef":
|
|
26275
|
+
case "$dynamicAnchor":
|
|
26276
|
+
case "$vocabulary":
|
|
26277
|
+
case "unevaluatedProperties":
|
|
26278
|
+
case "unevaluatedItems":
|
|
26279
|
+
unsupported(key, "Draft-07", "the target dialect has no equivalent");
|
|
26280
|
+
case "required":
|
|
26281
|
+
if (Array.isArray(value5) && value5.length === 0) break;
|
|
26282
|
+
assignProperty(out, key, value5);
|
|
26283
|
+
break;
|
|
26284
|
+
default:
|
|
26285
|
+
assignProperty(out, key, value5);
|
|
26286
|
+
}
|
|
26287
|
+
}
|
|
26288
|
+
convertTuple(out, prefixItems, items, context3);
|
|
26289
|
+
if (Object.hasOwn(source, "contains")) {
|
|
26290
|
+
const minContains = source.minContains;
|
|
26291
|
+
const maxContains = source.maxContains;
|
|
26292
|
+
if (minContains !== void 0 && minContains !== 1 || maxContains !== void 0) {
|
|
26293
|
+
unsupported("minContains/maxContains", "Draft-07", "contains cardinality cannot be represented");
|
|
26294
|
+
}
|
|
26295
|
+
if (Object.hasOwn(source, "minContains")) assignProperty(out, "minContains", minContains);
|
|
26296
|
+
} else {
|
|
26297
|
+
if (Object.hasOwn(source, "minContains")) assignProperty(out, "minContains", source.minContains);
|
|
26298
|
+
if (Object.hasOwn(source, "maxContains")) assignProperty(out, "maxContains", source.maxContains);
|
|
26299
|
+
}
|
|
26300
|
+
convertDependencies(source, out, context3, "draft-07");
|
|
26301
|
+
convertLegacyId(source, out, "$id", "Draft-07");
|
|
26302
|
+
convertReference(out, reference, context3);
|
|
26303
|
+
return out;
|
|
26304
|
+
}
|
|
26305
|
+
function convertTuple(out, prefixItems, items, context3) {
|
|
26306
|
+
if (prefixItems === void 0) {
|
|
26307
|
+
if (items !== void 0) assignProperty(out, "items", context3.schema(items, "items"));
|
|
26308
|
+
return;
|
|
26309
|
+
}
|
|
26310
|
+
assignProperty(out, "items", context3.schemaArray(prefixItems, "prefixItems", "items"));
|
|
26311
|
+
if (items !== void 0) {
|
|
26312
|
+
assignProperty(out, "additionalItems", context3.schema(items, "items", "additionalItems"));
|
|
26313
|
+
}
|
|
26314
|
+
}
|
|
26315
|
+
function convertReference(out, reference, context3) {
|
|
26316
|
+
if (reference === void 0) return;
|
|
26317
|
+
if (typeof reference === "string" && Object.keys(out).length > 0) {
|
|
26318
|
+
const referenceSchema = {};
|
|
26319
|
+
context3.reference(referenceSchema, reference);
|
|
26320
|
+
appendAllOf(out, referenceSchema);
|
|
26321
|
+
} else {
|
|
26322
|
+
context3.reference(out, reference);
|
|
26323
|
+
}
|
|
26324
|
+
}
|
|
26325
|
+
function convertDependencies(source, out, context3, targetDialect) {
|
|
26326
|
+
const dependentRequired = isObject(source.dependentRequired) ? source.dependentRequired : void 0;
|
|
26327
|
+
const dependentSchemas = isObject(source.dependentSchemas) ? source.dependentSchemas : void 0;
|
|
26328
|
+
if (dependentRequired === void 0 && dependentSchemas === void 0) return;
|
|
26329
|
+
const dependencies = {};
|
|
26330
|
+
const keys4 = /* @__PURE__ */ new Set([...Object.keys(dependentRequired ?? {}), ...Object.keys(dependentSchemas ?? {})]);
|
|
26331
|
+
for (const key of keys4) {
|
|
26332
|
+
const required3 = dependentRequired?.[key];
|
|
26333
|
+
const dependency = dependentSchemas?.[key];
|
|
26334
|
+
const omitRequired = targetDialect === "draft-04" && Array.isArray(required3) && required3.length === 0;
|
|
26335
|
+
if (dependency === void 0) {
|
|
26336
|
+
if (!omitRequired) assignProperty(dependencies, key, required3);
|
|
26337
|
+
} else if (required3 === void 0 || omitRequired) {
|
|
26338
|
+
assignProperty(dependencies, key, context3.schemaAt(dependency, ["dependentSchemas", key], ["dependencies", key]));
|
|
26339
|
+
} else {
|
|
26340
|
+
assignProperty(dependencies, key, {
|
|
26341
|
+
allOf: [context3.schemaAt(dependency, ["dependentSchemas", key], ["dependencies", key, "allOf", "0"]), {
|
|
26342
|
+
required: required3
|
|
26343
|
+
}]
|
|
26344
|
+
});
|
|
26345
|
+
}
|
|
26346
|
+
}
|
|
26347
|
+
if (Object.keys(dependencies).length > 0) assignProperty(out, "dependencies", dependencies);
|
|
26348
|
+
}
|
|
26349
|
+
function appendAllOf(out, schema) {
|
|
26350
|
+
if (Array.isArray(out.allOf)) out.allOf.push(schema);
|
|
26351
|
+
else assignProperty(out, "allOf", [schema]);
|
|
26352
|
+
}
|
|
26353
|
+
function convertLegacyId(source, out, targetKey, dialect) {
|
|
26354
|
+
const id2 = source.$id;
|
|
26355
|
+
const anchor = source.$anchor;
|
|
26356
|
+
if (anchor === void 0) {
|
|
26357
|
+
if (id2 !== void 0) assignProperty(out, targetKey, id2);
|
|
26358
|
+
return;
|
|
26359
|
+
}
|
|
26360
|
+
if (typeof anchor !== "string" || !ANCHOR_REGEXP.test(anchor)) {
|
|
26361
|
+
unsupported("$anchor", dialect, "the anchor is not valid");
|
|
26362
|
+
}
|
|
26363
|
+
if (!LEGACY_ID_FRAGMENT_REGEXP.test(anchor)) {
|
|
26364
|
+
unsupported("$anchor", dialect, "the anchor cannot be represented as a plain-name fragment identifier");
|
|
26365
|
+
}
|
|
26366
|
+
if (id2 === void 0) {
|
|
26367
|
+
assignProperty(out, targetKey, `#${anchor}`);
|
|
26368
|
+
} else {
|
|
26369
|
+
unsupported("$anchor", dialect, "it cannot be combined with the schema $id");
|
|
26370
|
+
}
|
|
25691
26371
|
}
|
|
25692
26372
|
|
|
25693
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
26373
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/RegExp.js
|
|
25694
26374
|
var RegExp2 = globalThis.RegExp;
|
|
25695
26375
|
var escape2 = (string6) => string6.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
25696
26376
|
|
|
25697
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
26377
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
25698
26378
|
var jsonSchemaAnnotationExcludedKeys = /* @__PURE__ */ new Set([...annotationExcludedKeys, IDENTIFIER_FALLBACK_KEY, ...jsonSchemaAnnotationKeys]);
|
|
25699
|
-
var toRepresentationOptions = {
|
|
25700
|
-
isAnonymousReferenceAllowed: (ast) => !isDeclaration(ast)
|
|
25701
|
-
};
|
|
25702
26379
|
function collectJsonSchemaAnnotations(annotations, options) {
|
|
25703
26380
|
if (annotations === void 0) return void 0;
|
|
25704
26381
|
const out = {};
|
|
@@ -25773,7 +26450,16 @@ function extractJsonSchemaNumberType(schema) {
|
|
|
25773
26450
|
function isJsonSchemaNumberEncoding(schema) {
|
|
25774
26451
|
return Array.isArray(schema.anyOf) && schema.anyOf.length === 4 && schema.anyOf[0]?.type === "number" && schema.anyOf.slice(1).every((member) => member.type === "string");
|
|
25775
26452
|
}
|
|
25776
|
-
|
|
26453
|
+
var inlineableCheckKeywords = "|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|";
|
|
26454
|
+
function hasOnlyKeywords(schema, allowed) {
|
|
26455
|
+
return Object.keys(schema).every((key) => allowed.includes(`|${key}|`));
|
|
26456
|
+
}
|
|
26457
|
+
function hasNoCollisions(left, rightKeys) {
|
|
26458
|
+
return typeof left.$ref !== "string" && rightKeys.every((key) => !Object.hasOwn(left, key));
|
|
26459
|
+
}
|
|
26460
|
+
var promotableAnnotationKeywords = "|title|description|default|examples|readOnly|writeOnly|";
|
|
26461
|
+
var inlineableAnnotatedCheckKeywords = inlineableCheckKeywords + promotableAnnotationKeywords;
|
|
26462
|
+
function appendJsonSchema(left, right, inlineCheck) {
|
|
25777
26463
|
if (Object.keys(left).length === 0) return right;
|
|
25778
26464
|
const rightKeys = Object.keys(right);
|
|
25779
26465
|
if (rightKeys.length === 0) return left;
|
|
@@ -25788,9 +26474,20 @@ function appendJsonSchema(left, right) {
|
|
|
25788
26474
|
type: type3
|
|
25789
26475
|
};
|
|
25790
26476
|
if (isNumberEncoding) delete base2.anyOf;
|
|
25791
|
-
|
|
26477
|
+
const extractedKeys = Object.keys(extracted.schema);
|
|
26478
|
+
if (extractedKeys.length === 0) return base2;
|
|
26479
|
+
return hasOnlyKeywords(extracted.schema, promotableAnnotationKeywords) && hasNoCollisions(base2, extractedKeys) ? {
|
|
26480
|
+
...base2,
|
|
26481
|
+
...extracted.schema
|
|
26482
|
+
} : appendJsonSchema(base2, extracted.schema, inlineCheck);
|
|
25792
26483
|
}
|
|
25793
26484
|
}
|
|
26485
|
+
if (inlineCheck && hasNoCollisions(left, rightKeys)) {
|
|
26486
|
+
return {
|
|
26487
|
+
...left,
|
|
26488
|
+
...right
|
|
26489
|
+
};
|
|
26490
|
+
}
|
|
25794
26491
|
const members = Array.isArray(right.allOf) && rightKeys.length === 1 ? right.allOf : [right];
|
|
25795
26492
|
if (Array.isArray(left.allOf)) {
|
|
25796
26493
|
return {
|
|
@@ -25880,21 +26577,24 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
25880
26577
|
schemas: schemas2
|
|
25881
26578
|
});
|
|
25882
26579
|
const ordinary2 = collectJsonSchemaAnnotations(annotations, options);
|
|
25883
|
-
|
|
26580
|
+
const schema = ordinary2 === void 0 ? fragment : {
|
|
25884
26581
|
...fragment,
|
|
25885
26582
|
...ordinary2
|
|
25886
26583
|
};
|
|
26584
|
+
const allowed = ordinary2 === void 0 ? inlineableCheckKeywords : inlineableAnnotatedCheckKeywords;
|
|
26585
|
+
return check3._tag === "Filter" && hasOnlyKeywords(schema, allowed) && (ordinary2 === void 0 || hasOnlyKeywords(ordinary2, promotableAnnotationKeywords)) ? [schema, true] : [schema];
|
|
25887
26586
|
}
|
|
25888
26587
|
if (check3._tag === "Filter") return void 0;
|
|
25889
26588
|
const children = check3.checks.map((child, index2) => compileCheck(child, type3, [...path, "checks", index2])).filter((child) => child !== void 0);
|
|
25890
26589
|
if (children.length === 0) return void 0;
|
|
25891
26590
|
const ordinary = collectJsonSchemaAnnotations(annotations, options);
|
|
25892
|
-
|
|
25893
|
-
|
|
26591
|
+
const allOf = children.map(([schema]) => schema);
|
|
26592
|
+
return [ordinary === void 0 ? {
|
|
26593
|
+
allOf
|
|
25894
26594
|
} : {
|
|
25895
|
-
allOf
|
|
26595
|
+
allOf,
|
|
25896
26596
|
...ordinary
|
|
25897
|
-
};
|
|
26597
|
+
}];
|
|
25898
26598
|
}
|
|
25899
26599
|
function recur3(representation, path) {
|
|
25900
26600
|
if (representation._tag === "Reference") {
|
|
@@ -25917,7 +26617,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
25917
26617
|
const type3 = typeof output.type === "string" && isJsonSchemaType(output.type) ? output.type : void 0;
|
|
25918
26618
|
const check3 = compileCheck(representation.checks[index2], type3, [...path, "checks", index2]);
|
|
25919
26619
|
if (check3 !== void 0) {
|
|
25920
|
-
output = appendJsonSchema(output, check3);
|
|
26620
|
+
output = appendJsonSchema(output, ...check3);
|
|
25921
26621
|
}
|
|
25922
26622
|
}
|
|
25923
26623
|
compiledRepresentations.set(representation, output);
|
|
@@ -26077,22 +26777,35 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
26077
26777
|
}
|
|
26078
26778
|
if (representation.propertySignatures.length > 0) out.properties = properties;
|
|
26079
26779
|
if (required3.length > 0) out.required = required3;
|
|
26080
|
-
out.additionalProperties = options?.additionalProperties ?? false;
|
|
26081
26780
|
const patternProperties = {};
|
|
26781
|
+
const additionalProperties = [];
|
|
26082
26782
|
for (let index2 = 0; index2 < representation.indexSignatures.length; index2++) {
|
|
26083
26783
|
const signature = representation.indexSignatures[index2];
|
|
26084
26784
|
let type3 = recur3(signature.type, [...path, "indexSignatures", index2, "type"]);
|
|
26085
26785
|
if (Object.keys(type3).length === 1 && "not" in type3) type3 = false;
|
|
26086
26786
|
const patterns = getParameterPatterns(signature.parameter, [...path, "indexSignatures", index2, "parameter"], /* @__PURE__ */ new Set());
|
|
26087
26787
|
if (patterns.length === 0) {
|
|
26088
|
-
|
|
26788
|
+
additionalProperties.push(type3);
|
|
26089
26789
|
} else {
|
|
26090
|
-
for (const pattern of patterns)
|
|
26790
|
+
for (const pattern of patterns) {
|
|
26791
|
+
const previous = patternProperties[pattern];
|
|
26792
|
+
assignProperty(patternProperties, pattern, previous === void 0 ? type3 : previous === false || type3 === false ? false : appendJsonSchema(previous, type3));
|
|
26793
|
+
}
|
|
26091
26794
|
}
|
|
26092
26795
|
}
|
|
26093
|
-
|
|
26796
|
+
const hasPatternProperties = Object.keys(patternProperties).length > 0;
|
|
26797
|
+
if (hasPatternProperties) {
|
|
26094
26798
|
out.patternProperties = patternProperties;
|
|
26095
|
-
|
|
26799
|
+
}
|
|
26800
|
+
if (representation.indexSignatures.length === 0) {
|
|
26801
|
+
out.additionalProperties = options?.additionalProperties ?? false;
|
|
26802
|
+
} else if (additionalProperties.length === 1 && representation.propertySignatures.length === 0 && !hasPatternProperties) {
|
|
26803
|
+
out.additionalProperties = additionalProperties[0];
|
|
26804
|
+
} else if (additionalProperties.length > 0) {
|
|
26805
|
+
out.allOf = additionalProperties.map((type3) => ({
|
|
26806
|
+
type: "object",
|
|
26807
|
+
additionalProperties: type3
|
|
26808
|
+
}));
|
|
26096
26809
|
}
|
|
26097
26810
|
if (typeof out.additionalProperties === "object" && out.additionalProperties !== null && Object.keys(out.additionalProperties).length === 0) {
|
|
26098
26811
|
delete out.additionalProperties;
|
|
@@ -26104,7 +26817,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
26104
26817
|
if (types.length === 0) return {
|
|
26105
26818
|
not: {}
|
|
26106
26819
|
};
|
|
26107
|
-
if (types.length > 1) {
|
|
26820
|
+
if (representation.mode === "anyOf" && types.length > 1) {
|
|
26108
26821
|
const compacted = compactEnums(types);
|
|
26109
26822
|
if (compacted !== void 0) return compacted;
|
|
26110
26823
|
}
|
|
@@ -26198,7 +26911,15 @@ function toJsonSchemaDocument(document, options) {
|
|
|
26198
26911
|
};
|
|
26199
26912
|
}
|
|
26200
26913
|
|
|
26201
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
26914
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
26915
|
+
var defaultReferencePolicy = ({
|
|
26916
|
+
identifier: identifier2
|
|
26917
|
+
}) => identifier2;
|
|
26918
|
+
function annotationsField(annotations) {
|
|
26919
|
+
return annotations === void 0 ? void 0 : {
|
|
26920
|
+
annotations
|
|
26921
|
+
};
|
|
26922
|
+
}
|
|
26202
26923
|
function toRepresentation(ast, options) {
|
|
26203
26924
|
const {
|
|
26204
26925
|
references,
|
|
@@ -26210,67 +26931,28 @@ function toRepresentation(ast, options) {
|
|
|
26210
26931
|
};
|
|
26211
26932
|
}
|
|
26212
26933
|
function toRepresentations(asts, options) {
|
|
26213
|
-
return fromASTs(asts, options);
|
|
26214
|
-
}
|
|
26215
|
-
function annotationsField(annotations) {
|
|
26216
|
-
return annotations === void 0 ? void 0 : {
|
|
26217
|
-
annotations
|
|
26218
|
-
};
|
|
26219
|
-
}
|
|
26220
|
-
function hasShareableStructure(ast, isAnonymousReferenceAllowed) {
|
|
26221
|
-
if (isAnonymousReferenceAllowed?.(ast) === false) return false;
|
|
26222
|
-
switch (ast._tag) {
|
|
26223
|
-
case "Arrays":
|
|
26224
|
-
case "Objects":
|
|
26225
|
-
case "Suspend":
|
|
26226
|
-
return true;
|
|
26227
|
-
case "Declaration":
|
|
26228
|
-
return true;
|
|
26229
|
-
case "Union":
|
|
26230
|
-
return ast.types.some((ast2) => hasShareableStructure(ast2, isAnonymousReferenceAllowed));
|
|
26231
|
-
default:
|
|
26232
|
-
return false;
|
|
26233
|
-
}
|
|
26234
|
-
}
|
|
26235
|
-
function isWorthReferencing(bodyCost, occurrences) {
|
|
26236
|
-
return occurrences * bodyCost > bodyCost + occurrences + 1;
|
|
26237
|
-
}
|
|
26238
|
-
function isAnonymousReferenceEligible(ast, occurrences, isAnonymousReferenceAllowed) {
|
|
26239
|
-
if (isAnonymousReferenceAllowed?.(ast) === false) return false;
|
|
26240
|
-
if (hasShareableStructure(ast, isAnonymousReferenceAllowed)) return true;
|
|
26241
|
-
switch (ast._tag) {
|
|
26242
|
-
case "Union":
|
|
26243
|
-
return isWorthReferencing(ast.types.length + 1, occurrences);
|
|
26244
|
-
case "Enum":
|
|
26245
|
-
return isWorthReferencing(ast.enums.length + 1, occurrences);
|
|
26246
|
-
case "TemplateLiteral":
|
|
26247
|
-
return isWorthReferencing(ast.parts.length + 1, occurrences);
|
|
26248
|
-
case "Literal":
|
|
26249
|
-
return typeof ast.literal === "string" && isWorthReferencing(ast.literal.length / 32 + 1, occurrences);
|
|
26250
|
-
default:
|
|
26251
|
-
return false;
|
|
26252
|
-
}
|
|
26253
|
-
}
|
|
26254
|
-
function resolveReferenceIdentifier(input, encoded) {
|
|
26255
|
-
const identifier2 = resolveIdentifier(encoded);
|
|
26256
|
-
if (identifier2 !== void 0) return {
|
|
26257
|
-
identifier: identifier2
|
|
26258
|
-
};
|
|
26259
|
-
const fallback = (encoded !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(encoded);
|
|
26260
|
-
return fallback === void 0 ? void 0 : {
|
|
26261
|
-
identifier: `${fallback}Encoded`,
|
|
26262
|
-
fallback
|
|
26263
|
-
};
|
|
26264
|
-
}
|
|
26265
|
-
function fromASTs(asts, options) {
|
|
26266
26934
|
const references = {};
|
|
26267
|
-
const anonymousReferences = /* @__PURE__ */ new Map();
|
|
26268
26935
|
const referenceOwners = /* @__PURE__ */ new Map();
|
|
26269
26936
|
const buildingReferences = /* @__PURE__ */ new Set();
|
|
26270
|
-
const
|
|
26271
|
-
const
|
|
26272
|
-
const shared = /* @__PURE__ */ new Set();
|
|
26937
|
+
const candidates = /* @__PURE__ */ new Map();
|
|
26938
|
+
const visitingCandidates = /* @__PURE__ */ new Set();
|
|
26273
26939
|
for (const ast of asts) visit(ast);
|
|
26940
|
+
const referencePolicy = options?.referencePolicy ?? defaultReferencePolicy;
|
|
26941
|
+
for (const candidatesByIdentifier of candidates.values()) {
|
|
26942
|
+
for (const candidate of candidatesByIdentifier.values()) {
|
|
26943
|
+
const requestedReference = referencePolicy({
|
|
26944
|
+
ast: candidate.ast,
|
|
26945
|
+
occurrences: candidate.occurrences,
|
|
26946
|
+
identifier: candidate.identifier
|
|
26947
|
+
});
|
|
26948
|
+
if (requestedReference !== void 0) {
|
|
26949
|
+
const separator = requestedReference === candidate.identifier || !requestedReference.endsWith("_") ? "_" : "";
|
|
26950
|
+
candidate.reference = getReference(requestedReference, candidate, separator);
|
|
26951
|
+
} else if (candidate.isRecursive) {
|
|
26952
|
+
candidate.reference = getReference(`${candidate.ast._tag}_`, candidate, "");
|
|
26953
|
+
}
|
|
26954
|
+
}
|
|
26955
|
+
}
|
|
26274
26956
|
const representations = map4(asts, (ast) => recur3(ast));
|
|
26275
26957
|
return {
|
|
26276
26958
|
representations,
|
|
@@ -26286,14 +26968,14 @@ function fromASTs(asts, options) {
|
|
|
26286
26968
|
referenceOwners.set(candidate, owner);
|
|
26287
26969
|
return candidate;
|
|
26288
26970
|
}
|
|
26289
|
-
function annotateReference(ast,
|
|
26290
|
-
const fallback =
|
|
26971
|
+
function annotateReference(ast, candidate, reference) {
|
|
26972
|
+
const fallback = candidate.fallback;
|
|
26291
26973
|
if (fallback !== void 0) {
|
|
26292
26974
|
return resolveIdentifierFallback(ast) === fallback ? ast : annotate(ast, {
|
|
26293
26975
|
[IDENTIFIER_FALLBACK_KEY]: fallback
|
|
26294
26976
|
});
|
|
26295
26977
|
}
|
|
26296
|
-
return reference ===
|
|
26978
|
+
return reference === candidate.identifier ? ast : annotate(ast, {
|
|
26297
26979
|
identifier: reference
|
|
26298
26980
|
});
|
|
26299
26981
|
}
|
|
@@ -26309,15 +26991,41 @@ function fromASTs(asts, options) {
|
|
|
26309
26991
|
$ref: reference
|
|
26310
26992
|
};
|
|
26311
26993
|
}
|
|
26312
|
-
function
|
|
26994
|
+
function getCandidate(input) {
|
|
26313
26995
|
const ast = getLastEncoding(input);
|
|
26314
26996
|
const owner = getContextOwner(ast);
|
|
26315
|
-
|
|
26316
|
-
|
|
26317
|
-
if (
|
|
26318
|
-
|
|
26997
|
+
let identifier2 = resolveIdentifier(ast);
|
|
26998
|
+
const fallback = identifier2 === void 0 ? (ast !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(ast) : void 0;
|
|
26999
|
+
if (fallback !== void 0) identifier2 = `${fallback}Encoded`;
|
|
27000
|
+
let candidatesByIdentifier = candidates.get(owner);
|
|
27001
|
+
if (candidatesByIdentifier === void 0) {
|
|
27002
|
+
candidatesByIdentifier = /* @__PURE__ */ new Map();
|
|
27003
|
+
candidates.set(owner, candidatesByIdentifier);
|
|
27004
|
+
}
|
|
27005
|
+
let candidate = candidatesByIdentifier.get(identifier2);
|
|
27006
|
+
if (candidate === void 0) {
|
|
27007
|
+
candidate = {
|
|
27008
|
+
ast: owner,
|
|
27009
|
+
identifier: identifier2,
|
|
27010
|
+
fallback,
|
|
27011
|
+
occurrences: 0,
|
|
27012
|
+
isRecursive: false,
|
|
27013
|
+
reference: void 0
|
|
27014
|
+
};
|
|
27015
|
+
candidatesByIdentifier.set(identifier2, candidate);
|
|
27016
|
+
}
|
|
27017
|
+
return candidate;
|
|
27018
|
+
}
|
|
27019
|
+
function visit(input) {
|
|
27020
|
+
const candidate = getCandidate(input);
|
|
27021
|
+
const ast = candidate.ast;
|
|
27022
|
+
candidate.occurrences++;
|
|
27023
|
+
if (visitingCandidates.has(candidate)) {
|
|
27024
|
+
candidate.isRecursive = true;
|
|
26319
27025
|
return;
|
|
26320
27026
|
}
|
|
27027
|
+
if (candidate.occurrences > 1) return;
|
|
27028
|
+
visitingCandidates.add(candidate);
|
|
26321
27029
|
visitChecks(ast.checks);
|
|
26322
27030
|
switch (ast._tag) {
|
|
26323
27031
|
case "Declaration":
|
|
@@ -26336,6 +27044,7 @@ function fromASTs(asts, options) {
|
|
|
26336
27044
|
visit(ast.thunk());
|
|
26337
27045
|
break;
|
|
26338
27046
|
}
|
|
27047
|
+
visitingCandidates.delete(candidate);
|
|
26339
27048
|
}
|
|
26340
27049
|
function visitChecks(checks) {
|
|
26341
27050
|
checks?.forEach((check3) => {
|
|
@@ -26344,41 +27053,14 @@ function fromASTs(asts, options) {
|
|
|
26344
27053
|
});
|
|
26345
27054
|
}
|
|
26346
27055
|
function recur3(input) {
|
|
26347
|
-
const
|
|
26348
|
-
const
|
|
26349
|
-
const
|
|
26350
|
-
if (referenceIdentifier !== void 0) {
|
|
26351
|
-
const reference2 = getReference(referenceIdentifier.identifier, owner);
|
|
26352
|
-
return makeReference(reference2, annotateReference(ast, referenceIdentifier, reference2));
|
|
26353
|
-
}
|
|
26354
|
-
const found = anonymousReferences.get(owner);
|
|
26355
|
-
if (found !== void 0) {
|
|
26356
|
-
return {
|
|
26357
|
-
_tag: "Reference",
|
|
26358
|
-
$ref: found
|
|
26359
|
-
};
|
|
26360
|
-
}
|
|
26361
|
-
const isShared = shared.has(owner);
|
|
26362
|
-
if (isShared || visiting.has(owner)) {
|
|
26363
|
-
const reference2 = getReference(`${ast._tag}_`, owner, "");
|
|
26364
|
-
anonymousReferences.set(owner, reference2);
|
|
26365
|
-
return isShared ? makeReference(reference2, ast) : {
|
|
26366
|
-
_tag: "Reference",
|
|
26367
|
-
$ref: reference2
|
|
26368
|
-
};
|
|
26369
|
-
}
|
|
26370
|
-
visiting.add(owner);
|
|
26371
|
-
const representation = on(ast);
|
|
26372
|
-
visiting.delete(owner);
|
|
26373
|
-
const reference = anonymousReferences.get(owner);
|
|
27056
|
+
const candidate = getCandidate(input);
|
|
27057
|
+
const ast = candidate.ast;
|
|
27058
|
+
const reference = candidate.reference;
|
|
26374
27059
|
if (reference !== void 0) {
|
|
26375
|
-
|
|
26376
|
-
return
|
|
26377
|
-
_tag: "Reference",
|
|
26378
|
-
$ref: reference
|
|
26379
|
-
};
|
|
27060
|
+
const annotated = candidate.identifier === void 0 ? ast : annotateReference(ast, candidate, reference);
|
|
27061
|
+
return makeReference(reference, annotated);
|
|
26380
27062
|
}
|
|
26381
|
-
return
|
|
27063
|
+
return on(ast);
|
|
26382
27064
|
}
|
|
26383
27065
|
function on(ast) {
|
|
26384
27066
|
const checks = fromChecks(ast.checks);
|
|
@@ -26544,7 +27226,7 @@ function fromASTs(asts, options) {
|
|
|
26544
27226
|
}
|
|
26545
27227
|
}
|
|
26546
27228
|
|
|
26547
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
27229
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/JsonPatch.js
|
|
26548
27230
|
function get5(oldValue, newValue) {
|
|
26549
27231
|
const patches = [];
|
|
26550
27232
|
getLoop(oldValue, newValue, "", patches);
|
|
@@ -26725,12 +27407,12 @@ function rebuildFromStack(stack, newParent) {
|
|
|
26725
27407
|
return acc;
|
|
26726
27408
|
}
|
|
26727
27409
|
|
|
26728
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
27410
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Optic.js
|
|
26729
27411
|
function makeIso(get7, set6) {
|
|
26730
|
-
return
|
|
27412
|
+
return make23(primitiveNode("Iso", get7, set6));
|
|
26731
27413
|
}
|
|
26732
27414
|
function makeLens(get7, replace2) {
|
|
26733
|
-
return
|
|
27415
|
+
return make23(primitiveNode("Lens", get7, replace2));
|
|
26734
27416
|
}
|
|
26735
27417
|
function primitiveNode(kind, get7, set6) {
|
|
26736
27418
|
return [{
|
|
@@ -26803,7 +27485,7 @@ function compose(a, b) {
|
|
|
26803
27485
|
return nodes;
|
|
26804
27486
|
}
|
|
26805
27487
|
function makeOptional(getResult, set6) {
|
|
26806
|
-
return
|
|
27488
|
+
return make23(primitiveNode("Optional", getResult, set6));
|
|
26807
27489
|
}
|
|
26808
27490
|
var OptionalImpl = class {
|
|
26809
27491
|
/** @internal */
|
|
@@ -26822,13 +27504,13 @@ var OptionalImpl = class {
|
|
|
26822
27504
|
return (s) => getOrElse2(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
|
|
26823
27505
|
}
|
|
26824
27506
|
compose(that) {
|
|
26825
|
-
return
|
|
27507
|
+
return make23(compose(this.node, that.node));
|
|
26826
27508
|
}
|
|
26827
27509
|
key(key) {
|
|
26828
|
-
return
|
|
27510
|
+
return make23(compose(this.node, [new PathNode([key])]));
|
|
26829
27511
|
}
|
|
26830
27512
|
optionalKey(key) {
|
|
26831
|
-
return
|
|
27513
|
+
return make23(compose(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
|
|
26832
27514
|
const copy3 = cloneShallow(s);
|
|
26833
27515
|
if (a === void 0) {
|
|
26834
27516
|
if (Array.isArray(copy3) && typeof key === "number") {
|
|
@@ -26843,20 +27525,20 @@ var OptionalImpl = class {
|
|
|
26843
27525
|
})));
|
|
26844
27526
|
}
|
|
26845
27527
|
check(...checks) {
|
|
26846
|
-
return
|
|
27528
|
+
return make23(compose(this.node, [new CheckNode(checks)]));
|
|
26847
27529
|
}
|
|
26848
27530
|
refine(refinement, annotations) {
|
|
26849
|
-
return
|
|
27531
|
+
return make23(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
|
|
26850
27532
|
}
|
|
26851
27533
|
tag(tag4) {
|
|
26852
27534
|
const err = fail2(new InvalidValue({
|
|
26853
27535
|
expected: `${JSON.stringify(tag4)} tag`
|
|
26854
27536
|
}));
|
|
26855
|
-
return
|
|
27537
|
+
return make23(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
|
|
26856
27538
|
}
|
|
26857
27539
|
at(key, ..._rest) {
|
|
26858
27540
|
const err = fail2(new Pointer([key], new MissingKey(void 0)));
|
|
26859
|
-
return
|
|
27541
|
+
return make23(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
|
|
26860
27542
|
if (Object.hasOwn(s, key)) {
|
|
26861
27543
|
const copy3 = cloneShallow(s);
|
|
26862
27544
|
assignProperty(copy3, key, a);
|
|
@@ -26962,7 +27644,7 @@ var PrismImpl = class extends OptionalImpl {
|
|
|
26962
27644
|
return (s) => getOrElse2(map2(this.getResult(s), (a) => this.set(f(a))), () => s);
|
|
26963
27645
|
}
|
|
26964
27646
|
};
|
|
26965
|
-
function
|
|
27647
|
+
function make23(node) {
|
|
26966
27648
|
let op = node[0] ?? identityOperation;
|
|
26967
27649
|
if (node.length > 1) {
|
|
26968
27650
|
const kind = node.reduce((kind2, step) => composeKind(kind2, step.kind), "Iso");
|
|
@@ -27066,12 +27748,12 @@ function composeKind(a, b) {
|
|
|
27066
27748
|
if (b === "Iso" || a === b) return a;
|
|
27067
27749
|
return "Optional";
|
|
27068
27750
|
}
|
|
27069
|
-
var identityIso = /* @__PURE__ */
|
|
27751
|
+
var identityIso = /* @__PURE__ */ make23([]);
|
|
27070
27752
|
function id() {
|
|
27071
27753
|
return identityIso;
|
|
27072
27754
|
}
|
|
27073
27755
|
|
|
27074
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
27756
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/redacted.js
|
|
27075
27757
|
var redactedRegistry = /* @__PURE__ */ new WeakMap();
|
|
27076
27758
|
var value = (self) => {
|
|
27077
27759
|
if (redactedRegistry.has(self)) {
|
|
@@ -27081,10 +27763,10 @@ var value = (self) => {
|
|
|
27081
27763
|
}
|
|
27082
27764
|
};
|
|
27083
27765
|
|
|
27084
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
27085
|
-
var
|
|
27086
|
-
var isRedacted = (u) => hasProperty(u,
|
|
27087
|
-
var
|
|
27766
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Redacted.js
|
|
27767
|
+
var TypeId23 = "~effect/data/Redacted";
|
|
27768
|
+
var isRedacted = (u) => hasProperty(u, TypeId23);
|
|
27769
|
+
var make24 = (value5, options) => {
|
|
27088
27770
|
const self = Object.create(Proto4);
|
|
27089
27771
|
if (options?.label) {
|
|
27090
27772
|
self.label = options.label;
|
|
@@ -27093,7 +27775,7 @@ var make23 = (value5, options) => {
|
|
|
27093
27775
|
return self;
|
|
27094
27776
|
};
|
|
27095
27777
|
var Proto4 = {
|
|
27096
|
-
[
|
|
27778
|
+
[TypeId23]: {
|
|
27097
27779
|
_A: (_) => _
|
|
27098
27780
|
},
|
|
27099
27781
|
label: void 0,
|
|
@@ -27114,11 +27796,11 @@ var Proto4 = {
|
|
|
27114
27796
|
var value2 = value;
|
|
27115
27797
|
var makeEquivalence5 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
|
|
27116
27798
|
|
|
27117
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
27118
|
-
var
|
|
27799
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schema.js
|
|
27800
|
+
var TypeId24 = TypeId22;
|
|
27119
27801
|
function declareConstructor() {
|
|
27120
27802
|
return (typeParameters, run2, annotations) => {
|
|
27121
|
-
return
|
|
27803
|
+
return make25(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make25(ast))), annotations));
|
|
27122
27804
|
};
|
|
27123
27805
|
}
|
|
27124
27806
|
function declare(is5, annotations) {
|
|
@@ -27145,9 +27827,15 @@ var SchemaErrorTypeId = "~effect/SchemaError/SchemaError";
|
|
|
27145
27827
|
var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
|
|
27146
27828
|
[SchemaErrorTypeId] = SchemaErrorTypeId;
|
|
27147
27829
|
constructor(issue2) {
|
|
27148
|
-
|
|
27149
|
-
|
|
27150
|
-
|
|
27830
|
+
const stackTraceLimit = getStackTraceLimit();
|
|
27831
|
+
setStackTraceLimit(0);
|
|
27832
|
+
try {
|
|
27833
|
+
super({
|
|
27834
|
+
issue: issue2
|
|
27835
|
+
});
|
|
27836
|
+
} finally {
|
|
27837
|
+
setStackTraceLimit(stackTraceLimit);
|
|
27838
|
+
}
|
|
27151
27839
|
}
|
|
27152
27840
|
get message() {
|
|
27153
27841
|
return defaultFormatter(this.issue);
|
|
@@ -27188,9 +27876,9 @@ function toStandardSchemaV1(self, options) {
|
|
|
27188
27876
|
if (exit3) {
|
|
27189
27877
|
return makeStandardResult(exit3);
|
|
27190
27878
|
}
|
|
27191
|
-
return new Promise((
|
|
27879
|
+
return new Promise((resolve3) => {
|
|
27192
27880
|
fiber3.addObserver((exit4) => {
|
|
27193
|
-
|
|
27881
|
+
resolve3(makeStandardResult(exit4));
|
|
27194
27882
|
});
|
|
27195
27883
|
});
|
|
27196
27884
|
};
|
|
@@ -27264,6 +27952,9 @@ function decodeUnknownEffect2(schema, options) {
|
|
|
27264
27952
|
};
|
|
27265
27953
|
}
|
|
27266
27954
|
function fromIssueEffect(self) {
|
|
27955
|
+
if (effectIsExit(self)) {
|
|
27956
|
+
return fromIssueExit(self);
|
|
27957
|
+
}
|
|
27267
27958
|
return catchCause2(self, (cause) => failCauseSync3(() => map6(cause, (issue2) => new SchemaError(issue2))));
|
|
27268
27959
|
}
|
|
27269
27960
|
var decodeEffect2 = decodeUnknownEffect2;
|
|
@@ -27369,29 +28060,29 @@ function encodeUnknownSync2(schema, options) {
|
|
|
27369
28060
|
};
|
|
27370
28061
|
}
|
|
27371
28062
|
var encodeSync2 = encodeUnknownSync2;
|
|
27372
|
-
var
|
|
28063
|
+
var make25 = make22;
|
|
27373
28064
|
function isSchema(u) {
|
|
27374
|
-
return hasProperty(u,
|
|
28065
|
+
return hasProperty(u, TypeId24) && u[TypeId24] === TypeId24;
|
|
27375
28066
|
}
|
|
27376
|
-
var optionalKey2 = /* @__PURE__ */ lambda((schema) =>
|
|
28067
|
+
var optionalKey2 = /* @__PURE__ */ lambda((schema) => make25(optionalKey(schema.ast), {
|
|
27377
28068
|
schema
|
|
27378
28069
|
}));
|
|
27379
28070
|
var requiredKey = /* @__PURE__ */ lambda((self) => self.schema);
|
|
27380
28071
|
var optional2 = /* @__PURE__ */ lambda((self) => {
|
|
27381
28072
|
const schema = UndefinedOr(self);
|
|
27382
|
-
return
|
|
28073
|
+
return make25(optional(self.ast), {
|
|
27383
28074
|
schema
|
|
27384
28075
|
});
|
|
27385
28076
|
});
|
|
27386
28077
|
var required = /* @__PURE__ */ lambda((self) => self.schema.members[0]);
|
|
27387
|
-
var mutableKey2 = /* @__PURE__ */ lambda((schema) =>
|
|
28078
|
+
var mutableKey2 = /* @__PURE__ */ lambda((schema) => make25(mutableKey(schema.ast), {
|
|
27388
28079
|
schema
|
|
27389
28080
|
}));
|
|
27390
28081
|
var readonlyKey = /* @__PURE__ */ lambda((self) => self.schema);
|
|
27391
|
-
var toType2 = /* @__PURE__ */ lambda((schema) =>
|
|
28082
|
+
var toType2 = /* @__PURE__ */ lambda((schema) => make25(toType(schema.ast), {
|
|
27392
28083
|
schema
|
|
27393
28084
|
}));
|
|
27394
|
-
var toEncoded2 = /* @__PURE__ */ lambda((schema) =>
|
|
28085
|
+
var toEncoded2 = /* @__PURE__ */ lambda((schema) => make25(toEncoded(schema.ast), {
|
|
27395
28086
|
schema
|
|
27396
28087
|
}));
|
|
27397
28088
|
var FlipTypeId = "~effect/Schema/flip";
|
|
@@ -27402,13 +28093,13 @@ function flip4(schema) {
|
|
|
27402
28093
|
if (isFlip$(schema)) {
|
|
27403
28094
|
return schema.schema.rebuild(flip3(schema.ast));
|
|
27404
28095
|
}
|
|
27405
|
-
return
|
|
28096
|
+
return make25(flip3(schema.ast), {
|
|
27406
28097
|
[FlipTypeId]: FlipTypeId,
|
|
27407
28098
|
schema
|
|
27408
28099
|
});
|
|
27409
28100
|
}
|
|
27410
28101
|
function Literal2(literal2) {
|
|
27411
|
-
const out =
|
|
28102
|
+
const out = make25(new Literal(literal2), {
|
|
27412
28103
|
literal: literal2,
|
|
27413
28104
|
transform(to) {
|
|
27414
28105
|
return out.pipe(decodeTo2(Literal2(to), {
|
|
@@ -27423,37 +28114,37 @@ function templateLiteralFromParts(parts2) {
|
|
|
27423
28114
|
return new TemplateLiteral(parts2.map((part) => isSchema(part) ? part.ast : new Literal(part)));
|
|
27424
28115
|
}
|
|
27425
28116
|
function TemplateLiteral2(parts2) {
|
|
27426
|
-
return
|
|
28117
|
+
return make25(templateLiteralFromParts(parts2), {
|
|
27427
28118
|
parts: parts2
|
|
27428
28119
|
});
|
|
27429
28120
|
}
|
|
27430
28121
|
function TemplateLiteralParser(parts2) {
|
|
27431
|
-
return
|
|
28122
|
+
return make25(templateLiteralFromParts(parts2).asTemplateLiteralParser(), {
|
|
27432
28123
|
parts: parts2
|
|
27433
28124
|
});
|
|
27434
28125
|
}
|
|
27435
28126
|
function Enum2(enums) {
|
|
27436
|
-
return
|
|
28127
|
+
return make25(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
|
|
27437
28128
|
enums
|
|
27438
28129
|
});
|
|
27439
28130
|
}
|
|
27440
|
-
var Never2 = /* @__PURE__ */
|
|
27441
|
-
var Any2 = /* @__PURE__ */
|
|
27442
|
-
var Unknown2 = /* @__PURE__ */
|
|
27443
|
-
var Null2 = /* @__PURE__ */
|
|
27444
|
-
var Undefined2 = /* @__PURE__ */
|
|
27445
|
-
var String5 = /* @__PURE__ */
|
|
27446
|
-
var Number6 = /* @__PURE__ */
|
|
27447
|
-
var Boolean4 = /* @__PURE__ */
|
|
27448
|
-
var Symbol3 = /* @__PURE__ */
|
|
27449
|
-
var BigInt5 = /* @__PURE__ */
|
|
27450
|
-
var Void2 = /* @__PURE__ */
|
|
27451
|
-
var ObjectKeyword2 = /* @__PURE__ */
|
|
28131
|
+
var Never2 = /* @__PURE__ */ make25(never3);
|
|
28132
|
+
var Any2 = /* @__PURE__ */ make25(any);
|
|
28133
|
+
var Unknown2 = /* @__PURE__ */ make25(unknown);
|
|
28134
|
+
var Null2 = /* @__PURE__ */ make25(null_);
|
|
28135
|
+
var Undefined2 = /* @__PURE__ */ make25(undefined_3);
|
|
28136
|
+
var String5 = /* @__PURE__ */ make25(string2);
|
|
28137
|
+
var Number6 = /* @__PURE__ */ make25(number2);
|
|
28138
|
+
var Boolean4 = /* @__PURE__ */ make25(boolean);
|
|
28139
|
+
var Symbol3 = /* @__PURE__ */ make25(symbol3);
|
|
28140
|
+
var BigInt5 = /* @__PURE__ */ make25(bigInt);
|
|
28141
|
+
var Void2 = /* @__PURE__ */ make25(void_5);
|
|
28142
|
+
var ObjectKeyword2 = /* @__PURE__ */ make25(objectKeyword);
|
|
27452
28143
|
function UniqueSymbol2(symbol6) {
|
|
27453
|
-
return
|
|
28144
|
+
return make25(new UniqueSymbol(symbol6));
|
|
27454
28145
|
}
|
|
27455
28146
|
function makeStruct(ast, fields) {
|
|
27456
|
-
return
|
|
28147
|
+
return make25(ast, {
|
|
27457
28148
|
fields,
|
|
27458
28149
|
mapFields(f, options) {
|
|
27459
28150
|
const fields2 = f(this.fields);
|
|
@@ -27529,19 +28220,19 @@ function extendTo(fields, derive) {
|
|
|
27529
28220
|
};
|
|
27530
28221
|
}
|
|
27531
28222
|
function Record(key, value5) {
|
|
27532
|
-
return
|
|
28223
|
+
return make25(record(key.ast, value5.ast), {
|
|
27533
28224
|
key,
|
|
27534
28225
|
value: value5
|
|
27535
28226
|
});
|
|
27536
28227
|
}
|
|
27537
28228
|
function StructWithRest(schema, records) {
|
|
27538
|
-
return
|
|
28229
|
+
return make25(structWithRest(schema.ast, records.map(getAST)), {
|
|
27539
28230
|
schema,
|
|
27540
28231
|
records
|
|
27541
28232
|
});
|
|
27542
28233
|
}
|
|
27543
28234
|
function makeTuple(ast, elements) {
|
|
27544
|
-
return
|
|
28235
|
+
return make25(ast, {
|
|
27545
28236
|
elements,
|
|
27546
28237
|
mapElements(f, options) {
|
|
27547
28238
|
const elements2 = f(this.elements);
|
|
@@ -27553,15 +28244,15 @@ function Tuple(elements) {
|
|
|
27553
28244
|
return makeTuple(tuple(elements), elements);
|
|
27554
28245
|
}
|
|
27555
28246
|
function TupleWithRest(schema, rest) {
|
|
27556
|
-
return
|
|
28247
|
+
return make25(tupleWithRest(schema.ast, rest.map(getAST)), {
|
|
27557
28248
|
schema,
|
|
27558
28249
|
rest
|
|
27559
28250
|
});
|
|
27560
28251
|
}
|
|
27561
|
-
var ArraySchema = /* @__PURE__ */ lambda((schema) =>
|
|
28252
|
+
var ArraySchema = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [], [schema.ast]), {
|
|
27562
28253
|
value: schema
|
|
27563
28254
|
}));
|
|
27564
|
-
var NonEmptyArray = /* @__PURE__ */ lambda((schema) =>
|
|
28255
|
+
var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [schema.ast], [schema.ast]), {
|
|
27565
28256
|
value: schema
|
|
27566
28257
|
}));
|
|
27567
28258
|
function ArrayEnsure(schema) {
|
|
@@ -27574,12 +28265,12 @@ function UniqueArray(item) {
|
|
|
27574
28265
|
return ArraySchema(item).check(isUnique());
|
|
27575
28266
|
}
|
|
27576
28267
|
var mutable = /* @__PURE__ */ lambda((schema) => {
|
|
27577
|
-
return
|
|
28268
|
+
return make25(new Arrays(true, schema.ast.elements, schema.ast.rest), {
|
|
27578
28269
|
schema
|
|
27579
28270
|
});
|
|
27580
28271
|
});
|
|
27581
28272
|
function makeUnion(ast, members) {
|
|
27582
|
-
return
|
|
28273
|
+
return make25(ast, {
|
|
27583
28274
|
members,
|
|
27584
28275
|
mapMembers(f, options) {
|
|
27585
28276
|
const members2 = f(this.members);
|
|
@@ -27592,7 +28283,7 @@ function Union2(members, options) {
|
|
|
27592
28283
|
}
|
|
27593
28284
|
function Literals(literals) {
|
|
27594
28285
|
const members = literals.map(Literal2);
|
|
27595
|
-
return
|
|
28286
|
+
return make25(union2(members, "anyOf", void 0), {
|
|
27596
28287
|
literals,
|
|
27597
28288
|
members,
|
|
27598
28289
|
mapMembers(f) {
|
|
@@ -27610,18 +28301,18 @@ var NullOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2]));
|
|
|
27610
28301
|
var UndefinedOr = /* @__PURE__ */ lambda((self) => Union2([self, Undefined2]));
|
|
27611
28302
|
var NullishOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2, Undefined2]));
|
|
27612
28303
|
function suspend3(f) {
|
|
27613
|
-
return
|
|
28304
|
+
return make25(new Suspend(() => f().ast));
|
|
27614
28305
|
}
|
|
27615
28306
|
function check(...checks) {
|
|
27616
28307
|
return (self) => self.check(...checks);
|
|
27617
28308
|
}
|
|
27618
28309
|
function refine(refinement, annotations) {
|
|
27619
|
-
return (schema) =>
|
|
28310
|
+
return (schema) => make25(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
|
|
27620
28311
|
schema
|
|
27621
28312
|
});
|
|
27622
28313
|
}
|
|
27623
28314
|
function brand2(identifier2) {
|
|
27624
|
-
return (schema) =>
|
|
28315
|
+
return (schema) => make25(brand(schema.ast, identifier2), {
|
|
27625
28316
|
schema,
|
|
27626
28317
|
identifier: identifier2
|
|
27627
28318
|
});
|
|
@@ -27632,12 +28323,12 @@ function fromBrand(identifier2, ctor) {
|
|
|
27632
28323
|
};
|
|
27633
28324
|
}
|
|
27634
28325
|
function middlewareDecoding2(decode4) {
|
|
27635
|
-
return (schema) =>
|
|
28326
|
+
return (schema) => make25(middlewareDecoding(schema.ast, new Middleware(decode4, identity)), {
|
|
27636
28327
|
schema
|
|
27637
28328
|
});
|
|
27638
28329
|
}
|
|
27639
28330
|
function middlewareEncoding2(encode4) {
|
|
27640
|
-
return (schema) =>
|
|
28331
|
+
return (schema) => make25(middlewareEncoding(schema.ast, new Middleware(identity, encode4)), {
|
|
27641
28332
|
schema
|
|
27642
28333
|
});
|
|
27643
28334
|
}
|
|
@@ -27655,7 +28346,7 @@ function catchEncodingWithContext(f) {
|
|
|
27655
28346
|
}
|
|
27656
28347
|
function decodeTo2(to, transformation) {
|
|
27657
28348
|
return (from) => {
|
|
27658
|
-
return
|
|
28349
|
+
return make25(decodeTo(from.ast, to.ast, transformation ? make15(transformation) : passthrough3()), {
|
|
27659
28350
|
from,
|
|
27660
28351
|
to
|
|
27661
28352
|
});
|
|
@@ -27677,7 +28368,7 @@ function encode(transformation) {
|
|
|
27677
28368
|
};
|
|
27678
28369
|
}
|
|
27679
28370
|
function withConstructorDefault2(defaultValue) {
|
|
27680
|
-
return (schema) =>
|
|
28371
|
+
return (schema) => make25(withConstructorDefault(schema.ast, defaultValue), {
|
|
27681
28372
|
schema
|
|
27682
28373
|
});
|
|
27683
28374
|
}
|
|
@@ -27739,7 +28430,8 @@ function toTaggedUnion(tag4) {
|
|
|
27739
28430
|
discriminants,
|
|
27740
28431
|
isAnyOf,
|
|
27741
28432
|
guards,
|
|
27742
|
-
match: match9
|
|
28433
|
+
match: match9,
|
|
28434
|
+
matchOrElse
|
|
27743
28435
|
});
|
|
27744
28436
|
function walk(schema) {
|
|
27745
28437
|
const ast = schema.ast;
|
|
@@ -27778,6 +28470,23 @@ function toTaggedUnion(tag4) {
|
|
|
27778
28470
|
const handler = Object.hasOwn(cases2, key) ? cases2[key] : void 0;
|
|
27779
28471
|
return handler(value5);
|
|
27780
28472
|
}
|
|
28473
|
+
function matchOrElse() {
|
|
28474
|
+
if (arguments.length === 2) {
|
|
28475
|
+
const cases3 = arguments[0];
|
|
28476
|
+
const orElse5 = arguments[1];
|
|
28477
|
+
return function(value6) {
|
|
28478
|
+
const key2 = value6[tag4];
|
|
28479
|
+
const handler2 = Object.hasOwn(cases3, key2) ? cases3[key2] ?? orElse5 : orElse5;
|
|
28480
|
+
return handler2(value6);
|
|
28481
|
+
};
|
|
28482
|
+
}
|
|
28483
|
+
const value5 = arguments[0];
|
|
28484
|
+
const cases2 = arguments[1];
|
|
28485
|
+
const orElse4 = arguments[2];
|
|
28486
|
+
const key = value5[tag4];
|
|
28487
|
+
const handler = Object.hasOwn(cases2, key) ? cases2[key] ?? orElse4 : orElse4;
|
|
28488
|
+
return handler(value5);
|
|
28489
|
+
}
|
|
27781
28490
|
};
|
|
27782
28491
|
}
|
|
27783
28492
|
function TaggedUnion(casesByTag) {
|
|
@@ -27792,13 +28501,15 @@ function TaggedUnion(casesByTag) {
|
|
|
27792
28501
|
const {
|
|
27793
28502
|
guards,
|
|
27794
28503
|
isAnyOf,
|
|
27795
|
-
match: match9
|
|
28504
|
+
match: match9,
|
|
28505
|
+
matchOrElse
|
|
27796
28506
|
} = toTaggedUnion("_tag")(union7);
|
|
27797
|
-
return
|
|
28507
|
+
return make25(union7.ast, {
|
|
27798
28508
|
cases,
|
|
27799
28509
|
isAnyOf,
|
|
27800
28510
|
guards,
|
|
27801
|
-
match: match9
|
|
28511
|
+
match: match9,
|
|
28512
|
+
matchOrElse
|
|
27802
28513
|
});
|
|
27803
28514
|
}
|
|
27804
28515
|
function Opaque() {
|
|
@@ -28216,7 +28927,7 @@ function isUncapitalized(annotations) {
|
|
|
28216
28927
|
var isUncapitalizedReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isUncapitalized", Null2, ({
|
|
28217
28928
|
annotations
|
|
28218
28929
|
}) => isUncapitalized(annotations));
|
|
28219
|
-
var Finite = /* @__PURE__ */
|
|
28930
|
+
var Finite = /* @__PURE__ */ make25(finite);
|
|
28220
28931
|
var isFinite3 = isFinite2;
|
|
28221
28932
|
var isFiniteReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isFinite", Null2, ({
|
|
28222
28933
|
annotations
|
|
@@ -29200,7 +29911,7 @@ function Option(value5) {
|
|
|
29200
29911
|
onSome: (t) => `some(${value6(t)})`
|
|
29201
29912
|
})
|
|
29202
29913
|
});
|
|
29203
|
-
return
|
|
29914
|
+
return make25(schema.ast, {
|
|
29204
29915
|
value: value5
|
|
29205
29916
|
});
|
|
29206
29917
|
}
|
|
@@ -29291,7 +30002,7 @@ function Result(success2, failure) {
|
|
|
29291
30002
|
onFailure: (t) => `failure(${failure2(t)})`
|
|
29292
30003
|
})
|
|
29293
30004
|
});
|
|
29294
|
-
return
|
|
30005
|
+
return make25(schema.ast, {
|
|
29295
30006
|
success: success2,
|
|
29296
30007
|
failure
|
|
29297
30008
|
});
|
|
@@ -29357,23 +30068,23 @@ function Redacted(value5, options) {
|
|
|
29357
30068
|
}),
|
|
29358
30069
|
expected: "Redacted",
|
|
29359
30070
|
toCodecJson: ([value6]) => link()(value6, {
|
|
29360
|
-
decode: transform((e) =>
|
|
30071
|
+
decode: transform((e) => make24(e, {
|
|
29361
30072
|
label
|
|
29362
30073
|
})),
|
|
29363
30074
|
encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
|
|
29364
30075
|
}),
|
|
29365
30076
|
toArbitrary: ([value6]) => () => ({
|
|
29366
|
-
arbitrary: value6.arbitrary.map((a) =>
|
|
30077
|
+
arbitrary: value6.arbitrary.map((a) => make24(a, {
|
|
29367
30078
|
label
|
|
29368
30079
|
})),
|
|
29369
|
-
terminal: value6.terminal?.map((a) =>
|
|
30080
|
+
terminal: value6.terminal?.map((a) => make24(a, {
|
|
29370
30081
|
label
|
|
29371
30082
|
}))
|
|
29372
30083
|
}),
|
|
29373
30084
|
toFormatter: () => globalThis.String,
|
|
29374
30085
|
toEquivalence: ([value6]) => makeEquivalence5(value6)
|
|
29375
30086
|
});
|
|
29376
|
-
return
|
|
30087
|
+
return make25(schema.ast, {
|
|
29377
30088
|
value: value5
|
|
29378
30089
|
});
|
|
29379
30090
|
}
|
|
@@ -29390,7 +30101,7 @@ function RedactedFromValue(value5, options) {
|
|
|
29390
30101
|
label: options?.label,
|
|
29391
30102
|
disallowJsonEncode: options?.disallowEncode
|
|
29392
30103
|
}), {
|
|
29393
|
-
decode: transform((t) =>
|
|
30104
|
+
decode: transform((t) => make24(t, {
|
|
29394
30105
|
label: options?.label
|
|
29395
30106
|
})),
|
|
29396
30107
|
encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
|
|
@@ -29454,7 +30165,7 @@ function CauseReason(error3, defect) {
|
|
|
29454
30165
|
toEquivalence: ([error4, defect2]) => causeReasonToEquivalence(error4, defect2),
|
|
29455
30166
|
toFormatter: ([error4, defect2]) => causeReasonToFormatter(error4, defect2)
|
|
29456
30167
|
});
|
|
29457
|
-
return
|
|
30168
|
+
return make25(schema.ast, {
|
|
29458
30169
|
error: error3,
|
|
29459
30170
|
defect
|
|
29460
30171
|
});
|
|
@@ -29535,7 +30246,7 @@ function Cause(error3, defect) {
|
|
|
29535
30246
|
toEquivalence: ([error4, defect2]) => causeToEquivalence(error4, defect2),
|
|
29536
30247
|
toFormatter: ([error4, defect2]) => causeToFormatter(error4, defect2)
|
|
29537
30248
|
});
|
|
29538
|
-
return
|
|
30249
|
+
return make25(schema.ast, {
|
|
29539
30250
|
error: error3,
|
|
29540
30251
|
defect
|
|
29541
30252
|
});
|
|
@@ -29712,7 +30423,7 @@ function Exit(value5, error3, defect) {
|
|
|
29712
30423
|
};
|
|
29713
30424
|
}
|
|
29714
30425
|
});
|
|
29715
|
-
return
|
|
30426
|
+
return make25(schema.ast, {
|
|
29716
30427
|
value: value5,
|
|
29717
30428
|
error: error3,
|
|
29718
30429
|
defect
|
|
@@ -29806,7 +30517,7 @@ function ReadonlyMap(key, value5) {
|
|
|
29806
30517
|
return `ReadonlyMap(${size6}) { ${entries3.join(", ")} }`;
|
|
29807
30518
|
}
|
|
29808
30519
|
});
|
|
29809
|
-
return
|
|
30520
|
+
return make25(schema.ast, {
|
|
29810
30521
|
key,
|
|
29811
30522
|
value: value5
|
|
29812
30523
|
});
|
|
@@ -29818,6 +30529,157 @@ var ReadonlyMapReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/R
|
|
|
29818
30529
|
const schema = ReadonlyMap(typeParameters[0], typeParameters[1]);
|
|
29819
30530
|
return annotations === void 0 ? schema : schema.annotate(annotations);
|
|
29820
30531
|
});
|
|
30532
|
+
function graphEncodedSchema(type3, node, edge) {
|
|
30533
|
+
return Struct({
|
|
30534
|
+
type: Literal2(type3),
|
|
30535
|
+
nodes: ArraySchema(Struct({
|
|
30536
|
+
index: Natural,
|
|
30537
|
+
data: node
|
|
30538
|
+
})),
|
|
30539
|
+
edges: ArraySchema(Struct({
|
|
30540
|
+
index: Natural,
|
|
30541
|
+
source: Natural,
|
|
30542
|
+
target: Natural,
|
|
30543
|
+
data: edge
|
|
30544
|
+
}))
|
|
30545
|
+
});
|
|
30546
|
+
}
|
|
30547
|
+
function graphDecode(input, options) {
|
|
30548
|
+
let previous = -1;
|
|
30549
|
+
const indexes = /* @__PURE__ */ new Set();
|
|
30550
|
+
for (let i = 0; i < input.nodes.length; i++) {
|
|
30551
|
+
const index2 = input.nodes[i].index;
|
|
30552
|
+
if (index2 <= previous) {
|
|
30553
|
+
return fail6(new Pointer(["nodes", i, "index"], new InvalidValue({
|
|
30554
|
+
expected: "a strictly increasing node index"
|
|
30555
|
+
}, index2, options)));
|
|
30556
|
+
}
|
|
30557
|
+
previous = index2;
|
|
30558
|
+
indexes.add(index2);
|
|
30559
|
+
}
|
|
30560
|
+
previous = -1;
|
|
30561
|
+
for (let i = 0; i < input.edges.length; i++) {
|
|
30562
|
+
const edge = input.edges[i];
|
|
30563
|
+
if (edge.index <= previous) {
|
|
30564
|
+
return fail6(new Pointer(["edges", i, "index"], new InvalidValue({
|
|
30565
|
+
expected: "a strictly increasing edge index"
|
|
30566
|
+
}, edge.index, options)));
|
|
30567
|
+
}
|
|
30568
|
+
previous = edge.index;
|
|
30569
|
+
if (!indexes.has(edge.source)) {
|
|
30570
|
+
return fail6(new Pointer(["edges", i, "source"], new InvalidValue({
|
|
30571
|
+
expected: "an encoded node index"
|
|
30572
|
+
}, edge.source, options)));
|
|
30573
|
+
}
|
|
30574
|
+
if (!indexes.has(edge.target)) {
|
|
30575
|
+
return fail6(new Pointer(["edges", i, "target"], new InvalidValue({
|
|
30576
|
+
expected: "an encoded node index"
|
|
30577
|
+
}, edge.target, options)));
|
|
30578
|
+
}
|
|
30579
|
+
}
|
|
30580
|
+
return succeed6(hydrate(input));
|
|
30581
|
+
}
|
|
30582
|
+
function graphEncode(input, type3, options) {
|
|
30583
|
+
if (!isGraph(input) || input.mutable || input.type !== type3) {
|
|
30584
|
+
return fail6(new InvalidValue({
|
|
30585
|
+
expected: `an immutable ${type3} Graph`
|
|
30586
|
+
}, input, options));
|
|
30587
|
+
}
|
|
30588
|
+
return succeed6(snapshot(input));
|
|
30589
|
+
}
|
|
30590
|
+
function graphToEquivalence(node, edge) {
|
|
30591
|
+
return (self, that) => {
|
|
30592
|
+
const a = snapshot(self);
|
|
30593
|
+
const b = snapshot(that);
|
|
30594
|
+
if (a.type !== b.type || a.nodes.length !== b.nodes.length || a.edges.length !== b.edges.length) return false;
|
|
30595
|
+
for (let i = 0; i < a.nodes.length; i++) {
|
|
30596
|
+
if (a.nodes[i].index !== b.nodes[i].index || !node(a.nodes[i].data, b.nodes[i].data)) return false;
|
|
30597
|
+
}
|
|
30598
|
+
for (let i = 0; i < a.edges.length; i++) {
|
|
30599
|
+
const ae = a.edges[i];
|
|
30600
|
+
const be = b.edges[i];
|
|
30601
|
+
const sameEndpoints = a.type === "directed" ? ae.source === be.source && ae.target === be.target : ae.source === be.source && ae.target === be.target || ae.source === be.target && ae.target === be.source;
|
|
30602
|
+
if (ae.index !== be.index || !sameEndpoints || !edge(ae.data, be.data)) return false;
|
|
30603
|
+
}
|
|
30604
|
+
return true;
|
|
30605
|
+
};
|
|
30606
|
+
}
|
|
30607
|
+
function graphToArbitrary(type3, node, edge) {
|
|
30608
|
+
return (fc, ctx) => {
|
|
30609
|
+
const empty8 = hydrate({
|
|
30610
|
+
type: type3,
|
|
30611
|
+
nodes: [],
|
|
30612
|
+
edges: []
|
|
30613
|
+
});
|
|
30614
|
+
const terminal = fc.constant(empty8);
|
|
30615
|
+
const arbitrary = fc.array(node.arbitrary).chain((values3) => {
|
|
30616
|
+
const nodes = values3.map((data, index2) => ({
|
|
30617
|
+
index: index2,
|
|
30618
|
+
data
|
|
30619
|
+
}));
|
|
30620
|
+
if (nodes.length === 0) return terminal;
|
|
30621
|
+
const endpoint = fc.integer({
|
|
30622
|
+
min: 0,
|
|
30623
|
+
max: nodes.length - 1
|
|
30624
|
+
});
|
|
30625
|
+
return fc.array(fc.tuple(endpoint, endpoint, edge.arbitrary)).map((values4) => hydrate({
|
|
30626
|
+
type: type3,
|
|
30627
|
+
nodes,
|
|
30628
|
+
edges: values4.map(([source, target, data], index2) => ({
|
|
30629
|
+
index: index2,
|
|
30630
|
+
source,
|
|
30631
|
+
target,
|
|
30632
|
+
data
|
|
30633
|
+
}))
|
|
30634
|
+
}));
|
|
30635
|
+
});
|
|
30636
|
+
return withRecursion(fc, ctx, terminal, arbitrary);
|
|
30637
|
+
};
|
|
30638
|
+
}
|
|
30639
|
+
function Graph(type3, node, edge) {
|
|
30640
|
+
const schema = declareConstructor()([node, edge], ([node2, edge2]) => {
|
|
30641
|
+
const encoded = graphEncodedSchema(type3, node2, edge2);
|
|
30642
|
+
return (input, ast, options) => {
|
|
30643
|
+
if (!isGraph(input) || input.mutable || input.type !== type3) {
|
|
30644
|
+
return fail6(new InvalidType(ast, input, options));
|
|
30645
|
+
}
|
|
30646
|
+
return flatMap5(decodeUnknownEffect(encoded)(snapshot(input), options), (snapshot2) => graphDecode(snapshot2, options));
|
|
30647
|
+
};
|
|
30648
|
+
}, {
|
|
30649
|
+
representation: {
|
|
30650
|
+
id: "effect/schema/Graph",
|
|
30651
|
+
payload: type3
|
|
30652
|
+
},
|
|
30653
|
+
toCode: ({
|
|
30654
|
+
typeParameters
|
|
30655
|
+
}) => ({
|
|
30656
|
+
runtime: `Schema.Graph(${format(type3)}, ${typeParameters[0].runtime}, ${typeParameters[1].runtime})`,
|
|
30657
|
+
Type: `Graph.Graph<${typeParameters[0].Type}, ${typeParameters[1].Type}, ${format(type3)}>`,
|
|
30658
|
+
importDeclarations: [`import * as Graph from "effect/Graph"`]
|
|
30659
|
+
}),
|
|
30660
|
+
expected: `an immutable ${type3} Graph`,
|
|
30661
|
+
toCodec: ([node2, edge2]) => link()(graphEncodedSchema(type3, node2, edge2), transformOrFail2({
|
|
30662
|
+
decode: graphDecode,
|
|
30663
|
+
encode: (graph, options) => graphEncode(graph, type3, options)
|
|
30664
|
+
})),
|
|
30665
|
+
toArbitrary: ([node2, edge2]) => graphToArbitrary(type3, node2, edge2),
|
|
30666
|
+
toEquivalence: ([node2, edge2]) => graphToEquivalence(node2, edge2),
|
|
30667
|
+
toFormatter: () => globalThis.String
|
|
30668
|
+
});
|
|
30669
|
+
return make25(schema.ast, {
|
|
30670
|
+
type: type3,
|
|
30671
|
+
node,
|
|
30672
|
+
edge
|
|
30673
|
+
});
|
|
30674
|
+
}
|
|
30675
|
+
var GraphReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/Graph", /* @__PURE__ */ Literals(["directed", "undirected"]), ({
|
|
30676
|
+
annotations,
|
|
30677
|
+
payload,
|
|
30678
|
+
typeParameters
|
|
30679
|
+
}) => {
|
|
30680
|
+
const schema = Graph(payload, typeParameters[0], typeParameters[1]);
|
|
30681
|
+
return annotations === void 0 ? schema : schema.annotate(annotations);
|
|
30682
|
+
});
|
|
29821
30683
|
function HashMap(key, value5) {
|
|
29822
30684
|
const schema = declareConstructor()([key, value5], ([key2, value6]) => {
|
|
29823
30685
|
const entries3 = ArraySchema(Tuple([key2, value6]));
|
|
@@ -29858,7 +30720,7 @@ function HashMap(key, value5) {
|
|
|
29858
30720
|
return `HashMap(${size6}) { ${entries3.join(", ")} }`;
|
|
29859
30721
|
}
|
|
29860
30722
|
});
|
|
29861
|
-
return
|
|
30723
|
+
return make25(schema.ast, {
|
|
29862
30724
|
key,
|
|
29863
30725
|
value: value5
|
|
29864
30726
|
});
|
|
@@ -29909,7 +30771,7 @@ function ReadonlySet(value5) {
|
|
|
29909
30771
|
return `ReadonlySet(${size6}) { ${values3.join(", ")} }`;
|
|
29910
30772
|
}
|
|
29911
30773
|
});
|
|
29912
|
-
return
|
|
30774
|
+
return make25(schema.ast, {
|
|
29913
30775
|
value: value5
|
|
29914
30776
|
});
|
|
29915
30777
|
}
|
|
@@ -29959,7 +30821,7 @@ function HashSet(value5) {
|
|
|
29959
30821
|
return `HashSet(${size6}) { ${values3.join(", ")} }`;
|
|
29960
30822
|
}
|
|
29961
30823
|
});
|
|
29962
|
-
return
|
|
30824
|
+
return make25(schema.ast, {
|
|
29963
30825
|
value: value5
|
|
29964
30826
|
});
|
|
29965
30827
|
}
|
|
@@ -30009,7 +30871,7 @@ function Chunk(value5) {
|
|
|
30009
30871
|
return `Chunk(${size6}) { ${values3.join(", ")} }`;
|
|
30010
30872
|
}
|
|
30011
30873
|
});
|
|
30012
|
-
return
|
|
30874
|
+
return make25(schema.ast, {
|
|
30013
30875
|
value: value5
|
|
30014
30876
|
});
|
|
30015
30877
|
}
|
|
@@ -30399,7 +31261,7 @@ var NumberFromString = /* @__PURE__ */ String5.annotate({
|
|
|
30399
31261
|
var FiniteFromString = /* @__PURE__ */ String5.annotate({
|
|
30400
31262
|
expected: "a string that will be decoded as a finite number"
|
|
30401
31263
|
}).pipe(/* @__PURE__ */ decodeTo2(Finite, numberFromString));
|
|
30402
|
-
var BigIntFromString = /* @__PURE__ */
|
|
31264
|
+
var BigIntFromString = /* @__PURE__ */ make25(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt5, bigintFromString));
|
|
30403
31265
|
var Trimmed = /* @__PURE__ */ String5.check(/* @__PURE__ */ isTrimmed());
|
|
30404
31266
|
var Trim = /* @__PURE__ */ String5.annotate({
|
|
30405
31267
|
expected: "a string that will be decoded as a trimmed string"
|
|
@@ -30602,7 +31464,7 @@ function makeClass(Inherited, identifier2, struct2, annotations, proto) {
|
|
|
30602
31464
|
}
|
|
30603
31465
|
});
|
|
30604
31466
|
}
|
|
30605
|
-
static [
|
|
31467
|
+
static [TypeId24] = TypeId24;
|
|
30606
31468
|
get [ClassTypeId]() {
|
|
30607
31469
|
return ClassTypeId;
|
|
30608
31470
|
}
|
|
@@ -30678,7 +31540,7 @@ function getClassSchemaFactory(from, identifier2, annotations) {
|
|
|
30678
31540
|
const ClassTypeId = getClassTypeId(identifier2);
|
|
30679
31541
|
const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
|
|
30680
31542
|
const transformation = getClassTransformation(self);
|
|
30681
|
-
const to =
|
|
31543
|
+
const to = make25(new Declaration([from.ast], () => (input, ast, options) => {
|
|
30682
31544
|
return isClassValue(input) ? succeed6(input) : fail6(new InvalidType(ast, input, options));
|
|
30683
31545
|
}, {
|
|
30684
31546
|
identifier: identifier2,
|
|
@@ -30790,9 +31652,9 @@ function toFormatter(schema, options) {
|
|
|
30790
31652
|
}
|
|
30791
31653
|
}
|
|
30792
31654
|
if (rest.length > 0) {
|
|
30793
|
-
const [
|
|
31655
|
+
const [head4, ...tail2] = rest;
|
|
30794
31656
|
for (; i < t.length - tail2.length; i++) {
|
|
30795
|
-
out.push(
|
|
31657
|
+
out.push(head4(t[i]));
|
|
30796
31658
|
}
|
|
30797
31659
|
for (let j = 0; j < tail2.length; j++) {
|
|
30798
31660
|
out.push(tail2[j](t[i + j]));
|
|
@@ -30862,15 +31724,15 @@ function overrideToEquivalence(toEquivalence3) {
|
|
|
30862
31724
|
function toEquivalence2(schema) {
|
|
30863
31725
|
return toEquivalence(schema.ast);
|
|
30864
31726
|
}
|
|
30865
|
-
function toRepresentation2(schema) {
|
|
30866
|
-
return toRepresentation(schema.ast);
|
|
31727
|
+
function toRepresentation2(schema, options) {
|
|
31728
|
+
return toRepresentation(schema.ast, options);
|
|
30867
31729
|
}
|
|
30868
31730
|
function toJsonSchemaDocument2(schema, options) {
|
|
30869
|
-
const document = toRepresentation(toCodecJsonAST(schema.ast),
|
|
31731
|
+
const document = toRepresentation(toCodecJsonAST(schema.ast), options);
|
|
30870
31732
|
return toJsonSchemaDocument(document, options);
|
|
30871
31733
|
}
|
|
30872
31734
|
function toCodecJson(schema) {
|
|
30873
|
-
return
|
|
31735
|
+
return make25(toCodecJsonAST(schema.ast), {
|
|
30874
31736
|
schema
|
|
30875
31737
|
});
|
|
30876
31738
|
}
|
|
@@ -30926,7 +31788,7 @@ function toCodecJsonASTStep(ast, recur3) {
|
|
|
30926
31788
|
if (!isFunction(getLink)) {
|
|
30927
31789
|
return replaceEncoding(ast, [unknownToJson]);
|
|
30928
31790
|
}
|
|
30929
|
-
const typeParameters = ast.typeParameters.map((tp) =>
|
|
31791
|
+
const typeParameters = ast.typeParameters.map((tp) => make22(toEncoded(tp)));
|
|
30930
31792
|
const link2 = getLink(typeParameters);
|
|
30931
31793
|
return link2 === void 0 ? ast : replaceEncoding(ast, [mapLink(link2, recur3)]);
|
|
30932
31794
|
}
|
|
@@ -30961,7 +31823,7 @@ function toCodecJsonASTStep(ast, recur3) {
|
|
|
30961
31823
|
return ast;
|
|
30962
31824
|
}
|
|
30963
31825
|
function toCodecIso(schema) {
|
|
30964
|
-
return
|
|
31826
|
+
return make25(toCodecIsoAST(toType(schema.ast)));
|
|
30965
31827
|
}
|
|
30966
31828
|
var toCodecIsoAST = /* @__PURE__ */ memoize((ast) => {
|
|
30967
31829
|
const out = toCodecIsoASTStep(ast, toCodecIsoAST);
|
|
@@ -30972,7 +31834,7 @@ function toCodecIsoASTStep(ast, recur3) {
|
|
|
30972
31834
|
case "Declaration": {
|
|
30973
31835
|
const getLink = ast.annotations?.toCodecIso ?? ast.annotations?.toCodec;
|
|
30974
31836
|
if (isFunction(getLink)) {
|
|
30975
|
-
const link2 = getLink(ast.typeParameters.map((tp) =>
|
|
31837
|
+
const link2 = getLink(ast.typeParameters.map((tp) => make22(tp)));
|
|
30976
31838
|
return replaceEncoding(ast, [mapLink(link2, recur3)]);
|
|
30977
31839
|
}
|
|
30978
31840
|
return ast;
|
|
@@ -30986,12 +31848,12 @@ function toCodecIsoASTStep(ast, recur3) {
|
|
|
30986
31848
|
return ast;
|
|
30987
31849
|
}
|
|
30988
31850
|
function toCodecStringTree(schema) {
|
|
30989
|
-
return
|
|
31851
|
+
return make25(toCodecStringTreeAST(schema.ast), {
|
|
30990
31852
|
schema
|
|
30991
31853
|
});
|
|
30992
31854
|
}
|
|
30993
31855
|
function toCodecArrayFromSingle(schema) {
|
|
30994
|
-
return
|
|
31856
|
+
return make25(toCodecArrayFromSingleAST(schema.ast));
|
|
30995
31857
|
}
|
|
30996
31858
|
function toEncoderXml(codec2, options) {
|
|
30997
31859
|
const rootName = resolveIdentifier(codec2.ast) ?? resolveTitle(codec2.ast);
|
|
@@ -31106,7 +31968,7 @@ var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
|
|
|
31106
31968
|
function toCodecStringTreeASTStep(ast, recur3, onMissingAnnotation) {
|
|
31107
31969
|
switch (ast._tag) {
|
|
31108
31970
|
case "Declaration": {
|
|
31109
|
-
const typeParameters = ast.typeParameters.map((tp) =>
|
|
31971
|
+
const typeParameters = ast.typeParameters.map((tp) => make25(recur3(toEncoded(tp))));
|
|
31110
31972
|
const getStringTreeLink = ast.annotations?.toCodecStringTree;
|
|
31111
31973
|
if (isFunction(getStringTreeLink)) {
|
|
31112
31974
|
const link3 = getStringTreeLink(typeParameters);
|
|
@@ -31259,7 +32121,7 @@ function toIsoFocus(_) {
|
|
|
31259
32121
|
}
|
|
31260
32122
|
function overrideToCodecIso(to, transformation) {
|
|
31261
32123
|
return (schema) => {
|
|
31262
|
-
return
|
|
32124
|
+
return make25(annotate(schema.ast, {
|
|
31263
32125
|
toCodecIso: () => new Link(to.ast, make15(transformation))
|
|
31264
32126
|
}), {
|
|
31265
32127
|
schema
|
|
@@ -31286,12 +32148,13 @@ function Tree(node) {
|
|
|
31286
32148
|
const Tree2 = Union2([node, ArraySchema(Tree$ref), Record(String5, Tree$ref)]);
|
|
31287
32149
|
return Tree2;
|
|
31288
32150
|
}
|
|
31289
|
-
var Json2 = /* @__PURE__ */
|
|
32151
|
+
var Json2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(Json, {
|
|
31290
32152
|
toCode: () => ({
|
|
31291
32153
|
runtime: "Schema.Json",
|
|
31292
32154
|
Type: "Schema.Json"
|
|
31293
32155
|
})
|
|
31294
32156
|
}));
|
|
32157
|
+
var JsonObject = /* @__PURE__ */ Record(String5, Json2);
|
|
31295
32158
|
var JsonReviver = /* @__PURE__ */ makeFixedDeclarationReviver("effect/schema/Json", Json2);
|
|
31296
32159
|
var JsonError = /* @__PURE__ */ Struct({
|
|
31297
32160
|
message: String5,
|
|
@@ -31299,7 +32162,7 @@ var JsonError = /* @__PURE__ */ Struct({
|
|
|
31299
32162
|
stack: /* @__PURE__ */ optionalKey2(String5),
|
|
31300
32163
|
cause: /* @__PURE__ */ optionalKey2(Json2)
|
|
31301
32164
|
});
|
|
31302
|
-
var MutableJson2 = /* @__PURE__ */
|
|
32165
|
+
var MutableJson2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(MutableJson, {
|
|
31303
32166
|
toCode: () => ({
|
|
31304
32167
|
runtime: "Schema.MutableJson",
|
|
31305
32168
|
Type: "Schema.MutableJson"
|
|
@@ -31313,7 +32176,7 @@ function resolveAnnotationsKey(schema) {
|
|
|
31313
32176
|
return schema.ast.context?.annotations;
|
|
31314
32177
|
}
|
|
31315
32178
|
|
|
31316
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
32179
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Console.js
|
|
31317
32180
|
var Console_exports = {};
|
|
31318
32181
|
__export(Console_exports, {
|
|
31319
32182
|
Console: () => Console,
|
|
@@ -31410,7 +32273,7 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
|
|
|
31410
32273
|
console2.timeEnd(label);
|
|
31411
32274
|
}))));
|
|
31412
32275
|
|
|
31413
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
32276
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Match.js
|
|
31414
32277
|
var Match_exports = {};
|
|
31415
32278
|
__export(Match_exports, {
|
|
31416
32279
|
any: () => any3,
|
|
@@ -31423,6 +32286,7 @@ __export(Match_exports, {
|
|
|
31423
32286
|
discriminators: () => discriminators2,
|
|
31424
32287
|
discriminatorsExhaustive: () => discriminatorsExhaustive2,
|
|
31425
32288
|
exhaustive: () => exhaustive2,
|
|
32289
|
+
fn: () => fn4,
|
|
31426
32290
|
instanceOf: () => instanceOf3,
|
|
31427
32291
|
instanceOfUnsafe: () => instanceOfUnsafe,
|
|
31428
32292
|
is: () => is4,
|
|
@@ -31452,35 +32316,38 @@ __export(Match_exports, {
|
|
|
31452
32316
|
withReturnType: () => withReturnType2
|
|
31453
32317
|
});
|
|
31454
32318
|
|
|
31455
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
31456
|
-
var
|
|
32319
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/matcher.js
|
|
32320
|
+
var TypeId25 = "~effect/match/Match/Matcher";
|
|
31457
32321
|
var TypeMatcherProto = {
|
|
31458
|
-
[
|
|
32322
|
+
[TypeId25]: {
|
|
31459
32323
|
_input: identity,
|
|
31460
32324
|
_filters: identity,
|
|
31461
32325
|
_remaining: identity,
|
|
31462
32326
|
_result: identity,
|
|
31463
|
-
_return: identity
|
|
32327
|
+
_return: identity,
|
|
32328
|
+
_args: identity
|
|
31464
32329
|
},
|
|
31465
32330
|
_tag: "TypeMatcher",
|
|
31466
32331
|
add(_case) {
|
|
31467
|
-
return makeTypeMatcher([...this.cases, _case]);
|
|
32332
|
+
return makeTypeMatcher(this.select, [...this.cases, _case]);
|
|
31468
32333
|
},
|
|
31469
32334
|
pipe() {
|
|
31470
32335
|
return pipeArguments(this, arguments);
|
|
31471
32336
|
}
|
|
31472
32337
|
};
|
|
31473
|
-
function makeTypeMatcher(cases) {
|
|
32338
|
+
function makeTypeMatcher(select, cases) {
|
|
31474
32339
|
const matcher = Object.create(TypeMatcherProto);
|
|
32340
|
+
matcher.select = select;
|
|
31475
32341
|
matcher.cases = cases;
|
|
31476
32342
|
return matcher;
|
|
31477
32343
|
}
|
|
31478
32344
|
var ValueMatcherProto = {
|
|
31479
|
-
[
|
|
32345
|
+
[TypeId25]: {
|
|
31480
32346
|
_input: identity,
|
|
31481
32347
|
_filters: identity,
|
|
31482
32348
|
_result: identity,
|
|
31483
|
-
_return: identity
|
|
32349
|
+
_return: identity,
|
|
32350
|
+
_flavor: identity
|
|
31484
32351
|
},
|
|
31485
32352
|
_tag: "ValueMatcher",
|
|
31486
32353
|
add(_case) {
|
|
@@ -31573,14 +32440,15 @@ var makeAndPredicate = (patterns) => {
|
|
|
31573
32440
|
return true;
|
|
31574
32441
|
};
|
|
31575
32442
|
};
|
|
31576
|
-
var type = () => makeTypeMatcher([]);
|
|
32443
|
+
var type = () => makeTypeMatcher(identity, []);
|
|
32444
|
+
var fn3 = (select) => makeTypeMatcher(select, []);
|
|
31577
32445
|
var value3 = (i) => makeValueMatcher(i, fail2(i));
|
|
31578
32446
|
var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
|
|
31579
|
-
const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
|
|
32447
|
+
const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
31580
32448
|
return match9(input);
|
|
31581
32449
|
});
|
|
31582
32450
|
var typeTags = () => (fields) => {
|
|
31583
|
-
const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
|
|
32451
|
+
const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
31584
32452
|
return (input) => match9(input);
|
|
31585
32453
|
};
|
|
31586
32454
|
var withReturnType = () => (self) => self;
|
|
@@ -31638,9 +32506,9 @@ var orElse2 = (f) => (self) => {
|
|
|
31638
32506
|
if (isResult2(toResult)) {
|
|
31639
32507
|
return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
|
|
31640
32508
|
}
|
|
31641
|
-
return (
|
|
31642
|
-
const a = toResult(
|
|
31643
|
-
return isSuccess2(a) ? a.success : f(a.failure);
|
|
32509
|
+
return (...args2) => {
|
|
32510
|
+
const a = toResult(...args2);
|
|
32511
|
+
return isSuccess2(a) ? a.success : f(a.failure, ...args2);
|
|
31644
32512
|
};
|
|
31645
32513
|
};
|
|
31646
32514
|
var orElseAbsurd = (self) => orElse2(() => {
|
|
@@ -31653,22 +32521,24 @@ var result3 = (self) => {
|
|
|
31653
32521
|
const len = self.cases.length;
|
|
31654
32522
|
if (len === 1) {
|
|
31655
32523
|
const _case = self.cases[0];
|
|
31656
|
-
return (
|
|
32524
|
+
return (...args2) => {
|
|
32525
|
+
const input = self.select(...args2);
|
|
31657
32526
|
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
31658
|
-
return succeed2(_case.evaluate(input));
|
|
32527
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
31659
32528
|
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
31660
|
-
return succeed2(_case.evaluate(input));
|
|
32529
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
31661
32530
|
}
|
|
31662
32531
|
return fail2(input);
|
|
31663
32532
|
};
|
|
31664
32533
|
}
|
|
31665
|
-
return (
|
|
32534
|
+
return (...args2) => {
|
|
32535
|
+
const input = self.select(...args2);
|
|
31666
32536
|
for (let i = 0; i < len; i++) {
|
|
31667
32537
|
const _case = self.cases[i];
|
|
31668
32538
|
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
31669
|
-
return succeed2(_case.evaluate(input));
|
|
32539
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
31670
32540
|
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
31671
|
-
return succeed2(_case.evaluate(input));
|
|
32541
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
31672
32542
|
}
|
|
31673
32543
|
}
|
|
31674
32544
|
return fail2(input);
|
|
@@ -31682,7 +32552,7 @@ var option3 = (self) => {
|
|
|
31682
32552
|
onSuccess: some2
|
|
31683
32553
|
});
|
|
31684
32554
|
}
|
|
31685
|
-
return (
|
|
32555
|
+
return (...args2) => match2(toResult(...args2), {
|
|
31686
32556
|
onFailure: () => none2(),
|
|
31687
32557
|
onSuccess: some2
|
|
31688
32558
|
});
|
|
@@ -31696,8 +32566,8 @@ var exhaustive = (self) => {
|
|
|
31696
32566
|
}
|
|
31697
32567
|
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
31698
32568
|
}
|
|
31699
|
-
return (
|
|
31700
|
-
const result5 = toResult(
|
|
32569
|
+
return (...args2) => {
|
|
32570
|
+
const result5 = toResult(...args2);
|
|
31701
32571
|
if (isSuccess2(result5)) {
|
|
31702
32572
|
return result5.success;
|
|
31703
32573
|
}
|
|
@@ -31705,8 +32575,9 @@ var exhaustive = (self) => {
|
|
|
31705
32575
|
};
|
|
31706
32576
|
};
|
|
31707
32577
|
|
|
31708
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
32578
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Match.js
|
|
31709
32579
|
var type2 = type;
|
|
32580
|
+
var fn4 = fn3;
|
|
31710
32581
|
var value4 = value3;
|
|
31711
32582
|
var valueTags2 = valueTags;
|
|
31712
32583
|
var typeTags2 = typeTags;
|
|
@@ -31744,7 +32615,7 @@ var result4 = result3;
|
|
|
31744
32615
|
var option4 = option3;
|
|
31745
32616
|
var exhaustive2 = exhaustive;
|
|
31746
32617
|
|
|
31747
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
32618
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Ref.js
|
|
31748
32619
|
var Ref_exports = {};
|
|
31749
32620
|
__export(Ref_exports, {
|
|
31750
32621
|
get: () => get6,
|
|
@@ -31752,7 +32623,7 @@ __export(Ref_exports, {
|
|
|
31752
32623
|
getAndUpdate: () => getAndUpdate,
|
|
31753
32624
|
getAndUpdateSome: () => getAndUpdateSome,
|
|
31754
32625
|
getUnsafe: () => getUnsafe6,
|
|
31755
|
-
make: () =>
|
|
32626
|
+
make: () => make26,
|
|
31756
32627
|
makeUnsafe: () => makeUnsafe5,
|
|
31757
32628
|
modify: () => modify4,
|
|
31758
32629
|
modifySome: () => modifySome,
|
|
@@ -31763,9 +32634,9 @@ __export(Ref_exports, {
|
|
|
31763
32634
|
updateSome: () => updateSome,
|
|
31764
32635
|
updateSomeAndGet: () => updateSomeAndGet
|
|
31765
32636
|
});
|
|
31766
|
-
var
|
|
32637
|
+
var TypeId26 = "~effect/Ref";
|
|
31767
32638
|
var RefProto = {
|
|
31768
|
-
[
|
|
32639
|
+
[TypeId26]: {
|
|
31769
32640
|
_A: identity
|
|
31770
32641
|
},
|
|
31771
32642
|
...PipeInspectableProto,
|
|
@@ -31781,7 +32652,7 @@ var makeUnsafe5 = (value5) => {
|
|
|
31781
32652
|
self.ref = make16(value5);
|
|
31782
32653
|
return self;
|
|
31783
32654
|
};
|
|
31784
|
-
var
|
|
32655
|
+
var make26 = (value5) => sync3(() => makeUnsafe5(value5));
|
|
31785
32656
|
var get6 = (self) => sync3(() => self.ref.current);
|
|
31786
32657
|
var set4 = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => set(self.ref, value5)));
|
|
31787
32658
|
var getAndSet = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => {
|
|
@@ -35015,7 +35886,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
35015
35886
|
});
|
|
35016
35887
|
}
|
|
35017
35888
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
35018
|
-
const
|
|
35889
|
+
const fn5 = ctx.data;
|
|
35019
35890
|
if (this._def.returns instanceof ZodPromise) {
|
|
35020
35891
|
const me = this;
|
|
35021
35892
|
return OK(async function(...args2) {
|
|
@@ -35024,7 +35895,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
35024
35895
|
error3.addIssue(makeArgsIssue(args2, e));
|
|
35025
35896
|
throw error3;
|
|
35026
35897
|
});
|
|
35027
|
-
const result5 = await Reflect.apply(
|
|
35898
|
+
const result5 = await Reflect.apply(fn5, this, parsedArgs);
|
|
35028
35899
|
const parsedReturns = await me._def.returns._def.type.parseAsync(result5, params).catch((e) => {
|
|
35029
35900
|
error3.addIssue(makeReturnsIssue(result5, e));
|
|
35030
35901
|
throw error3;
|
|
@@ -35038,7 +35909,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
35038
35909
|
if (!parsedArgs.success) {
|
|
35039
35910
|
throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]);
|
|
35040
35911
|
}
|
|
35041
|
-
const result5 = Reflect.apply(
|
|
35912
|
+
const result5 = Reflect.apply(fn5, this, parsedArgs.data);
|
|
35042
35913
|
const parsedReturns = me._def.returns.safeParse(result5, params);
|
|
35043
35914
|
if (!parsedReturns.success) {
|
|
35044
35915
|
throw new ZodError([makeReturnsIssue(result5, parsedReturns.error)]);
|
|
@@ -35747,8 +36618,8 @@ function $constructor(name, initializer3, params) {
|
|
|
35747
36618
|
const inst = params?.Parent ? new Definition() : this;
|
|
35748
36619
|
init2(inst, def);
|
|
35749
36620
|
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
35750
|
-
for (const
|
|
35751
|
-
|
|
36621
|
+
for (const fn5 of inst._zod.deferred) {
|
|
36622
|
+
fn5();
|
|
35752
36623
|
}
|
|
35753
36624
|
return inst;
|
|
35754
36625
|
}
|
|
@@ -35801,7 +36672,7 @@ __export(util_exports, {
|
|
|
35801
36672
|
captureStackTrace: () => captureStackTrace,
|
|
35802
36673
|
cleanEnum: () => cleanEnum,
|
|
35803
36674
|
cleanRegex: () => cleanRegex,
|
|
35804
|
-
clone: () =>
|
|
36675
|
+
clone: () => clone2,
|
|
35805
36676
|
cloneDef: () => cloneDef,
|
|
35806
36677
|
createTransparentProxy: () => createTransparentProxy,
|
|
35807
36678
|
defineLazy: () => defineLazy,
|
|
@@ -36082,7 +36953,7 @@ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boo
|
|
|
36082
36953
|
function escapeRegex(str) {
|
|
36083
36954
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
36084
36955
|
}
|
|
36085
|
-
function
|
|
36956
|
+
function clone2(inst, def, params) {
|
|
36086
36957
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
36087
36958
|
if (!def || params?.parent)
|
|
36088
36959
|
cl._zod.parent = inst;
|
|
@@ -36183,7 +37054,7 @@ function pick2(schema, mask2) {
|
|
|
36183
37054
|
},
|
|
36184
37055
|
checks: []
|
|
36185
37056
|
});
|
|
36186
|
-
return
|
|
37057
|
+
return clone2(schema, def);
|
|
36187
37058
|
}
|
|
36188
37059
|
function omit3(schema, mask2) {
|
|
36189
37060
|
const currDef = schema._zod.def;
|
|
@@ -36208,7 +37079,7 @@ function omit3(schema, mask2) {
|
|
|
36208
37079
|
},
|
|
36209
37080
|
checks: []
|
|
36210
37081
|
});
|
|
36211
|
-
return
|
|
37082
|
+
return clone2(schema, def);
|
|
36212
37083
|
}
|
|
36213
37084
|
function extend2(schema, shape) {
|
|
36214
37085
|
if (!isPlainObject(shape)) {
|
|
@@ -36231,7 +37102,7 @@ function extend2(schema, shape) {
|
|
|
36231
37102
|
return _shape;
|
|
36232
37103
|
}
|
|
36233
37104
|
});
|
|
36234
|
-
return
|
|
37105
|
+
return clone2(schema, def);
|
|
36235
37106
|
}
|
|
36236
37107
|
function safeExtend(schema, shape) {
|
|
36237
37108
|
if (!isPlainObject(shape)) {
|
|
@@ -36244,7 +37115,7 @@ function safeExtend(schema, shape) {
|
|
|
36244
37115
|
return _shape;
|
|
36245
37116
|
}
|
|
36246
37117
|
});
|
|
36247
|
-
return
|
|
37118
|
+
return clone2(schema, def);
|
|
36248
37119
|
}
|
|
36249
37120
|
function merge3(a, b) {
|
|
36250
37121
|
const def = mergeDefs(a._zod.def, {
|
|
@@ -36259,7 +37130,7 @@ function merge3(a, b) {
|
|
|
36259
37130
|
checks: []
|
|
36260
37131
|
// delete existing checks
|
|
36261
37132
|
});
|
|
36262
|
-
return
|
|
37133
|
+
return clone2(a, def);
|
|
36263
37134
|
}
|
|
36264
37135
|
function partial(Class6, schema, mask2) {
|
|
36265
37136
|
const currDef = schema._zod.def;
|
|
@@ -36297,7 +37168,7 @@ function partial(Class6, schema, mask2) {
|
|
|
36297
37168
|
},
|
|
36298
37169
|
checks: []
|
|
36299
37170
|
});
|
|
36300
|
-
return
|
|
37171
|
+
return clone2(schema, def);
|
|
36301
37172
|
}
|
|
36302
37173
|
function required2(Class6, schema, mask2) {
|
|
36303
37174
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -36328,7 +37199,7 @@ function required2(Class6, schema, mask2) {
|
|
|
36328
37199
|
return shape;
|
|
36329
37200
|
}
|
|
36330
37201
|
});
|
|
36331
|
-
return
|
|
37202
|
+
return clone2(schema, def);
|
|
36332
37203
|
}
|
|
36333
37204
|
function aborted(x, startIndex = 0) {
|
|
36334
37205
|
if (x.aborted === true)
|
|
@@ -37319,9 +38190,9 @@ var Doc = class {
|
|
|
37319
38190
|
if (this)
|
|
37320
38191
|
this.args = args2;
|
|
37321
38192
|
}
|
|
37322
|
-
indented(
|
|
38193
|
+
indented(fn5) {
|
|
37323
38194
|
this.indent += 1;
|
|
37324
|
-
|
|
38195
|
+
fn5(this);
|
|
37325
38196
|
this.indent -= 1;
|
|
37326
38197
|
}
|
|
37327
38198
|
write(arg) {
|
|
@@ -37366,8 +38237,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37366
38237
|
checks.unshift(inst);
|
|
37367
38238
|
}
|
|
37368
38239
|
for (const ch of checks) {
|
|
37369
|
-
for (const
|
|
37370
|
-
|
|
38240
|
+
for (const fn5 of ch._zod.onattach) {
|
|
38241
|
+
fn5(inst);
|
|
37371
38242
|
}
|
|
37372
38243
|
}
|
|
37373
38244
|
if (checks.length === 0) {
|
|
@@ -38190,8 +39061,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
38190
39061
|
}
|
|
38191
39062
|
doc.write(`payload.value = newResult;`);
|
|
38192
39063
|
doc.write(`return payload;`);
|
|
38193
|
-
const
|
|
38194
|
-
return (payload, ctx) =>
|
|
39064
|
+
const fn5 = doc.compile();
|
|
39065
|
+
return (payload, ctx) => fn5(shape, payload, ctx);
|
|
38195
39066
|
};
|
|
38196
39067
|
let fastpass;
|
|
38197
39068
|
const isObject3 = isObject2;
|
|
@@ -40140,29 +41011,29 @@ function _file(Class6, params) {
|
|
|
40140
41011
|
});
|
|
40141
41012
|
}
|
|
40142
41013
|
// @__NO_SIDE_EFFECTS__
|
|
40143
|
-
function _custom(Class6,
|
|
41014
|
+
function _custom(Class6, fn5, _params) {
|
|
40144
41015
|
const norm = normalizeParams(_params);
|
|
40145
41016
|
norm.abort ?? (norm.abort = true);
|
|
40146
41017
|
const schema = new Class6({
|
|
40147
41018
|
type: "custom",
|
|
40148
41019
|
check: "custom",
|
|
40149
|
-
fn:
|
|
41020
|
+
fn: fn5,
|
|
40150
41021
|
...norm
|
|
40151
41022
|
});
|
|
40152
41023
|
return schema;
|
|
40153
41024
|
}
|
|
40154
41025
|
// @__NO_SIDE_EFFECTS__
|
|
40155
|
-
function _refine(Class6,
|
|
41026
|
+
function _refine(Class6, fn5, _params) {
|
|
40156
41027
|
const schema = new Class6({
|
|
40157
41028
|
type: "custom",
|
|
40158
41029
|
check: "custom",
|
|
40159
|
-
fn:
|
|
41030
|
+
fn: fn5,
|
|
40160
41031
|
...normalizeParams(_params)
|
|
40161
41032
|
});
|
|
40162
41033
|
return schema;
|
|
40163
41034
|
}
|
|
40164
41035
|
// @__NO_SIDE_EFFECTS__
|
|
40165
|
-
function _superRefine(
|
|
41036
|
+
function _superRefine(fn5) {
|
|
40166
41037
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
40167
41038
|
payload.addIssue = (issue2) => {
|
|
40168
41039
|
if (typeof issue2 === "string") {
|
|
@@ -40178,17 +41049,17 @@ function _superRefine(fn3) {
|
|
|
40178
41049
|
payload.issues.push(issue(_issue2));
|
|
40179
41050
|
}
|
|
40180
41051
|
};
|
|
40181
|
-
return
|
|
41052
|
+
return fn5(payload.value, payload);
|
|
40182
41053
|
});
|
|
40183
41054
|
return ch;
|
|
40184
41055
|
}
|
|
40185
41056
|
// @__NO_SIDE_EFFECTS__
|
|
40186
|
-
function _check(
|
|
41057
|
+
function _check(fn5, params) {
|
|
40187
41058
|
const ch = new $ZodCheck({
|
|
40188
41059
|
check: "custom",
|
|
40189
41060
|
...normalizeParams(params)
|
|
40190
41061
|
});
|
|
40191
|
-
ch._zod.check =
|
|
41062
|
+
ch._zod.check = fn5;
|
|
40192
41063
|
return ch;
|
|
40193
41064
|
}
|
|
40194
41065
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -40352,7 +41223,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
40352
41223
|
const meta3 = ctx.metadataRegistry.get(schema);
|
|
40353
41224
|
if (meta3)
|
|
40354
41225
|
Object.assign(result5.schema, meta3);
|
|
40355
|
-
if (ctx.io === "input" &&
|
|
41226
|
+
if (ctx.io === "input" && isTransforming2(schema)) {
|
|
40356
41227
|
delete result5.schema.examples;
|
|
40357
41228
|
delete result5.schema.default;
|
|
40358
41229
|
}
|
|
@@ -40452,7 +41323,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
40452
41323
|
}
|
|
40453
41324
|
}
|
|
40454
41325
|
}
|
|
40455
|
-
function
|
|
41326
|
+
function finalize2(ctx, schema) {
|
|
40456
41327
|
const root = ctx.seen.get(schema);
|
|
40457
41328
|
if (!root)
|
|
40458
41329
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -40573,7 +41444,7 @@ function finalize(ctx, schema) {
|
|
|
40573
41444
|
throw new Error("Error converting schema to JSON.");
|
|
40574
41445
|
}
|
|
40575
41446
|
}
|
|
40576
|
-
function
|
|
41447
|
+
function isTransforming2(_schema, _ctx) {
|
|
40577
41448
|
const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
|
|
40578
41449
|
if (ctx.seen.has(_schema))
|
|
40579
41450
|
return false;
|
|
@@ -40582,43 +41453,43 @@ function isTransforming(_schema, _ctx) {
|
|
|
40582
41453
|
if (def.type === "transform")
|
|
40583
41454
|
return true;
|
|
40584
41455
|
if (def.type === "array")
|
|
40585
|
-
return
|
|
41456
|
+
return isTransforming2(def.element, ctx);
|
|
40586
41457
|
if (def.type === "set")
|
|
40587
|
-
return
|
|
41458
|
+
return isTransforming2(def.valueType, ctx);
|
|
40588
41459
|
if (def.type === "lazy")
|
|
40589
|
-
return
|
|
41460
|
+
return isTransforming2(def.getter(), ctx);
|
|
40590
41461
|
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
|
|
40591
|
-
return
|
|
41462
|
+
return isTransforming2(def.innerType, ctx);
|
|
40592
41463
|
}
|
|
40593
41464
|
if (def.type === "intersection") {
|
|
40594
|
-
return
|
|
41465
|
+
return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
|
|
40595
41466
|
}
|
|
40596
41467
|
if (def.type === "record" || def.type === "map") {
|
|
40597
|
-
return
|
|
41468
|
+
return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
|
|
40598
41469
|
}
|
|
40599
41470
|
if (def.type === "pipe") {
|
|
40600
|
-
return
|
|
41471
|
+
return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
|
|
40601
41472
|
}
|
|
40602
41473
|
if (def.type === "object") {
|
|
40603
41474
|
for (const key in def.shape) {
|
|
40604
|
-
if (
|
|
41475
|
+
if (isTransforming2(def.shape[key], ctx))
|
|
40605
41476
|
return true;
|
|
40606
41477
|
}
|
|
40607
41478
|
return false;
|
|
40608
41479
|
}
|
|
40609
41480
|
if (def.type === "union") {
|
|
40610
41481
|
for (const option5 of def.options) {
|
|
40611
|
-
if (
|
|
41482
|
+
if (isTransforming2(option5, ctx))
|
|
40612
41483
|
return true;
|
|
40613
41484
|
}
|
|
40614
41485
|
return false;
|
|
40615
41486
|
}
|
|
40616
41487
|
if (def.type === "tuple") {
|
|
40617
41488
|
for (const item of def.items) {
|
|
40618
|
-
if (
|
|
41489
|
+
if (isTransforming2(item, ctx))
|
|
40619
41490
|
return true;
|
|
40620
41491
|
}
|
|
40621
|
-
if (def.rest &&
|
|
41492
|
+
if (def.rest && isTransforming2(def.rest, ctx))
|
|
40622
41493
|
return true;
|
|
40623
41494
|
return false;
|
|
40624
41495
|
}
|
|
@@ -40628,14 +41499,14 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
40628
41499
|
const ctx = initializeContext({ ...params, processors });
|
|
40629
41500
|
process2(schema, ctx);
|
|
40630
41501
|
extractDefs(ctx, schema);
|
|
40631
|
-
return
|
|
41502
|
+
return finalize2(ctx, schema);
|
|
40632
41503
|
};
|
|
40633
41504
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
40634
41505
|
const { libraryOptions, target } = params ?? {};
|
|
40635
41506
|
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
40636
41507
|
process2(schema, ctx);
|
|
40637
41508
|
extractDefs(ctx, schema);
|
|
40638
|
-
return
|
|
41509
|
+
return finalize2(ctx, schema);
|
|
40639
41510
|
};
|
|
40640
41511
|
|
|
40641
41512
|
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
@@ -41114,7 +41985,7 @@ var lazyProcessor = (schema, ctx, _json, params) => {
|
|
|
41114
41985
|
seen.ref = innerType;
|
|
41115
41986
|
};
|
|
41116
41987
|
|
|
41117
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
41988
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
41118
41989
|
function isZ4Schema(s) {
|
|
41119
41990
|
const schema = s;
|
|
41120
41991
|
return !!schema._zod;
|
|
@@ -41499,7 +42370,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
41499
42370
|
});
|
|
41500
42371
|
};
|
|
41501
42372
|
inst.with = inst.check;
|
|
41502
|
-
inst.clone = (def2, params) =>
|
|
42373
|
+
inst.clone = (def2, params) => clone2(inst, def2, params);
|
|
41503
42374
|
inst.brand = () => inst;
|
|
41504
42375
|
inst.register = ((reg, meta3) => {
|
|
41505
42376
|
reg.add(inst, meta3);
|
|
@@ -41520,7 +42391,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
41520
42391
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
41521
42392
|
inst.refine = (check3, params) => inst.check(refine2(check3, params));
|
|
41522
42393
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
41523
|
-
inst.overwrite = (
|
|
42394
|
+
inst.overwrite = (fn5) => inst.check(_overwrite(fn5));
|
|
41524
42395
|
inst.optional = () => optional3(inst);
|
|
41525
42396
|
inst.exactOptional = () => exactOptional(inst);
|
|
41526
42397
|
inst.nullable = () => nullable(inst);
|
|
@@ -41556,7 +42427,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
41556
42427
|
};
|
|
41557
42428
|
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
41558
42429
|
inst.isNullable = () => inst.safeParse(null).success;
|
|
41559
|
-
inst.apply = (
|
|
42430
|
+
inst.apply = (fn5) => fn5(inst);
|
|
41560
42431
|
return inst;
|
|
41561
42432
|
});
|
|
41562
42433
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -42112,7 +42983,7 @@ function record3(keyType, valueType, params) {
|
|
|
42112
42983
|
});
|
|
42113
42984
|
}
|
|
42114
42985
|
function partialRecord(keyType, valueType, params) {
|
|
42115
|
-
const k =
|
|
42986
|
+
const k = clone2(keyType);
|
|
42116
42987
|
k._zod.values = void 0;
|
|
42117
42988
|
return new ZodRecord2({
|
|
42118
42989
|
type: "record",
|
|
@@ -42282,10 +43153,10 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
42282
43153
|
return payload;
|
|
42283
43154
|
};
|
|
42284
43155
|
});
|
|
42285
|
-
function transform3(
|
|
43156
|
+
function transform3(fn5) {
|
|
42286
43157
|
return new ZodTransform({
|
|
42287
43158
|
type: "transform",
|
|
42288
|
-
transform:
|
|
43159
|
+
transform: fn5
|
|
42289
43160
|
});
|
|
42290
43161
|
}
|
|
42291
43162
|
var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
@@ -42498,22 +43369,22 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
42498
43369
|
ZodType2.init(inst, def);
|
|
42499
43370
|
inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
|
|
42500
43371
|
});
|
|
42501
|
-
function check2(
|
|
43372
|
+
function check2(fn5) {
|
|
42502
43373
|
const ch = new $ZodCheck({
|
|
42503
43374
|
check: "custom"
|
|
42504
43375
|
// ...util.normalizeParams(params),
|
|
42505
43376
|
});
|
|
42506
|
-
ch._zod.check =
|
|
43377
|
+
ch._zod.check = fn5;
|
|
42507
43378
|
return ch;
|
|
42508
43379
|
}
|
|
42509
|
-
function custom(
|
|
42510
|
-
return _custom(ZodCustom,
|
|
43380
|
+
function custom(fn5, _params) {
|
|
43381
|
+
return _custom(ZodCustom, fn5 ?? (() => true), _params);
|
|
42511
43382
|
}
|
|
42512
|
-
function refine2(
|
|
42513
|
-
return _refine(ZodCustom,
|
|
43383
|
+
function refine2(fn5, _params = {}) {
|
|
43384
|
+
return _refine(ZodCustom, fn5, _params);
|
|
42514
43385
|
}
|
|
42515
|
-
function superRefine(
|
|
42516
|
-
return _superRefine(
|
|
43386
|
+
function superRefine(fn5) {
|
|
43387
|
+
return _superRefine(fn5);
|
|
42517
43388
|
}
|
|
42518
43389
|
var describe2 = describe;
|
|
42519
43390
|
var meta2 = meta;
|
|
@@ -42550,8 +43421,8 @@ function json(params) {
|
|
|
42550
43421
|
});
|
|
42551
43422
|
return jsonSchema;
|
|
42552
43423
|
}
|
|
42553
|
-
function preprocess(
|
|
42554
|
-
return pipe2(transform3(
|
|
43424
|
+
function preprocess(fn5, schema) {
|
|
43425
|
+
return pipe2(transform3(fn5), schema);
|
|
42555
43426
|
}
|
|
42556
43427
|
|
|
42557
43428
|
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
@@ -42569,7 +43440,7 @@ var z = {
|
|
|
42569
43440
|
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
42570
43441
|
config(en_default2());
|
|
42571
43442
|
|
|
42572
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
43443
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
42573
43444
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
42574
43445
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
42575
43446
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -44088,7 +44959,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
44088
44959
|
}
|
|
44089
44960
|
};
|
|
44090
44961
|
|
|
44091
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
44962
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
44092
44963
|
function isTerminal(status) {
|
|
44093
44964
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
44094
44965
|
}
|
|
@@ -44096,7 +44967,7 @@ function isTerminal(status) {
|
|
|
44096
44967
|
// ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
44097
44968
|
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
44098
44969
|
|
|
44099
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
44970
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
44100
44971
|
function getMethodLiteral(schema) {
|
|
44101
44972
|
const shape = getObjectShape(schema);
|
|
44102
44973
|
const methodSchema = shape?.method;
|
|
@@ -44117,7 +44988,7 @@ function parseWithCompat(schema, data) {
|
|
|
44117
44988
|
return result5.data;
|
|
44118
44989
|
}
|
|
44119
44990
|
|
|
44120
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
44991
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
44121
44992
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
44122
44993
|
var Protocol = class {
|
|
44123
44994
|
constructor(_options) {
|
|
@@ -44617,7 +45488,7 @@ var Protocol = class {
|
|
|
44617
45488
|
return;
|
|
44618
45489
|
}
|
|
44619
45490
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
44620
|
-
await new Promise((
|
|
45491
|
+
await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
|
|
44621
45492
|
options?.signal?.throwIfAborted();
|
|
44622
45493
|
}
|
|
44623
45494
|
} catch (error3) {
|
|
@@ -44634,7 +45505,7 @@ var Protocol = class {
|
|
|
44634
45505
|
*/
|
|
44635
45506
|
request(request3, resultSchema, options) {
|
|
44636
45507
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
44637
|
-
return new Promise((
|
|
45508
|
+
return new Promise((resolve3, reject) => {
|
|
44638
45509
|
const earlyReject = (error3) => {
|
|
44639
45510
|
reject(error3);
|
|
44640
45511
|
};
|
|
@@ -44712,7 +45583,7 @@ var Protocol = class {
|
|
|
44712
45583
|
if (!parseResult.success) {
|
|
44713
45584
|
reject(parseResult.error);
|
|
44714
45585
|
} else {
|
|
44715
|
-
|
|
45586
|
+
resolve3(parseResult.data);
|
|
44716
45587
|
}
|
|
44717
45588
|
} catch (error3) {
|
|
44718
45589
|
reject(error3);
|
|
@@ -44973,12 +45844,12 @@ var Protocol = class {
|
|
|
44973
45844
|
}
|
|
44974
45845
|
} catch {
|
|
44975
45846
|
}
|
|
44976
|
-
return new Promise((
|
|
45847
|
+
return new Promise((resolve3, reject) => {
|
|
44977
45848
|
if (signal.aborted) {
|
|
44978
45849
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
44979
45850
|
return;
|
|
44980
45851
|
}
|
|
44981
|
-
const timeoutId = setTimeout(
|
|
45852
|
+
const timeoutId = setTimeout(resolve3, interval);
|
|
44982
45853
|
signal.addEventListener("abort", () => {
|
|
44983
45854
|
clearTimeout(timeoutId);
|
|
44984
45855
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -45071,7 +45942,7 @@ function mergeCapabilities(base2, additional) {
|
|
|
45071
45942
|
return result5;
|
|
45072
45943
|
}
|
|
45073
45944
|
|
|
45074
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
45945
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
45075
45946
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
45076
45947
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
45077
45948
|
function createDefaultAjvInstance() {
|
|
@@ -45139,7 +46010,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
45139
46010
|
}
|
|
45140
46011
|
};
|
|
45141
46012
|
|
|
45142
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
46013
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
45143
46014
|
var ExperimentalServerTasks = class {
|
|
45144
46015
|
constructor(_server) {
|
|
45145
46016
|
this._server = _server;
|
|
@@ -45352,7 +46223,7 @@ var ExperimentalServerTasks = class {
|
|
|
45352
46223
|
}
|
|
45353
46224
|
};
|
|
45354
46225
|
|
|
45355
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
46226
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
45356
46227
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
45357
46228
|
if (!requests) {
|
|
45358
46229
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -45387,7 +46258,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
45387
46258
|
}
|
|
45388
46259
|
}
|
|
45389
46260
|
|
|
45390
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
46261
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
45391
46262
|
var Server = class extends Protocol {
|
|
45392
46263
|
/**
|
|
45393
46264
|
* Initializes this server with the given name and version information.
|
|
@@ -45767,10 +46638,10 @@ var Server = class extends Protocol {
|
|
|
45767
46638
|
}
|
|
45768
46639
|
};
|
|
45769
46640
|
|
|
45770
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
46641
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
45771
46642
|
import process3 from "node:process";
|
|
45772
46643
|
|
|
45773
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
46644
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
45774
46645
|
var ReadBuffer = class {
|
|
45775
46646
|
append(chunk) {
|
|
45776
46647
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
@@ -45798,7 +46669,7 @@ function serializeMessage(message) {
|
|
|
45798
46669
|
return JSON.stringify(message) + "\n";
|
|
45799
46670
|
}
|
|
45800
46671
|
|
|
45801
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
46672
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
45802
46673
|
var StdioServerTransport = class {
|
|
45803
46674
|
constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
|
|
45804
46675
|
this._stdin = _stdin;
|
|
@@ -45848,12 +46719,12 @@ var StdioServerTransport = class {
|
|
|
45848
46719
|
this.onclose?.();
|
|
45849
46720
|
}
|
|
45850
46721
|
send(message) {
|
|
45851
|
-
return new Promise((
|
|
46722
|
+
return new Promise((resolve3) => {
|
|
45852
46723
|
const json2 = serializeMessage(message);
|
|
45853
46724
|
if (this._stdout.write(json2)) {
|
|
45854
|
-
|
|
46725
|
+
resolve3();
|
|
45855
46726
|
} else {
|
|
45856
|
-
this._stdout.once("drain",
|
|
46727
|
+
this._stdout.once("drain", resolve3);
|
|
45857
46728
|
}
|
|
45858
46729
|
});
|
|
45859
46730
|
}
|
|
@@ -45939,12 +46810,96 @@ var runInit = () => {
|
|
|
45939
46810
|
};
|
|
45940
46811
|
|
|
45941
46812
|
// ../foldkit/src/schema/index.ts
|
|
45942
|
-
var
|
|
45943
|
-
|
|
45944
|
-
|
|
46813
|
+
var assignPlainProperty = (output, name, value5) => {
|
|
46814
|
+
if (name === "__proto__") {
|
|
46815
|
+
Object.defineProperty(output, name, {
|
|
46816
|
+
value: value5,
|
|
46817
|
+
writable: true,
|
|
46818
|
+
enumerable: true,
|
|
46819
|
+
configurable: true
|
|
46820
|
+
});
|
|
46821
|
+
} else {
|
|
46822
|
+
output[name] = value5;
|
|
46823
|
+
}
|
|
46824
|
+
};
|
|
46825
|
+
var isDirectlyCopyable = (ast) => {
|
|
46826
|
+
if (ast.checks !== void 0 || ast.encoding !== void 0 || ast.context !== void 0 || ast.annotations?.["parseOptions"] !== void 0) {
|
|
46827
|
+
return false;
|
|
46828
|
+
}
|
|
46829
|
+
return Match_exports.value(ast).pipe(
|
|
46830
|
+
Match_exports.withReturnType(),
|
|
46831
|
+
Match_exports.tagsExhaustive({
|
|
46832
|
+
Declaration: () => false,
|
|
46833
|
+
Null: () => true,
|
|
46834
|
+
Undefined: () => true,
|
|
46835
|
+
Void: () => true,
|
|
46836
|
+
Never: () => true,
|
|
46837
|
+
Unknown: () => true,
|
|
46838
|
+
Any: () => true,
|
|
46839
|
+
String: () => true,
|
|
46840
|
+
Number: () => true,
|
|
46841
|
+
Boolean: () => true,
|
|
46842
|
+
BigInt: () => true,
|
|
46843
|
+
Symbol: () => true,
|
|
46844
|
+
Literal: () => true,
|
|
46845
|
+
UniqueSymbol: () => true,
|
|
46846
|
+
ObjectKeyword: () => true,
|
|
46847
|
+
Enum: () => true,
|
|
46848
|
+
TemplateLiteral: ({ parts: parts2 }) => parts2.every(isDirectlyCopyable),
|
|
46849
|
+
Arrays: () => false,
|
|
46850
|
+
Objects: () => false,
|
|
46851
|
+
Union: ({ mode, types }) => mode !== "oneOf" && types.every(isDirectlyCopyable),
|
|
46852
|
+
Suspend: () => false
|
|
46853
|
+
})
|
|
46854
|
+
);
|
|
46855
|
+
};
|
|
46856
|
+
var getDirectPropertyNames = (propertySignatures) => {
|
|
46857
|
+
const names = [];
|
|
46858
|
+
for (const { name, type: type3 } of propertySignatures) {
|
|
46859
|
+
if (name !== "_tag" && !isDirectlyCopyable(SchemaAST_exports.toType(type3))) {
|
|
46860
|
+
return void 0;
|
|
46861
|
+
}
|
|
46862
|
+
names.push(name);
|
|
46863
|
+
}
|
|
46864
|
+
return names;
|
|
46865
|
+
};
|
|
46866
|
+
var makeCallable = (tag4, fields) => {
|
|
46867
|
+
const schema = Schema_exports.TaggedStruct(tag4, fields);
|
|
46868
|
+
const propertyNames = Object.hasOwn(fields, "_tag") ? void 0 : getDirectPropertyNames(schema.ast.propertySignatures);
|
|
46869
|
+
const make27 = (value5) => schema.make(
|
|
46870
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
46871
|
+
value5 ?? {}
|
|
46872
|
+
);
|
|
46873
|
+
const construct = propertyNames !== void 0 ? (value5) => {
|
|
46874
|
+
const input = value5 ?? {};
|
|
46875
|
+
if (Object(input) !== input) {
|
|
46876
|
+
return make27(value5);
|
|
46877
|
+
}
|
|
46878
|
+
const output = {};
|
|
46879
|
+
for (const name of propertyNames) {
|
|
46880
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, name);
|
|
46881
|
+
if (name !== "_tag" && descriptor === void 0 && Reflect.has(input, name)) {
|
|
46882
|
+
return make27(value5);
|
|
46883
|
+
}
|
|
46884
|
+
if (descriptor !== void 0 && !("value" in descriptor)) {
|
|
46885
|
+
return make27(value5);
|
|
46886
|
+
}
|
|
46887
|
+
const inputValue = descriptor === void 0 ? void 0 : input[name];
|
|
46888
|
+
if (name === "_tag") {
|
|
46889
|
+
if (inputValue !== void 0 && inputValue !== tag4) {
|
|
46890
|
+
return make27(value5);
|
|
46891
|
+
}
|
|
46892
|
+
assignPlainProperty(output, name, tag4);
|
|
46893
|
+
} else {
|
|
46894
|
+
assignPlainProperty(output, name, inputValue);
|
|
46895
|
+
}
|
|
46896
|
+
}
|
|
46897
|
+
return output;
|
|
46898
|
+
} : make27;
|
|
46899
|
+
return new Proxy(function() {
|
|
45945
46900
|
}, {
|
|
45946
46901
|
apply(_target, _thisArg, argumentsList) {
|
|
45947
|
-
return
|
|
46902
|
+
return construct(argumentsList[0]);
|
|
45948
46903
|
},
|
|
45949
46904
|
get(_target, property, receiver) {
|
|
45950
46905
|
return Reflect.get(schema, property, receiver);
|
|
@@ -45955,10 +46910,10 @@ var makeCallable = (schema) => (
|
|
|
45955
46910
|
getPrototypeOf() {
|
|
45956
46911
|
return Reflect.getPrototypeOf(schema);
|
|
45957
46912
|
}
|
|
45958
|
-
})
|
|
45959
|
-
|
|
46913
|
+
});
|
|
46914
|
+
};
|
|
45960
46915
|
function ts(tag4, fields = {}) {
|
|
45961
|
-
return makeCallable(
|
|
46916
|
+
return makeCallable(tag4, fields);
|
|
45962
46917
|
}
|
|
45963
46918
|
|
|
45964
46919
|
// ../foldkit/src/devTools/protocol.ts
|