@cortexkit/pi-magic-context 0.29.1 → 0.30.0
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/index.js +1084 -848
- package/dist/subagent-entry.js +1127 -892
- package/package.json +9 -9
package/dist/subagent-entry.js
CHANGED
|
@@ -6958,7 +6958,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
6958
6958
|
};
|
|
6959
6959
|
});
|
|
6960
6960
|
|
|
6961
|
-
// ../../node_modules/.bun/comment-json@
|
|
6961
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/common.js
|
|
6962
6962
|
var require_common = __commonJS((exports, module) => {
|
|
6963
6963
|
var PREFIX_BEFORE = "before";
|
|
6964
6964
|
var PREFIX_AFTER_PROP = "after-prop";
|
|
@@ -6990,8 +6990,6 @@ var require_common = __commonJS((exports, module) => {
|
|
|
6990
6990
|
var NON_PROP_SYMBOL_KEYS = NON_PROP_SYMBOL_PREFIXES.map(Symbol.for);
|
|
6991
6991
|
var COLON = ":";
|
|
6992
6992
|
var UNDEFINED = undefined;
|
|
6993
|
-
var LINE_BREAKS_BEFORE = new WeakMap;
|
|
6994
|
-
var LINE_BREAKS_AFTER = new WeakMap;
|
|
6995
6993
|
var RAW_STRING_LITERALS = new WeakMap;
|
|
6996
6994
|
var is_string = (subject) => typeof subject === "string";
|
|
6997
6995
|
var is_number = (subject) => typeof subject === "number";
|
|
@@ -7094,17 +7092,49 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7094
7092
|
});
|
|
7095
7093
|
return target;
|
|
7096
7094
|
};
|
|
7097
|
-
var
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7095
|
+
var is_comment_symbol = (subject) => {
|
|
7096
|
+
const key = Symbol.keyFor(subject);
|
|
7097
|
+
return is_string(key) && (NON_PROP_SYMBOL_PREFIXES.includes(key) || PROP_SYMBOL_PREFIXES.some((prefix) => key.indexOf(prefix + COLON) === 0));
|
|
7098
|
+
};
|
|
7099
|
+
var remove_blank_line_tokens = (comments) => {
|
|
7100
|
+
let write = 0;
|
|
7101
|
+
let removed = false;
|
|
7102
|
+
comments.forEach((comment) => {
|
|
7103
|
+
if (comment && comment.type === "BlankLine") {
|
|
7104
|
+
removed = true;
|
|
7105
|
+
return;
|
|
7106
|
+
}
|
|
7107
|
+
comments[write++] = comment;
|
|
7108
|
+
});
|
|
7109
|
+
comments.length = write;
|
|
7110
|
+
return removed;
|
|
7111
|
+
};
|
|
7112
|
+
var remove_blank_lines_from_prop = (target, prop) => {
|
|
7113
|
+
if (!Object.hasOwn(target, prop)) {
|
|
7114
|
+
return;
|
|
7101
7115
|
}
|
|
7102
|
-
|
|
7103
|
-
|
|
7116
|
+
const comments = target[prop];
|
|
7117
|
+
if (!Array.isArray(comments) || !remove_blank_line_tokens(comments)) {
|
|
7118
|
+
return;
|
|
7119
|
+
}
|
|
7120
|
+
if (!comments.length) {
|
|
7121
|
+
delete target[prop];
|
|
7104
7122
|
}
|
|
7105
7123
|
};
|
|
7106
|
-
var
|
|
7107
|
-
|
|
7124
|
+
var remove_blank_lines_deep = (target) => {
|
|
7125
|
+
Object.getOwnPropertySymbols(target).forEach((prop) => {
|
|
7126
|
+
if (is_comment_symbol(prop)) {
|
|
7127
|
+
remove_blank_lines_from_prop(target, prop);
|
|
7128
|
+
}
|
|
7129
|
+
});
|
|
7130
|
+
Object.keys(target).forEach((key) => {
|
|
7131
|
+
const value = target[key];
|
|
7132
|
+
if (is_object(value)) {
|
|
7133
|
+
remove_blank_lines_deep(value);
|
|
7134
|
+
}
|
|
7135
|
+
});
|
|
7136
|
+
};
|
|
7137
|
+
var is_raw_json = typeof JSON.isRawJSON === "function" ? JSON.isRawJSON : () => false;
|
|
7108
7138
|
module.exports = {
|
|
7109
7139
|
PROP_SYMBOL_PREFIXES,
|
|
7110
7140
|
PREFIX_BEFORE,
|
|
@@ -7134,9 +7164,6 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7134
7164
|
is_raw_json,
|
|
7135
7165
|
set_raw_string_literal,
|
|
7136
7166
|
get_raw_string_literal,
|
|
7137
|
-
set_comment_line_breaks,
|
|
7138
|
-
get_comment_line_breaks_before,
|
|
7139
|
-
get_comment_line_breaks_after,
|
|
7140
7167
|
assign(target, source, keys) {
|
|
7141
7168
|
if (!is_object(target)) {
|
|
7142
7169
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
@@ -7198,11 +7225,26 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7198
7225
|
return;
|
|
7199
7226
|
}
|
|
7200
7227
|
delete target[prop];
|
|
7228
|
+
},
|
|
7229
|
+
removeBlankLines(target, location) {
|
|
7230
|
+
if (!is_object(target)) {
|
|
7231
|
+
throw new TypeError("target must be an object");
|
|
7232
|
+
}
|
|
7233
|
+
if (location === UNDEFINED) {
|
|
7234
|
+
remove_blank_lines_deep(target);
|
|
7235
|
+
return;
|
|
7236
|
+
}
|
|
7237
|
+
const {
|
|
7238
|
+
where,
|
|
7239
|
+
key
|
|
7240
|
+
} = location;
|
|
7241
|
+
const prop = symbol_checked(where, key);
|
|
7242
|
+
remove_blank_lines_from_prop(target, prop);
|
|
7201
7243
|
}
|
|
7202
7244
|
};
|
|
7203
7245
|
});
|
|
7204
7246
|
|
|
7205
|
-
// ../../node_modules/.bun/comment-json@
|
|
7247
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/array.js
|
|
7206
7248
|
var require_array = __commonJS((exports, module) => {
|
|
7207
7249
|
var { sort } = require_src();
|
|
7208
7250
|
var {
|
|
@@ -7360,7 +7402,7 @@ var require_array = __commonJS((exports, module) => {
|
|
|
7360
7402
|
};
|
|
7361
7403
|
});
|
|
7362
7404
|
|
|
7363
|
-
// ../../node_modules/.bun/comment-json@
|
|
7405
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/parse.js
|
|
7364
7406
|
var require_parse = __commonJS((exports, module) => {
|
|
7365
7407
|
var esprima = require_esprima();
|
|
7366
7408
|
var {
|
|
@@ -7386,7 +7428,6 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7386
7428
|
is_object,
|
|
7387
7429
|
define: define2,
|
|
7388
7430
|
set_raw_string_literal,
|
|
7389
|
-
set_comment_line_breaks,
|
|
7390
7431
|
assign_non_prop_comments
|
|
7391
7432
|
} = require_common();
|
|
7392
7433
|
var tokenize = (code) => esprima.tokenize(code, {
|
|
@@ -7400,23 +7441,27 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7400
7441
|
var previous_props = [];
|
|
7401
7442
|
var last_prop;
|
|
7402
7443
|
var remove_comments = false;
|
|
7444
|
+
var remove_blank_lines = false;
|
|
7403
7445
|
var inline = false;
|
|
7404
7446
|
var tokens = null;
|
|
7405
7447
|
var last = null;
|
|
7406
7448
|
var current = null;
|
|
7407
7449
|
var index;
|
|
7408
7450
|
var reviver = null;
|
|
7451
|
+
var source_line_count = 0;
|
|
7409
7452
|
var clean = () => {
|
|
7410
7453
|
current_code = UNDEFINED;
|
|
7411
7454
|
previous_props.length = previous_hosts.length = 0;
|
|
7412
7455
|
last = null;
|
|
7413
7456
|
last_prop = UNDEFINED;
|
|
7457
|
+
remove_blank_lines = false;
|
|
7414
7458
|
};
|
|
7415
7459
|
var free = () => {
|
|
7416
7460
|
clean();
|
|
7417
7461
|
tokens.length = 0;
|
|
7418
7462
|
unassigned_comments = comments_host = tokens = last = current = reviver = null;
|
|
7419
7463
|
current_code = UNDEFINED;
|
|
7464
|
+
source_line_count = 0;
|
|
7420
7465
|
};
|
|
7421
7466
|
var symbolFor = (prefix) => Symbol.for(last_prop !== UNDEFINED ? prefix + COLON + last_prop : prefix);
|
|
7422
7467
|
var transform2 = (k, { value, context = {} }) => reviver ? reviver(k, value, context) : value;
|
|
@@ -7460,6 +7505,37 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7460
7505
|
var restore_comments_host = () => {
|
|
7461
7506
|
comments_host = previous_hosts.pop();
|
|
7462
7507
|
};
|
|
7508
|
+
var create_blank_line = () => ({
|
|
7509
|
+
type: "BlankLine",
|
|
7510
|
+
inline: false
|
|
7511
|
+
});
|
|
7512
|
+
var append_blank_lines = (comments, from_line, to_line) => {
|
|
7513
|
+
if (remove_blank_lines) {
|
|
7514
|
+
return;
|
|
7515
|
+
}
|
|
7516
|
+
let blank_lines = Math.max(0, to_line - from_line - 1);
|
|
7517
|
+
while (blank_lines-- > 0) {
|
|
7518
|
+
comments.push(create_blank_line());
|
|
7519
|
+
}
|
|
7520
|
+
};
|
|
7521
|
+
var normalize_parse_options = (options) => {
|
|
7522
|
+
if (typeof options === "boolean") {
|
|
7523
|
+
return {
|
|
7524
|
+
no_comments: options,
|
|
7525
|
+
no_blank_lines: false
|
|
7526
|
+
};
|
|
7527
|
+
}
|
|
7528
|
+
if (!is_object(options)) {
|
|
7529
|
+
return {
|
|
7530
|
+
no_comments: false,
|
|
7531
|
+
no_blank_lines: false
|
|
7532
|
+
};
|
|
7533
|
+
}
|
|
7534
|
+
return {
|
|
7535
|
+
no_comments: !!options.no_comments,
|
|
7536
|
+
no_blank_lines: !!options.no_blank_lines
|
|
7537
|
+
};
|
|
7538
|
+
};
|
|
7463
7539
|
var assign_after_comments = () => {
|
|
7464
7540
|
if (!unassigned_comments) {
|
|
7465
7541
|
return;
|
|
@@ -7492,26 +7568,26 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7492
7568
|
};
|
|
7493
7569
|
var parse_comments = (prefix) => {
|
|
7494
7570
|
const comments = [];
|
|
7571
|
+
let previous_line = last ? last.loc.end.line : 0;
|
|
7495
7572
|
while (current && (is("LineComment") || is("BlockComment"))) {
|
|
7573
|
+
append_blank_lines(comments, previous_line, current.loc.start.line);
|
|
7496
7574
|
const comment = {
|
|
7497
7575
|
...current,
|
|
7498
7576
|
inline
|
|
7499
7577
|
};
|
|
7500
|
-
const previous_line = last ? last.loc.end.line : 1;
|
|
7501
|
-
set_comment_line_breaks(comment, Math.max(0, comment.loc.start.line - previous_line));
|
|
7502
7578
|
comments.push(comment);
|
|
7579
|
+
previous_line = comment.loc.end.line;
|
|
7503
7580
|
next();
|
|
7504
7581
|
}
|
|
7505
|
-
|
|
7506
|
-
if (length) {
|
|
7507
|
-
const comment = comments[length - 1];
|
|
7508
|
-
const current_line = current ? current.loc.start.line : comment.loc.end.line;
|
|
7509
|
-
set_comment_line_breaks(comment, undefined, Math.max(0, current_line - comment.loc.end.line));
|
|
7510
|
-
}
|
|
7582
|
+
append_blank_lines(comments, previous_line, current ? current.loc.start.line : source_line_count);
|
|
7511
7583
|
if (remove_comments) {
|
|
7512
|
-
|
|
7584
|
+
for (let i = comments.length - 1;i >= 0; i--) {
|
|
7585
|
+
if (comments[i].type !== "BlankLine") {
|
|
7586
|
+
comments.splice(i, 1);
|
|
7587
|
+
}
|
|
7588
|
+
}
|
|
7513
7589
|
}
|
|
7514
|
-
if (!length) {
|
|
7590
|
+
if (!comments.length) {
|
|
7515
7591
|
return;
|
|
7516
7592
|
}
|
|
7517
7593
|
if (prefix) {
|
|
@@ -7650,12 +7726,19 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7650
7726
|
return {};
|
|
7651
7727
|
}
|
|
7652
7728
|
}
|
|
7653
|
-
var parse5 = (code, rev,
|
|
7729
|
+
var parse5 = (code, rev, options) => {
|
|
7654
7730
|
clean();
|
|
7731
|
+
const {
|
|
7732
|
+
no_comments,
|
|
7733
|
+
no_blank_lines
|
|
7734
|
+
} = normalize_parse_options(options);
|
|
7655
7735
|
current_code = code;
|
|
7736
|
+
source_line_count = code.split(`
|
|
7737
|
+
`).length;
|
|
7656
7738
|
tokens = tokenize(code);
|
|
7657
7739
|
reviver = rev;
|
|
7658
7740
|
remove_comments = no_comments;
|
|
7741
|
+
remove_blank_lines = no_blank_lines;
|
|
7659
7742
|
if (!tokens.length) {
|
|
7660
7743
|
unexpected_end();
|
|
7661
7744
|
}
|
|
@@ -7685,7 +7768,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7685
7768
|
};
|
|
7686
7769
|
});
|
|
7687
7770
|
|
|
7688
|
-
// ../../node_modules/.bun/comment-json@
|
|
7771
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/stringify.js
|
|
7689
7772
|
var require_stringify = __commonJS((exports, module) => {
|
|
7690
7773
|
var {
|
|
7691
7774
|
PREFIX_BEFORE_ALL,
|
|
@@ -7707,8 +7790,6 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7707
7790
|
is_number,
|
|
7708
7791
|
is_object,
|
|
7709
7792
|
get_raw_string_literal,
|
|
7710
|
-
get_comment_line_breaks_before,
|
|
7711
|
-
get_comment_line_breaks_after,
|
|
7712
7793
|
is_raw_json
|
|
7713
7794
|
} = require_common();
|
|
7714
7795
|
var SPACE = " ";
|
|
@@ -7723,26 +7804,18 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7723
7804
|
var quote = JSON.stringify;
|
|
7724
7805
|
var comment_stringify = (value, line) => line ? `//${value}` : `/*${value}*/`;
|
|
7725
7806
|
var repeat_line_breaks = (line_breaks, gap) => (LF + gap).repeat(line_breaks);
|
|
7726
|
-
var
|
|
7727
|
-
var
|
|
7728
|
-
if (!previous_comment || !previous_comment.loc || !comment.loc) {
|
|
7729
|
-
return null;
|
|
7730
|
-
}
|
|
7731
|
-
const { end } = previous_comment.loc;
|
|
7732
|
-
const { start } = comment.loc;
|
|
7733
|
-
if (!end || !start || !is_number(end.line) || !is_number(start.line)) {
|
|
7734
|
-
return null;
|
|
7735
|
-
}
|
|
7736
|
-
const line_breaks = start.line - end.line;
|
|
7737
|
-
return line_breaks >= 0 ? line_breaks : null;
|
|
7738
|
-
};
|
|
7739
|
-
var count_trailing_line_breaks = (str, gap) => {
|
|
7740
|
-
const unit = LF + gap;
|
|
7741
|
-
const { length } = unit;
|
|
7807
|
+
var is_inline_whitespace = (char) => char === SPACE || char === "\t";
|
|
7808
|
+
var count_trailing_line_breaks = (str) => {
|
|
7742
7809
|
let i = str.length;
|
|
7743
7810
|
let count = 0;
|
|
7744
|
-
while (i
|
|
7745
|
-
i
|
|
7811
|
+
while (i > 0) {
|
|
7812
|
+
while (i > 0 && is_inline_whitespace(str[i - 1])) {
|
|
7813
|
+
i--;
|
|
7814
|
+
}
|
|
7815
|
+
if (i === 0 || str[i - 1] !== LF) {
|
|
7816
|
+
return count;
|
|
7817
|
+
}
|
|
7818
|
+
i--;
|
|
7746
7819
|
count++;
|
|
7747
7820
|
}
|
|
7748
7821
|
return count;
|
|
@@ -7753,27 +7826,30 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7753
7826
|
return EMPTY;
|
|
7754
7827
|
}
|
|
7755
7828
|
let str = EMPTY;
|
|
7829
|
+
let blank_lines = 0;
|
|
7756
7830
|
let last_comment = null;
|
|
7757
7831
|
comments.forEach((comment, i) => {
|
|
7832
|
+
if (comment.type === "BlankLine") {
|
|
7833
|
+
blank_lines++;
|
|
7834
|
+
return;
|
|
7835
|
+
}
|
|
7758
7836
|
const {
|
|
7759
7837
|
inline,
|
|
7760
7838
|
type,
|
|
7761
7839
|
value
|
|
7762
7840
|
} = comment;
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
line_breaks_before = read_line_breaks_from_loc(last_comment, comment);
|
|
7766
|
-
}
|
|
7767
|
-
if (line_breaks_before === null) {
|
|
7768
|
-
line_breaks_before = inline ? 0 : 1;
|
|
7769
|
-
}
|
|
7770
|
-
const delimiter = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 ? EMPTY : LF + deeper_gap;
|
|
7841
|
+
const line_breaks_before = blank_lines > 0 ? blank_lines + (inline ? 0 : 1) : null;
|
|
7842
|
+
const delimiter = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 && symbol_tag === PREFIX_BEFORE_ALL && deeper_gap === EMPTY ? EMPTY : LF + deeper_gap;
|
|
7771
7843
|
const is_line_comment = type === "LineComment";
|
|
7772
7844
|
str += delimiter + comment_stringify(value, is_line_comment);
|
|
7845
|
+
blank_lines = 0;
|
|
7773
7846
|
last_comment = comment;
|
|
7774
7847
|
});
|
|
7848
|
+
if (!last_comment) {
|
|
7849
|
+
return blank_lines ? repeat_line_breaks(blank_lines + 1, deeper_gap) : EMPTY;
|
|
7850
|
+
}
|
|
7775
7851
|
const default_line_breaks_after = display_block || last_comment.type === "LineComment" ? 1 : 0;
|
|
7776
|
-
const line_breaks_after =
|
|
7852
|
+
const line_breaks_after = blank_lines > 0 ? blank_lines + 1 : default_line_breaks_after;
|
|
7777
7853
|
return str + repeat_line_breaks(line_breaks_after, deeper_gap);
|
|
7778
7854
|
};
|
|
7779
7855
|
var replacer = null;
|
|
@@ -7782,7 +7858,7 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7782
7858
|
replacer = null;
|
|
7783
7859
|
indent = EMPTY;
|
|
7784
7860
|
};
|
|
7785
|
-
var join5 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one
|
|
7861
|
+
var join5 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one)), gap) : two ? two.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(two)), gap) : EMPTY;
|
|
7786
7862
|
var join_content = (inside, value, gap) => {
|
|
7787
7863
|
const comment = process_comments(value, PREFIX_BEFORE, gap + indent, true);
|
|
7788
7864
|
return join5(comment, inside, gap);
|
|
@@ -7881,6 +7957,8 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7881
7957
|
const str = toString.call(subject);
|
|
7882
7958
|
return PRIMITIVE_OBJECT_TYPES.includes(str);
|
|
7883
7959
|
};
|
|
7960
|
+
var normalize_blank_lines = (str) => typeof str === "string" ? str.replace(/\n[ \t]+(?=\n)/g, `
|
|
7961
|
+
`) : str;
|
|
7884
7962
|
module.exports = (value, replacer_, space) => {
|
|
7885
7963
|
const indent_ = get_indent(space);
|
|
7886
7964
|
if (!indent_) {
|
|
@@ -7893,11 +7971,12 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7893
7971
|
indent = indent_;
|
|
7894
7972
|
const str = is_primitive_object(value) ? JSON.stringify(value) : stringify("", { "": value }, EMPTY);
|
|
7895
7973
|
clean();
|
|
7896
|
-
|
|
7974
|
+
const output = is_object(value) ? process_comments(value, PREFIX_BEFORE_ALL, EMPTY, true).trimLeft() + str + process_comments(value, PREFIX_AFTER_ALL, EMPTY).trimRight() : str;
|
|
7975
|
+
return normalize_blank_lines(output);
|
|
7897
7976
|
};
|
|
7898
7977
|
});
|
|
7899
7978
|
|
|
7900
|
-
// ../../node_modules/.bun/comment-json@
|
|
7979
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/index.js
|
|
7901
7980
|
var require_src2 = __commonJS((exports, module) => {
|
|
7902
7981
|
var { parse: parse5, tokenize } = require_parse();
|
|
7903
7982
|
var stringify = require_stringify();
|
|
@@ -7912,7 +7991,8 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7912
7991
|
PREFIX_AFTER_ALL,
|
|
7913
7992
|
assign,
|
|
7914
7993
|
moveComments,
|
|
7915
|
-
removeComments
|
|
7994
|
+
removeComments,
|
|
7995
|
+
removeBlankLines
|
|
7916
7996
|
} = require_common();
|
|
7917
7997
|
module.exports = {
|
|
7918
7998
|
PREFIX_BEFORE,
|
|
@@ -7928,7 +8008,8 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7928
8008
|
CommentArray,
|
|
7929
8009
|
assign,
|
|
7930
8010
|
moveComments,
|
|
7931
|
-
removeComments
|
|
8011
|
+
removeComments,
|
|
8012
|
+
removeBlankLines
|
|
7932
8013
|
};
|
|
7933
8014
|
});
|
|
7934
8015
|
|
|
@@ -164194,7 +164275,7 @@ ${partLines.join(`
|
|
|
164194
164275
|
`), lastOrdinal, truncated };
|
|
164195
164276
|
}
|
|
164196
164277
|
|
|
164197
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164278
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/memory.mjs
|
|
164198
164279
|
var exports_memory = {};
|
|
164199
164280
|
__export(exports_memory, {
|
|
164200
164281
|
Update: () => Update,
|
|
@@ -164205,7 +164286,7 @@ __export(exports_memory, {
|
|
|
164205
164286
|
Assign: () => Assign
|
|
164206
164287
|
});
|
|
164207
164288
|
|
|
164208
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164289
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/metrics.mjs
|
|
164209
164290
|
var Metrics = {
|
|
164210
164291
|
assign: 0,
|
|
164211
164292
|
create: 0,
|
|
@@ -164214,17 +164295,17 @@ var Metrics = {
|
|
|
164214
164295
|
update: 0
|
|
164215
164296
|
};
|
|
164216
164297
|
|
|
164217
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164298
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/assign.mjs
|
|
164218
164299
|
function Assign(left, right) {
|
|
164219
164300
|
Metrics.assign += 1;
|
|
164220
164301
|
return { ...left, ...right };
|
|
164221
164302
|
}
|
|
164222
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164303
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
|
|
164223
164304
|
var exports_guard = {};
|
|
164224
164305
|
__export(exports_guard, {
|
|
164225
164306
|
Values: () => Values,
|
|
164226
|
-
TakeLeft: () => TakeLeft,
|
|
164227
164307
|
Symbols: () => Symbols,
|
|
164308
|
+
ShiftLeft: () => ShiftLeft,
|
|
164228
164309
|
Keys: () => Keys,
|
|
164229
164310
|
IsValueLike: () => IsValueLike,
|
|
164230
164311
|
IsUnsafePropertyKey: () => IsUnsafePropertyKey,
|
|
@@ -164240,7 +164321,6 @@ __export(exports_guard, {
|
|
|
164240
164321
|
IsMaxLength: () => IsMaxLength2,
|
|
164241
164322
|
IsLessThan: () => IsLessThan,
|
|
164242
164323
|
IsLessEqualThan: () => IsLessEqualThan,
|
|
164243
|
-
IsIterator: () => IsIterator,
|
|
164244
164324
|
IsInteger: () => IsInteger,
|
|
164245
164325
|
IsGreaterThan: () => IsGreaterThan,
|
|
164246
164326
|
IsGreaterEqualThan: () => IsGreaterEqualThan,
|
|
@@ -164251,7 +164331,6 @@ __export(exports_guard, {
|
|
|
164251
164331
|
IsClassInstance: () => IsClassInstance,
|
|
164252
164332
|
IsBoolean: () => IsBoolean,
|
|
164253
164333
|
IsBigInt: () => IsBigInt,
|
|
164254
|
-
IsAsyncIterator: () => IsAsyncIterator,
|
|
164255
164334
|
IsArray: () => IsArray,
|
|
164256
164335
|
HasPropertyKey: () => HasPropertyKey,
|
|
164257
164336
|
GraphemeCount: () => GraphemeCount2,
|
|
@@ -164261,7 +164340,7 @@ __export(exports_guard, {
|
|
|
164261
164340
|
Entries: () => Entries
|
|
164262
164341
|
});
|
|
164263
164342
|
|
|
164264
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164343
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/string.mjs
|
|
164265
164344
|
function IsBetween(value, min, max) {
|
|
164266
164345
|
return value >= min && value <= max;
|
|
164267
164346
|
}
|
|
@@ -164365,13 +164444,10 @@ function IsMaxLengthFast(value, maxLength) {
|
|
|
164365
164444
|
return true;
|
|
164366
164445
|
}
|
|
164367
164446
|
|
|
164368
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164447
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
|
|
164369
164448
|
function IsArray(value) {
|
|
164370
164449
|
return Array.isArray(value);
|
|
164371
164450
|
}
|
|
164372
|
-
function IsAsyncIterator(value) {
|
|
164373
|
-
return IsObject(value) && Symbol.asyncIterator in value;
|
|
164374
|
-
}
|
|
164375
164451
|
function IsBigInt(value) {
|
|
164376
164452
|
return IsEqual(typeof value, "bigint");
|
|
164377
164453
|
}
|
|
@@ -164394,9 +164470,6 @@ function IsFunction(value) {
|
|
|
164394
164470
|
function IsInteger(value) {
|
|
164395
164471
|
return Number.isInteger(value);
|
|
164396
164472
|
}
|
|
164397
|
-
function IsIterator(value) {
|
|
164398
|
-
return IsObject(value) && Symbol.iterator in value;
|
|
164399
|
-
}
|
|
164400
164473
|
function IsNull(value) {
|
|
164401
164474
|
return IsEqual(value, null);
|
|
164402
164475
|
}
|
|
@@ -164480,7 +164553,7 @@ function EveryAll(value, offset, callback) {
|
|
|
164480
164553
|
}
|
|
164481
164554
|
return result;
|
|
164482
164555
|
}
|
|
164483
|
-
function
|
|
164556
|
+
function ShiftLeft(array2, true_, false_) {
|
|
164484
164557
|
return IsEqual(array2.length, 0) ? false_() : true_(array2[0], array2.slice(1));
|
|
164485
164558
|
}
|
|
164486
164559
|
function IsUnsafePropertyKey(key) {
|
|
@@ -164516,20 +164589,99 @@ function DeepEqualArray(left, right) {
|
|
|
164516
164589
|
function IsDeepEqual(left, right) {
|
|
164517
164590
|
return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
|
|
164518
164591
|
}
|
|
164519
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164520
|
-
|
|
164521
|
-
|
|
164592
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/globals.mjs
|
|
164593
|
+
var exports_globals = {};
|
|
164594
|
+
__export(exports_globals, {
|
|
164595
|
+
IsUint8ClampedArray: () => IsUint8ClampedArray,
|
|
164596
|
+
IsUint8Array: () => IsUint8Array,
|
|
164597
|
+
IsUint32Array: () => IsUint32Array,
|
|
164598
|
+
IsUint16Array: () => IsUint16Array,
|
|
164599
|
+
IsTypeArray: () => IsTypeArray,
|
|
164600
|
+
IsString: () => IsString2,
|
|
164601
|
+
IsSet: () => IsSet,
|
|
164602
|
+
IsRegExp: () => IsRegExp,
|
|
164603
|
+
IsNumber: () => IsNumber2,
|
|
164604
|
+
IsMap: () => IsMap,
|
|
164605
|
+
IsInt8Array: () => IsInt8Array,
|
|
164606
|
+
IsInt32Array: () => IsInt32Array,
|
|
164607
|
+
IsInt16Array: () => IsInt16Array,
|
|
164608
|
+
IsFloat64Array: () => IsFloat64Array,
|
|
164609
|
+
IsFloat32Array: () => IsFloat32Array,
|
|
164610
|
+
IsDate: () => IsDate,
|
|
164611
|
+
IsBoolean: () => IsBoolean2,
|
|
164612
|
+
IsBigUint64Array: () => IsBigUint64Array,
|
|
164613
|
+
IsBigInt64Array: () => IsBigInt64Array
|
|
164614
|
+
});
|
|
164615
|
+
function IsBoolean2(value) {
|
|
164616
|
+
return value instanceof Boolean;
|
|
164617
|
+
}
|
|
164618
|
+
function IsNumber2(value) {
|
|
164619
|
+
return value instanceof Number;
|
|
164620
|
+
}
|
|
164621
|
+
function IsString2(value) {
|
|
164622
|
+
return value instanceof String;
|
|
164623
|
+
}
|
|
164624
|
+
function IsTypeArray(value) {
|
|
164625
|
+
return globalThis.ArrayBuffer.isView(value);
|
|
164626
|
+
}
|
|
164627
|
+
function IsInt8Array(value) {
|
|
164628
|
+
return value instanceof globalThis.Int8Array;
|
|
164629
|
+
}
|
|
164630
|
+
function IsUint8Array(value) {
|
|
164631
|
+
return value instanceof globalThis.Uint8Array;
|
|
164632
|
+
}
|
|
164633
|
+
function IsUint8ClampedArray(value) {
|
|
164634
|
+
return value instanceof globalThis.Uint8ClampedArray;
|
|
164635
|
+
}
|
|
164636
|
+
function IsInt16Array(value) {
|
|
164637
|
+
return value instanceof globalThis.Int16Array;
|
|
164638
|
+
}
|
|
164639
|
+
function IsUint16Array(value) {
|
|
164640
|
+
return value instanceof globalThis.Uint16Array;
|
|
164641
|
+
}
|
|
164642
|
+
function IsInt32Array(value) {
|
|
164643
|
+
return value instanceof globalThis.Int32Array;
|
|
164644
|
+
}
|
|
164645
|
+
function IsUint32Array(value) {
|
|
164646
|
+
return value instanceof globalThis.Uint32Array;
|
|
164647
|
+
}
|
|
164648
|
+
function IsFloat32Array(value) {
|
|
164649
|
+
return value instanceof globalThis.Float32Array;
|
|
164650
|
+
}
|
|
164651
|
+
function IsFloat64Array(value) {
|
|
164652
|
+
return value instanceof globalThis.Float64Array;
|
|
164653
|
+
}
|
|
164654
|
+
function IsBigInt64Array(value) {
|
|
164655
|
+
return value instanceof globalThis.BigInt64Array;
|
|
164656
|
+
}
|
|
164657
|
+
function IsBigUint64Array(value) {
|
|
164658
|
+
return value instanceof globalThis.BigUint64Array;
|
|
164659
|
+
}
|
|
164660
|
+
function IsRegExp(value) {
|
|
164661
|
+
return value instanceof globalThis.RegExp;
|
|
164662
|
+
}
|
|
164663
|
+
function IsDate(value) {
|
|
164664
|
+
return value instanceof globalThis.Date;
|
|
164522
164665
|
}
|
|
164523
|
-
function
|
|
164666
|
+
function IsSet(value) {
|
|
164667
|
+
return value instanceof globalThis.Set;
|
|
164668
|
+
}
|
|
164669
|
+
function IsMap(value) {
|
|
164670
|
+
return value instanceof globalThis.Map;
|
|
164671
|
+
}
|
|
164672
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/clone.mjs
|
|
164673
|
+
function FromClassInstance(value) {
|
|
164524
164674
|
return value;
|
|
164525
164675
|
}
|
|
164526
|
-
function
|
|
164527
|
-
return
|
|
164676
|
+
function IsTypeObject(value) {
|
|
164677
|
+
return exports_guard.HasPropertyKey(value, "~kind") || exports_guard.HasPropertyKey(value, "~unsafe");
|
|
164528
164678
|
}
|
|
164529
|
-
function
|
|
164679
|
+
function FromTypeObject(value) {
|
|
164530
164680
|
const result = {};
|
|
164531
164681
|
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
164532
164682
|
for (const key of Object.keys(descriptors)) {
|
|
164683
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
164684
|
+
continue;
|
|
164533
164685
|
const descriptor = descriptors[key];
|
|
164534
164686
|
if (exports_guard.HasPropertyKey(descriptor, "value")) {
|
|
164535
164687
|
Object.defineProperty(result, key, { ...descriptor, value: FromValue(descriptor.value) });
|
|
@@ -164537,20 +164689,44 @@ function FromObject(value) {
|
|
|
164537
164689
|
}
|
|
164538
164690
|
return result;
|
|
164539
164691
|
}
|
|
164692
|
+
function FromPlainObject(value) {
|
|
164693
|
+
const result = {};
|
|
164694
|
+
for (const key of exports_guard.Keys(value)) {
|
|
164695
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
164696
|
+
continue;
|
|
164697
|
+
result[key] = FromValue(value[key]);
|
|
164698
|
+
}
|
|
164699
|
+
for (const key of exports_guard.Symbols(value)) {
|
|
164700
|
+
result[key] = FromValue(value[key]);
|
|
164701
|
+
}
|
|
164702
|
+
return result;
|
|
164703
|
+
}
|
|
164704
|
+
function FromObject(value) {
|
|
164705
|
+
return exports_guard.IsClassInstance(value) ? FromClassInstance(value) : IsTypeObject(value) ? FromTypeObject(value) : FromPlainObject(value);
|
|
164706
|
+
}
|
|
164707
|
+
function FromArray(value) {
|
|
164708
|
+
return value.map((element) => FromValue(element));
|
|
164709
|
+
}
|
|
164710
|
+
function FromTypedArray(value) {
|
|
164711
|
+
return value.slice();
|
|
164712
|
+
}
|
|
164540
164713
|
function FromRegExp(value) {
|
|
164541
164714
|
return new RegExp(value.source, value.flags);
|
|
164542
164715
|
}
|
|
164543
|
-
function
|
|
164544
|
-
return value;
|
|
164716
|
+
function FromMap(value) {
|
|
164717
|
+
return new Map(FromValue([...value.entries()]));
|
|
164718
|
+
}
|
|
164719
|
+
function FromSet(value) {
|
|
164720
|
+
return new Set(FromValue([...value.values()]));
|
|
164545
164721
|
}
|
|
164546
164722
|
function FromValue(value) {
|
|
164547
|
-
return value
|
|
164723
|
+
return exports_globals.IsTypeArray(value) ? FromTypedArray(value) : exports_globals.IsRegExp(value) ? FromRegExp(value) : exports_globals.IsMap(value) ? FromMap(value) : exports_globals.IsSet(value) ? FromSet(value) : exports_guard.IsArray(value) ? FromArray(value) : exports_guard.IsObject(value) ? FromObject(value) : value;
|
|
164548
164724
|
}
|
|
164549
164725
|
function Clone(value) {
|
|
164550
164726
|
Metrics.clone += 1;
|
|
164551
164727
|
return FromValue(value);
|
|
164552
164728
|
}
|
|
164553
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164729
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/settings/settings.mjs
|
|
164554
164730
|
var exports_settings = {};
|
|
164555
164731
|
__export(exports_settings, {
|
|
164556
164732
|
Set: () => Set2,
|
|
@@ -164563,7 +164739,8 @@ var settings = {
|
|
|
164563
164739
|
useAcceleration: true,
|
|
164564
164740
|
exactOptionalPropertyTypes: false,
|
|
164565
164741
|
enumerableKind: false,
|
|
164566
|
-
correctiveParse: false
|
|
164742
|
+
correctiveParse: false,
|
|
164743
|
+
unionPrioritySort: true
|
|
164567
164744
|
};
|
|
164568
164745
|
function Reset() {
|
|
164569
164746
|
settings.immutableTypes = false;
|
|
@@ -164572,6 +164749,7 @@ function Reset() {
|
|
|
164572
164749
|
settings.exactOptionalPropertyTypes = false;
|
|
164573
164750
|
settings.enumerableKind = false;
|
|
164574
164751
|
settings.correctiveParse = false;
|
|
164752
|
+
settings.unionPrioritySort = true;
|
|
164575
164753
|
}
|
|
164576
164754
|
function Set2(options) {
|
|
164577
164755
|
for (const key of exports_guard.Keys(options)) {
|
|
@@ -164584,7 +164762,7 @@ function Set2(options) {
|
|
|
164584
164762
|
function Get() {
|
|
164585
164763
|
return settings;
|
|
164586
164764
|
}
|
|
164587
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164765
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/create.mjs
|
|
164588
164766
|
function MergeHidden(left, right) {
|
|
164589
164767
|
for (const key of Object.keys(right)) {
|
|
164590
164768
|
Object.defineProperty(left, key, {
|
|
@@ -164606,7 +164784,7 @@ function Create(hidden, enumerable, options = {}) {
|
|
|
164606
164784
|
const withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
|
|
164607
164785
|
return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
|
|
164608
164786
|
}
|
|
164609
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164787
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/discard.mjs
|
|
164610
164788
|
function Discard(value, propertyKeys) {
|
|
164611
164789
|
Metrics.discard += 1;
|
|
164612
164790
|
const result = {};
|
|
@@ -164619,7 +164797,7 @@ function Discard(value, propertyKeys) {
|
|
|
164619
164797
|
}
|
|
164620
164798
|
return result;
|
|
164621
164799
|
}
|
|
164622
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164800
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/update.mjs
|
|
164623
164801
|
function Update(current, hidden, enumerable) {
|
|
164624
164802
|
Metrics.update += 1;
|
|
164625
164803
|
const settings2 = exports_settings.Get();
|
|
@@ -164642,7 +164820,7 @@ function Update(current, hidden, enumerable) {
|
|
|
164642
164820
|
}
|
|
164643
164821
|
return result;
|
|
164644
164822
|
}
|
|
164645
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164823
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/schema.mjs
|
|
164646
164824
|
function IsKind(value, kind) {
|
|
164647
164825
|
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.IsEqual(value["~kind"], kind);
|
|
164648
164826
|
}
|
|
@@ -164650,136 +164828,41 @@ function IsSchema(value) {
|
|
|
164650
164828
|
return exports_guard.IsObject(value);
|
|
164651
164829
|
}
|
|
164652
164830
|
|
|
164653
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164654
|
-
function OptionalAddAction(type) {
|
|
164655
|
-
return exports_memory.Create({ ["~kind"]: "OptionalAddAction" }, { type }, {});
|
|
164656
|
-
}
|
|
164657
|
-
function IsOptionalAddAction(value) {
|
|
164658
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "OptionalAddAction") && IsSchema(value.type);
|
|
164659
|
-
}
|
|
164660
|
-
function OptionalRemoveAction(type) {
|
|
164661
|
-
return exports_memory.Create({ ["~kind"]: "OptionalRemoveAction" }, { type }, {});
|
|
164662
|
-
}
|
|
164663
|
-
function IsOptionalRemoveAction(value) {
|
|
164664
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "OptionalRemoveAction") && IsSchema(value.type);
|
|
164665
|
-
}
|
|
164666
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/action/_readonly.mjs
|
|
164667
|
-
function ReadonlyAddAction(type) {
|
|
164668
|
-
return exports_memory.Create({ ["~kind"]: "ReadonlyAddAction" }, { type }, {});
|
|
164669
|
-
}
|
|
164670
|
-
function IsReadonlyAddAction(value) {
|
|
164671
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "ReadonlyAddAction") && IsSchema(value.type);
|
|
164672
|
-
}
|
|
164673
|
-
function ReadonlyRemoveAction(type) {
|
|
164674
|
-
return exports_memory.Create({ ["~kind"]: "ReadonlyRemoveAction" }, { type }, {});
|
|
164675
|
-
}
|
|
164676
|
-
function IsReadonlyRemoveAction(value) {
|
|
164677
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "ReadonlyRemoveAction") && IsSchema(value.type);
|
|
164678
|
-
}
|
|
164679
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/deferred.mjs
|
|
164831
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/deferred.mjs
|
|
164680
164832
|
function Deferred(action, parameters, options) {
|
|
164681
|
-
return exports_memory.Create({ "~kind": "Deferred" }, { action, parameters, options }, {});
|
|
164833
|
+
return exports_memory.Create({ "~kind": "Deferred" }, { type: "deferred", action, parameters, options }, {});
|
|
164682
164834
|
}
|
|
164683
164835
|
function IsDeferred(value) {
|
|
164684
164836
|
return IsKind(value, "Deferred");
|
|
164685
164837
|
}
|
|
164686
164838
|
|
|
164687
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164688
|
-
function
|
|
164689
|
-
return exports_memory.Create({ ["~kind"]: "Promise" }, { type: "promise", item }, options);
|
|
164690
|
-
}
|
|
164691
|
-
function IsPromise(value) {
|
|
164692
|
-
return IsKind(value, "Promise");
|
|
164693
|
-
}
|
|
164694
|
-
function PromiseOptions(type) {
|
|
164695
|
-
return exports_memory.Discard(type, ["~kind", "type", "item"]);
|
|
164696
|
-
}
|
|
164697
|
-
|
|
164698
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_immutable.mjs
|
|
164699
|
-
function ImmutableAdd(type) {
|
|
164700
|
-
return exports_memory.Update(type, { "~immutable": true }, {});
|
|
164701
|
-
}
|
|
164702
|
-
function Immutable(type) {
|
|
164703
|
-
return ImmutableAdd(type);
|
|
164704
|
-
}
|
|
164705
|
-
function IsImmutable(value) {
|
|
164706
|
-
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
|
|
164707
|
-
}
|
|
164708
|
-
|
|
164709
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_optional.mjs
|
|
164710
|
-
function OptionalRemove(type) {
|
|
164711
|
-
const result = exports_memory.Discard(type, ["~optional"]);
|
|
164712
|
-
return result;
|
|
164713
|
-
}
|
|
164714
|
-
function OptionalAdd(type) {
|
|
164715
|
-
return exports_memory.Update(type, { "~optional": true }, {});
|
|
164716
|
-
}
|
|
164717
|
-
function Optional(type) {
|
|
164718
|
-
return OptionalAdd(type);
|
|
164719
|
-
}
|
|
164720
|
-
function IsOptional(value) {
|
|
164721
|
-
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
|
|
164722
|
-
}
|
|
164723
|
-
|
|
164724
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_readonly.mjs
|
|
164725
|
-
function ReadonlyRemove(type) {
|
|
164726
|
-
return exports_memory.Discard(type, ["~readonly"]);
|
|
164727
|
-
}
|
|
164728
|
-
function ReadonlyAdd(type) {
|
|
164839
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
164840
|
+
function AddReadonlyOperation(type) {
|
|
164729
164841
|
return exports_memory.Update(type, { "~readonly": true }, {});
|
|
164730
164842
|
}
|
|
164731
|
-
function
|
|
164732
|
-
|
|
164843
|
+
function AddReadonlyAction(type, options) {
|
|
164844
|
+
const result = exports_memory.Update(AddReadonlyOperation(type), {}, options);
|
|
164845
|
+
return result;
|
|
164733
164846
|
}
|
|
164734
|
-
function
|
|
164735
|
-
|
|
164847
|
+
function AddReadonlyInstantiate(context, state, type, options) {
|
|
164848
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
164849
|
+
return AddReadonlyAction(instantiatedType, options);
|
|
164736
164850
|
}
|
|
164737
164851
|
|
|
164738
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164739
|
-
function
|
|
164740
|
-
return {
|
|
164741
|
-
enumerable: exports_settings.Get().enumerableKind,
|
|
164742
|
-
writable: false,
|
|
164743
|
-
configurable: false,
|
|
164744
|
-
value
|
|
164745
|
-
};
|
|
164852
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
164853
|
+
function AddOptionalOperation(type) {
|
|
164854
|
+
return exports_memory.Update(type, { "~optional": true }, {});
|
|
164746
164855
|
}
|
|
164747
|
-
|
|
164748
|
-
|
|
164749
|
-
|
|
164750
|
-
globalThis.Object.defineProperty(this, "~kind", BaseProperty("Base"));
|
|
164751
|
-
globalThis.Object.defineProperty(this, "~guard", BaseProperty({
|
|
164752
|
-
check: (value) => this.Check(value),
|
|
164753
|
-
errors: (value) => this.Errors(value)
|
|
164754
|
-
}));
|
|
164755
|
-
}
|
|
164756
|
-
Check(_value) {
|
|
164757
|
-
return true;
|
|
164758
|
-
}
|
|
164759
|
-
Errors(_value) {
|
|
164760
|
-
return [];
|
|
164761
|
-
}
|
|
164762
|
-
Convert(value) {
|
|
164763
|
-
return value;
|
|
164764
|
-
}
|
|
164765
|
-
Clean(value) {
|
|
164766
|
-
return value;
|
|
164767
|
-
}
|
|
164768
|
-
Default(value) {
|
|
164769
|
-
return value;
|
|
164770
|
-
}
|
|
164771
|
-
Create() {
|
|
164772
|
-
throw new Error("Create not implemented");
|
|
164773
|
-
}
|
|
164774
|
-
Clone() {
|
|
164775
|
-
throw Error("Clone not implemented");
|
|
164776
|
-
}
|
|
164856
|
+
function AddOptionalAction(type, options) {
|
|
164857
|
+
const result = exports_memory.Update(AddOptionalOperation(type), {}, options);
|
|
164858
|
+
return result;
|
|
164777
164859
|
}
|
|
164778
|
-
function
|
|
164779
|
-
|
|
164860
|
+
function AddOptionalInstantiate(context, state, type, options) {
|
|
164861
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
164862
|
+
return AddOptionalAction(instantiatedType, options);
|
|
164780
164863
|
}
|
|
164781
164864
|
|
|
164782
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164865
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/array.mjs
|
|
164783
164866
|
function _Array_(items, options) {
|
|
164784
164867
|
return exports_memory.Create({ "~kind": "Array" }, { type: "array", items }, options);
|
|
164785
164868
|
}
|
|
@@ -164790,18 +164873,7 @@ function ArrayOptions(type) {
|
|
|
164790
164873
|
return exports_memory.Discard(type, ["~kind", "type", "items"]);
|
|
164791
164874
|
}
|
|
164792
164875
|
|
|
164793
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164794
|
-
function AsyncIterator(iteratorItems, options) {
|
|
164795
|
-
return exports_memory.Create({ "~kind": "AsyncIterator" }, { type: "asyncIterator", iteratorItems }, options);
|
|
164796
|
-
}
|
|
164797
|
-
function IsAsyncIterator2(value) {
|
|
164798
|
-
return IsKind(value, "AsyncIterator");
|
|
164799
|
-
}
|
|
164800
|
-
function AsyncIteratorOptions(type) {
|
|
164801
|
-
return exports_memory.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
164802
|
-
}
|
|
164803
|
-
|
|
164804
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/constructor.mjs
|
|
164876
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/constructor.mjs
|
|
164805
164877
|
function Constructor(parameters, instanceType, options = {}) {
|
|
164806
164878
|
return exports_memory.Create({ "~kind": "Constructor" }, { type: "constructor", parameters, instanceType }, options);
|
|
164807
164879
|
}
|
|
@@ -164812,7 +164884,7 @@ function ConstructorOptions(type) {
|
|
|
164812
164884
|
return exports_memory.Discard(type, ["~kind", "type", "parameters", "instanceType"]);
|
|
164813
164885
|
}
|
|
164814
164886
|
|
|
164815
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164887
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/function.mjs
|
|
164816
164888
|
function _Function_(parameters, returnType, options = {}) {
|
|
164817
164889
|
return exports_memory.Create({ ["~kind"]: "Function" }, { type: "function", parameters, returnType }, options);
|
|
164818
164890
|
}
|
|
@@ -164823,7 +164895,7 @@ function FunctionOptions(type) {
|
|
|
164823
164895
|
return exports_memory.Discard(type, ["~kind", "type", "parameters", "returnType"]);
|
|
164824
164896
|
}
|
|
164825
164897
|
|
|
164826
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164898
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/ref.mjs
|
|
164827
164899
|
function Ref(ref, options) {
|
|
164828
164900
|
return exports_memory.Create({ ["~kind"]: "Ref" }, { $ref: ref }, options);
|
|
164829
164901
|
}
|
|
@@ -164831,7 +164903,7 @@ function IsRef(value) {
|
|
|
164831
164903
|
return IsKind(value, "Ref");
|
|
164832
164904
|
}
|
|
164833
164905
|
|
|
164834
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164906
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/generic.mjs
|
|
164835
164907
|
function Generic(parameters, expression) {
|
|
164836
164908
|
return exports_memory.Create({ "~kind": "Generic" }, { type: "generic", parameters, expression });
|
|
164837
164909
|
}
|
|
@@ -164839,7 +164911,7 @@ function IsGeneric(value) {
|
|
|
164839
164911
|
return IsKind(value, "Generic");
|
|
164840
164912
|
}
|
|
164841
164913
|
|
|
164842
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164914
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/any.mjs
|
|
164843
164915
|
function Any(options) {
|
|
164844
164916
|
return exports_memory.Create({ ["~kind"]: "Any" }, {}, options);
|
|
164845
164917
|
}
|
|
@@ -164847,7 +164919,7 @@ function IsAny(value) {
|
|
|
164847
164919
|
return IsKind(value, "Any");
|
|
164848
164920
|
}
|
|
164849
164921
|
|
|
164850
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164922
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/never.mjs
|
|
164851
164923
|
var NeverPattern = "(?!)";
|
|
164852
164924
|
function Never(options) {
|
|
164853
164925
|
return exports_memory.Create({ "~kind": "Never" }, { not: {} }, options);
|
|
@@ -164856,7 +164928,23 @@ function IsNever(value) {
|
|
|
164856
164928
|
return IsKind(value, "Never");
|
|
164857
164929
|
}
|
|
164858
164930
|
|
|
164859
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164931
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_optional.mjs
|
|
164932
|
+
function AddOptionalDeferred(type, options = {}) {
|
|
164933
|
+
return Deferred("AddOptional", [type], options);
|
|
164934
|
+
}
|
|
164935
|
+
function AddOptional(type, options = {}) {
|
|
164936
|
+
return AddOptionalAction(type, options);
|
|
164937
|
+
}
|
|
164938
|
+
|
|
164939
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_optional.mjs
|
|
164940
|
+
function Optional(type) {
|
|
164941
|
+
return AddOptional(type);
|
|
164942
|
+
}
|
|
164943
|
+
function IsOptional(value) {
|
|
164944
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
|
|
164945
|
+
}
|
|
164946
|
+
|
|
164947
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/properties.mjs
|
|
164860
164948
|
function RequiredArray(properties) {
|
|
164861
164949
|
return exports_guard.Keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
164862
164950
|
}
|
|
@@ -164867,7 +164955,7 @@ function PropertyValues(properties) {
|
|
|
164867
164955
|
return exports_guard.Values(properties);
|
|
164868
164956
|
}
|
|
164869
164957
|
|
|
164870
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164958
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/object.mjs
|
|
164871
164959
|
function _Object_(properties, options = {}) {
|
|
164872
164960
|
const requiredKeys = RequiredArray(properties);
|
|
164873
164961
|
const required2 = requiredKeys.length > 0 ? { required: requiredKeys } : {};
|
|
@@ -164880,18 +164968,7 @@ function ObjectOptions(type) {
|
|
|
164880
164968
|
return exports_memory.Discard(type, ["~kind", "type", "properties", "required"]);
|
|
164881
164969
|
}
|
|
164882
164970
|
|
|
164883
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164884
|
-
function Union(anyOf, options = {}) {
|
|
164885
|
-
return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
164886
|
-
}
|
|
164887
|
-
function IsUnion(value) {
|
|
164888
|
-
return IsKind(value, "Union");
|
|
164889
|
-
}
|
|
164890
|
-
function UnionOptions(type) {
|
|
164891
|
-
return exports_memory.Discard(type, ["~kind", "anyOf"]);
|
|
164892
|
-
}
|
|
164893
|
-
|
|
164894
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/unknown.mjs
|
|
164971
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unknown.mjs
|
|
164895
164972
|
function Unknown(options) {
|
|
164896
164973
|
return exports_memory.Create({ ["~kind"]: "Unknown" }, {}, options);
|
|
164897
164974
|
}
|
|
@@ -164899,7 +164976,7 @@ function IsUnknown(value) {
|
|
|
164899
164976
|
return IsKind(value, "Unknown");
|
|
164900
164977
|
}
|
|
164901
164978
|
|
|
164902
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164979
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/cyclic.mjs
|
|
164903
164980
|
function Cyclic($defs, $ref, options) {
|
|
164904
164981
|
const defs = exports_guard.Keys($defs).reduce((result, key) => {
|
|
164905
164982
|
return { ...result, [key]: exports_memory.Update($defs[key], {}, { $id: key }) };
|
|
@@ -164910,7 +164987,7 @@ function IsCyclic(value) {
|
|
|
164910
164987
|
return IsKind(value, "Cyclic");
|
|
164911
164988
|
}
|
|
164912
164989
|
|
|
164913
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164990
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unsafe.mjs
|
|
164914
164991
|
function Unsafe(schema) {
|
|
164915
164992
|
return exports_memory.Update(schema, { ["~unsafe"]: null }, {});
|
|
164916
164993
|
}
|
|
@@ -164918,7 +164995,7 @@ function IsUnsafe(value) {
|
|
|
164918
164995
|
return exports_guard.IsObjectNotArray(value) && exports_guard.HasPropertyKey(value, "~unsafe") && exports_guard.IsNull(value["~unsafe"]);
|
|
164919
164996
|
}
|
|
164920
164997
|
|
|
164921
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164998
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/arguments/arguments.mjs
|
|
164922
164999
|
var exports_arguments = {};
|
|
164923
165000
|
__export(exports_arguments, {
|
|
164924
165001
|
Match: () => Match
|
|
@@ -164928,7 +165005,7 @@ function Match(args, match) {
|
|
|
164928
165005
|
throw Error("Invalid Arguments");
|
|
164929
165006
|
})();
|
|
164930
165007
|
}
|
|
164931
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165008
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/infer.mjs
|
|
164932
165009
|
function Infer(...args) {
|
|
164933
165010
|
const [name2, extends_] = exports_arguments.Match(args, {
|
|
164934
165011
|
2: (name3, extends_2) => [name3, extends_2, extends_2],
|
|
@@ -164940,7 +165017,18 @@ function IsInfer(value) {
|
|
|
164940
165017
|
return IsKind(value, "Infer");
|
|
164941
165018
|
}
|
|
164942
165019
|
|
|
164943
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165020
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/dependent.mjs
|
|
165021
|
+
function Dependent(if_, then_, else_, options = {}) {
|
|
165022
|
+
return exports_memory.Create({ "~kind": "Dependent" }, { if: if_, then: then_, else: else_ }, options);
|
|
165023
|
+
}
|
|
165024
|
+
function IsDependent(value) {
|
|
165025
|
+
return IsKind(value, "Dependent");
|
|
165026
|
+
}
|
|
165027
|
+
function DependentOptions(type) {
|
|
165028
|
+
return exports_memory.Discard(type, ["~kind", "if", "then", "else"]);
|
|
165029
|
+
}
|
|
165030
|
+
|
|
165031
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
|
|
164944
165032
|
function IsTypeScriptEnumLike(value) {
|
|
164945
165033
|
return exports_guard.IsObjectNotArray(value);
|
|
164946
165034
|
}
|
|
@@ -164949,7 +165037,7 @@ function TypeScriptEnumToEnumValues(type) {
|
|
|
164949
165037
|
return keys.reduce((result, key) => [...result, type[key]], []);
|
|
164950
165038
|
}
|
|
164951
165039
|
|
|
164952
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165040
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/enum.mjs
|
|
164953
165041
|
function Enum(value, options) {
|
|
164954
165042
|
const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;
|
|
164955
165043
|
return exports_memory.Create({ "~kind": "Enum" }, { enum: values }, options);
|
|
@@ -164958,7 +165046,7 @@ function IsEnum(value) {
|
|
|
164958
165046
|
return IsKind(value, "Enum");
|
|
164959
165047
|
}
|
|
164960
165048
|
|
|
164961
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165049
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/intersect.mjs
|
|
164962
165050
|
function Intersect(types, options = {}) {
|
|
164963
165051
|
return exports_memory.Create({ "~kind": "Intersect" }, { allOf: types }, options);
|
|
164964
165052
|
}
|
|
@@ -164968,11 +165056,11 @@ function IsIntersect(value) {
|
|
|
164968
165056
|
function IntersectOptions(type) {
|
|
164969
165057
|
return exports_memory.Discard(type, ["~kind", "allOf"]);
|
|
164970
165058
|
}
|
|
164971
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165059
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/unreachable/unreachable.mjs
|
|
164972
165060
|
function Unreachable() {
|
|
164973
165061
|
throw new Error("Unreachable");
|
|
164974
165062
|
}
|
|
164975
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165063
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/hashing/hash.mjs
|
|
164976
165064
|
var ByteMarker;
|
|
164977
165065
|
(function(ByteMarker2) {
|
|
164978
165066
|
ByteMarker2[ByteMarker2["Array"] = 0] = "Array";
|
|
@@ -164997,7 +165085,7 @@ var F64 = new Float64Array(1);
|
|
|
164997
165085
|
var F64In = new DataView(F64.buffer);
|
|
164998
165086
|
var F64Out = new Uint8Array(F64.buffer);
|
|
164999
165087
|
var encoder2 = new TextEncoder;
|
|
165000
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165088
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_codec.mjs
|
|
165001
165089
|
class EncodeBuilder {
|
|
165002
165090
|
constructor(type, decode3) {
|
|
165003
165091
|
this.type = type;
|
|
@@ -165036,17 +165124,38 @@ function Encode(type, callback) {
|
|
|
165036
165124
|
function IsCodec(value) {
|
|
165037
165125
|
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~codec") && exports_guard.IsObject(value["~codec"]) && exports_guard.HasPropertyKey(value["~codec"], "encode") && exports_guard.HasPropertyKey(value["~codec"], "decode");
|
|
165038
165126
|
}
|
|
165039
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165127
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_immutable.mjs
|
|
165128
|
+
function Immutable(type) {
|
|
165129
|
+
return AddImmutable(type);
|
|
165130
|
+
}
|
|
165131
|
+
function IsImmutable(value) {
|
|
165132
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
|
|
165133
|
+
}
|
|
165134
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_readonly.mjs
|
|
165135
|
+
function AddReadonlyDeferred(type, options = {}) {
|
|
165136
|
+
return Deferred("AddReadonly", [type], options);
|
|
165137
|
+
}
|
|
165138
|
+
function AddReadonly(type, options = {}) {
|
|
165139
|
+
return AddReadonlyAction(type, options);
|
|
165140
|
+
}
|
|
165141
|
+
|
|
165142
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_readonly.mjs
|
|
165143
|
+
function Readonly(type) {
|
|
165144
|
+
return AddReadonly(type);
|
|
165145
|
+
}
|
|
165146
|
+
function IsReadonly(value) {
|
|
165147
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~readonly");
|
|
165148
|
+
}
|
|
165149
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_refine.mjs
|
|
165040
165150
|
function RefineAdd(type, refinement) {
|
|
165041
165151
|
const refinements = IsRefine(type) ? [...type["~refine"], refinement] : [refinement];
|
|
165042
165152
|
return exports_memory.Update(type, { "~refine": refinements }, {});
|
|
165043
165153
|
}
|
|
165044
165154
|
function Refine(...args) {
|
|
165045
|
-
const [type, check2,
|
|
165155
|
+
const [type, check2, error51] = exports_arguments.Match(args, {
|
|
165046
165156
|
3: (type2, check3, error52) => [type2, check3, error52],
|
|
165047
165157
|
2: (type2, check3) => [type2, check3, () => "Refine Error"]
|
|
165048
165158
|
});
|
|
165049
|
-
const error51 = exports_guard.IsString(error_or_message) ? () => error_or_message : error_or_message;
|
|
165050
165159
|
return RefineAdd(type, { check: check2, error: error51 });
|
|
165051
165160
|
}
|
|
165052
165161
|
function IsRefinement(value) {
|
|
@@ -165055,7 +165164,7 @@ function IsRefinement(value) {
|
|
|
165055
165164
|
function IsRefine(value) {
|
|
165056
165165
|
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~refine") && exports_guard.IsArray(value["~refine"]) && exports_guard.Every(value["~refine"], 0, (value2) => IsRefinement(value2));
|
|
165057
165166
|
}
|
|
165058
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165167
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/bigint.mjs
|
|
165059
165168
|
var BigIntPattern = "-?(?:0|[1-9][0-9]*)n";
|
|
165060
165169
|
function BigInt2(options) {
|
|
165061
165170
|
return exports_memory.Create({ "~kind": "BigInt" }, { type: "bigint" }, options);
|
|
@@ -165063,21 +165172,21 @@ function BigInt2(options) {
|
|
|
165063
165172
|
function IsBigInt2(value) {
|
|
165064
165173
|
return IsKind(value, "BigInt");
|
|
165065
165174
|
}
|
|
165066
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165175
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/boolean.mjs
|
|
165067
165176
|
function Boolean2(options) {
|
|
165068
165177
|
return exports_memory.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
|
|
165069
165178
|
}
|
|
165070
|
-
function
|
|
165179
|
+
function IsBoolean3(value) {
|
|
165071
165180
|
return IsKind(value, "Boolean");
|
|
165072
165181
|
}
|
|
165073
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165182
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/identifier.mjs
|
|
165074
165183
|
function Identifier(name2) {
|
|
165075
165184
|
return exports_memory.Create({ "~kind": "Identifier" }, { name: name2 });
|
|
165076
165185
|
}
|
|
165077
165186
|
function IsIdentifier(value) {
|
|
165078
165187
|
return IsKind(value, "Identifier");
|
|
165079
165188
|
}
|
|
165080
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165189
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/integer.mjs
|
|
165081
165190
|
var IntegerPattern = "-?(?:0|[1-9][0-9]*)";
|
|
165082
165191
|
function Integer(options) {
|
|
165083
165192
|
return exports_memory.Create({ "~kind": "Integer" }, { type: "integer" }, options);
|
|
@@ -165085,17 +165194,7 @@ function Integer(options) {
|
|
|
165085
165194
|
function IsInteger2(value) {
|
|
165086
165195
|
return IsKind(value, "Integer");
|
|
165087
165196
|
}
|
|
165088
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165089
|
-
function Iterator(iteratorItems, options) {
|
|
165090
|
-
return exports_memory.Create({ "~kind": "Iterator" }, { type: "iterator", iteratorItems }, options);
|
|
165091
|
-
}
|
|
165092
|
-
function IsIterator2(value) {
|
|
165093
|
-
return IsKind(value, "Iterator");
|
|
165094
|
-
}
|
|
165095
|
-
function IteratorOptions(type) {
|
|
165096
|
-
return exports_memory.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
165097
|
-
}
|
|
165098
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/literal.mjs
|
|
165197
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/literal.mjs
|
|
165099
165198
|
class InvalidLiteralValue extends Error {
|
|
165100
165199
|
constructor(value) {
|
|
165101
165200
|
super(`Invalid Literal value`);
|
|
@@ -165127,29 +165226,29 @@ function IsLiteralString(value) {
|
|
|
165127
165226
|
function IsLiteral(value) {
|
|
165128
165227
|
return IsKind(value, "Literal");
|
|
165129
165228
|
}
|
|
165130
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165229
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/null.mjs
|
|
165131
165230
|
function Null(options) {
|
|
165132
165231
|
return exports_memory.Create({ "~kind": "Null" }, { type: "null" }, options);
|
|
165133
165232
|
}
|
|
165134
165233
|
function IsNull2(value) {
|
|
165135
165234
|
return IsKind(value, "Null");
|
|
165136
165235
|
}
|
|
165137
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165138
|
-
var NumberPattern = "-?(?:0|[1-9][0-9]*)(
|
|
165236
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/number.mjs
|
|
165237
|
+
var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";
|
|
165139
165238
|
function Number2(options) {
|
|
165140
165239
|
return exports_memory.Create({ "~kind": "Number" }, { type: "number" }, options);
|
|
165141
165240
|
}
|
|
165142
|
-
function
|
|
165241
|
+
function IsNumber3(value) {
|
|
165143
165242
|
return IsKind(value, "Number");
|
|
165144
165243
|
}
|
|
165145
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165244
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/symbol.mjs
|
|
165146
165245
|
function Symbol2(options) {
|
|
165147
165246
|
return exports_memory.Create({ "~kind": "Symbol" }, { type: "symbol" }, options);
|
|
165148
165247
|
}
|
|
165149
165248
|
function IsSymbol2(value) {
|
|
165150
165249
|
return IsKind(value, "Symbol");
|
|
165151
165250
|
}
|
|
165152
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165251
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/parameter.mjs
|
|
165153
165252
|
function Parameter(...args) {
|
|
165154
165253
|
const [name2, extends_, equals] = exports_arguments.Match(args, {
|
|
165155
165254
|
3: (name3, extends_2, equals2) => [name3, extends_2, equals2],
|
|
@@ -165161,28 +165260,39 @@ function Parameter(...args) {
|
|
|
165161
165260
|
function IsParameter(value) {
|
|
165162
165261
|
return IsKind(value, "Parameter");
|
|
165163
165262
|
}
|
|
165164
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165263
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/string.mjs
|
|
165165
165264
|
var StringPattern = ".*";
|
|
165166
165265
|
function String2(options) {
|
|
165167
165266
|
return exports_memory.Create({ "~kind": "String" }, { type: "string" }, options);
|
|
165168
165267
|
}
|
|
165169
|
-
function
|
|
165268
|
+
function IsString3(value) {
|
|
165170
165269
|
return IsKind(value, "String");
|
|
165171
165270
|
}
|
|
165172
165271
|
|
|
165173
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165272
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/union.mjs
|
|
165273
|
+
function Union(anyOf, options = {}) {
|
|
165274
|
+
return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
165275
|
+
}
|
|
165276
|
+
function IsUnion(value) {
|
|
165277
|
+
return IsKind(value, "Union");
|
|
165278
|
+
}
|
|
165279
|
+
function UnionOptions(type) {
|
|
165280
|
+
return exports_memory.Discard(type, ["~kind", "anyOf"]);
|
|
165281
|
+
}
|
|
165282
|
+
|
|
165283
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/pattern.mjs
|
|
165174
165284
|
function ParsePatternIntoTypes(pattern) {
|
|
165175
165285
|
const parsed = Pattern(pattern);
|
|
165176
165286
|
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : [];
|
|
165177
165287
|
return result;
|
|
165178
165288
|
}
|
|
165179
165289
|
|
|
165180
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165290
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs
|
|
165181
165291
|
function FromLiteral(_value) {
|
|
165182
165292
|
return true;
|
|
165183
165293
|
}
|
|
165184
165294
|
function FromTypesReduce(types) {
|
|
165185
|
-
return exports_guard.
|
|
165295
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType(left) ? FromTypesReduce(right) : false, () => true);
|
|
165186
165296
|
}
|
|
165187
165297
|
function FromTypes(types) {
|
|
165188
165298
|
const result = exports_guard.IsEqual(types.length, 0) ? false : FromTypesReduce(types);
|
|
@@ -165196,27 +165306,27 @@ function IsTemplateLiteralFinite(types) {
|
|
|
165196
165306
|
return result;
|
|
165197
165307
|
}
|
|
165198
165308
|
|
|
165199
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165309
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/create.mjs
|
|
165200
165310
|
function TemplateLiteralCreate(pattern) {
|
|
165201
165311
|
return exports_memory.Create({ ["~kind"]: "TemplateLiteral" }, { type: "string", pattern }, {});
|
|
165202
165312
|
}
|
|
165203
165313
|
|
|
165204
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165314
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/decode.mjs
|
|
165205
165315
|
function FromLiteralPush(variants, value, result = []) {
|
|
165206
|
-
return exports_guard.
|
|
165316
|
+
return exports_guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);
|
|
165207
165317
|
}
|
|
165208
165318
|
function FromLiteral2(variants, value) {
|
|
165209
165319
|
return exports_guard.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value);
|
|
165210
165320
|
}
|
|
165211
165321
|
function FromUnion(variants, types, result = []) {
|
|
165212
|
-
return exports_guard.
|
|
165322
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType2(variants, left)]), () => result);
|
|
165213
165323
|
}
|
|
165214
165324
|
function FromType2(variants, type) {
|
|
165215
165325
|
const result = IsUnion(type) ? FromUnion(variants, type.anyOf) : IsLiteral(type) ? FromLiteral2(variants, type.const) : Unreachable();
|
|
165216
165326
|
return result;
|
|
165217
165327
|
}
|
|
165218
165328
|
function DecodeFromSpan(variants, types) {
|
|
165219
|
-
return exports_guard.
|
|
165329
|
+
return exports_guard.ShiftLeft(types, (left, right) => DecodeFromSpan(FromType2(variants, left), right), () => variants);
|
|
165220
165330
|
}
|
|
165221
165331
|
function VariantsToLiterals(variants) {
|
|
165222
165332
|
return variants.map((variant) => Literal(variant));
|
|
@@ -165241,67 +165351,78 @@ function TemplateLiteralDecode(pattern) {
|
|
|
165241
165351
|
return result;
|
|
165242
165352
|
}
|
|
165243
165353
|
|
|
165244
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165354
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/record_create.mjs
|
|
165245
165355
|
function CreateRecord(key, value) {
|
|
165246
165356
|
const type = "object";
|
|
165247
165357
|
const patternProperties = { [key]: value };
|
|
165248
165358
|
return exports_memory.Create({ ["~kind"]: "Record" }, { type, patternProperties });
|
|
165249
165359
|
}
|
|
165250
165360
|
|
|
165251
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165361
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_any.mjs
|
|
165252
165362
|
function FromAnyKey(value) {
|
|
165253
165363
|
return CreateRecord(StringKey, value);
|
|
165254
165364
|
}
|
|
165255
165365
|
|
|
165256
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165366
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs
|
|
165257
165367
|
function FromBooleanKey(value) {
|
|
165258
165368
|
return _Object_({ true: value, false: value });
|
|
165259
165369
|
}
|
|
165260
165370
|
|
|
165261
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165262
|
-
function
|
|
165263
|
-
|
|
165371
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/tuple.mjs
|
|
165372
|
+
function Tuple(types, options = {}) {
|
|
165373
|
+
const [items, minItems, additionalItems] = [types, types.length, false];
|
|
165374
|
+
return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
165264
165375
|
}
|
|
165265
|
-
function
|
|
165266
|
-
|
|
165267
|
-
return result;
|
|
165376
|
+
function IsTuple(value) {
|
|
165377
|
+
return IsKind(value, "Tuple");
|
|
165268
165378
|
}
|
|
165269
|
-
function
|
|
165270
|
-
|
|
165271
|
-
|
|
165272
|
-
|
|
165379
|
+
function TupleOptions(type) {
|
|
165380
|
+
return exports_memory.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
|
|
165381
|
+
}
|
|
165382
|
+
|
|
165383
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
165384
|
+
function RemoveReadonlyOperation(type) {
|
|
165385
|
+
return exports_memory.Discard(type, ["~readonly"]);
|
|
165273
165386
|
}
|
|
165274
|
-
function
|
|
165275
|
-
const result =
|
|
165387
|
+
function RemoveReadonlyAction(type, options) {
|
|
165388
|
+
const result = exports_memory.Update(RemoveReadonlyOperation(type), {}, options);
|
|
165276
165389
|
return result;
|
|
165277
165390
|
}
|
|
165391
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
165392
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
165393
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
165394
|
+
}
|
|
165278
165395
|
|
|
165279
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165280
|
-
function
|
|
165281
|
-
|
|
165282
|
-
|
|
165283
|
-
|
|
165396
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
165397
|
+
function RemoveReadonlyDeferred(type, options = {}) {
|
|
165398
|
+
return Deferred("RemoveReadonly", [type], options);
|
|
165399
|
+
}
|
|
165400
|
+
function RemoveReadonly(type, options = {}) {
|
|
165401
|
+
return RemoveReadonlyAction(type, options);
|
|
165284
165402
|
}
|
|
165285
165403
|
|
|
165286
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165287
|
-
function
|
|
165288
|
-
|
|
165404
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
165405
|
+
function RemoveOptionalOperation(type) {
|
|
165406
|
+
return exports_memory.Discard(type, ["~optional"]);
|
|
165407
|
+
}
|
|
165408
|
+
function RemoveOptionalAction(type, options) {
|
|
165409
|
+
const result = exports_memory.Update(RemoveOptionalOperation(type), {}, options);
|
|
165289
165410
|
return result;
|
|
165290
165411
|
}
|
|
165291
|
-
|
|
165292
|
-
|
|
165293
|
-
|
|
165294
|
-
const [items, minItems, additionalItems] = [types, types.length, false];
|
|
165295
|
-
return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
165412
|
+
function RemoveOptionalInstantiate(context, state, type, options) {
|
|
165413
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
165414
|
+
return RemoveOptionalAction(instantiatedType, options);
|
|
165296
165415
|
}
|
|
165297
|
-
|
|
165298
|
-
|
|
165416
|
+
|
|
165417
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
165418
|
+
function RemoveOptionalDeferred(type, options = {}) {
|
|
165419
|
+
return Deferred("RemoveOptional", [type], options);
|
|
165299
165420
|
}
|
|
165300
|
-
function
|
|
165301
|
-
return
|
|
165421
|
+
function RemoveOptional(type, options = {}) {
|
|
165422
|
+
return RemoveOptionalAction(type, options);
|
|
165302
165423
|
}
|
|
165303
165424
|
|
|
165304
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165425
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
165305
165426
|
function TupleElementsToProperties(types) {
|
|
165306
165427
|
const result = types.reduceRight((result2, right, index) => {
|
|
165307
165428
|
return { [index]: right, ...result2 };
|
|
@@ -165314,7 +165435,7 @@ function TupleToObject(type) {
|
|
|
165314
165435
|
return result;
|
|
165315
165436
|
}
|
|
165316
165437
|
|
|
165317
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165438
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
165318
165439
|
function IsReadonlyProperty(left, right) {
|
|
165319
165440
|
return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
|
|
165320
165441
|
}
|
|
@@ -165325,8 +165446,8 @@ function CompositeProperty(left, right) {
|
|
|
165325
165446
|
const isReadonly = IsReadonlyProperty(left, right);
|
|
165326
165447
|
const isOptional = IsOptionalProperty(left, right);
|
|
165327
165448
|
const evaluated = EvaluateIntersect([left, right]);
|
|
165328
|
-
const property =
|
|
165329
|
-
return isReadonly && isOptional ?
|
|
165449
|
+
const property = RemoveReadonly(RemoveOptional(evaluated));
|
|
165450
|
+
return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
|
|
165330
165451
|
}
|
|
165331
165452
|
function CompositePropertyKey(left, right, key) {
|
|
165332
165453
|
return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
|
|
@@ -165348,13 +165469,13 @@ function Composite(left, right) {
|
|
|
165348
165469
|
return _Object_(properties);
|
|
165349
165470
|
}
|
|
165350
165471
|
|
|
165351
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165472
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
165352
165473
|
function Narrow(left, right) {
|
|
165353
165474
|
const result = Compare(left, right);
|
|
165354
165475
|
return exports_guard.IsEqual(result, ResultLeftInside) ? left : exports_guard.IsEqual(result, ResultRightInside) ? right : exports_guard.IsEqual(result, ResultEqual) ? right : Never();
|
|
165355
165476
|
}
|
|
165356
165477
|
|
|
165357
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165478
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/distribute.mjs
|
|
165358
165479
|
function IsObjectLike(type) {
|
|
165359
165480
|
return IsObject2(type) || IsTuple(type);
|
|
165360
165481
|
}
|
|
@@ -165374,65 +165495,114 @@ function DistributeOperation(left, right) {
|
|
|
165374
165495
|
return result;
|
|
165375
165496
|
}
|
|
165376
165497
|
function DistributeType(type, types, result = []) {
|
|
165377
|
-
return exports_guard.
|
|
165498
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(type, left)]), () => exports_guard.IsEqual(result.length, 0) ? [type] : result);
|
|
165378
165499
|
}
|
|
165379
165500
|
function DistributeUnion(types, distribution, result = []) {
|
|
165380
|
-
return exports_guard.
|
|
165501
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);
|
|
165381
165502
|
}
|
|
165382
165503
|
function Distribute(types, result = []) {
|
|
165383
|
-
return exports_guard.
|
|
165504
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsUnion(left) ? Distribute(right, DistributeUnion(left.anyOf, result)) : Distribute(right, DistributeType(left, result)), () => result);
|
|
165505
|
+
}
|
|
165506
|
+
|
|
165507
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/operation.mjs
|
|
165508
|
+
function ExcludeType(left, right) {
|
|
165509
|
+
const check2 = Extends({}, left, right);
|
|
165510
|
+
const result = exports_result.IsExtendsTrueLike(check2) ? [] : [left];
|
|
165511
|
+
return result;
|
|
165512
|
+
}
|
|
165513
|
+
function ExcludeUnion(types, right) {
|
|
165514
|
+
return types.reduce((result, head) => {
|
|
165515
|
+
return [...result, ...ExcludeType(head, right)];
|
|
165516
|
+
}, []);
|
|
165517
|
+
}
|
|
165518
|
+
function ExcludeOperation(left, right) {
|
|
165519
|
+
const evaluated = EvaluateType(left);
|
|
165520
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
165521
|
+
const remaining = ExcludeUnion(canonical, right);
|
|
165522
|
+
const result = EvaluateUnion(remaining);
|
|
165523
|
+
return result;
|
|
165384
165524
|
}
|
|
165385
165525
|
|
|
165386
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165526
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
|
|
165527
|
+
function EvaluateDependent(if_, then_, else_) {
|
|
165528
|
+
const intersect = Intersect([if_, then_]);
|
|
165529
|
+
const excluded = ExcludeOperation(else_, if_);
|
|
165530
|
+
const result = EvaluateUnion([intersect, excluded]);
|
|
165531
|
+
return result;
|
|
165532
|
+
}
|
|
165533
|
+
function EvaluateEnum(values) {
|
|
165534
|
+
const result = values.map((value) => Literal(value));
|
|
165535
|
+
return EvaluateUnion(result);
|
|
165536
|
+
}
|
|
165387
165537
|
function EvaluateIntersect(types) {
|
|
165388
165538
|
const distribution = Distribute(types);
|
|
165389
|
-
const
|
|
165539
|
+
const broadend = Broaden(distribution);
|
|
165540
|
+
const result = EvaluateUnionFast(broadend);
|
|
165541
|
+
return result;
|
|
165542
|
+
}
|
|
165543
|
+
function EvaluateTemplateLiteral(pattern) {
|
|
165544
|
+
const evaluated = TemplateLiteralDecode(pattern);
|
|
165545
|
+
const result = EvaluateType(evaluated);
|
|
165390
165546
|
return result;
|
|
165391
165547
|
}
|
|
165392
165548
|
function EvaluateUnion(types) {
|
|
165393
|
-
const
|
|
165549
|
+
const broadend = Broaden(types);
|
|
165550
|
+
const result = EvaluateUnionFast(broadend);
|
|
165394
165551
|
return result;
|
|
165395
165552
|
}
|
|
165396
165553
|
function EvaluateType(type) {
|
|
165397
|
-
return IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
165554
|
+
return IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) : IsEnum(type) ? EvaluateEnum(type.enum) : IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
165398
165555
|
}
|
|
165399
165556
|
function EvaluateUnionFast(types) {
|
|
165400
165557
|
const result = exports_guard.IsEqual(types.length, 1) ? types[0] : exports_guard.IsEqual(types.length, 0) ? Never() : Union(types);
|
|
165401
165558
|
return result;
|
|
165402
165559
|
}
|
|
165403
165560
|
|
|
165404
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165561
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_enum.mjs
|
|
165562
|
+
function FromEnumKey(values, value) {
|
|
165563
|
+
const unionKey = EvaluateEnum(values);
|
|
165564
|
+
const result = FromKey(unionKey, value);
|
|
165565
|
+
return result;
|
|
165566
|
+
}
|
|
165567
|
+
|
|
165568
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_integer.mjs
|
|
165569
|
+
function FromIntegerKey(_key, value) {
|
|
165570
|
+
const result = CreateRecord(IntegerKey, value);
|
|
165571
|
+
return result;
|
|
165572
|
+
}
|
|
165573
|
+
|
|
165574
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs
|
|
165405
165575
|
function FromIntersectKey(types, value) {
|
|
165406
165576
|
const evaluatedKey = EvaluateIntersect(types);
|
|
165407
165577
|
const result = FromKey(evaluatedKey, value);
|
|
165408
165578
|
return result;
|
|
165409
165579
|
}
|
|
165410
165580
|
|
|
165411
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165581
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_literal.mjs
|
|
165412
165582
|
function FromLiteralKey(key, value) {
|
|
165413
165583
|
return exports_guard.IsString(key) || exports_guard.IsNumber(key) ? _Object_({ [key]: value }) : exports_guard.IsEqual(key, false) ? _Object_({ false: value }) : exports_guard.IsEqual(key, true) ? _Object_({ true: value }) : _Object_({});
|
|
165414
165584
|
}
|
|
165415
165585
|
|
|
165416
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165586
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_number.mjs
|
|
165417
165587
|
function FromNumberKey(_key, value) {
|
|
165418
165588
|
const result = CreateRecord(NumberKey, value);
|
|
165419
165589
|
return result;
|
|
165420
165590
|
}
|
|
165421
165591
|
|
|
165422
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165592
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_string.mjs
|
|
165423
165593
|
function FromStringKey(key, value) {
|
|
165424
165594
|
return exports_guard.HasPropertyKey(key, "pattern") && (exports_guard.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
|
|
165425
165595
|
}
|
|
165426
165596
|
|
|
165427
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165597
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
|
|
165428
165598
|
function FromTemplateKey(pattern, value) {
|
|
165429
165599
|
const types = ParsePatternIntoTypes(pattern);
|
|
165430
165600
|
const finite = IsTemplateLiteralFinite(types);
|
|
165431
|
-
const result = finite ? FromKey(
|
|
165601
|
+
const result = finite ? FromKey(EvaluateTemplateLiteral(pattern), value) : CreateRecord(pattern, value);
|
|
165432
165602
|
return result;
|
|
165433
165603
|
}
|
|
165434
165604
|
|
|
165435
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165605
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/flatten.mjs
|
|
165436
165606
|
function FlattenType(type) {
|
|
165437
165607
|
const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
165438
165608
|
return result;
|
|
@@ -165443,9 +165613,9 @@ function Flatten(types) {
|
|
|
165443
165613
|
}, []);
|
|
165444
165614
|
}
|
|
165445
165615
|
|
|
165446
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165616
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_union.mjs
|
|
165447
165617
|
function StringOrNumberCheck(types) {
|
|
165448
|
-
return types.some((type) =>
|
|
165618
|
+
return types.some((type) => IsString3(type) || IsNumber3(type) || IsInteger2(type));
|
|
165449
165619
|
}
|
|
165450
165620
|
function TryBuildRecord(types, value) {
|
|
165451
165621
|
return exports_guard.IsEqual(StringOrNumberCheck(types), true) ? CreateRecord(StringKey, value) : undefined;
|
|
@@ -165466,13 +165636,13 @@ function FromUnionKey(types, value) {
|
|
|
165466
165636
|
return IsSchema(record2) ? record2 : CreateObject(flattened, value);
|
|
165467
165637
|
}
|
|
165468
165638
|
|
|
165469
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165639
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key.mjs
|
|
165470
165640
|
function FromKey(key, value) {
|
|
165471
|
-
const result = IsAny(key) ? FromAnyKey(value) :
|
|
165641
|
+
const result = IsAny(key) ? FromAnyKey(value) : IsBoolean3(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber3(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString3(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
|
|
165472
165642
|
return result;
|
|
165473
165643
|
}
|
|
165474
165644
|
|
|
165475
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165645
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/instantiate.mjs
|
|
165476
165646
|
function RecordAction(key, value, options) {
|
|
165477
165647
|
const result = CanInstantiate([key]) ? exports_memory.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
|
|
165478
165648
|
return result;
|
|
@@ -165483,7 +165653,7 @@ function RecordInstantiate(context, state, key, value, options) {
|
|
|
165483
165653
|
return RecordAction(instantiatedKey, instantiatedValue, options);
|
|
165484
165654
|
}
|
|
165485
165655
|
|
|
165486
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165656
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/record.mjs
|
|
165487
165657
|
var IntegerKey = `^${IntegerPattern}$`;
|
|
165488
165658
|
var NumberKey = `^${NumberPattern}$`;
|
|
165489
165659
|
var StringKey = `^${StringPattern}$`;
|
|
@@ -165493,15 +165663,19 @@ function RecordDeferred(key, value, options = {}) {
|
|
|
165493
165663
|
function Record(key, value, options = {}) {
|
|
165494
165664
|
return RecordAction(key, value, options);
|
|
165495
165665
|
}
|
|
165496
|
-
function RecordFromPattern(
|
|
165497
|
-
return CreateRecord(
|
|
165666
|
+
function RecordFromPattern(pattern, value) {
|
|
165667
|
+
return CreateRecord(pattern, value);
|
|
165668
|
+
}
|
|
165669
|
+
function RecordPatternToType(pattern) {
|
|
165670
|
+
const result = exports_guard.IsEqual(pattern, StringKey) ? String2() : exports_guard.IsEqual(pattern, IntegerKey) ? Integer() : exports_guard.IsEqual(pattern, NumberKey) ? Number2() : TemplateLiteralDecodeUnsafe(pattern);
|
|
165671
|
+
return result;
|
|
165498
165672
|
}
|
|
165499
165673
|
function RecordPattern(type) {
|
|
165500
165674
|
return exports_guard.Keys(type.patternProperties)[0];
|
|
165501
165675
|
}
|
|
165502
165676
|
function RecordKey(type) {
|
|
165503
165677
|
const pattern = RecordPattern(type);
|
|
165504
|
-
const result =
|
|
165678
|
+
const result = RecordPatternToType(pattern);
|
|
165505
165679
|
return result;
|
|
165506
165680
|
}
|
|
165507
165681
|
function RecordValue(type) {
|
|
@@ -165510,37 +165684,37 @@ function RecordValue(type) {
|
|
|
165510
165684
|
function IsRecord(value) {
|
|
165511
165685
|
return IsKind(value, "Record");
|
|
165512
165686
|
}
|
|
165513
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165687
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/rest.mjs
|
|
165514
165688
|
function Rest(type) {
|
|
165515
165689
|
return exports_memory.Create({ "~kind": "Rest" }, { type: "rest", items: type }, {});
|
|
165516
165690
|
}
|
|
165517
165691
|
function IsRest(value) {
|
|
165518
165692
|
return IsKind(value, "Rest");
|
|
165519
165693
|
}
|
|
165520
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165694
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/this.mjs
|
|
165521
165695
|
function This(options) {
|
|
165522
165696
|
return exports_memory.Create({ ["~kind"]: "This" }, { $ref: "#" }, options);
|
|
165523
165697
|
}
|
|
165524
165698
|
function IsThis(value) {
|
|
165525
165699
|
return IsKind(value, "This");
|
|
165526
165700
|
}
|
|
165527
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165701
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/undefined.mjs
|
|
165528
165702
|
function Undefined(options) {
|
|
165529
165703
|
return exports_memory.Create({ "~kind": "Undefined" }, { type: "undefined" }, options);
|
|
165530
165704
|
}
|
|
165531
165705
|
function IsUndefined2(value) {
|
|
165532
165706
|
return IsKind(value, "Undefined");
|
|
165533
165707
|
}
|
|
165534
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165708
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/void.mjs
|
|
165535
165709
|
function Void(options) {
|
|
165536
165710
|
return exports_memory.Create({ "~kind": "Void" }, { type: "void" }, options);
|
|
165537
165711
|
}
|
|
165538
165712
|
function IsVoid(value) {
|
|
165539
165713
|
return IsKind(value, "Void");
|
|
165540
165714
|
}
|
|
165541
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165715
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/mapping.mjs
|
|
165542
165716
|
function IntrinsicOrCall(ref2, parameters) {
|
|
165543
|
-
return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters[0]) : exports_guard.IsEqual(ref2, "
|
|
165717
|
+
return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters[0]) : exports_guard.IsEqual(ref2, "Capitalize") ? CapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ConstructorParameters") ? ConstructorParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Evaluate") ? EvaluateDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Exclude") ? ExcludeDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Extract") ? ExtractDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Index") ? IndexDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "InstanceType") ? InstanceTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Lowercase") ? LowercaseDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "NonNullable") ? NonNullableDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Omit") ? OmitDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Parameters") ? ParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Partial") ? PartialDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Pick") ? PickDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Readonly") ? ReadonlyObjectDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "KeyOf") ? KeyOfDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Record") ? RecordDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Required") ? RequiredDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ReturnType") ? ReturnTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uncapitalize") ? UncapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uppercase") ? UppercaseDeferred(parameters[0]) : CallConstruct(Ref(ref2), parameters);
|
|
165544
165718
|
}
|
|
165545
165719
|
function Unreachable2() {
|
|
165546
165720
|
throw Error("Unreachable");
|
|
@@ -165629,8 +165803,17 @@ function KeywordVoidMapping(input) {
|
|
|
165629
165803
|
function KeywordThisMapping(input) {
|
|
165630
165804
|
return This();
|
|
165631
165805
|
}
|
|
165632
|
-
function
|
|
165633
|
-
return input;
|
|
165806
|
+
function LiteralBigIntMapping(input) {
|
|
165807
|
+
return Literal(BigInt(input));
|
|
165808
|
+
}
|
|
165809
|
+
function LiteralBooleanMapping(input) {
|
|
165810
|
+
return Literal(exports_guard.IsEqual(input, "true"));
|
|
165811
|
+
}
|
|
165812
|
+
function LiteralNumberMapping(input) {
|
|
165813
|
+
return Literal(parseFloat(input));
|
|
165814
|
+
}
|
|
165815
|
+
function LiteralStringMapping(input) {
|
|
165816
|
+
return Literal(input);
|
|
165634
165817
|
}
|
|
165635
165818
|
function TemplateInterpolateMapping(input) {
|
|
165636
165819
|
return input[1];
|
|
@@ -165647,20 +165830,8 @@ function TemplateLiteralTypesMapping(input) {
|
|
|
165647
165830
|
function TemplateLiteralMapping(input) {
|
|
165648
165831
|
return TemplateLiteralDeferred(input);
|
|
165649
165832
|
}
|
|
165650
|
-
function
|
|
165651
|
-
return
|
|
165652
|
-
}
|
|
165653
|
-
function LiteralBooleanMapping(input) {
|
|
165654
|
-
return Literal(exports_guard.IsEqual(input, "true"));
|
|
165655
|
-
}
|
|
165656
|
-
function LiteralNumberMapping(input) {
|
|
165657
|
-
return Literal(parseFloat(input));
|
|
165658
|
-
}
|
|
165659
|
-
function LiteralStringMapping(input) {
|
|
165660
|
-
return Literal(input);
|
|
165661
|
-
}
|
|
165662
|
-
function LiteralMapping(input) {
|
|
165663
|
-
return input;
|
|
165833
|
+
function DependentMapping(input) {
|
|
165834
|
+
return exports_guard.IsEqual(input.length, 6) ? Dependent(input[1], input[3], input[5]) : Dependent(input[1], input[3], Unknown());
|
|
165664
165835
|
}
|
|
165665
165836
|
function KeyOfMapping(input) {
|
|
165666
165837
|
return input.length > 0;
|
|
@@ -165676,18 +165847,24 @@ function ExtendsMapping(input) {
|
|
|
165676
165847
|
function BaseMapping(input) {
|
|
165677
165848
|
return exports_guard.IsArray(input) && exports_guard.IsEqual(input.length, 3) ? input[1] : input;
|
|
165678
165849
|
}
|
|
165679
|
-
|
|
165850
|
+
function WithMapping(input) {
|
|
165851
|
+
return exports_guard.IsEqual(input.length, 2) ? input[1] : [];
|
|
165852
|
+
}
|
|
165853
|
+
function FactorIndexArray(Type, indexArray) {
|
|
165680
165854
|
return indexArray.reduce((result, left) => {
|
|
165681
165855
|
const _left = left;
|
|
165682
165856
|
return exports_guard.IsEqual(_left.length, 1) ? IndexDeferred(result, _left[0]) : exports_guard.IsEqual(_left.length, 0) ? _Array_(result) : Unreachable2();
|
|
165683
165857
|
}, Type);
|
|
165684
|
-
}
|
|
165685
|
-
|
|
165858
|
+
}
|
|
165859
|
+
function FactorExtends(type, extend2) {
|
|
165686
165860
|
return exports_guard.IsEqual(extend2.length, 3) ? ConditionalDeferred(type, extend2[0], extend2[1], extend2[2]) : type;
|
|
165687
|
-
}
|
|
165861
|
+
}
|
|
165862
|
+
function FactorWith(type, withClause) {
|
|
165863
|
+
return exports_guard.IsArray(withClause) && exports_guard.IsEqual(withClause.length, 0) ? type : WithDeferred(type, withClause);
|
|
165864
|
+
}
|
|
165688
165865
|
function FactorMapping(input) {
|
|
165689
|
-
const [keyOf, type, indexArray, extend2] = input;
|
|
165690
|
-
return keyOf ? FactorExtends(KeyOfDeferred(FactorIndexArray(type, indexArray)), extend2) : FactorExtends(FactorIndexArray(type, indexArray), extend2);
|
|
165866
|
+
const [keyOf, type, indexArray, extend2, withClause] = input;
|
|
165867
|
+
return FactorWith(keyOf ? FactorExtends(KeyOfDeferred(FactorIndexArray(type, indexArray)), extend2) : FactorExtends(FactorIndexArray(type, indexArray), extend2), withClause);
|
|
165691
165868
|
}
|
|
165692
165869
|
function ExprBinaryMapping(left, rest2) {
|
|
165693
165870
|
return exports_guard.IsEqual(rest2.length, 3) ? (() => {
|
|
@@ -165717,7 +165894,7 @@ function ExprMapping(input) {
|
|
|
165717
165894
|
return ExprBinaryMapping(left, rest2);
|
|
165718
165895
|
}
|
|
165719
165896
|
function ExprReadonlyMapping(input) {
|
|
165720
|
-
return
|
|
165897
|
+
return AddImmutableDeferred(input[1]);
|
|
165721
165898
|
}
|
|
165722
165899
|
function ExprPipeMapping(input) {
|
|
165723
165900
|
return input[1];
|
|
@@ -165741,7 +165918,7 @@ function PropertyKeyQuotedMapping(input) {
|
|
|
165741
165918
|
return input;
|
|
165742
165919
|
}
|
|
165743
165920
|
function PropertyKeyIndexMapping(input) {
|
|
165744
|
-
return IsInteger2(input[3]) ? IntegerKey :
|
|
165921
|
+
return IsInteger2(input[3]) ? IntegerKey : IsNumber3(input[3]) ? NumberKey : IsSymbol2(input[3]) ? StringKey : IsString3(input[3]) ? StringKey : Unreachable2();
|
|
165745
165922
|
}
|
|
165746
165923
|
function PropertyKeyMapping(input) {
|
|
165747
165924
|
return input;
|
|
@@ -165755,7 +165932,7 @@ function OptionalMapping(input) {
|
|
|
165755
165932
|
function PropertyMapping(input) {
|
|
165756
165933
|
const [isReadonly, key, isOptional, _colon, type] = input;
|
|
165757
165934
|
return {
|
|
165758
|
-
[key]: isReadonly && isOptional ?
|
|
165935
|
+
[key]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type
|
|
165759
165936
|
};
|
|
165760
165937
|
}
|
|
165761
165938
|
function PropertyDelimiterMapping(input) {
|
|
@@ -165779,16 +165956,16 @@ function _Object_Mapping(input) {
|
|
|
165779
165956
|
return _Object_(properties2, options);
|
|
165780
165957
|
}
|
|
165781
165958
|
function ElementNamedMapping(input) {
|
|
165782
|
-
return exports_guard.IsEqual(input.length, 5) ?
|
|
165959
|
+
return exports_guard.IsEqual(input.length, 5) ? AddReadonlyDeferred(AddOptionalDeferred(input[4])) : exports_guard.IsEqual(input.length, 3) ? input[2] : exports_guard.IsEqual(input.length, 4) ? exports_guard.IsEqual(input[2], "readonly") ? AddReadonlyDeferred(input[3]) : AddOptionalDeferred(input[3]) : Unreachable2();
|
|
165783
165960
|
}
|
|
165784
165961
|
function ElementReadonlyOptionalMapping(input) {
|
|
165785
|
-
return
|
|
165962
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[1]));
|
|
165786
165963
|
}
|
|
165787
165964
|
function ElementReadonlyMapping(input) {
|
|
165788
|
-
return
|
|
165965
|
+
return AddReadonlyDeferred(input[1]);
|
|
165789
165966
|
}
|
|
165790
165967
|
function ElementOptionalMapping(input) {
|
|
165791
|
-
return
|
|
165968
|
+
return AddOptionalDeferred(input[0]);
|
|
165792
165969
|
}
|
|
165793
165970
|
function ElementBaseMapping(input) {
|
|
165794
165971
|
return input;
|
|
@@ -165799,17 +165976,17 @@ function ElementMapping(input) {
|
|
|
165799
165976
|
function ElementListMapping(input) {
|
|
165800
165977
|
return Delimited(input);
|
|
165801
165978
|
}
|
|
165802
|
-
function
|
|
165979
|
+
function _Tuple_Mapping(input) {
|
|
165803
165980
|
return Tuple(input[1]);
|
|
165804
165981
|
}
|
|
165805
165982
|
function ParameterReadonlyOptionalMapping(input) {
|
|
165806
|
-
return
|
|
165983
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[4]));
|
|
165807
165984
|
}
|
|
165808
165985
|
function ParameterReadonlyMapping(input) {
|
|
165809
|
-
return
|
|
165986
|
+
return AddReadonlyDeferred(input[3]);
|
|
165810
165987
|
}
|
|
165811
165988
|
function ParameterOptionalMapping(input) {
|
|
165812
|
-
return
|
|
165989
|
+
return AddOptionalDeferred(input[3]);
|
|
165813
165990
|
}
|
|
165814
165991
|
function ParameterTypeMapping(input) {
|
|
165815
165992
|
return input[2];
|
|
@@ -165826,17 +166003,17 @@ function ParameterListMapping(input) {
|
|
|
165826
166003
|
function _Function_Mapping(input) {
|
|
165827
166004
|
return _Function_(input[1], input[4]);
|
|
165828
166005
|
}
|
|
165829
|
-
function
|
|
166006
|
+
function _Constructor_Mapping(input) {
|
|
165830
166007
|
return Constructor(input[2], input[5]);
|
|
165831
166008
|
}
|
|
165832
166009
|
function ApplyReadonly(state, type) {
|
|
165833
|
-
return exports_guard.IsEqual(state, "remove") ?
|
|
166010
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveReadonlyDeferred(type) : exports_guard.IsEqual(state, "add") ? AddReadonlyDeferred(type) : type;
|
|
165834
166011
|
}
|
|
165835
166012
|
function MappedReadonlyMapping(input) {
|
|
165836
166013
|
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
165837
166014
|
}
|
|
165838
166015
|
function ApplyOptional(state, type) {
|
|
165839
|
-
return exports_guard.IsEqual(state, "remove") ?
|
|
166016
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveOptionalDeferred(type) : exports_guard.IsEqual(state, "add") ? AddOptionalDeferred(type) : type;
|
|
165840
166017
|
}
|
|
165841
166018
|
function MappedOptionalMapping(input) {
|
|
165842
166019
|
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
@@ -165844,48 +166021,51 @@ function MappedOptionalMapping(input) {
|
|
|
165844
166021
|
function MappedAsMapping(input) {
|
|
165845
166022
|
return exports_guard.IsEqual(input.length, 2) ? [input[1]] : [];
|
|
165846
166023
|
}
|
|
165847
|
-
function
|
|
166024
|
+
function _Mapped_Mapping(input) {
|
|
165848
166025
|
return exports_guard.IsArray(input[6]) && exports_guard.IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))) : MappedDeferred(Identifier(input[3]), input[5], Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10])));
|
|
165849
166026
|
}
|
|
165850
166027
|
function ReferenceMapping(input) {
|
|
165851
166028
|
return Ref(input);
|
|
165852
166029
|
}
|
|
165853
|
-
function
|
|
165854
|
-
return
|
|
166030
|
+
function WithBigIntMapping(input) {
|
|
166031
|
+
return BigInt(input);
|
|
165855
166032
|
}
|
|
165856
|
-
function
|
|
166033
|
+
function WithNumberMapping(input) {
|
|
165857
166034
|
return parseFloat(input);
|
|
165858
166035
|
}
|
|
165859
|
-
function
|
|
166036
|
+
function WithBooleanMapping(input) {
|
|
165860
166037
|
return exports_guard.IsEqual(input, "true");
|
|
165861
166038
|
}
|
|
165862
|
-
function
|
|
166039
|
+
function WithStringMapping(input) {
|
|
165863
166040
|
return input;
|
|
165864
166041
|
}
|
|
165865
|
-
function
|
|
166042
|
+
function WithNullMapping(input) {
|
|
165866
166043
|
return null;
|
|
165867
166044
|
}
|
|
165868
|
-
function
|
|
166045
|
+
function WithUndefinedMapping(input) {
|
|
166046
|
+
return;
|
|
166047
|
+
}
|
|
166048
|
+
function WithPropertyMapping(input) {
|
|
165869
166049
|
return { [input[0]]: input[2] };
|
|
165870
166050
|
}
|
|
165871
|
-
function
|
|
166051
|
+
function WithPropertyListMapping(input) {
|
|
165872
166052
|
return Delimited(input);
|
|
165873
166053
|
}
|
|
165874
|
-
function
|
|
166054
|
+
function WithObjectMappingReduce(propertyList) {
|
|
165875
166055
|
return propertyList.reduce((result, left) => {
|
|
165876
166056
|
return exports_memory.Assign(result, left);
|
|
165877
166057
|
}, {});
|
|
165878
166058
|
}
|
|
165879
|
-
function
|
|
165880
|
-
return
|
|
166059
|
+
function WithObjectMapping(input) {
|
|
166060
|
+
return WithObjectMappingReduce(input[1]);
|
|
165881
166061
|
}
|
|
165882
|
-
function
|
|
166062
|
+
function WithElementListMapping(input) {
|
|
165883
166063
|
return Delimited(input);
|
|
165884
166064
|
}
|
|
165885
|
-
function
|
|
166065
|
+
function WithArrayMapping(input) {
|
|
165886
166066
|
return input[1];
|
|
165887
166067
|
}
|
|
165888
|
-
function
|
|
166068
|
+
function WithValueMapping(input) {
|
|
165889
166069
|
return input;
|
|
165890
166070
|
}
|
|
165891
166071
|
function PatternBigIntMapping(input) {
|
|
@@ -165969,7 +166149,7 @@ function ModuleMapping(input) {
|
|
|
165969
166149
|
function ScriptMapping(input) {
|
|
165970
166150
|
return input;
|
|
165971
166151
|
}
|
|
165972
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166152
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/match.mjs
|
|
165973
166153
|
function IsMatch(value) {
|
|
165974
166154
|
return IsEqual(value.length, 2);
|
|
165975
166155
|
}
|
|
@@ -165977,7 +166157,7 @@ function Match2(input, ok, fail) {
|
|
|
165977
166157
|
return IsMatch(input) ? ok(input[0], input[1]) : fail();
|
|
165978
166158
|
}
|
|
165979
166159
|
|
|
165980
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166160
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/take.mjs
|
|
165981
166161
|
function TakeVariant(variant, input) {
|
|
165982
166162
|
return IsEqual(input.indexOf(variant), 0) ? [variant, input.slice(variant.length)] : [];
|
|
165983
166163
|
}
|
|
@@ -165990,7 +166170,7 @@ function Take(variants, input) {
|
|
|
165990
166170
|
return [];
|
|
165991
166171
|
}
|
|
165992
166172
|
|
|
165993
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166173
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/char.mjs
|
|
165994
166174
|
function Range(start, end) {
|
|
165995
166175
|
return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));
|
|
165996
166176
|
}
|
|
@@ -166009,7 +166189,7 @@ var Dot = ".";
|
|
|
166009
166189
|
var DollarSign = "$";
|
|
166010
166190
|
var Hyphen = "-";
|
|
166011
166191
|
|
|
166012
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166192
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/trim.mjs
|
|
166013
166193
|
var LineComment = "//";
|
|
166014
166194
|
var OpenComment = "/*";
|
|
166015
166195
|
var CloseComment = "*/";
|
|
@@ -166035,12 +166215,12 @@ function Trim(input) {
|
|
|
166035
166215
|
return trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
166036
166216
|
}
|
|
166037
166217
|
|
|
166038
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166218
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/optional.mjs
|
|
166039
166219
|
function Optional2(value, input) {
|
|
166040
166220
|
return Match2(Take([value], input), (Optional3, Rest2) => [Optional3, Rest2], () => ["", input]);
|
|
166041
166221
|
}
|
|
166042
166222
|
|
|
166043
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166223
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/many.mjs
|
|
166044
166224
|
function IsDiscard(discard2, input) {
|
|
166045
166225
|
return discard2.includes(input);
|
|
166046
166226
|
}
|
|
@@ -166048,7 +166228,7 @@ function Many(allowed, discard2, input, result = "") {
|
|
|
166048
166228
|
return Match2(Take(allowed, input), (Char, Rest2) => IsDiscard(discard2, Char) ? Many(allowed, discard2, Rest2, result) : Many(allowed, discard2, Rest2, `${result}${Char}`), () => [result, input]);
|
|
166049
166229
|
}
|
|
166050
166230
|
|
|
166051
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166231
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_integer.mjs
|
|
166052
166232
|
function TakeNonZero(input) {
|
|
166053
166233
|
return Take(NonZero, input);
|
|
166054
166234
|
}
|
|
@@ -166063,7 +166243,7 @@ function UnsignedInteger(input) {
|
|
|
166063
166243
|
return TakeUnsignedInteger(Trim(input));
|
|
166064
166244
|
}
|
|
166065
166245
|
|
|
166066
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166246
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/integer.mjs
|
|
166067
166247
|
function TakeSign(input) {
|
|
166068
166248
|
return Optional2(Hyphen, input);
|
|
166069
166249
|
}
|
|
@@ -166074,21 +166254,21 @@ function Integer2(input) {
|
|
|
166074
166254
|
return TakeSignedInteger(Trim(input));
|
|
166075
166255
|
}
|
|
166076
166256
|
|
|
166077
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166257
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/bigint.mjs
|
|
166078
166258
|
function TakeBigInt(input) {
|
|
166079
166259
|
return Match2(Integer2(input), (Integer3, IntegerRest) => Match2(Take(["n"], IntegerRest), (_N, NRest) => [`${Integer3}`, NRest], () => []), () => []);
|
|
166080
166260
|
}
|
|
166081
166261
|
function BigInt3(input) {
|
|
166082
166262
|
return TakeBigInt(input);
|
|
166083
166263
|
}
|
|
166084
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166264
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/const.mjs
|
|
166085
166265
|
function TakeConst(const_, input) {
|
|
166086
166266
|
return Take([const_], input);
|
|
166087
166267
|
}
|
|
166088
166268
|
function Const(const_, input) {
|
|
166089
166269
|
return IsEqual(const_, "") ? ["", input] : const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) : const_.startsWith(WhiteSpace) ? TakeConst(const_, input) : TakeConst(const_, Trim(input));
|
|
166090
166270
|
}
|
|
166091
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166271
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/ident.mjs
|
|
166092
166272
|
var Initial = [...Alpha, UnderScore, DollarSign];
|
|
166093
166273
|
function TakeInitial(input) {
|
|
166094
166274
|
return Take(Initial, input);
|
|
@@ -166103,7 +166283,7 @@ function TakeIdent(input) {
|
|
|
166103
166283
|
function Ident(input) {
|
|
166104
166284
|
return TakeIdent(Trim(input));
|
|
166105
166285
|
}
|
|
166106
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166286
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_number.mjs
|
|
166107
166287
|
var AllowedDigits2 = [...Digit, UnderScore];
|
|
166108
166288
|
function IsLeadingDot(input) {
|
|
166109
166289
|
return IsMatch(Take([Dot], input));
|
|
@@ -166124,7 +166304,7 @@ function UnsignedNumber(input) {
|
|
|
166124
166304
|
return TakeUnsignedNumber(Trim(input));
|
|
166125
166305
|
}
|
|
166126
166306
|
|
|
166127
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166307
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/number.mjs
|
|
166128
166308
|
function TakeSign2(input) {
|
|
166129
166309
|
return Optional2(Hyphen, input);
|
|
166130
166310
|
}
|
|
@@ -166134,19 +166314,19 @@ function TakeSignedNumber(input) {
|
|
|
166134
166314
|
function Number3(input) {
|
|
166135
166315
|
return TakeSignedNumber(Trim(input));
|
|
166136
166316
|
}
|
|
166137
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166317
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until.mjs
|
|
166138
166318
|
function TakeOne(input) {
|
|
166139
166319
|
const result = IsEqual(input, "") ? [] : [input.slice(0, 1), input.slice(1)];
|
|
166140
166320
|
return result;
|
|
166141
166321
|
}
|
|
166142
166322
|
function IsInputMatchSentinal(end, input) {
|
|
166143
|
-
return
|
|
166323
|
+
return ShiftLeft(end, (left, right) => input.startsWith(left) ? true : IsInputMatchSentinal(right, input), () => false);
|
|
166144
166324
|
}
|
|
166145
166325
|
function Until(end, input, result = "") {
|
|
166146
166326
|
return Match2(TakeOne(input), (One, Rest2) => IsInputMatchSentinal(end, input) ? [result, input] : Until(end, Rest2, `${result}${One}`), () => []);
|
|
166147
166327
|
}
|
|
166148
166328
|
|
|
166149
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166329
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/span.mjs
|
|
166150
166330
|
function MultiLine(start, end, input) {
|
|
166151
166331
|
return Match2(Take([start], input), (_, Rest2) => Match2(Until([end], Rest2), (Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, Rest3) => [`${Until2}`, Rest3], () => []), () => []), () => []);
|
|
166152
166332
|
}
|
|
@@ -166156,7 +166336,7 @@ function SingleLine(start, end, input) {
|
|
|
166156
166336
|
function Span(start, end, multiLine, input) {
|
|
166157
166337
|
return multiLine ? MultiLine(start, end, Trim(input)) : SingleLine(start, end, Trim(input));
|
|
166158
166338
|
}
|
|
166159
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166339
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/string.mjs
|
|
166160
166340
|
function TakeInitial2(quotes, input) {
|
|
166161
166341
|
return Take(quotes, input);
|
|
166162
166342
|
}
|
|
@@ -166169,11 +166349,11 @@ function TakeString(quotes, input) {
|
|
|
166169
166349
|
function String3(quotes, input) {
|
|
166170
166350
|
return TakeString(quotes, Trim(input));
|
|
166171
166351
|
}
|
|
166172
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166352
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until_1.mjs
|
|
166173
166353
|
function Until_1(end, input) {
|
|
166174
166354
|
return Match2(Until(end, input), (Until2, UntilRest) => IsEqual(Until2, "") ? [] : [Until2, UntilRest], () => []);
|
|
166175
166355
|
}
|
|
166176
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166356
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/parser.mjs
|
|
166177
166357
|
var If = (result, left, right = () => []) => result.length === 2 ? left(result) : right();
|
|
166178
166358
|
var GenericParameterExtendsEquals = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => If(Const("=", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [GenericParameterExtendsEqualsMapping(_0), input2]);
|
|
166179
166359
|
var GenericParameterExtends = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterExtendsMapping(_0), input2]);
|
|
@@ -166202,23 +166382,23 @@ var KeywordNever = (input) => If(Const("never", input), ([_0, input2]) => [Keywo
|
|
|
166202
166382
|
var KeywordSymbol = (input) => If(Const("symbol", input), ([_0, input2]) => [KeywordSymbolMapping(_0), input2]);
|
|
166203
166383
|
var KeywordVoid = (input) => If(Const("void", input), ([_0, input2]) => [KeywordVoidMapping(_0), input2]);
|
|
166204
166384
|
var KeywordThis = (input) => If(Const("this", input), ([_0, input2]) => [KeywordThisMapping(_0), input2]);
|
|
166205
|
-
var Keyword = (input) => If(If(KeywordString(input), ([_0, input2]) => [_0, input2], () => If(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If(KeywordThis(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))), ([_0, input2]) => [KeywordMapping(_0), input2]);
|
|
166206
166385
|
var TemplateInterpolate = (input) => If(If(Const("${", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateInterpolateMapping(_0), input2]);
|
|
166207
166386
|
var TemplateSpan = (input) => If(Until(["${", "`"], input), ([_0, input2]) => [TemplateSpanMapping(_0), input2]);
|
|
166208
166387
|
var TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input2]) => If(TemplateInterpolate(input2), ([_1, input3]) => If(TemplateBody(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [TemplateBodyMapping(_0), input2]);
|
|
166209
166388
|
var TemplateLiteralTypes = (input) => If(If(Const("`", input), ([_0, input2]) => If(TemplateBody(input2), ([_1, input3]) => If(Const("`", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateLiteralTypesMapping(_0), input2]);
|
|
166210
166389
|
var TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input2]) => [TemplateLiteralMapping(_0), input2]);
|
|
166390
|
+
var Dependent2 = (input) => If(If(If(Const("if", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("then", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => If(Const("else", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If(If(Const("if", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("then", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [DependentMapping(_0), input2]);
|
|
166211
166391
|
var LiteralBigInt = (input) => If(BigInt3(input), ([_0, input2]) => [LiteralBigIntMapping(_0), input2]);
|
|
166212
166392
|
var LiteralBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [LiteralBooleanMapping(_0), input2]);
|
|
166213
166393
|
var LiteralNumber = (input) => If(Number3(input), ([_0, input2]) => [LiteralNumberMapping(_0), input2]);
|
|
166214
166394
|
var LiteralString = (input) => If(String3(["'", '"'], input), ([_0, input2]) => [LiteralStringMapping(_0), input2]);
|
|
166215
|
-
var Literal2 = (input) => If(If(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If(LiteralString(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [LiteralMapping(_0), input2]);
|
|
166216
166395
|
var KeyOf = (input) => If(If(If(Const("keyof", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [KeyOfMapping(_0), input2]);
|
|
166217
166396
|
var IndexArray_0 = (input, result = []) => If(If(If(Const("[", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(Const("[", input), ([_0, input2]) => If(Const("]", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => IndexArray_0(input2, [...result, _0]), () => [result, input]);
|
|
166218
166397
|
var IndexArray = (input) => If(IndexArray_0(input), ([_0, input2]) => [IndexArrayMapping(_0), input2]);
|
|
166219
|
-
var
|
|
166220
|
-
var
|
|
166221
|
-
var
|
|
166398
|
+
var Extends2 = (input) => If(If(If(Const("extends", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("?", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => If(Const(":", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExtendsMapping(_0), input2]);
|
|
166399
|
+
var Base = (input) => If(If(If(Const("(", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(KeywordString(input), ([_0, input2]) => [_0, input2], () => If(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If(KeywordThis(input), ([_0, input2]) => [_0, input2], () => If(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If(LiteralString(input), ([_0, input2]) => [_0, input2], () => If(TemplateLiteral(input), ([_0, input2]) => [_0, input2], () => If(Dependent2(input), ([_0, input2]) => [_0, input2], () => If(_Object_2(input), ([_0, input2]) => [_0, input2], () => If(_Tuple_(input), ([_0, input2]) => [_0, input2], () => If(_Constructor_(input), ([_0, input2]) => [_0, input2], () => If(_Function_2(input), ([_0, input2]) => [_0, input2], () => If(_Mapped_(input), ([_0, input2]) => [_0, input2], () => If(GenericCall(input), ([_0, input2]) => [_0, input2], () => If(Reference(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))))))))))))))))), ([_0, input2]) => [BaseMapping(_0), input2]);
|
|
166400
|
+
var With = (input) => If(If(If(Const("with", input), ([_0, input2]) => If(WithObject(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithMapping(_0), input2]);
|
|
166401
|
+
var Factor = (input) => If(If(KeyOf(input), ([_0, input2]) => If(Base(input2), ([_1, input3]) => If(IndexArray(input3), ([_2, input4]) => If(Extends2(input4), ([_3, input5]) => If(With(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [FactorMapping(_0), input2]);
|
|
166222
166402
|
var ExprTermTail = (input) => If(If(If(Const("&", input), ([_0, input2]) => If(Factor(input2), ([_1, input3]) => If(ExprTermTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTermTailMapping(_0), input2]);
|
|
166223
166403
|
var ExprTerm = (input) => If(If(Factor(input), ([_0, input2]) => If(ExprTermTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprTermMapping(_0), input2]);
|
|
166224
166404
|
var ExprTail = (input) => If(If(If(Const("|", input), ([_0, input2]) => If(ExprTerm(input2), ([_1, input3]) => If(ExprTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTailMapping(_0), input2]);
|
|
@@ -166252,7 +166432,7 @@ var ElementBase = (input) => If(If(ElementNamed(input), ([_0, input2]) => [_0, i
|
|
|
166252
166432
|
var Element = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(ElementBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(ElementBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementMapping(_0), input2]);
|
|
166253
166433
|
var ElementList_0 = (input, result = []) => If(If(Element(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
166254
166434
|
var ElementList = (input) => If(If(ElementList_0(input), ([_0, input2]) => If(If(If(Element(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ElementListMapping(_0), input2]);
|
|
166255
|
-
var
|
|
166435
|
+
var _Tuple_ = (input) => If(If(Const("[", input), ([_0, input2]) => If(ElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_Tuple_Mapping(_0), input2]);
|
|
166256
166436
|
var ParameterReadonlyOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Const("readonly", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [ParameterReadonlyOptionalMapping(_0), input2]);
|
|
166257
166437
|
var ParameterReadonly = (input) => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Const("readonly", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterReadonlyMapping(_0), input2]);
|
|
166258
166438
|
var ParameterOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterOptionalMapping(_0), input2]);
|
|
@@ -166262,31 +166442,32 @@ var Parameter2 = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(P
|
|
|
166262
166442
|
var ParameterList_0 = (input, result = []) => If(If(Parameter2(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ParameterList_0(input2, [...result, _0]), () => [result, input]);
|
|
166263
166443
|
var ParameterList = (input) => If(If(ParameterList_0(input), ([_0, input2]) => If(If(If(Parameter2(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ParameterListMapping(_0), input2]);
|
|
166264
166444
|
var _Function_2 = (input) => If(If(Const("(", input), ([_0, input2]) => If(ParameterList(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => If(Const("=>", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_Function_Mapping(_0), input2]);
|
|
166265
|
-
var
|
|
166445
|
+
var _Constructor_ = (input) => If(If(Const("new", input), ([_0, input2]) => If(Const("(", input2), ([_1, input3]) => If(ParameterList(input3), ([_2, input4]) => If(Const(")", input4), ([_3, input5]) => If(Const("=>", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_Constructor_Mapping(_0), input2]);
|
|
166266
166446
|
var MappedReadonly = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedReadonlyMapping(_0), input2]);
|
|
166267
166447
|
var MappedOptional = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedOptionalMapping(_0), input2]);
|
|
166268
166448
|
var MappedAs = (input) => If(If(If(Const("as", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [MappedAsMapping(_0), input2]);
|
|
166269
|
-
var
|
|
166449
|
+
var _Mapped_ = (input) => If(If(Const("{", input), ([_0, input2]) => If(MappedReadonly(input2), ([_1, input3]) => If(Const("[", input3), ([_2, input4]) => If(Ident(input4), ([_3, input5]) => If(Const("in", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => If(MappedAs(input7), ([_6, input8]) => If(Const("]", input8), ([_7, input9]) => If(MappedOptional(input9), ([_8, input10]) => If(Const(":", input10), ([_9, input11]) => If(Type(input11), ([_10, input12]) => If(OptionalSemiColon(input12), ([_11, input13]) => If(Const("}", input13), ([_12, input14]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input14]))))))))))))), ([_0, input2]) => [_Mapped_Mapping(_0), input2]);
|
|
166270
166450
|
var Reference = (input) => If(Ident(input), ([_0, input2]) => [ReferenceMapping(_0), input2]);
|
|
166271
|
-
var
|
|
166272
|
-
var
|
|
166273
|
-
var
|
|
166274
|
-
var
|
|
166275
|
-
var
|
|
166276
|
-
var
|
|
166277
|
-
var
|
|
166278
|
-
var
|
|
166279
|
-
var
|
|
166280
|
-
var
|
|
166281
|
-
var
|
|
166282
|
-
var
|
|
166283
|
-
var
|
|
166451
|
+
var WithBigInt = (input) => If(BigInt3(input), ([_0, input2]) => [WithBigIntMapping(_0), input2]);
|
|
166452
|
+
var WithNumber = (input) => If(Number3(input), ([_0, input2]) => [WithNumberMapping(_0), input2]);
|
|
166453
|
+
var WithBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithBooleanMapping(_0), input2]);
|
|
166454
|
+
var WithString = (input) => If(String3(['"', "'"], input), ([_0, input2]) => [WithStringMapping(_0), input2]);
|
|
166455
|
+
var WithNull = (input) => If(Const("null", input), ([_0, input2]) => [WithNullMapping(_0), input2]);
|
|
166456
|
+
var WithUndefined = (input) => If(Const("undefined", input), ([_0, input2]) => [WithUndefinedMapping(_0), input2]);
|
|
166457
|
+
var WithProperty = (input) => If(If(PropertyKey(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(WithValue(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithPropertyMapping(_0), input2]);
|
|
166458
|
+
var WithPropertyList_0 = (input, result = []) => If(If(WithProperty(input), ([_0, input2]) => If(PropertyDelimiter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithPropertyList_0(input2, [...result, _0]), () => [result, input]);
|
|
166459
|
+
var WithPropertyList = (input) => If(If(WithPropertyList_0(input), ([_0, input2]) => If(If(If(WithProperty(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [WithPropertyListMapping(_0), input2]);
|
|
166460
|
+
var WithObject = (input) => If(If(Const("{", input), ([_0, input2]) => If(WithPropertyList(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithObjectMapping(_0), input2]);
|
|
166461
|
+
var WithElementList_0 = (input, result = []) => If(If(WithValue(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
166462
|
+
var WithElementList = (input) => If(If(WithElementList_0(input), ([_0, input2]) => If(If(If(WithValue(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [WithElementListMapping(_0), input2]);
|
|
166463
|
+
var WithArray = (input) => If(If(Const("[", input), ([_0, input2]) => If(WithElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithArrayMapping(_0), input2]);
|
|
166464
|
+
var WithValue = (input) => If(If(WithBigInt(input), ([_0, input2]) => [_0, input2], () => If(WithNumber(input), ([_0, input2]) => [_0, input2], () => If(WithBoolean(input), ([_0, input2]) => [_0, input2], () => If(WithString(input), ([_0, input2]) => [_0, input2], () => If(WithNull(input), ([_0, input2]) => [_0, input2], () => If(WithUndefined(input), ([_0, input2]) => [_0, input2], () => If(WithObject(input), ([_0, input2]) => [_0, input2], () => If(WithArray(input), ([_0, input2]) => [_0, input2], () => [])))))))), ([_0, input2]) => [WithValueMapping(_0), input2]);
|
|
166284
166465
|
var PatternBigInt = (input) => If(Const("-?(?:0|[1-9][0-9]*)n", input), ([_0, input2]) => [PatternBigIntMapping(_0), input2]);
|
|
166285
166466
|
var PatternString = (input) => If(Const(".*", input), ([_0, input2]) => [PatternStringMapping(_0), input2]);
|
|
166286
|
-
var PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(
|
|
166467
|
+
var PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", input), ([_0, input2]) => [PatternNumberMapping(_0), input2]);
|
|
166287
166468
|
var PatternInteger = (input) => If(Const("-?(?:0|[1-9][0-9]*)", input), ([_0, input2]) => [PatternIntegerMapping(_0), input2]);
|
|
166288
166469
|
var PatternNever = (input) => If(Const("(?!)", input), ([_0, input2]) => [PatternNeverMapping(_0), input2]);
|
|
166289
|
-
var PatternText = (input) => If(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(
|
|
166470
|
+
var PatternText = (input) => If(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", "-?(?:0|[1-9][0-9]*)", "(?!)", "(", ")", "$", "|"], input), ([_0, input2]) => [PatternTextMapping(_0), input2]);
|
|
166290
166471
|
var PatternBase = (input) => If(If(PatternBigInt(input), ([_0, input2]) => [_0, input2], () => If(PatternString(input), ([_0, input2]) => [_0, input2], () => If(PatternNumber(input), ([_0, input2]) => [_0, input2], () => If(PatternInteger(input), ([_0, input2]) => [_0, input2], () => If(PatternNever(input), ([_0, input2]) => [_0, input2], () => If(PatternGroup(input), ([_0, input2]) => [_0, input2], () => If(PatternText(input), ([_0, input2]) => [_0, input2], () => []))))))), ([_0, input2]) => [PatternBaseMapping(_0), input2]);
|
|
166291
166472
|
var PatternGroup = (input) => If(If(Const("(", input), ([_0, input2]) => If(PatternBody(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternGroupMapping(_0), input2]);
|
|
166292
166473
|
var PatternUnion = (input) => If(If(If(PatternTerm(input), ([_0, input2]) => If(Const("|", input2), ([_1, input3]) => If(PatternUnion(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(PatternTerm(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [PatternUnionMapping(_0), input2]);
|
|
@@ -166310,14 +166491,14 @@ var ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input2]) =>
|
|
|
166310
166491
|
var Module = (input) => If(If(ModuleDeclaration(input), ([_0, input2]) => If(ModuleDeclarationList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleMapping(_0), input2]);
|
|
166311
166492
|
var Script = (input) => If(If(Module(input), ([_0, input2]) => [_0, input2], () => If(GenericType(input), ([_0, input2]) => [_0, input2], () => If(Type(input), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [ScriptMapping(_0), input2]);
|
|
166312
166493
|
|
|
166313
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166494
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/template.mjs
|
|
166314
166495
|
function ParseTemplateIntoTypes(template) {
|
|
166315
166496
|
const parsed = TemplateLiteralTypes(`\`${template}\``);
|
|
166316
166497
|
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : Unreachable();
|
|
166317
166498
|
return result;
|
|
166318
166499
|
}
|
|
166319
166500
|
|
|
166320
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166501
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/encode.mjs
|
|
166321
166502
|
function JoinString(input) {
|
|
166322
166503
|
return input.join("|");
|
|
166323
166504
|
}
|
|
@@ -166350,18 +166531,18 @@ function EncodeTemplateLiteralDeferred(types, right, pattern) {
|
|
|
166350
166531
|
const result = EncodeType(templateLiteral2, right, pattern);
|
|
166351
166532
|
return result;
|
|
166352
166533
|
}
|
|
166353
|
-
function EncodeEnum(
|
|
166354
|
-
const
|
|
166355
|
-
return
|
|
166534
|
+
function EncodeEnum(values, right, pattern) {
|
|
166535
|
+
const evaluated = EvaluateEnum(values);
|
|
166536
|
+
return EncodeType(evaluated, right, pattern);
|
|
166356
166537
|
}
|
|
166357
166538
|
function EncodeUnion(types, right, pattern, result = []) {
|
|
166358
|
-
return exports_guard.
|
|
166539
|
+
return exports_guard.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], "")]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));
|
|
166359
166540
|
}
|
|
166360
166541
|
function EncodeType(type, right, pattern) {
|
|
166361
|
-
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) :
|
|
166542
|
+
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) : IsBoolean3(type) ? EncodeBoolean(right, pattern) : IsNumber3(type) ? EncodeNumber(right, pattern) : IsString3(type) ? EncodeString(right, pattern) : IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) : IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) : IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) : NeverPattern;
|
|
166362
166543
|
}
|
|
166363
166544
|
function EncodeTypes(types, pattern) {
|
|
166364
|
-
return exports_guard.
|
|
166545
|
+
return exports_guard.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);
|
|
166365
166546
|
}
|
|
166366
166547
|
function EncodePattern(types) {
|
|
166367
166548
|
const encoded = EncodeTypes(types, "");
|
|
@@ -166374,7 +166555,7 @@ function TemplateLiteralEncode(types) {
|
|
|
166374
166555
|
return result;
|
|
166375
166556
|
}
|
|
166376
166557
|
|
|
166377
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166558
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs
|
|
166378
166559
|
function TemplateLiteralAction(types, options) {
|
|
166379
166560
|
const result = CanInstantiate(types) ? exports_memory.Update(TemplateLiteralEncode(types), {}, options) : TemplateLiteralDeferred(types, options);
|
|
166380
166561
|
return result;
|
|
@@ -166384,7 +166565,7 @@ function TemplateLiteralInstantiate(context, state, types, options) {
|
|
|
166384
166565
|
return TemplateLiteralAction(instantiatedTypes, options);
|
|
166385
166566
|
}
|
|
166386
166567
|
|
|
166387
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166568
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/template_literal.mjs
|
|
166388
166569
|
function TemplateLiteralDeferred(types, options = {}) {
|
|
166389
166570
|
return Deferred("TemplateLiteral", [types], options);
|
|
166390
166571
|
}
|
|
@@ -166406,7 +166587,7 @@ function IsTemplateLiteral(value) {
|
|
|
166406
166587
|
return IsKind(value, "TemplateLiteral");
|
|
166407
166588
|
}
|
|
166408
166589
|
|
|
166409
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166590
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/result.mjs
|
|
166410
166591
|
var exports_result = {};
|
|
166411
166592
|
__export(exports_result, {
|
|
166412
166593
|
Match: () => Match3,
|
|
@@ -166442,37 +166623,41 @@ function IsExtendsTrueLike(value) {
|
|
|
166442
166623
|
function Match3(result, true_, false_) {
|
|
166443
166624
|
return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
|
|
166444
166625
|
}
|
|
166445
|
-
|
|
166626
|
+
|
|
166627
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_right.mjs
|
|
166446
166628
|
function ExtendsRightInfer(inferred, name2, left, right) {
|
|
166447
166629
|
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => ExtendsTrue(exports_memory.Assign(exports_memory.Assign(inferred, checkInferred), { [name2]: left })), () => ExtendsFalse());
|
|
166448
166630
|
}
|
|
166449
166631
|
function ExtendsRightAny(inferred, _left) {
|
|
166450
166632
|
return ExtendsTrue(inferred);
|
|
166451
166633
|
}
|
|
166634
|
+
function ExtendsRightDependent(inferred, left, if_, then_, else_) {
|
|
166635
|
+
return Match3(ExtendsLeft(inferred, left, if_), (inferred2) => Match3(ExtendsLeft(inferred2, left, then_), (inferred3) => ExtendsTrue(inferred3), () => ExtendsFalse()), () => Match3(ExtendsLeft(inferred, left, else_), (inferred2) => ExtendsTrue(inferred2), () => ExtendsFalse()));
|
|
166636
|
+
}
|
|
166452
166637
|
function ExtendsRightEnum(inferred, left, right) {
|
|
166453
|
-
const
|
|
166454
|
-
return ExtendsLeft(inferred, left,
|
|
166638
|
+
const evaluated = EvaluateEnum(right);
|
|
166639
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
166455
166640
|
}
|
|
166456
166641
|
function ExtendsRightIntersect(inferred, left, right) {
|
|
166457
|
-
return exports_guard.
|
|
166642
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsRightIntersect(inferred2, left, tail), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166458
166643
|
}
|
|
166459
166644
|
function ExtendsRightTemplateLiteral(inferred, left, right) {
|
|
166460
|
-
const
|
|
166461
|
-
return ExtendsLeft(inferred, left,
|
|
166645
|
+
const evaluated = EvaluateTemplateLiteral(right);
|
|
166646
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
166462
166647
|
}
|
|
166463
166648
|
function ExtendsRightUnion(inferred, left, right) {
|
|
166464
|
-
return exports_guard.
|
|
166649
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsRightUnion(inferred, left, tail)), () => ExtendsFalse());
|
|
166465
166650
|
}
|
|
166466
166651
|
function ExtendsRight(inferred, left, right) {
|
|
166467
|
-
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166652
|
+
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166468
166653
|
}
|
|
166469
166654
|
|
|
166470
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166655
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/any.mjs
|
|
166471
166656
|
function ExtendsAny(inferred, left, right) {
|
|
166472
166657
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsUnion(inferred);
|
|
166473
166658
|
}
|
|
166474
166659
|
|
|
166475
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166660
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/array.mjs
|
|
166476
166661
|
function ExtendsImmutable(left, right) {
|
|
166477
166662
|
const isImmutableLeft = IsImmutable(left);
|
|
166478
166663
|
const isImmutableRight = IsImmutable(right);
|
|
@@ -166482,22 +166667,17 @@ function ExtendsArray(inferred, arrayLeft, left, right) {
|
|
|
166482
166667
|
return IsArray2(right) ? ExtendsImmutable(arrayLeft, right) ? ExtendsLeft(inferred, left, right.items) : ExtendsFalse() : ExtendsRight(inferred, arrayLeft, right);
|
|
166483
166668
|
}
|
|
166484
166669
|
|
|
166485
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166486
|
-
function ExtendsAsyncIterator(inferred, left, right) {
|
|
166487
|
-
return IsAsyncIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, AsyncIterator(left), right);
|
|
166488
|
-
}
|
|
166489
|
-
|
|
166490
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/extends/bigint.mjs
|
|
166670
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/bigint.mjs
|
|
166491
166671
|
function ExtendsBigInt(inferred, left, right) {
|
|
166492
166672
|
return IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166493
166673
|
}
|
|
166494
166674
|
|
|
166495
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166675
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/boolean.mjs
|
|
166496
166676
|
function ExtendsBoolean(inferred, left, right) {
|
|
166497
|
-
return
|
|
166677
|
+
return IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166498
166678
|
}
|
|
166499
166679
|
|
|
166500
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166680
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/parameters.mjs
|
|
166501
166681
|
function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
166502
166682
|
const checkLeft = IsInfer(right) ? left : right;
|
|
166503
166683
|
const checkRight = IsInfer(right) ? right : left;
|
|
@@ -166506,52 +166686,53 @@ function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
|
166506
166686
|
return !isLeftOptional && isRightOptional ? ExtendsFalse() : Match3(ExtendsLeft(inferred, checkLeft, checkRight), (inferred2) => ExtendsParameters(inferred2, leftRest, rightRest), () => ExtendsFalse());
|
|
166507
166687
|
}
|
|
166508
166688
|
function ParameterRight(inferred, left, leftRest, rightRest) {
|
|
166509
|
-
return exports_guard.
|
|
166689
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
166510
166690
|
}
|
|
166511
166691
|
function ParametersLeft(inferred, left, rightRest) {
|
|
166512
|
-
return exports_guard.
|
|
166692
|
+
return exports_guard.ShiftLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => ExtendsTrue(inferred));
|
|
166513
166693
|
}
|
|
166514
166694
|
function ExtendsParameters(inferred, left, right) {
|
|
166515
166695
|
return ParametersLeft(inferred, left, right);
|
|
166516
166696
|
}
|
|
166517
166697
|
|
|
166518
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166698
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/return_type.mjs
|
|
166519
166699
|
function ExtendsReturnType(inferred, left, right) {
|
|
166520
166700
|
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsLeft(inferred, left, right);
|
|
166521
166701
|
}
|
|
166522
166702
|
|
|
166523
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166703
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/constructor.mjs
|
|
166524
166704
|
function ExtendsConstructor(inferred, parameters, returnType, right) {
|
|
166525
166705
|
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsConstructor2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["instanceType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
166526
166706
|
}
|
|
166527
166707
|
|
|
166528
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166708
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/dependent.mjs
|
|
166709
|
+
function ExtendsDependent(inferred, if_, then_, else_, right) {
|
|
166710
|
+
return Match3(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));
|
|
166711
|
+
}
|
|
166712
|
+
|
|
166713
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/enum.mjs
|
|
166529
166714
|
function ExtendsEnum(inferred, left, right) {
|
|
166530
|
-
|
|
166715
|
+
const evaluated = EvaluateEnum(left);
|
|
166716
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
166531
166717
|
}
|
|
166532
166718
|
|
|
166533
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166719
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/function.mjs
|
|
166534
166720
|
function ExtendsFunction(inferred, parameters, returnType, right) {
|
|
166535
166721
|
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsFunction2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["returnType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
166536
166722
|
}
|
|
166537
166723
|
|
|
166538
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166724
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/integer.mjs
|
|
166539
166725
|
function ExtendsInteger(inferred, left, right) {
|
|
166540
|
-
return IsInteger2(right) ? ExtendsTrue(inferred) :
|
|
166726
|
+
return IsInteger2(right) ? ExtendsTrue(inferred) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166541
166727
|
}
|
|
166542
166728
|
|
|
166543
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166729
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/intersect.mjs
|
|
166544
166730
|
function ExtendsIntersect(inferred, left, right) {
|
|
166545
166731
|
const evaluated = EvaluateIntersect(left);
|
|
166546
166732
|
return ExtendsLeft(inferred, evaluated, right);
|
|
166547
166733
|
}
|
|
166548
166734
|
|
|
166549
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166550
|
-
function ExtendsIterator(inferred, left, right) {
|
|
166551
|
-
return IsIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, Iterator(left), right);
|
|
166552
|
-
}
|
|
166553
|
-
|
|
166554
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/extends/literal.mjs
|
|
166735
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/literal.mjs
|
|
166555
166736
|
function ExtendsLiteralValue(inferred, left, right) {
|
|
166556
166737
|
return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166557
166738
|
}
|
|
@@ -166559,34 +166740,34 @@ function ExtendsLiteralBigInt(inferred, left, right) {
|
|
|
166559
166740
|
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166560
166741
|
}
|
|
166561
166742
|
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
166562
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166743
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166563
166744
|
}
|
|
166564
166745
|
function ExtendsLiteralNumber(inferred, left, right) {
|
|
166565
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166746
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166566
166747
|
}
|
|
166567
166748
|
function ExtendsLiteralString(inferred, left, right) {
|
|
166568
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166749
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166569
166750
|
}
|
|
166570
166751
|
function ExtendsLiteral(inferred, left, right) {
|
|
166571
166752
|
return exports_guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : exports_guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : exports_guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : exports_guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
|
|
166572
166753
|
}
|
|
166573
166754
|
|
|
166574
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166755
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/never.mjs
|
|
166575
166756
|
function ExtendsNever(inferred, left, right) {
|
|
166576
166757
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : ExtendsTrue(inferred);
|
|
166577
166758
|
}
|
|
166578
166759
|
|
|
166579
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166760
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/null.mjs
|
|
166580
166761
|
function ExtendsNull(inferred, left, right) {
|
|
166581
166762
|
return IsNull2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166582
166763
|
}
|
|
166583
166764
|
|
|
166584
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166765
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/number.mjs
|
|
166585
166766
|
function ExtendsNumber(inferred, left, right) {
|
|
166586
|
-
return
|
|
166767
|
+
return IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166587
166768
|
}
|
|
166588
166769
|
|
|
166589
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166770
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/object.mjs
|
|
166590
166771
|
function ExtendsPropertyOptional(inferred, left, right) {
|
|
166591
166772
|
return IsOptional(left) ? IsOptional(right) ? ExtendsTrue(inferred) : ExtendsFalse() : ExtendsTrue(inferred);
|
|
166592
166773
|
}
|
|
@@ -166614,32 +166795,54 @@ function ExtendsProperties(inferred, left, right) {
|
|
|
166614
166795
|
function ExtendsObjectToObject(inferred, left, right) {
|
|
166615
166796
|
return ExtendsProperties(inferred, left, right);
|
|
166616
166797
|
}
|
|
166798
|
+
function RecordMergeInferred(left, right) {
|
|
166799
|
+
return exports_guard.Keys(right).reduce((result, key) => {
|
|
166800
|
+
return {
|
|
166801
|
+
...result,
|
|
166802
|
+
[key]: exports_guard.HasPropertyKey(left, key) ? IsUnion(result[key]) ? Union([...result[key].anyOf, right[key]]) : Union([left[key], right[key]]) : right[key]
|
|
166803
|
+
};
|
|
166804
|
+
}, left);
|
|
166805
|
+
}
|
|
166806
|
+
function ExtendsRecordComparer(properties2, keys, type, result) {
|
|
166807
|
+
return exports_guard.ShiftLeft(keys, (left, right) => Match3(ExtendsLeft({}, properties2[left], type), (inferred) => ExtendsRecordComparer(properties2, right, type, RecordMergeInferred(result, inferred)), () => ExtendsFalse()), () => ExtendsTrue(result));
|
|
166808
|
+
}
|
|
166809
|
+
function ExtendsObjectToRecord(inferred, properties2, _pattern, value) {
|
|
166810
|
+
const keys = exports_guard.Keys(properties2);
|
|
166811
|
+
const result = ExtendsRecordComparer(properties2, keys, value, inferred);
|
|
166812
|
+
return result;
|
|
166813
|
+
}
|
|
166617
166814
|
function ExtendsObject(inferred, left, right) {
|
|
166618
|
-
return IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
166815
|
+
return IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) : IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
166619
166816
|
}
|
|
166620
166817
|
|
|
166621
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166622
|
-
function
|
|
166623
|
-
return
|
|
166818
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/record.mjs
|
|
166819
|
+
function FromObject2(inferred, properties2) {
|
|
166820
|
+
return exports_guard.IsEqual(exports_guard.Keys(properties2).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166821
|
+
}
|
|
166822
|
+
function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
166823
|
+
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
166824
|
+
}
|
|
166825
|
+
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
166826
|
+
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166624
166827
|
}
|
|
166625
166828
|
|
|
166626
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166829
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/string.mjs
|
|
166627
166830
|
function ExtendsString(inferred, left, right) {
|
|
166628
|
-
return
|
|
166831
|
+
return IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166629
166832
|
}
|
|
166630
166833
|
|
|
166631
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166834
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/symbol.mjs
|
|
166632
166835
|
function ExtendsSymbol(inferred, left, right) {
|
|
166633
166836
|
return IsSymbol2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166634
166837
|
}
|
|
166635
166838
|
|
|
166636
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166839
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/template_literal.mjs
|
|
166637
166840
|
function ExtendsTemplateLiteral(inferred, left, right) {
|
|
166638
|
-
const
|
|
166639
|
-
return ExtendsLeft(inferred,
|
|
166841
|
+
const evaluated = EvaluateTemplateLiteral(left);
|
|
166842
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
166640
166843
|
}
|
|
166641
166844
|
|
|
166642
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166845
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/inference.mjs
|
|
166643
166846
|
function Inferrable(name2, type) {
|
|
166644
166847
|
return exports_memory.Create({ "~kind": "Inferrable" }, { name: name2, type }, {});
|
|
166645
166848
|
}
|
|
@@ -166653,7 +166856,7 @@ function TryInferable(type) {
|
|
|
166653
166856
|
return IsInfer(type) ? Inferrable(type.name, type.extends) : undefined;
|
|
166654
166857
|
}
|
|
166655
166858
|
function TryInferResults(rest3, right, result = []) {
|
|
166656
|
-
return exports_guard.
|
|
166859
|
+
return exports_guard.ShiftLeft(rest3, (head, tail) => Match3(ExtendsLeft({}, head, right), () => TryInferResults(tail, right, [...result, head]), () => {
|
|
166657
166860
|
return;
|
|
166658
166861
|
}), () => result);
|
|
166659
166862
|
}
|
|
@@ -166666,7 +166869,7 @@ function InferUnionResult(inferred, name2, left, right) {
|
|
|
166666
166869
|
return exports_guard.IsArray(results) ? ExtendsTrue(exports_memory.Assign(inferred, { [name2]: Union(results) })) : ExtendsFalse();
|
|
166667
166870
|
}
|
|
166668
166871
|
|
|
166669
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166872
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/tuple.mjs
|
|
166670
166873
|
function Reverse(types) {
|
|
166671
166874
|
return [...types].reverse();
|
|
166672
166875
|
}
|
|
@@ -166683,61 +166886,61 @@ function ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {
|
|
|
166683
166886
|
}
|
|
166684
166887
|
function ElementsLeft(inferred, reversed, leftRest, right, rightRest) {
|
|
166685
166888
|
const inferable = TryRestInferable(right);
|
|
166686
|
-
return IsInferable(inferable) ? InferTupleResult(inferred, inferable["name"], ApplyReverse(leftRest, reversed), inferable["type"]) : exports_guard.
|
|
166889
|
+
return IsInferable(inferable) ? InferTupleResult(inferred, inferable["name"], ApplyReverse(leftRest, reversed), inferable["type"]) : exports_guard.ShiftLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => ExtendsFalse());
|
|
166687
166890
|
}
|
|
166688
166891
|
function ElementsRight(inferred, reversed, leftRest, rightRest) {
|
|
166689
|
-
return exports_guard.
|
|
166892
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => exports_guard.IsEqual(leftRest.length, 0) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
166690
166893
|
}
|
|
166691
166894
|
function Elements(inferred, reversed, leftRest, rightRest) {
|
|
166692
166895
|
return ElementsRight(inferred, reversed, leftRest, rightRest);
|
|
166693
166896
|
}
|
|
166694
166897
|
function ExtendsTupleToTuple(inferred, left, right) {
|
|
166695
|
-
const instantiatedRight = InstantiateElements(inferred,
|
|
166898
|
+
const instantiatedRight = InstantiateElements(inferred, State([], []), right);
|
|
166696
166899
|
const reversed = Reversed(instantiatedRight);
|
|
166697
166900
|
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
166698
166901
|
}
|
|
166699
166902
|
function ExtendsTupleToArray(inferred, left, right) {
|
|
166700
166903
|
const inferrable = TryInferable(right);
|
|
166701
|
-
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : exports_guard.
|
|
166904
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : exports_guard.ShiftLeft(left, (head, tail) => Match3(ExtendsLeft(inferred, head, right), (inferred2) => ExtendsTupleToArray(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166702
166905
|
}
|
|
166703
166906
|
function ExtendsTuple(inferred, left, right) {
|
|
166704
|
-
const instantiatedLeft = InstantiateElements(inferred,
|
|
166907
|
+
const instantiatedLeft = InstantiateElements(inferred, State([], []), left);
|
|
166705
166908
|
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray2(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
|
|
166706
166909
|
}
|
|
166707
166910
|
|
|
166708
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166911
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/undefined.mjs
|
|
166709
166912
|
function ExtendsUndefined(inferred, left, right) {
|
|
166710
166913
|
return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166711
166914
|
}
|
|
166712
166915
|
|
|
166713
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166916
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/union.mjs
|
|
166714
166917
|
function ExtendsUnionSome(inferred, type, unionTypes) {
|
|
166715
|
-
return exports_guard.
|
|
166918
|
+
return exports_guard.ShiftLeft(unionTypes, (head, tail) => Match3(ExtendsLeft(inferred, type, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsUnionSome(inferred, type, tail)), () => ExtendsFalse());
|
|
166716
166919
|
}
|
|
166717
166920
|
function ExtendsUnionLeft(inferred, left, right) {
|
|
166718
|
-
return exports_guard.
|
|
166921
|
+
return exports_guard.ShiftLeft(left, (head, tail) => Match3(ExtendsUnionSome(inferred, head, right), (inferred2) => ExtendsUnionLeft(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166719
166922
|
}
|
|
166720
166923
|
function ExtendsUnion2(inferred, left, right) {
|
|
166721
166924
|
const inferrable = TryInferable(right);
|
|
166722
166925
|
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : IsUnion(right) ? ExtendsUnionLeft(inferred, left, right.anyOf) : ExtendsUnionLeft(inferred, left, [right]);
|
|
166723
166926
|
}
|
|
166724
166927
|
|
|
166725
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166928
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/unknown.mjs
|
|
166726
166929
|
function ExtendsUnknown(inferred, left, right) {
|
|
166727
166930
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166728
166931
|
}
|
|
166729
166932
|
|
|
166730
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166933
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/void.mjs
|
|
166731
166934
|
function ExtendsVoid(inferred, left, right) {
|
|
166732
166935
|
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166733
166936
|
}
|
|
166734
166937
|
|
|
166735
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166938
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_left.mjs
|
|
166736
166939
|
function ExtendsLeft(inferred, left, right) {
|
|
166737
|
-
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) :
|
|
166940
|
+
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean3(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor2(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) : IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) : IsFunction2(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger2(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull2(left) ? ExtendsNull(inferred, left, right) : IsNumber3(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString3(left) ? ExtendsString(inferred, left, right) : IsSymbol2(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined2(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
|
|
166738
166941
|
}
|
|
166739
166942
|
|
|
166740
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166943
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/interface/instantiate.mjs
|
|
166741
166944
|
function InterfaceOperation(heritage, properties2) {
|
|
166742
166945
|
const result = EvaluateIntersect([...heritage, _Object_(properties2)]);
|
|
166743
166946
|
return result;
|
|
@@ -166752,7 +166955,7 @@ function InterfaceInstantiate(context, state, heritage, properties2, options) {
|
|
|
166752
166955
|
return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
|
|
166753
166956
|
}
|
|
166754
166957
|
|
|
166755
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166958
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/interface.mjs
|
|
166756
166959
|
function InterfaceDeferred(heritage, properties2, options = {}) {
|
|
166757
166960
|
return Deferred("Interface", [heritage, properties2], options);
|
|
166758
166961
|
}
|
|
@@ -166763,7 +166966,7 @@ function Interface(heritage, properties2, options = {}) {
|
|
|
166763
166966
|
return InterfaceAction(heritage, properties2, options);
|
|
166764
166967
|
}
|
|
166765
166968
|
|
|
166766
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166969
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/check.mjs
|
|
166767
166970
|
function FromRef(stack, context, ref2) {
|
|
166768
166971
|
return stack.includes(ref2) ? true : FromType3([...stack, ref2], context, context[ref2]);
|
|
166769
166972
|
}
|
|
@@ -166772,20 +166975,20 @@ function FromProperties(stack, context, properties2) {
|
|
|
166772
166975
|
return FromTypes2(stack, context, types);
|
|
166773
166976
|
}
|
|
166774
166977
|
function FromTypes2(stack, context, types) {
|
|
166775
|
-
return exports_guard.
|
|
166978
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType3(stack, context, left) ? true : FromTypes2(stack, context, right), () => false);
|
|
166776
166979
|
}
|
|
166777
166980
|
function FromType3(stack, context, type) {
|
|
166778
|
-
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray2(type) ? FromType3(stack, context, type.items) :
|
|
166981
|
+
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray2(type) ? FromType3(stack, context, type.items) : IsConstructor2(type) ? FromTypes2(stack, context, [...type.parameters, type.instanceType]) : IsFunction2(type) ? FromTypes2(stack, context, [...type.parameters, type.returnType]) : IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) : IsIntersect(type) ? FromTypes2(stack, context, type.allOf) : IsObject2(type) ? FromProperties(stack, context, type.properties) : IsUnion(type) ? FromTypes2(stack, context, type.anyOf) : IsTuple(type) ? FromTypes2(stack, context, type.items) : IsRecord(type) ? FromType3(stack, context, RecordValue(type)) : false;
|
|
166779
166982
|
}
|
|
166780
166983
|
function CyclicCheck(stack, context, type) {
|
|
166781
166984
|
const result = FromType3(stack, context, type);
|
|
166782
166985
|
return result;
|
|
166783
166986
|
}
|
|
166784
166987
|
|
|
166785
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166988
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/candidates.mjs
|
|
166786
166989
|
function ResolveCandidateKeys(context, keys) {
|
|
166787
166990
|
return keys.reduce((result, left) => {
|
|
166788
|
-
return
|
|
166991
|
+
return CyclicCheck([left], context, context[left]) ? [...result, left] : result;
|
|
166789
166992
|
}, []);
|
|
166790
166993
|
}
|
|
166791
166994
|
function CyclicCandidates(context) {
|
|
@@ -166793,7 +166996,7 @@ function CyclicCandidates(context) {
|
|
|
166793
166996
|
const result = ResolveCandidateKeys(context, keys);
|
|
166794
166997
|
return result;
|
|
166795
166998
|
}
|
|
166796
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166999
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs
|
|
166797
167000
|
function FromRef2(context, ref2, result) {
|
|
166798
167001
|
return result.includes(ref2) ? result : (ref2 in context) ? FromType4(context, context[ref2], [...result, ref2]) : Unreachable();
|
|
166799
167002
|
}
|
|
@@ -166807,13 +167010,13 @@ function FromTypes3(context, types, result) {
|
|
|
166807
167010
|
}, result);
|
|
166808
167011
|
}
|
|
166809
167012
|
function FromType4(context, type, result) {
|
|
166810
|
-
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray2(type) ? FromType4(context, type.items, result) :
|
|
167013
|
+
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray2(type) ? FromType4(context, type.items, result) : IsConstructor2(type) ? FromTypes3(context, [...type.parameters, type.instanceType], result) : IsFunction2(type) ? FromTypes3(context, [...type.parameters, type.returnType], result) : IsInterfaceDeferred(type) ? FromProperties2(context, type.parameters[1], result) : IsIntersect(type) ? FromTypes3(context, type.allOf, result) : IsObject2(type) ? FromProperties2(context, type.properties, result) : IsUnion(type) ? FromTypes3(context, type.anyOf, result) : IsTuple(type) ? FromTypes3(context, type.items, result) : IsRecord(type) ? FromType4(context, RecordValue(type), result) : result;
|
|
166811
167014
|
}
|
|
166812
167015
|
function CyclicDependencies(context, key, type) {
|
|
166813
167016
|
const result = FromType4(context, type, [key]);
|
|
166814
167017
|
return result;
|
|
166815
167018
|
}
|
|
166816
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167019
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/extends.mjs
|
|
166817
167020
|
function FromRef3(_ref) {
|
|
166818
167021
|
return Any();
|
|
166819
167022
|
}
|
|
@@ -166828,7 +167031,7 @@ function FromTypes4(types) {
|
|
|
166828
167031
|
}, []);
|
|
166829
167032
|
}
|
|
166830
167033
|
function FromType5(type) {
|
|
166831
|
-
return IsRef(type) ? FromRef3(type.$ref) : IsArray2(type) ? _Array_(FromType5(type.items), ArrayOptions(type)) :
|
|
167034
|
+
return IsRef(type) ? FromRef3(type.$ref) : IsArray2(type) ? _Array_(FromType5(type.items), ArrayOptions(type)) : IsConstructor2(type) ? Constructor(FromTypes4(type.parameters), FromType5(type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes4(type.parameters), FromType5(type.returnType)) : IsIntersect(type) ? Intersect(FromTypes4(type.allOf)) : IsObject2(type) ? _Object_(FromProperties3(type.properties)) : IsRecord(type) ? Record(RecordKey(type), FromType5(RecordValue(type))) : IsUnion(type) ? Union(FromTypes4(type.anyOf)) : IsTuple(type) ? Tuple(FromTypes4(type.items)) : type;
|
|
166832
167035
|
}
|
|
166833
167036
|
function CyclicAnyFromParameters(defs, ref2) {
|
|
166834
167037
|
return ref2 in defs ? FromType5(defs[ref2]) : Unknown();
|
|
@@ -166836,10 +167039,10 @@ function CyclicAnyFromParameters(defs, ref2) {
|
|
|
166836
167039
|
function CyclicExtends(type) {
|
|
166837
167040
|
return CyclicAnyFromParameters(type.$defs, type.$ref);
|
|
166838
167041
|
}
|
|
166839
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167042
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs
|
|
166840
167043
|
function CyclicInterface(context, heritage, properties2) {
|
|
166841
|
-
const instantiatedHeritage = InstantiateTypes(context,
|
|
166842
|
-
const instantiatedProperties = InstantiateProperties({},
|
|
167044
|
+
const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
|
|
167045
|
+
const instantiatedProperties = InstantiateProperties({}, State([], []), properties2);
|
|
166843
167046
|
const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, _Object_(instantiatedProperties)]);
|
|
166844
167047
|
return evaluatedInterface;
|
|
166845
167048
|
}
|
|
@@ -166857,7 +167060,7 @@ function InstantiateCyclic(context, ref2, type) {
|
|
|
166857
167060
|
const result = Cyclic(definitions, ref2);
|
|
166858
167061
|
return result;
|
|
166859
167062
|
}
|
|
166860
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167063
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/target.mjs
|
|
166861
167064
|
function Resolve(defs, ref2) {
|
|
166862
167065
|
return ref2 in defs ? IsRef(defs[ref2]) ? Resolve(defs, defs[ref2].$ref) : defs[ref2] : Never();
|
|
166863
167066
|
}
|
|
@@ -166865,29 +167068,29 @@ function CyclicTarget(defs, ref2) {
|
|
|
166865
167068
|
const result = Resolve(defs, ref2);
|
|
166866
167069
|
return result;
|
|
166867
167070
|
}
|
|
166868
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167071
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends.mjs
|
|
166869
167072
|
function Canonical(type) {
|
|
166870
167073
|
return IsCyclic(type) ? CyclicExtends(type) : IsUnsafe(type) ? Unknown() : type;
|
|
166871
167074
|
}
|
|
166872
|
-
function
|
|
167075
|
+
function Extends(inferred, left, right) {
|
|
166873
167076
|
const canonicalLeft = Canonical(left);
|
|
166874
167077
|
const canonicalRight = Canonical(right);
|
|
166875
167078
|
return ExtendsLeft(inferred, canonicalLeft, canonicalRight);
|
|
166876
167079
|
}
|
|
166877
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167080
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/compare.mjs
|
|
166878
167081
|
var ResultEqual = "equal";
|
|
166879
167082
|
var ResultDisjoint = "disjoint";
|
|
166880
167083
|
var ResultLeftInside = "left-inside";
|
|
166881
167084
|
var ResultRightInside = "right-inside";
|
|
166882
167085
|
function Compare(left, right) {
|
|
166883
167086
|
const extendsCheck = [
|
|
166884
|
-
IsUnknown(left) ? exports_result.ExtendsFalse() :
|
|
166885
|
-
IsUnknown(left) ? exports_result.ExtendsTrue({}) :
|
|
167087
|
+
IsUnknown(left) ? exports_result.ExtendsFalse() : Extends({}, left, right),
|
|
167088
|
+
IsUnknown(left) ? exports_result.ExtendsTrue({}) : Extends({}, right, left)
|
|
166886
167089
|
];
|
|
166887
167090
|
return exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultEqual : exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsFalse(extendsCheck[1]) ? ResultLeftInside : exports_result.IsExtendsFalse(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultRightInside : ResultDisjoint;
|
|
166888
167091
|
}
|
|
166889
167092
|
|
|
166890
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167093
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/broaden.mjs
|
|
166891
167094
|
function BroadFilter(type, types) {
|
|
166892
167095
|
return types.filter((left) => {
|
|
166893
167096
|
return Compare(type, left) === ResultRightInside ? false : true;
|
|
@@ -166912,10 +167115,9 @@ function BroadenTypes(types) {
|
|
|
166912
167115
|
function Broaden(types) {
|
|
166913
167116
|
const broadened = BroadenTypes(types);
|
|
166914
167117
|
const flattened = Flatten(broadened);
|
|
166915
|
-
|
|
166916
|
-
return result;
|
|
167118
|
+
return flattened;
|
|
166917
167119
|
}
|
|
166918
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167120
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs
|
|
166919
167121
|
function EvaluateAction(type, options) {
|
|
166920
167122
|
const result = exports_memory.Update(EvaluateType(type), {}, options);
|
|
166921
167123
|
return result;
|
|
@@ -166924,7 +167126,7 @@ function EvaluateInstantiate(context, state, type, options) {
|
|
|
166924
167126
|
const instantiatedType = InstantiateType(context, state, type);
|
|
166925
167127
|
return EvaluateAction(instantiatedType, options);
|
|
166926
167128
|
}
|
|
166927
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167129
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
166928
167130
|
function CollectDistributionNames(expression, result = []) {
|
|
166929
167131
|
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? IsRef(expression.parameters[0]) ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]["$ref"]])) : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result)) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? IsDeferred(expression.parameters[1]) && exports_guard.IsEqual(expression.parameters[1].action, "KeyOf") && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]["$ref"]] : result : result;
|
|
166930
167132
|
}
|
|
@@ -166932,7 +167134,7 @@ function BuildDistributionArray(parameters, names) {
|
|
|
166932
167134
|
return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);
|
|
166933
167135
|
}
|
|
166934
167136
|
function ZipDistributionArray(arguments_, distributionArray, result = []) {
|
|
166935
|
-
return exports_guard.
|
|
167137
|
+
return exports_guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => exports_guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);
|
|
166936
167138
|
}
|
|
166937
167139
|
function Expand(type) {
|
|
166938
167140
|
return IsUnion(type) ? [...type.anyOf] : [type];
|
|
@@ -166957,7 +167159,7 @@ function DistributeArguments(parameters, arguments_, expression) {
|
|
|
166957
167159
|
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? Distribute2(zippedArguments) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? Distribute2(zippedArguments) : [arguments_];
|
|
166958
167160
|
}
|
|
166959
167161
|
|
|
166960
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167162
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_target.mjs
|
|
166961
167163
|
function FromNotResolvable() {
|
|
166962
167164
|
return ["(not-resolvable)", Never()];
|
|
166963
167165
|
}
|
|
@@ -166977,9 +167179,9 @@ function ResolveTarget(context, target2, arguments_) {
|
|
|
166977
167179
|
return FromType6(context, "(anonymous)", target2, arguments_);
|
|
166978
167180
|
}
|
|
166979
167181
|
|
|
166980
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167182
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs
|
|
166981
167183
|
function AssertArgumentExtends(name2, type, extends_) {
|
|
166982
|
-
if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(
|
|
167184
|
+
if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(Extends({}, type, extends_)))
|
|
166983
167185
|
return;
|
|
166984
167186
|
const cause = { parameter: name2, expect: extends_, actual: type };
|
|
166985
167187
|
throw new Error(`Argument for parameter ${name2} does not satisfy constraint`, { cause });
|
|
@@ -166992,16 +167194,16 @@ function BindArgument(context, state, name2, extends_, type) {
|
|
|
166992
167194
|
function BindArguments(context, state, parameterLeft, parameterRight, arguments_) {
|
|
166993
167195
|
const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);
|
|
166994
167196
|
const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);
|
|
166995
|
-
return exports_guard.
|
|
167197
|
+
return exports_guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, instantiatedEquals), state, parameterRight, []));
|
|
166996
167198
|
}
|
|
166997
167199
|
function BindParameters(context, state, parameters, arguments_) {
|
|
166998
|
-
return exports_guard.
|
|
167200
|
+
return exports_guard.ShiftLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);
|
|
166999
167201
|
}
|
|
167000
167202
|
function ResolveArgumentsContext(context, state, parameters, arguments_) {
|
|
167001
167203
|
return BindParameters(context, state, parameters, arguments_);
|
|
167002
167204
|
}
|
|
167003
167205
|
|
|
167004
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167206
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/instantiate.mjs
|
|
167005
167207
|
function Peek(state) {
|
|
167006
167208
|
const result = exports_guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : "";
|
|
167007
167209
|
return result;
|
|
@@ -167012,8 +167214,8 @@ function IsTailCall(state, name2) {
|
|
|
167012
167214
|
}
|
|
167013
167215
|
function CallDispatch(context, state, target2, parameters, expression, arguments_) {
|
|
167014
167216
|
const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);
|
|
167015
|
-
const returnType = InstantiateType(argumentsContext,
|
|
167016
|
-
return InstantiateType(
|
|
167217
|
+
const returnType = InstantiateType(argumentsContext, State([...state["callstack"], target2["$ref"]], state["visited"]), expression);
|
|
167218
|
+
return InstantiateType(argumentsContext, State([], []), returnType);
|
|
167017
167219
|
}
|
|
167018
167220
|
function CallDistributed(context, state, target2, parameters, expression, distributedArguments) {
|
|
167019
167221
|
return distributedArguments.reduce((result, arguments_) => [...result, CallDispatch(context, state, target2, parameters, expression, arguments_)], []);
|
|
@@ -167033,46 +167235,59 @@ function CallInstantiate(context, state, target2, arguments_) {
|
|
|
167033
167235
|
return result;
|
|
167034
167236
|
}
|
|
167035
167237
|
|
|
167036
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167238
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/call.mjs
|
|
167037
167239
|
function CallConstruct(target2, arguments_) {
|
|
167038
|
-
return exports_memory.Create({ ["~kind"]: "Call" }, { target: target2, arguments: arguments_ }, {});
|
|
167240
|
+
return exports_memory.Create({ ["~kind"]: "Call" }, { type: "call", target: target2, arguments: arguments_ }, {});
|
|
167039
167241
|
}
|
|
167040
167242
|
function Call(target2, arguments_) {
|
|
167041
|
-
return CallInstantiate({},
|
|
167243
|
+
return CallInstantiate({}, State([], []), target2, arguments_);
|
|
167042
167244
|
}
|
|
167043
167245
|
function IsCall(value) {
|
|
167044
167246
|
return IsKind(value, "Call");
|
|
167045
167247
|
}
|
|
167046
167248
|
|
|
167047
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167249
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs
|
|
167250
|
+
function RemoveImmutableOperation(type) {
|
|
167251
|
+
return exports_memory.Discard(type, ["~immutable"]);
|
|
167252
|
+
}
|
|
167253
|
+
function RemoveImmutableAction(type, options) {
|
|
167254
|
+
const result = exports_memory.Update(RemoveImmutableOperation(type), {}, options);
|
|
167255
|
+
return result;
|
|
167256
|
+
}
|
|
167257
|
+
function RemoveImmutableInstantiate(context, state, type, options) {
|
|
167258
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
167259
|
+
return RemoveImmutableAction(instantiatedType, options);
|
|
167260
|
+
}
|
|
167261
|
+
|
|
167262
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs
|
|
167048
167263
|
function ApplyMapping(mapping, value) {
|
|
167049
167264
|
return mapping(value);
|
|
167050
167265
|
}
|
|
167051
167266
|
|
|
167052
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167267
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs
|
|
167053
167268
|
function FromLiteral3(mapping, value) {
|
|
167054
167269
|
return exports_guard.IsString(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
|
|
167055
167270
|
}
|
|
167056
167271
|
|
|
167057
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167272
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs
|
|
167058
167273
|
function FromTemplateLiteral(mapping, pattern) {
|
|
167059
|
-
const
|
|
167060
|
-
const result = FromType7(mapping,
|
|
167274
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167275
|
+
const result = FromType7(mapping, evaluated);
|
|
167061
167276
|
return result;
|
|
167062
167277
|
}
|
|
167063
167278
|
|
|
167064
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167279
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs
|
|
167065
167280
|
function FromUnion2(mapping, types) {
|
|
167066
167281
|
const result = types.map((type) => FromType7(mapping, type));
|
|
167067
167282
|
return Union(result);
|
|
167068
167283
|
}
|
|
167069
167284
|
|
|
167070
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167285
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs
|
|
167071
167286
|
function FromType7(mapping, type) {
|
|
167072
167287
|
return IsLiteral(type) ? FromLiteral3(mapping, type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) : IsUnion(type) ? FromUnion2(mapping, type.anyOf) : type;
|
|
167073
167288
|
}
|
|
167074
167289
|
|
|
167075
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167290
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/capitalize.mjs
|
|
167076
167291
|
function CapitalizeDeferred(type, options = {}) {
|
|
167077
167292
|
return Deferred("Capitalize", [type], options);
|
|
167078
167293
|
}
|
|
@@ -167080,7 +167295,7 @@ function Capitalize(type, options = {}) {
|
|
|
167080
167295
|
return CapitalizeAction(type, options);
|
|
167081
167296
|
}
|
|
167082
167297
|
|
|
167083
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167298
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/lowercase.mjs
|
|
167084
167299
|
function LowercaseDeferred(type, options = {}) {
|
|
167085
167300
|
return Deferred("Lowercase", [type], options);
|
|
167086
167301
|
}
|
|
@@ -167088,7 +167303,7 @@ function Lowercase(type, options = {}) {
|
|
|
167088
167303
|
return LowercaseAction(type, options);
|
|
167089
167304
|
}
|
|
167090
167305
|
|
|
167091
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167306
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uncapitalize.mjs
|
|
167092
167307
|
function UncapitalizeDeferred(type, options = {}) {
|
|
167093
167308
|
return Deferred("Uncapitalize", [type], options);
|
|
167094
167309
|
}
|
|
@@ -167096,7 +167311,7 @@ function Uncapitalize(type, options = {}) {
|
|
|
167096
167311
|
return UncapitalizeAction(type, options);
|
|
167097
167312
|
}
|
|
167098
167313
|
|
|
167099
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167314
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uppercase.mjs
|
|
167100
167315
|
function UppercaseDeferred(type, options = {}) {
|
|
167101
167316
|
return Deferred("Uppercase", [type], options);
|
|
167102
167317
|
}
|
|
@@ -167104,7 +167319,7 @@ function Uppercase(type, options = {}) {
|
|
|
167104
167319
|
return UppercaseAction(type, options);
|
|
167105
167320
|
}
|
|
167106
167321
|
|
|
167107
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167322
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs
|
|
167108
167323
|
var CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);
|
|
167109
167324
|
var LowercaseMapping = (input) => input.toLowerCase();
|
|
167110
167325
|
var UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);
|
|
@@ -167142,17 +167357,17 @@ function UppercaseInstantiate(context, state, type, options) {
|
|
|
167142
167357
|
return UppercaseAction(instantiatedType, options);
|
|
167143
167358
|
}
|
|
167144
167359
|
|
|
167145
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167360
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/conditional.mjs
|
|
167146
167361
|
function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
167147
167362
|
return Deferred("Conditional", [left, right, true_, false_], options);
|
|
167148
167363
|
}
|
|
167149
167364
|
function Conditional(left, right, true_, false_, options = {}) {
|
|
167150
|
-
return ConditionalAction({},
|
|
167365
|
+
return ConditionalAction({}, State([], []), left, right, true_, false_, options);
|
|
167151
167366
|
}
|
|
167152
167367
|
|
|
167153
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167368
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/conditional/instantiate.mjs
|
|
167154
167369
|
function ConditionalOperation(context, state, left, right, true_, false_) {
|
|
167155
|
-
const extendsResult =
|
|
167370
|
+
const extendsResult = Extends(context, left, right);
|
|
167156
167371
|
return exports_result.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) : exports_result.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) : InstantiateType(context, state, false_);
|
|
167157
167372
|
}
|
|
167158
167373
|
function ConditionalAction(context, state, left, right, true_, false_, options) {
|
|
@@ -167164,7 +167379,7 @@ function ConditionalInstantiate(context, state, left, right, true_, false_, opti
|
|
|
167164
167379
|
const instantiatedRight = InstantiateType(context, state, right);
|
|
167165
167380
|
return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);
|
|
167166
167381
|
}
|
|
167167
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167382
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/constructor_parameters.mjs
|
|
167168
167383
|
function ConstructorParametersDeferred(type, options = {}) {
|
|
167169
167384
|
return Deferred("ConstructorParameters", [type], options);
|
|
167170
167385
|
}
|
|
@@ -167172,10 +167387,10 @@ function ConstructorParameters(type, options = {}) {
|
|
|
167172
167387
|
return ConstructorParametersAction(type, options);
|
|
167173
167388
|
}
|
|
167174
167389
|
|
|
167175
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167390
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs
|
|
167176
167391
|
function ConstructorParametersOperation(type) {
|
|
167177
167392
|
const parameters = IsConstructor2(type) ? type["parameters"] : [];
|
|
167178
|
-
const instantiatedParameters = InstantiateElements({},
|
|
167393
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
167179
167394
|
const result = Tuple(instantiatedParameters);
|
|
167180
167395
|
return result;
|
|
167181
167396
|
}
|
|
@@ -167188,7 +167403,7 @@ function ConstructorParametersInstantiate(context, state, type, options) {
|
|
|
167188
167403
|
return ConstructorParametersAction(instantiatedType, options);
|
|
167189
167404
|
}
|
|
167190
167405
|
|
|
167191
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167406
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/exclude.mjs
|
|
167192
167407
|
function ExcludeDeferred(left, right, options = {}) {
|
|
167193
167408
|
return Deferred("Exclude", [left, right], options);
|
|
167194
167409
|
}
|
|
@@ -167196,24 +167411,7 @@ function Exclude(left, right, options = {}) {
|
|
|
167196
167411
|
return ExcludeAction(left, right, options);
|
|
167197
167412
|
}
|
|
167198
167413
|
|
|
167199
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167200
|
-
function ExcludeUnionLeft(types, right) {
|
|
167201
|
-
return types.reduce((result, head) => {
|
|
167202
|
-
return [...result, ...ExcludeTypeLeft(head, right)];
|
|
167203
|
-
}, []);
|
|
167204
|
-
}
|
|
167205
|
-
function ExcludeTypeLeft(left, right) {
|
|
167206
|
-
const check3 = Extends2({}, left, right);
|
|
167207
|
-
const result = exports_result.IsExtendsTrueLike(check3) ? [] : [left];
|
|
167208
|
-
return result;
|
|
167209
|
-
}
|
|
167210
|
-
function ExcludeOperation(left, right) {
|
|
167211
|
-
const remaining = IsEnum(left) ? ExcludeUnionLeft(EnumValuesToVariants(left.enum), right) : IsUnion(left) ? ExcludeUnionLeft(Flatten(left.anyOf), right) : ExcludeTypeLeft(left, right);
|
|
167212
|
-
const result = EvaluateUnion(remaining);
|
|
167213
|
-
return result;
|
|
167214
|
-
}
|
|
167215
|
-
|
|
167216
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
|
|
167414
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
|
|
167217
167415
|
function ExcludeAction(left, right, options) {
|
|
167218
167416
|
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExcludeOperation(left, right), {}, options) : ExcludeDeferred(left, right, options);
|
|
167219
167417
|
return result;
|
|
@@ -167224,7 +167422,7 @@ function ExcludeInstantiate(context, state, left, right, options) {
|
|
|
167224
167422
|
return ExcludeAction(instantiatedLeft, instantiatedRight, options);
|
|
167225
167423
|
}
|
|
167226
167424
|
|
|
167227
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167425
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/extract.mjs
|
|
167228
167426
|
function ExtractDeferred(left, right, options = {}) {
|
|
167229
167427
|
return Deferred("Extract", [left, right], options);
|
|
167230
167428
|
}
|
|
@@ -167232,24 +167430,26 @@ function Extract(left, right, options = {}) {
|
|
|
167232
167430
|
return ExtractAction(left, right, options);
|
|
167233
167431
|
}
|
|
167234
167432
|
|
|
167235
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167236
|
-
function
|
|
167237
|
-
|
|
167238
|
-
return [...result, ...ExtractTypeLeft(head, right)];
|
|
167239
|
-
}, []);
|
|
167240
|
-
}
|
|
167241
|
-
function ExtractTypeLeft(left, right) {
|
|
167242
|
-
const check3 = Extends2({}, left, right);
|
|
167433
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/operation.mjs
|
|
167434
|
+
function ExtractType(left, right) {
|
|
167435
|
+
const check3 = Extends({}, left, right);
|
|
167243
167436
|
const result = exports_result.IsExtendsTrueLike(check3) ? [left] : [];
|
|
167244
167437
|
return result;
|
|
167245
167438
|
}
|
|
167439
|
+
function ExtractUnion(types, right) {
|
|
167440
|
+
return types.reduce((result, head) => {
|
|
167441
|
+
return [...result, ...ExtractType(head, right)];
|
|
167442
|
+
}, []);
|
|
167443
|
+
}
|
|
167246
167444
|
function ExtractOperation(left, right) {
|
|
167247
|
-
const
|
|
167445
|
+
const evaluated = EvaluateType(left);
|
|
167446
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
167447
|
+
const remaining = ExtractUnion(canonical, right);
|
|
167248
167448
|
const result = EvaluateUnion(remaining);
|
|
167249
167449
|
return result;
|
|
167250
167450
|
}
|
|
167251
167451
|
|
|
167252
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167452
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/instantiate.mjs
|
|
167253
167453
|
function ExtractAction(left, right, options) {
|
|
167254
167454
|
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExtractOperation(left, right), {}, options) : ExtractDeferred(left, right, options);
|
|
167255
167455
|
return result;
|
|
@@ -167260,7 +167460,7 @@ function ExtractInstantiate(context, state, left, right, options) {
|
|
|
167260
167460
|
return ExtractAction(instantiatedLeft, instantiatedRight, options);
|
|
167261
167461
|
}
|
|
167262
167462
|
|
|
167263
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167463
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs
|
|
167264
167464
|
function KeysToLiterals(keys) {
|
|
167265
167465
|
return keys.reduce((result, left) => {
|
|
167266
167466
|
return IsLiteralValue(left) ? [...result, Literal(left)] : result;
|
|
@@ -167272,7 +167472,7 @@ function KeysToIndexer(keys) {
|
|
|
167272
167472
|
return result;
|
|
167273
167473
|
}
|
|
167274
167474
|
|
|
167275
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167475
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/indexed.mjs
|
|
167276
167476
|
function IndexDeferred(type, indexer, options = {}) {
|
|
167277
167477
|
return Deferred("Index", [type, indexer], options);
|
|
167278
167478
|
}
|
|
@@ -167281,14 +167481,21 @@ function Index(type, indexer_or_keys, options = {}) {
|
|
|
167281
167481
|
return IndexAction(type, indexer, options);
|
|
167282
167482
|
}
|
|
167283
167483
|
|
|
167284
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167484
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_cyclic.mjs
|
|
167285
167485
|
function FromCyclic(defs, ref2) {
|
|
167286
167486
|
const target2 = CyclicTarget(defs, ref2);
|
|
167287
167487
|
const result = FromType8(target2);
|
|
167288
167488
|
return result;
|
|
167289
167489
|
}
|
|
167290
167490
|
|
|
167291
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167491
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_dependent.mjs
|
|
167492
|
+
function FromDependent(if_, then_, else_) {
|
|
167493
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
167494
|
+
const result = FromType8(evaluated);
|
|
167495
|
+
return result;
|
|
167496
|
+
}
|
|
167497
|
+
|
|
167498
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_intersect.mjs
|
|
167292
167499
|
function CollapseIntersectProperties(left, right) {
|
|
167293
167500
|
const leftKeys = exports_guard.Keys(left).filter((key) => !exports_guard.HasPropertyKey(right, key));
|
|
167294
167501
|
const rightKeys = exports_guard.Keys(right).filter((key) => !exports_guard.HasPropertyKey(left, key));
|
|
@@ -167306,19 +167513,19 @@ function FromIntersect(types) {
|
|
|
167306
167513
|
}, {});
|
|
167307
167514
|
}
|
|
167308
167515
|
|
|
167309
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167310
|
-
function
|
|
167516
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
167517
|
+
function FromObject3(properties2) {
|
|
167311
167518
|
return properties2;
|
|
167312
167519
|
}
|
|
167313
167520
|
|
|
167314
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167521
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_tuple.mjs
|
|
167315
167522
|
function FromTuple(types) {
|
|
167316
167523
|
const object3 = TupleToObject(Tuple(types));
|
|
167317
167524
|
const result = FromType8(object3);
|
|
167318
167525
|
return result;
|
|
167319
167526
|
}
|
|
167320
167527
|
|
|
167321
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167528
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_union.mjs
|
|
167322
167529
|
function CollapseUnionProperties(left, right) {
|
|
167323
167530
|
const sharedKeys = exports_guard.Keys(left).filter((key) => (key in right));
|
|
167324
167531
|
const result = sharedKeys.reduce((result2, key) => {
|
|
@@ -167327,31 +167534,31 @@ function CollapseUnionProperties(left, right) {
|
|
|
167327
167534
|
return result;
|
|
167328
167535
|
}
|
|
167329
167536
|
function ReduceVariants(types, result) {
|
|
167330
|
-
return exports_guard.
|
|
167537
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType8(left))), () => result);
|
|
167331
167538
|
}
|
|
167332
167539
|
function FromUnion3(types) {
|
|
167333
|
-
return exports_guard.
|
|
167540
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType8(left)), () => Unreachable());
|
|
167334
167541
|
}
|
|
167335
167542
|
|
|
167336
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167543
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
167337
167544
|
function FromType8(type) {
|
|
167338
|
-
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ?
|
|
167545
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject3(type.properties) : {};
|
|
167339
167546
|
}
|
|
167340
167547
|
|
|
167341
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167548
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/collapse.mjs
|
|
167342
167549
|
function CollapseToObject(type) {
|
|
167343
167550
|
const properties2 = FromType8(type);
|
|
167344
167551
|
const result = _Object_(properties2);
|
|
167345
167552
|
return result;
|
|
167346
167553
|
}
|
|
167347
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167554
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys.mjs
|
|
167348
167555
|
var integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
167349
167556
|
function ConvertToIntegerKey(value) {
|
|
167350
167557
|
const normal = `${value}`;
|
|
167351
167558
|
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
167352
167559
|
}
|
|
167353
167560
|
|
|
167354
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167561
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_array.mjs
|
|
167355
167562
|
function NormalizeLiteral(value) {
|
|
167356
167563
|
return Literal(ConvertToIntegerKey(value));
|
|
167357
167564
|
}
|
|
@@ -167363,76 +167570,83 @@ function NormalizeIndexer(type) {
|
|
|
167363
167570
|
}
|
|
167364
167571
|
function FromArray2(type, indexer) {
|
|
167365
167572
|
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
167366
|
-
const check3 =
|
|
167573
|
+
const check3 = Extends({}, normalizedIndexer, Number2());
|
|
167367
167574
|
const result = exports_result.IsExtendsTrueLike(check3) ? type : IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Number2() : Never();
|
|
167368
167575
|
return result;
|
|
167369
167576
|
}
|
|
167370
167577
|
|
|
167371
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167578
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
167372
167579
|
function FromCyclic2(defs, ref2) {
|
|
167373
167580
|
const target2 = CyclicTarget(defs, ref2);
|
|
167374
167581
|
const result = FromType9(target2);
|
|
167375
167582
|
return result;
|
|
167376
167583
|
}
|
|
167377
167584
|
|
|
167378
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167379
|
-
function
|
|
167380
|
-
|
|
167381
|
-
|
|
167382
|
-
|
|
167585
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs
|
|
167586
|
+
function FromDependent2(if_, then_, else_) {
|
|
167587
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
167588
|
+
const result = FromType9(evaluated);
|
|
167589
|
+
return result;
|
|
167383
167590
|
}
|
|
167384
167591
|
|
|
167385
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167592
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_enum.mjs
|
|
167386
167593
|
function FromEnum(values) {
|
|
167387
|
-
const
|
|
167388
|
-
const result =
|
|
167594
|
+
const evaluated = EvaluateEnum(values);
|
|
167595
|
+
const result = FromType9(evaluated);
|
|
167389
167596
|
return result;
|
|
167390
167597
|
}
|
|
167391
167598
|
|
|
167392
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167599
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs
|
|
167393
167600
|
function FromIntersect2(types) {
|
|
167394
167601
|
const evaluated = EvaluateIntersect(types);
|
|
167395
167602
|
const result = FromType9(evaluated);
|
|
167396
167603
|
return result;
|
|
167397
167604
|
}
|
|
167398
167605
|
|
|
167399
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167606
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_literal.mjs
|
|
167400
167607
|
function FromLiteral4(value) {
|
|
167401
167608
|
const result = [`${value}`];
|
|
167402
167609
|
return result;
|
|
167403
167610
|
}
|
|
167404
167611
|
|
|
167405
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167612
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs
|
|
167406
167613
|
function FromTemplateLiteral2(pattern) {
|
|
167407
|
-
const
|
|
167408
|
-
const result = FromType9(
|
|
167614
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167615
|
+
const result = FromType9(evaluated);
|
|
167409
167616
|
return result;
|
|
167410
167617
|
}
|
|
167411
167618
|
|
|
167412
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167619
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_union.mjs
|
|
167620
|
+
function FromUnion4(types) {
|
|
167621
|
+
return types.reduce((result, left) => {
|
|
167622
|
+
return [...result, ...FromType9(left)];
|
|
167623
|
+
}, []);
|
|
167624
|
+
}
|
|
167625
|
+
|
|
167626
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_type.mjs
|
|
167413
167627
|
function FromType9(type) {
|
|
167414
|
-
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
167628
|
+
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsDependent(type) ? FromDependent2(type.if, type.then, type.else) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
167415
167629
|
}
|
|
167416
167630
|
|
|
167417
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167631
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs
|
|
167418
167632
|
function ToIndexableKeys(type) {
|
|
167419
167633
|
const result = FromType9(type);
|
|
167420
167634
|
return result;
|
|
167421
167635
|
}
|
|
167422
167636
|
|
|
167423
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167637
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/this/expand_this.mjs
|
|
167424
167638
|
function FromTypes5(properties2, types) {
|
|
167425
167639
|
return types.map((type) => FromType10(properties2, type));
|
|
167426
167640
|
}
|
|
167427
167641
|
function FromType10(properties2, type) {
|
|
167428
|
-
return IsArray2(type) ? _Array_(FromType10(properties2, type.items)) :
|
|
167642
|
+
return IsArray2(type) ? _Array_(FromType10(properties2, type.items)) : IsConstructor2(type) ? Constructor(FromTypes5(properties2, type.parameters), FromType10(properties2, type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes5(properties2, type.parameters), FromType10(properties2, type.returnType)) : IsTuple(type) ? Tuple(FromTypes5(properties2, type.items)) : IsUnion(type) ? Union(FromTypes5(properties2, type.anyOf)) : IsIntersect(type) ? Intersect(FromTypes5(properties2, type.allOf)) : IsThis(type) ? _Object_(properties2) : type;
|
|
167429
167643
|
}
|
|
167430
167644
|
function ExpandThis(properties2, type) {
|
|
167431
167645
|
const result = FromType10(properties2, type);
|
|
167432
167646
|
return result;
|
|
167433
167647
|
}
|
|
167434
167648
|
|
|
167435
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167649
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_object.mjs
|
|
167436
167650
|
function IndexProperty(properties2, key) {
|
|
167437
167651
|
const selectedType = key in properties2 ? properties2[key] : Never();
|
|
167438
167652
|
const result = ExpandThis(properties2, selectedType);
|
|
@@ -167461,12 +167675,12 @@ function FromIndexerNumber(properties2) {
|
|
|
167461
167675
|
const result = EvaluateUnion(variants);
|
|
167462
167676
|
return result;
|
|
167463
167677
|
}
|
|
167464
|
-
function
|
|
167465
|
-
const result =
|
|
167678
|
+
function FromObject4(properties2, indexer) {
|
|
167679
|
+
const result = IsNumber3(indexer) ? FromIndexerNumber(properties2) : FromIndexer(properties2, indexer);
|
|
167466
167680
|
return result;
|
|
167467
167681
|
}
|
|
167468
167682
|
|
|
167469
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167683
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs
|
|
167470
167684
|
function ConvertLiteral(value) {
|
|
167471
167685
|
return Literal(ConvertToIntegerKey(value));
|
|
167472
167686
|
}
|
|
@@ -167477,10 +167691,10 @@ function FormatArrayIndexer(type) {
|
|
|
167477
167691
|
return IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) : IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) : IsLiteral(type) ? ConvertLiteral(type.const) : type;
|
|
167478
167692
|
}
|
|
167479
167693
|
|
|
167480
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167694
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
167481
167695
|
function IndexElementsWithIndexer(types, indexer) {
|
|
167482
167696
|
return types.reduceRight((result, right, index) => {
|
|
167483
|
-
const check3 =
|
|
167697
|
+
const check3 = Extends({}, Literal(index), indexer);
|
|
167484
167698
|
return exports_result.IsExtendsTrueLike(check3) ? [right, ...result] : result;
|
|
167485
167699
|
}, []);
|
|
167486
167700
|
}
|
|
@@ -167493,17 +167707,17 @@ function FromTupleWithoutIndexer(types) {
|
|
|
167493
167707
|
return EvaluateUnionFast(types);
|
|
167494
167708
|
}
|
|
167495
167709
|
function FromTuple2(types, indexer) {
|
|
167496
|
-
return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) :
|
|
167710
|
+
return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber3(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer);
|
|
167497
167711
|
}
|
|
167498
167712
|
|
|
167499
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167713
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
167500
167714
|
function FromType11(type, indexer) {
|
|
167501
|
-
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ?
|
|
167715
|
+
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
167502
167716
|
}
|
|
167503
167717
|
|
|
167504
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167718
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/instantiate.mjs
|
|
167505
167719
|
function NormalizeType(type) {
|
|
167506
|
-
const result = IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167720
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167507
167721
|
return result;
|
|
167508
167722
|
}
|
|
167509
167723
|
function IndexAction(type, indexer, options) {
|
|
@@ -167516,7 +167730,7 @@ function IndexInstantiate(context, state, type, indexer, options) {
|
|
|
167516
167730
|
return IndexAction(instantiatedType, instantiatedIndexer, options);
|
|
167517
167731
|
}
|
|
167518
167732
|
|
|
167519
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167733
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/instance_type.mjs
|
|
167520
167734
|
function InstanceTypeDeferred(type, options = {}) {
|
|
167521
167735
|
return Deferred("InstanceType", [type], options);
|
|
167522
167736
|
}
|
|
@@ -167524,7 +167738,7 @@ function InstanceType(type, options = {}) {
|
|
|
167524
167738
|
return InstanceTypeAction(type, options);
|
|
167525
167739
|
}
|
|
167526
167740
|
|
|
167527
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167741
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs
|
|
167528
167742
|
function InstanceTypeOperation(type) {
|
|
167529
167743
|
return IsConstructor2(type) ? type["instanceType"] : Never();
|
|
167530
167744
|
}
|
|
@@ -167537,7 +167751,7 @@ function InstanceTypeInstantiate(context, state, type, options = {}) {
|
|
|
167537
167751
|
return InstanceTypeAction(instantiatedType, options);
|
|
167538
167752
|
}
|
|
167539
167753
|
|
|
167540
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167754
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/keyof.mjs
|
|
167541
167755
|
function KeyOfDeferred(type, options = {}) {
|
|
167542
167756
|
return Deferred("KeyOf", [type], options);
|
|
167543
167757
|
}
|
|
@@ -167545,49 +167759,49 @@ function KeyOf2(type, options = {}) {
|
|
|
167545
167759
|
return KeyOfAction(type, options);
|
|
167546
167760
|
}
|
|
167547
167761
|
|
|
167548
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167762
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_any.mjs
|
|
167549
167763
|
function FromAny() {
|
|
167550
167764
|
return Union([Number2(), String2(), Symbol2()]);
|
|
167551
167765
|
}
|
|
167552
167766
|
|
|
167553
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167767
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
167554
167768
|
function FromArray3(_type) {
|
|
167555
167769
|
return Number2();
|
|
167556
167770
|
}
|
|
167557
167771
|
|
|
167558
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167772
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_object.mjs
|
|
167559
167773
|
function FromPropertyKeys(keys) {
|
|
167560
167774
|
const result = keys.reduce((result2, left) => {
|
|
167561
167775
|
return IsLiteralValue(left) ? [...result2, Literal(ConvertToIntegerKey(left))] : Unreachable();
|
|
167562
167776
|
}, []);
|
|
167563
167777
|
return result;
|
|
167564
167778
|
}
|
|
167565
|
-
function
|
|
167779
|
+
function FromObject5(properties2) {
|
|
167566
167780
|
const propertyKeys = exports_guard.Keys(properties2);
|
|
167567
167781
|
const variants = FromPropertyKeys(propertyKeys);
|
|
167568
167782
|
const result = EvaluateUnionFast(variants);
|
|
167569
167783
|
return result;
|
|
167570
167784
|
}
|
|
167571
167785
|
|
|
167572
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167573
|
-
function
|
|
167786
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_record.mjs
|
|
167787
|
+
function FromRecord2(type) {
|
|
167574
167788
|
return RecordKey(type);
|
|
167575
167789
|
}
|
|
167576
167790
|
|
|
167577
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167791
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs
|
|
167578
167792
|
function FromTuple3(types) {
|
|
167579
167793
|
const result = types.map((_, index) => Literal(index));
|
|
167580
167794
|
return EvaluateUnionFast(result);
|
|
167581
167795
|
}
|
|
167582
167796
|
|
|
167583
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167797
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
167584
167798
|
function FromType12(type) {
|
|
167585
|
-
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ?
|
|
167799
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
167586
167800
|
}
|
|
167587
167801
|
|
|
167588
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167802
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/instantiate.mjs
|
|
167589
167803
|
function NormalizeType2(type) {
|
|
167590
|
-
const result = IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167804
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167591
167805
|
return result;
|
|
167592
167806
|
}
|
|
167593
167807
|
function KeyOfAction(type, options) {
|
|
@@ -167598,18 +167812,18 @@ function KeyOfInstantiate(context, state, type, options) {
|
|
|
167598
167812
|
return KeyOfAction(instantiatedType, options);
|
|
167599
167813
|
}
|
|
167600
167814
|
|
|
167601
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167815
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/mapped.mjs
|
|
167602
167816
|
function MappedDeferred(identifier2, type, as, property, options = {}) {
|
|
167603
167817
|
return Deferred("Mapped", [identifier2, type, as, property], options);
|
|
167604
167818
|
}
|
|
167605
|
-
function
|
|
167606
|
-
return MappedAction({},
|
|
167819
|
+
function Mapped(identifier2, type, as, property, options = {}) {
|
|
167820
|
+
return MappedAction({}, State([], []), identifier2, type, as, property, options);
|
|
167607
167821
|
}
|
|
167608
167822
|
|
|
167609
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167823
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs
|
|
167610
167824
|
function FromTemplateLiteral3(pattern) {
|
|
167611
|
-
const
|
|
167612
|
-
const result = FromType13(
|
|
167825
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167826
|
+
const result = FromType13(evaluated);
|
|
167613
167827
|
return result;
|
|
167614
167828
|
}
|
|
167615
167829
|
function FromUnion5(types) {
|
|
@@ -167617,12 +167831,17 @@ function FromUnion5(types) {
|
|
|
167617
167831
|
return [...result, ...FromType13(left)];
|
|
167618
167832
|
}, []);
|
|
167619
167833
|
}
|
|
167834
|
+
function FromEnum2(values) {
|
|
167835
|
+
const evaluated = EvaluateEnum(values);
|
|
167836
|
+
const result = FromType13(evaluated);
|
|
167837
|
+
return result;
|
|
167838
|
+
}
|
|
167620
167839
|
function FromLiteral5(value) {
|
|
167621
167840
|
const result = exports_guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
167622
167841
|
return result;
|
|
167623
167842
|
}
|
|
167624
167843
|
function FromType13(type) {
|
|
167625
|
-
const result = IsEnum(type) ?
|
|
167844
|
+
const result = IsEnum(type) ? FromEnum2(type.enum) : IsLiteral(type) ? FromLiteral5(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral3(type.pattern) : IsUnion(type) ? FromUnion5(type.anyOf) : [type];
|
|
167626
167845
|
return result;
|
|
167627
167846
|
}
|
|
167628
167847
|
function MappedVariants(type) {
|
|
@@ -167630,9 +167849,9 @@ function MappedVariants(type) {
|
|
|
167630
167849
|
return result;
|
|
167631
167850
|
}
|
|
167632
167851
|
|
|
167633
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167852
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs
|
|
167634
167853
|
function CanonicalAs(instantiatedAs) {
|
|
167635
|
-
const result = IsTemplateLiteral(instantiatedAs) ?
|
|
167854
|
+
const result = IsTemplateLiteral(instantiatedAs) ? EvaluateTemplateLiteral(instantiatedAs.pattern) : instantiatedAs;
|
|
167636
167855
|
return result;
|
|
167637
167856
|
}
|
|
167638
167857
|
function MappedVariant(context, state, identifier2, variant, as, property) {
|
|
@@ -167660,7 +167879,7 @@ function MappedOperation(context, state, identifier2, type, as, property) {
|
|
|
167660
167879
|
return result;
|
|
167661
167880
|
}
|
|
167662
167881
|
|
|
167663
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167882
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/instantiate.mjs
|
|
167664
167883
|
function MappedAction(context, state, identifier2, type, as, property, options) {
|
|
167665
167884
|
const result = CanInstantiate([type]) ? exports_memory.Update(MappedOperation(context, state, identifier2, type, as, property), {}, options) : MappedDeferred(identifier2, type, as, property, options);
|
|
167666
167885
|
return result;
|
|
@@ -167670,33 +167889,34 @@ function MappedInstantiate(context, state, identifier2, type, as, property, opti
|
|
|
167670
167889
|
return MappedAction(context, state, identifier2, instantiatedType, as, property, options);
|
|
167671
167890
|
}
|
|
167672
167891
|
|
|
167673
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167674
|
-
function InstantiateCyclics(context, cyclicKeys) {
|
|
167675
|
-
const
|
|
167676
|
-
|
|
167677
|
-
|
|
167892
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/module/instantiate.mjs
|
|
167893
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
167894
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
167895
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => cyclicKeys.includes(key));
|
|
167896
|
+
return declarationKeys.reduce((result, key) => {
|
|
167897
|
+
return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
|
|
167678
167898
|
}, {});
|
|
167679
167899
|
}
|
|
167680
|
-
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
167681
|
-
const
|
|
167682
|
-
|
|
167683
|
-
|
|
167900
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
167901
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
167902
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => !cyclicKeys.includes(key));
|
|
167903
|
+
return declarationKeys.reduce((result, key) => {
|
|
167904
|
+
return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
|
|
167684
167905
|
}, {});
|
|
167685
167906
|
}
|
|
167686
|
-
function InstantiateModule(context, options) {
|
|
167687
|
-
const cyclicCandidates = CyclicCandidates(
|
|
167688
|
-
const instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates);
|
|
167689
|
-
const instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates);
|
|
167907
|
+
function InstantiateModule(context, declarations, options) {
|
|
167908
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
167909
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
167910
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
167690
167911
|
const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
167691
167912
|
return exports_memory.Update(instantiatedModule, {}, options);
|
|
167692
167913
|
}
|
|
167693
|
-
function ModuleInstantiate(context, _state,
|
|
167694
|
-
const
|
|
167695
|
-
const instantiatedModule = InstantiateModule(moduleContext, options);
|
|
167914
|
+
function ModuleInstantiate(context, _state, declarations, options) {
|
|
167915
|
+
const instantiatedModule = InstantiateModule(context, declarations, options);
|
|
167696
167916
|
return instantiatedModule;
|
|
167697
167917
|
}
|
|
167698
167918
|
|
|
167699
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167919
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/non_nullable.mjs
|
|
167700
167920
|
function NonNullableDeferred(type, options = {}) {
|
|
167701
167921
|
return Deferred("NonNullable", [type], options);
|
|
167702
167922
|
}
|
|
@@ -167704,7 +167924,7 @@ function NonNullable(type, options = {}) {
|
|
|
167704
167924
|
return NonNullableAction(type, options);
|
|
167705
167925
|
}
|
|
167706
167926
|
|
|
167707
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167927
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs
|
|
167708
167928
|
function NonNullableOperation(type) {
|
|
167709
167929
|
const excluded = Union([Null(), Undefined()]);
|
|
167710
167930
|
return ExcludeAction(type, excluded, {});
|
|
@@ -167718,7 +167938,7 @@ function NonNullableInstantiate(context, state, type, options) {
|
|
|
167718
167938
|
return NonNullableAction(instantiatedType, options);
|
|
167719
167939
|
}
|
|
167720
167940
|
|
|
167721
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167941
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/omit.mjs
|
|
167722
167942
|
function OmitDeferred(type, indexer, options = {}) {
|
|
167723
167943
|
return Deferred("Omit", [type, indexer], options);
|
|
167724
167944
|
}
|
|
@@ -167727,14 +167947,14 @@ function Omit(type, indexer_or_keys, options = {}) {
|
|
|
167727
167947
|
return OmitAction(type, indexer, options);
|
|
167728
167948
|
}
|
|
167729
167949
|
|
|
167730
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167950
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs
|
|
167731
167951
|
function ToIndexable(type) {
|
|
167732
167952
|
const collapsed = CollapseToObject(type);
|
|
167733
167953
|
const result = IsObject2(collapsed) ? collapsed.properties : Unreachable();
|
|
167734
167954
|
return result;
|
|
167735
167955
|
}
|
|
167736
167956
|
|
|
167737
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167957
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/from_type.mjs
|
|
167738
167958
|
function FromKeys(properties2, keys) {
|
|
167739
167959
|
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
167740
167960
|
return keys.includes(key) ? result2 : { ...result2, [key]: properties2[key] };
|
|
@@ -167749,7 +167969,7 @@ function FromType14(type, indexer) {
|
|
|
167749
167969
|
return result;
|
|
167750
167970
|
}
|
|
167751
167971
|
|
|
167752
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167972
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/instantiate.mjs
|
|
167753
167973
|
function OmitAction(type, indexer, options) {
|
|
167754
167974
|
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType14(type, indexer), {}, options) : OmitDeferred(type, indexer, options);
|
|
167755
167975
|
return result;
|
|
@@ -167760,25 +167980,7 @@ function OmitInstantiate(context, state, type, indexer, options) {
|
|
|
167760
167980
|
return OmitAction(instantiatedType, instantiatedIndexer, options);
|
|
167761
167981
|
}
|
|
167762
167982
|
|
|
167763
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167764
|
-
function OptionsDeferred(type, options) {
|
|
167765
|
-
return Deferred("Options", [type, options], {});
|
|
167766
|
-
}
|
|
167767
|
-
function Options2(type, options) {
|
|
167768
|
-
return OptionsAction(type, options);
|
|
167769
|
-
}
|
|
167770
|
-
|
|
167771
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/engine/options/instantiate.mjs
|
|
167772
|
-
function OptionsAction(type, options) {
|
|
167773
|
-
const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : OptionsDeferred(type, options);
|
|
167774
|
-
return result;
|
|
167775
|
-
}
|
|
167776
|
-
function OptionsInstantiate(context, state, type, options) {
|
|
167777
|
-
const instaniatedType = InstantiateType(context, state, type);
|
|
167778
|
-
return OptionsAction(instaniatedType, options);
|
|
167779
|
-
}
|
|
167780
|
-
|
|
167781
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/action/parameters.mjs
|
|
167983
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/parameters.mjs
|
|
167782
167984
|
function ParametersDeferred(type, options = {}) {
|
|
167783
167985
|
return Deferred("Parameters", [type], options);
|
|
167784
167986
|
}
|
|
@@ -167786,10 +167988,10 @@ function Parameters(type, options = {}) {
|
|
|
167786
167988
|
return ParametersAction(type, options);
|
|
167787
167989
|
}
|
|
167788
167990
|
|
|
167789
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167991
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/parameters/instantiate.mjs
|
|
167790
167992
|
function ParametersOperation(type) {
|
|
167791
167993
|
const parameters = IsFunction2(type) ? type["parameters"] : [];
|
|
167792
|
-
const instantiatedParameters = InstantiateElements({},
|
|
167994
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
167793
167995
|
const result = Tuple(instantiatedParameters);
|
|
167794
167996
|
return result;
|
|
167795
167997
|
}
|
|
@@ -167802,7 +168004,7 @@ function ParametersInstantiate(context, state, type, options) {
|
|
|
167802
168004
|
return ParametersAction(instantiatedType, options);
|
|
167803
168005
|
}
|
|
167804
168006
|
|
|
167805
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168007
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/partial.mjs
|
|
167806
168008
|
function PartialDeferred(type, options = {}) {
|
|
167807
168009
|
return Deferred("Partial", [type], options);
|
|
167808
168010
|
}
|
|
@@ -167810,7 +168012,7 @@ function Partial(type, options = {}) {
|
|
|
167810
168012
|
return PartialAction(type, options);
|
|
167811
168013
|
}
|
|
167812
168014
|
|
|
167813
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168015
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs
|
|
167814
168016
|
function FromCyclic3(defs, ref2) {
|
|
167815
168017
|
const target2 = CyclicTarget(defs, ref2);
|
|
167816
168018
|
const partial2 = FromType15(target2);
|
|
@@ -167818,33 +168020,41 @@ function FromCyclic3(defs, ref2) {
|
|
|
167818
168020
|
return result;
|
|
167819
168021
|
}
|
|
167820
168022
|
|
|
167821
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168023
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_dependent.mjs
|
|
168024
|
+
function FromDependent3(if_, then_, else_) {
|
|
168025
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168026
|
+
const result = FromType15(evaluated);
|
|
168027
|
+
return result;
|
|
168028
|
+
}
|
|
168029
|
+
|
|
168030
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_intersect.mjs
|
|
167822
168031
|
function FromIntersect3(types) {
|
|
167823
|
-
const
|
|
167824
|
-
|
|
168032
|
+
const evaluated = EvaluateIntersect(types);
|
|
168033
|
+
const result = FromType15(evaluated);
|
|
168034
|
+
return result;
|
|
167825
168035
|
}
|
|
167826
168036
|
|
|
167827
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168037
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_union.mjs
|
|
167828
168038
|
function FromUnion6(types) {
|
|
167829
168039
|
const result = types.map((type) => FromType15(type));
|
|
167830
168040
|
return Union(result);
|
|
167831
168041
|
}
|
|
167832
168042
|
|
|
167833
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167834
|
-
function
|
|
168043
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
168044
|
+
function FromObject6(properties2) {
|
|
167835
168045
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167836
|
-
return { ...result2, [left]:
|
|
168046
|
+
return { ...result2, [left]: AddOptional(properties2[left]) };
|
|
167837
168047
|
}, {});
|
|
167838
168048
|
const result = _Object_(mapped);
|
|
167839
168049
|
return result;
|
|
167840
168050
|
}
|
|
167841
168051
|
|
|
167842
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168052
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
167843
168053
|
function FromType15(type) {
|
|
167844
|
-
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ?
|
|
168054
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject6(type.properties) : _Object_({});
|
|
167845
168055
|
}
|
|
167846
168056
|
|
|
167847
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168057
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/instantiate.mjs
|
|
167848
168058
|
function PartialAction(type, options) {
|
|
167849
168059
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType15(type), {}, options) : PartialDeferred(type, options);
|
|
167850
168060
|
return result;
|
|
@@ -167854,7 +168064,7 @@ function PartialInstantiate(context, state, type, options) {
|
|
|
167854
168064
|
return PartialAction(instantiatedType, options);
|
|
167855
168065
|
}
|
|
167856
168066
|
|
|
167857
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168067
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/pick.mjs
|
|
167858
168068
|
function PickDeferred(type, indexer, options = {}) {
|
|
167859
168069
|
return Deferred("Pick", [type, indexer], options);
|
|
167860
168070
|
}
|
|
@@ -167863,7 +168073,7 @@ function Pick(type, indexer_or_keys, options = {}) {
|
|
|
167863
168073
|
return PickAction(type, indexer, options);
|
|
167864
168074
|
}
|
|
167865
168075
|
|
|
167866
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168076
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/from_type.mjs
|
|
167867
168077
|
function FromKeys2(properties2, keys) {
|
|
167868
168078
|
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
167869
168079
|
return keys.includes(key) ? exports_memory.Assign(result2, { [key]: properties2[key] }) : result2;
|
|
@@ -167878,7 +168088,7 @@ function FromType16(type, indexer) {
|
|
|
167878
168088
|
return result;
|
|
167879
168089
|
}
|
|
167880
168090
|
|
|
167881
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168091
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/instantiate.mjs
|
|
167882
168092
|
function PickAction(type, indexer, options) {
|
|
167883
168093
|
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType16(type, indexer), {}, options) : PickDeferred(type, indexer, options);
|
|
167884
168094
|
return result;
|
|
@@ -167889,22 +168099,21 @@ function PickInstantiate(context, state, type, indexer, options) {
|
|
|
167889
168099
|
return PickAction(instantiatedType, instantiatedIndexer, options);
|
|
167890
168100
|
}
|
|
167891
168101
|
|
|
167892
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168102
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/readonly_object.mjs
|
|
167893
168103
|
function ReadonlyObjectDeferred(type, options = {}) {
|
|
167894
168104
|
return Deferred("ReadonlyObject", [type], options);
|
|
167895
168105
|
}
|
|
167896
168106
|
function ReadonlyObject(type, options = {}) {
|
|
167897
168107
|
return ReadonlyObjectAction(type, options);
|
|
167898
168108
|
}
|
|
167899
|
-
var ReadonlyType = ReadonlyObject;
|
|
167900
168109
|
|
|
167901
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168110
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
167902
168111
|
function FromArray4(type) {
|
|
167903
|
-
const result =
|
|
168112
|
+
const result = AddImmutable(_Array_(type));
|
|
167904
168113
|
return result;
|
|
167905
168114
|
}
|
|
167906
168115
|
|
|
167907
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168116
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs
|
|
167908
168117
|
function FromCyclic4(defs, ref2) {
|
|
167909
168118
|
const target2 = CyclicTarget(defs, ref2);
|
|
167910
168119
|
const partial2 = FromType17(target2);
|
|
@@ -167912,39 +168121,47 @@ function FromCyclic4(defs, ref2) {
|
|
|
167912
168121
|
return result;
|
|
167913
168122
|
}
|
|
167914
168123
|
|
|
167915
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168124
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs
|
|
168125
|
+
function FromDependent4(if_, then_, else_) {
|
|
168126
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168127
|
+
const result = FromType17(evaluated);
|
|
168128
|
+
return result;
|
|
168129
|
+
}
|
|
168130
|
+
|
|
168131
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs
|
|
167916
168132
|
function FromIntersect4(types) {
|
|
167917
|
-
const
|
|
167918
|
-
|
|
168133
|
+
const evaluated = EvaluateIntersect(types);
|
|
168134
|
+
const result = FromType17(evaluated);
|
|
168135
|
+
return result;
|
|
167919
168136
|
}
|
|
167920
168137
|
|
|
167921
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167922
|
-
function
|
|
168138
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
168139
|
+
function FromObject7(properties2) {
|
|
167923
168140
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167924
|
-
return { ...result2, [left]:
|
|
168141
|
+
return { ...result2, [left]: AddReadonly(properties2[left]) };
|
|
167925
168142
|
}, {});
|
|
167926
168143
|
const result = _Object_(mapped);
|
|
167927
168144
|
return result;
|
|
167928
168145
|
}
|
|
167929
168146
|
|
|
167930
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168147
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs
|
|
167931
168148
|
function FromTuple4(types) {
|
|
167932
|
-
const result =
|
|
168149
|
+
const result = AddImmutable(Tuple(types));
|
|
167933
168150
|
return result;
|
|
167934
168151
|
}
|
|
167935
168152
|
|
|
167936
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168153
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs
|
|
167937
168154
|
function FromUnion7(types) {
|
|
167938
168155
|
const result = types.map((type) => FromType17(type));
|
|
167939
168156
|
return Union(result);
|
|
167940
168157
|
}
|
|
167941
168158
|
|
|
167942
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168159
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
167943
168160
|
function FromType17(type) {
|
|
167944
|
-
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ?
|
|
168161
|
+
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
167945
168162
|
}
|
|
167946
168163
|
|
|
167947
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168164
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
|
|
167948
168165
|
function ReadonlyObjectAction(type, options) {
|
|
167949
168166
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType17(type), {}, options) : ReadonlyObjectDeferred(type);
|
|
167950
168167
|
return result;
|
|
@@ -167954,12 +168171,12 @@ function ReadonlyObjectInstantiate(context, state, type, options) {
|
|
|
167954
168171
|
return ReadonlyObjectAction(instantiatedType, options);
|
|
167955
168172
|
}
|
|
167956
168173
|
|
|
167957
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168174
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/ref/instantiate.mjs
|
|
167958
168175
|
function RefInstantiate(context, state, type, ref2) {
|
|
167959
|
-
return ref2
|
|
168176
|
+
return state.visited.includes(ref2) ? type : (ref2 in context) ? InstantiateType(context, State(state["callstack"], [...state["visited"], ref2]), context[ref2]) : type;
|
|
167960
168177
|
}
|
|
167961
168178
|
|
|
167962
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168179
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_cyclic.mjs
|
|
167963
168180
|
function FromCyclic5(defs, ref2) {
|
|
167964
168181
|
const target2 = CyclicTarget(defs, ref2);
|
|
167965
168182
|
const partial2 = FromType18(target2);
|
|
@@ -167967,33 +168184,41 @@ function FromCyclic5(defs, ref2) {
|
|
|
167967
168184
|
return result;
|
|
167968
168185
|
}
|
|
167969
168186
|
|
|
167970
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168187
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_dependent.mjs
|
|
168188
|
+
function FromDependent5(if_, then_, else_) {
|
|
168189
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168190
|
+
const result = FromType18(evaluated);
|
|
168191
|
+
return result;
|
|
168192
|
+
}
|
|
168193
|
+
|
|
168194
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_intersect.mjs
|
|
167971
168195
|
function FromIntersect5(types) {
|
|
167972
|
-
const
|
|
167973
|
-
|
|
168196
|
+
const evaluated = EvaluateIntersect(types);
|
|
168197
|
+
const result = FromType18(evaluated);
|
|
168198
|
+
return result;
|
|
167974
168199
|
}
|
|
167975
168200
|
|
|
167976
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168201
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_union.mjs
|
|
167977
168202
|
function FromUnion8(types) {
|
|
167978
168203
|
const result = types.map((type) => FromType18(type));
|
|
167979
168204
|
return Union(result);
|
|
167980
168205
|
}
|
|
167981
168206
|
|
|
167982
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167983
|
-
function
|
|
168207
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
168208
|
+
function FromObject8(properties2) {
|
|
167984
168209
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167985
|
-
return { ...result2, [left]:
|
|
168210
|
+
return { ...result2, [left]: RemoveOptional(properties2[left]) };
|
|
167986
168211
|
}, {});
|
|
167987
168212
|
const result = _Object_(mapped);
|
|
167988
168213
|
return result;
|
|
167989
168214
|
}
|
|
167990
168215
|
|
|
167991
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168216
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
167992
168217
|
function FromType18(type) {
|
|
167993
|
-
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ?
|
|
168218
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject8(type.properties) : _Object_({});
|
|
167994
168219
|
}
|
|
167995
168220
|
|
|
167996
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168221
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/required.mjs
|
|
167997
168222
|
function RequiredDeferred(type, options = {}) {
|
|
167998
168223
|
return Deferred("Required", [type], options);
|
|
167999
168224
|
}
|
|
@@ -168001,7 +168226,7 @@ function Required(type, options = {}) {
|
|
|
168001
168226
|
return RequiredAction(type, options);
|
|
168002
168227
|
}
|
|
168003
168228
|
|
|
168004
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168229
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/instantiate.mjs
|
|
168005
168230
|
function RequiredAction(type, options) {
|
|
168006
168231
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType18(type), {}, options) : RequiredDeferred(type, options);
|
|
168007
168232
|
return result;
|
|
@@ -168011,7 +168236,7 @@ function RequiredInstantiate(context, state, type, options) {
|
|
|
168011
168236
|
return RequiredAction(instaniatedType, options);
|
|
168012
168237
|
}
|
|
168013
168238
|
|
|
168014
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168239
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/return_type.mjs
|
|
168015
168240
|
function ReturnTypeDeferred(type, options = {}) {
|
|
168016
168241
|
return Deferred("ReturnType", [type], options);
|
|
168017
168242
|
}
|
|
@@ -168019,7 +168244,7 @@ function ReturnType(type, options = {}) {
|
|
|
168019
168244
|
return ReturnTypeAction(type, options);
|
|
168020
168245
|
}
|
|
168021
168246
|
|
|
168022
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168247
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/return_type/instantiate.mjs
|
|
168023
168248
|
function ReturnTypeOperation(type) {
|
|
168024
168249
|
return IsFunction2(type) ? type["returnType"] : Never();
|
|
168025
168250
|
}
|
|
@@ -168032,7 +168257,25 @@ function ReturnTypeInstantiate(context, state, type, options = {}) {
|
|
|
168032
168257
|
return ReturnTypeAction(instantiatedType, options);
|
|
168033
168258
|
}
|
|
168034
168259
|
|
|
168035
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168260
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/with.mjs
|
|
168261
|
+
function WithDeferred(type, options) {
|
|
168262
|
+
return Deferred("With", [type, options], {});
|
|
168263
|
+
}
|
|
168264
|
+
function With2(type, options) {
|
|
168265
|
+
return WithAction(type, options);
|
|
168266
|
+
}
|
|
168267
|
+
|
|
168268
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/with/instantiate.mjs
|
|
168269
|
+
function WithAction(type, options) {
|
|
168270
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : WithDeferred(type, options);
|
|
168271
|
+
return result;
|
|
168272
|
+
}
|
|
168273
|
+
function WithInstantiate(context, state, type, options) {
|
|
168274
|
+
const instaniatedType = InstantiateType(context, state, type);
|
|
168275
|
+
return WithAction(instaniatedType, options);
|
|
168276
|
+
}
|
|
168277
|
+
|
|
168278
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/rest/spread.mjs
|
|
168036
168279
|
function SpreadElement(type) {
|
|
168037
168280
|
const result = IsRest(type) ? IsTuple(type.items) ? RestSpread(type.items.items) : IsInfer(type.items) ? [type] : IsRef(type.items) ? [type] : [Never()] : [type];
|
|
168038
168281
|
return result;
|
|
@@ -168043,18 +168286,12 @@ function RestSpread(types) {
|
|
|
168043
168286
|
}, []);
|
|
168044
168287
|
return result;
|
|
168045
168288
|
}
|
|
168046
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168047
|
-
function
|
|
168048
|
-
return
|
|
168049
|
-
}
|
|
168050
|
-
function ModifierActions(type, readonly2, optional2) {
|
|
168051
|
-
return IsReadonlyRemoveAction(type) ? ModifierActions(type.type, "remove", optional2) : IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly2, "remove") : IsReadonlyAddAction(type) ? ModifierActions(type.type, "add", optional2) : IsOptionalAddAction(type) ? ModifierActions(type.type, readonly2, "add") : [type, readonly2, optional2];
|
|
168052
|
-
}
|
|
168053
|
-
function ApplyReadonly2(action, type) {
|
|
168054
|
-
return exports_guard.IsEqual(action, "remove") ? ReadonlyRemove(type) : exports_guard.IsEqual(action, "add") ? ReadonlyAdd(type) : type;
|
|
168289
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instantiate.mjs
|
|
168290
|
+
function State(callstack, visited) {
|
|
168291
|
+
return { callstack, visited };
|
|
168055
168292
|
}
|
|
168056
|
-
function
|
|
168057
|
-
return exports_guard.
|
|
168293
|
+
function CanInstantiate(types) {
|
|
168294
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsRef(left) ? false : CanInstantiate(right), () => true);
|
|
168058
168295
|
}
|
|
168059
168296
|
function InstantiateProperties(context, state, properties2) {
|
|
168060
168297
|
return exports_guard.Keys(properties2).reduce((result, key) => {
|
|
@@ -168069,70 +168306,77 @@ function InstantiateElements(context, state, types) {
|
|
|
168069
168306
|
function InstantiateTypes(context, state, types) {
|
|
168070
168307
|
return types.map((type) => InstantiateType(context, state, type));
|
|
168071
168308
|
}
|
|
168309
|
+
function WithModifiers(type, instantiatedType) {
|
|
168310
|
+
const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;
|
|
168311
|
+
const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;
|
|
168312
|
+
const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;
|
|
168313
|
+
return withImmutable;
|
|
168314
|
+
}
|
|
168072
168315
|
function InstantiateDeferred(context, state, action, parameters, options) {
|
|
168073
|
-
return exports_guard.IsEqual(action, "
|
|
168074
|
-
}
|
|
168075
|
-
function
|
|
168076
|
-
const
|
|
168077
|
-
const
|
|
168078
|
-
const type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0];
|
|
168079
|
-
const instantiated = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray2(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsAsyncIterator2(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor2(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : IsFunction2(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsIterator2(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) : IsObject2(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsPromise(type) ? _Promise_(InstantiateType(context, state, type.item), PromiseOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
168080
|
-
const withImmutable = immutable ? Immutable(instantiated) : instantiated;
|
|
168081
|
-
const withModifiers = ApplyReadonly2(modifiers[1], ApplyOptional2(modifiers[2], withImmutable));
|
|
168316
|
+
return exports_guard.IsEqual(action, "AddImmutable") ? AddImmutableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveImmutable") ? RemoveImmutableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "AddReadonly") ? AddReadonlyInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveReadonly") ? RemoveReadonlyInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "AddOptional") ? AddOptionalInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveOptional") ? RemoveOptionalInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : exports_guard.IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : exports_guard.IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "With") ? WithInstantiate(context, state, parameters[0], parameters[1]) : Deferred(action, parameters, options);
|
|
168317
|
+
}
|
|
168318
|
+
function InstantiateImmediate(context, state, type) {
|
|
168319
|
+
const instantiatedType = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray2(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor2(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsFunction2(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsObject2(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
168320
|
+
const withModifiers = WithModifiers(type, instantiatedType);
|
|
168082
168321
|
return withModifiers;
|
|
168083
168322
|
}
|
|
168323
|
+
function InstantiateType(context, state, type) {
|
|
168324
|
+
const result = IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : InstantiateImmediate(context, state, type);
|
|
168325
|
+
return result;
|
|
168326
|
+
}
|
|
168084
168327
|
function Instantiate(context, type) {
|
|
168085
|
-
return InstantiateType(context,
|
|
168328
|
+
return InstantiateType(context, State([], []), type);
|
|
168086
168329
|
}
|
|
168087
168330
|
|
|
168088
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168089
|
-
function
|
|
168090
|
-
return
|
|
168331
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
168332
|
+
function AddImmutableOperation(type) {
|
|
168333
|
+
return exports_memory.Update(type, { "~immutable": true }, {});
|
|
168091
168334
|
}
|
|
168092
|
-
function
|
|
168093
|
-
const result =
|
|
168335
|
+
function AddImmutableAction(type, options) {
|
|
168336
|
+
const result = exports_memory.Update(AddImmutableOperation(type), {}, options);
|
|
168094
168337
|
return result;
|
|
168095
168338
|
}
|
|
168096
|
-
function
|
|
168339
|
+
function AddImmutableInstantiate(context, state, type, options) {
|
|
168097
168340
|
const instantiatedType = InstantiateType(context, state, type);
|
|
168098
|
-
return
|
|
168341
|
+
return AddImmutableAction(instantiatedType, options);
|
|
168099
168342
|
}
|
|
168100
168343
|
|
|
168101
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168102
|
-
function
|
|
168103
|
-
return Deferred("
|
|
168344
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_immutable.mjs
|
|
168345
|
+
function AddImmutableDeferred(type, options = {}) {
|
|
168346
|
+
return Deferred("AddImmutable", [type], options);
|
|
168104
168347
|
}
|
|
168105
|
-
function
|
|
168106
|
-
return
|
|
168348
|
+
function AddImmutable(type, options = {}) {
|
|
168349
|
+
return AddImmutableAction(type, options);
|
|
168107
168350
|
}
|
|
168108
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168351
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/evaluate.mjs
|
|
168109
168352
|
function EvaluateDeferred(type, options = {}) {
|
|
168110
168353
|
return Deferred("Evaluate", [type], options);
|
|
168111
168354
|
}
|
|
168112
168355
|
function Evaluate(type, options = {}) {
|
|
168113
168356
|
return EvaluateAction(type, options);
|
|
168114
168357
|
}
|
|
168115
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168116
|
-
function ModuleDeferred(
|
|
168117
|
-
return Deferred("Module", [
|
|
168358
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/module.mjs
|
|
168359
|
+
function ModuleDeferred(declarations, options = {}) {
|
|
168360
|
+
return Deferred("Module", [declarations], options);
|
|
168118
168361
|
}
|
|
168119
|
-
function Module2(
|
|
168120
|
-
return
|
|
168362
|
+
function Module2(declarations, options = {}) {
|
|
168363
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
168121
168364
|
}
|
|
168122
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168365
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/script.mjs
|
|
168123
168366
|
function Script2(...args) {
|
|
168124
|
-
const [context, input,
|
|
168125
|
-
2: (script,
|
|
168126
|
-
3: (context2, script,
|
|
168367
|
+
const [context, input, options] = exports_arguments.Match(args, {
|
|
168368
|
+
2: (script, options2) => exports_guard.IsString(script) ? [{}, script, options2] : [script, options2, {}],
|
|
168369
|
+
3: (context2, script, options2) => [context2, script, options2],
|
|
168127
168370
|
1: (script) => [{}, script, {}]
|
|
168128
168371
|
});
|
|
168129
168372
|
const result = Script(input);
|
|
168130
|
-
const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context,
|
|
168131
|
-
return exports_memory.Update(parsed, {},
|
|
168373
|
+
const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context, State([], []), result[0]) : Never();
|
|
168374
|
+
return exports_memory.Update(parsed, {}, options);
|
|
168132
168375
|
}
|
|
168133
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168376
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/typebox.mjs
|
|
168134
168377
|
var exports_typebox = {};
|
|
168135
168378
|
__export(exports_typebox, {
|
|
168379
|
+
With: () => With2,
|
|
168136
168380
|
Void: () => Void,
|
|
168137
168381
|
Uppercase: () => Uppercase,
|
|
168138
168382
|
Unsafe: () => Unsafe,
|
|
@@ -168155,15 +168399,12 @@ __export(exports_typebox, {
|
|
|
168155
168399
|
RecordPattern: () => RecordPattern,
|
|
168156
168400
|
RecordKey: () => RecordKey,
|
|
168157
168401
|
Record: () => Record,
|
|
168158
|
-
ReadonlyType: () => ReadonlyType,
|
|
168159
168402
|
ReadonlyObject: () => ReadonlyObject,
|
|
168160
168403
|
Readonly: () => Readonly,
|
|
168161
|
-
Promise: () => _Promise_,
|
|
168162
168404
|
Pick: () => Pick,
|
|
168163
168405
|
Partial: () => Partial,
|
|
168164
168406
|
Parameters: () => Parameters,
|
|
168165
168407
|
Parameter: () => Parameter,
|
|
168166
|
-
Options: () => Options2,
|
|
168167
168408
|
Optional: () => Optional,
|
|
168168
168409
|
Omit: () => Omit,
|
|
168169
168410
|
Object: () => _Object_,
|
|
@@ -168172,11 +168413,10 @@ __export(exports_typebox, {
|
|
|
168172
168413
|
NonNullable: () => NonNullable,
|
|
168173
168414
|
Never: () => Never,
|
|
168174
168415
|
Module: () => Module2,
|
|
168175
|
-
Mapped: () =>
|
|
168416
|
+
Mapped: () => Mapped,
|
|
168176
168417
|
Lowercase: () => Lowercase,
|
|
168177
168418
|
Literal: () => Literal,
|
|
168178
168419
|
KeyOf: () => KeyOf2,
|
|
168179
|
-
Iterator: () => Iterator,
|
|
168180
168420
|
IsVoid: () => IsVoid,
|
|
168181
168421
|
IsUnsafe: () => IsUnsafe,
|
|
168182
168422
|
IsUnknown: () => IsUnknown,
|
|
@@ -168186,23 +168426,21 @@ __export(exports_typebox, {
|
|
|
168186
168426
|
IsThis: () => IsThis,
|
|
168187
168427
|
IsTemplateLiteral: () => IsTemplateLiteral,
|
|
168188
168428
|
IsSymbol: () => IsSymbol2,
|
|
168189
|
-
IsString: () =>
|
|
168429
|
+
IsString: () => IsString3,
|
|
168190
168430
|
IsSchema: () => IsSchema,
|
|
168191
168431
|
IsRest: () => IsRest,
|
|
168192
168432
|
IsRefine: () => IsRefine,
|
|
168193
168433
|
IsRef: () => IsRef,
|
|
168194
168434
|
IsRecord: () => IsRecord,
|
|
168195
168435
|
IsReadonly: () => IsReadonly,
|
|
168196
|
-
IsPromise: () => IsPromise,
|
|
168197
168436
|
IsParameter: () => IsParameter,
|
|
168198
168437
|
IsOptional: () => IsOptional,
|
|
168199
168438
|
IsObject: () => IsObject2,
|
|
168200
|
-
IsNumber: () =>
|
|
168439
|
+
IsNumber: () => IsNumber3,
|
|
168201
168440
|
IsNull: () => IsNull2,
|
|
168202
168441
|
IsNever: () => IsNever,
|
|
168203
168442
|
IsLiteral: () => IsLiteral,
|
|
168204
168443
|
IsKind: () => IsKind,
|
|
168205
|
-
IsIterator: () => IsIterator2,
|
|
168206
168444
|
IsIntersect: () => IsIntersect,
|
|
168207
168445
|
IsInteger: () => IsInteger2,
|
|
168208
168446
|
IsInfer: () => IsInfer,
|
|
@@ -168211,14 +168449,13 @@ __export(exports_typebox, {
|
|
|
168211
168449
|
IsGeneric: () => IsGeneric,
|
|
168212
168450
|
IsFunction: () => IsFunction2,
|
|
168213
168451
|
IsEnum: () => IsEnum,
|
|
168452
|
+
IsDependent: () => IsDependent,
|
|
168214
168453
|
IsCyclic: () => IsCyclic,
|
|
168215
168454
|
IsConstructor: () => IsConstructor2,
|
|
168216
168455
|
IsCodec: () => IsCodec,
|
|
168217
168456
|
IsCall: () => IsCall,
|
|
168218
|
-
IsBoolean: () =>
|
|
168457
|
+
IsBoolean: () => IsBoolean3,
|
|
168219
168458
|
IsBigInt: () => IsBigInt2,
|
|
168220
|
-
IsBase: () => IsBase,
|
|
168221
|
-
IsAsyncIterator: () => IsAsyncIterator2,
|
|
168222
168459
|
IsArray: () => IsArray2,
|
|
168223
168460
|
IsAny: () => IsAny,
|
|
168224
168461
|
Intersect: () => Intersect,
|
|
@@ -168234,12 +168471,13 @@ __export(exports_typebox, {
|
|
|
168234
168471
|
Function: () => _Function_,
|
|
168235
168472
|
Extract: () => Extract,
|
|
168236
168473
|
ExtendsResult: () => exports_result,
|
|
168237
|
-
Extends: () =>
|
|
168474
|
+
Extends: () => Extends,
|
|
168238
168475
|
Exclude: () => Exclude,
|
|
168239
168476
|
Evaluate: () => Evaluate,
|
|
168240
168477
|
Enum: () => Enum,
|
|
168241
168478
|
EncodeBuilder: () => EncodeBuilder,
|
|
168242
168479
|
Encode: () => Encode,
|
|
168480
|
+
Dependent: () => Dependent,
|
|
168243
168481
|
DecodeBuilder: () => DecodeBuilder,
|
|
168244
168482
|
Decode: () => Decode,
|
|
168245
168483
|
Cyclic: () => Cyclic,
|
|
@@ -168251,9 +168489,6 @@ __export(exports_typebox, {
|
|
|
168251
168489
|
Call: () => Call,
|
|
168252
168490
|
Boolean: () => Boolean2,
|
|
168253
168491
|
BigInt: () => BigInt2,
|
|
168254
|
-
Base: () => Base,
|
|
168255
|
-
Awaited: () => Awaited,
|
|
168256
|
-
AsyncIterator: () => AsyncIterator,
|
|
168257
168492
|
Array: () => _Array_,
|
|
168258
168493
|
Any: () => Any
|
|
168259
168494
|
});
|
|
@@ -169187,18 +169422,18 @@ function updateMemoryStatus(db, id, status) {
|
|
|
169187
169422
|
getUpdateMemoryStatusStatement(db).run(status, Date.now(), id);
|
|
169188
169423
|
}
|
|
169189
169424
|
function mergeMetadataJson(existing, patch) {
|
|
169190
|
-
let
|
|
169425
|
+
let base = {};
|
|
169191
169426
|
if (existing) {
|
|
169192
169427
|
try {
|
|
169193
169428
|
const parsed = JSON.parse(existing);
|
|
169194
169429
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
169195
|
-
|
|
169430
|
+
base = parsed;
|
|
169196
169431
|
}
|
|
169197
169432
|
} catch {
|
|
169198
|
-
|
|
169433
|
+
base = {};
|
|
169199
169434
|
}
|
|
169200
169435
|
}
|
|
169201
|
-
return JSON.stringify({ ...
|
|
169436
|
+
return JSON.stringify({ ...base, ...patch });
|
|
169202
169437
|
}
|
|
169203
169438
|
function updateMemoryContent(db, id, content, normalizedHash) {
|
|
169204
169439
|
const memory2 = getMemoryById(db, id);
|
|
@@ -170538,11 +170773,11 @@ function getAutoSearchHintDecisions(db, sessionId) {
|
|
|
170538
170773
|
const row = db.prepare("SELECT auto_search_hint_decisions FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
170539
170774
|
return parseJsonArray(row?.auto_search_hint_decisions, isValidAutoSearchHintDecision);
|
|
170540
170775
|
}
|
|
170541
|
-
function casUpdateJsonArrayColumn(db, sessionId, column, validator, mutate,
|
|
170776
|
+
function casUpdateJsonArrayColumn(db, sessionId, column, validator, mutate, options) {
|
|
170542
170777
|
if (column !== "note_nudge_anchors" && column !== "auto_search_hint_decisions") {
|
|
170543
170778
|
throw new Error(`casUpdateJsonArrayColumn: refusing unknown column "${column}"`);
|
|
170544
170779
|
}
|
|
170545
|
-
if (
|
|
170780
|
+
if (options?.ensureRow === false) {
|
|
170546
170781
|
const exists = db.prepare("SELECT 1 FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
170547
170782
|
if (!exists)
|
|
170548
170783
|
return true;
|
|
@@ -171107,22 +171342,22 @@ function buildStatusClause(status) {
|
|
|
171107
171342
|
params: statuses
|
|
171108
171343
|
};
|
|
171109
171344
|
}
|
|
171110
|
-
function getNotes(db,
|
|
171345
|
+
function getNotes(db, options = {}) {
|
|
171111
171346
|
const clauses = [];
|
|
171112
171347
|
const params = [];
|
|
171113
|
-
if (
|
|
171348
|
+
if (options.sessionId !== undefined) {
|
|
171114
171349
|
clauses.push("session_id = ?");
|
|
171115
|
-
params.push(
|
|
171350
|
+
params.push(options.sessionId);
|
|
171116
171351
|
}
|
|
171117
|
-
if (
|
|
171352
|
+
if (options.projectPath !== undefined) {
|
|
171118
171353
|
clauses.push("project_path = ?");
|
|
171119
|
-
params.push(
|
|
171354
|
+
params.push(options.projectPath);
|
|
171120
171355
|
}
|
|
171121
|
-
if (
|
|
171356
|
+
if (options.type !== undefined) {
|
|
171122
171357
|
clauses.push("type = ?");
|
|
171123
|
-
params.push(
|
|
171358
|
+
params.push(options.type);
|
|
171124
171359
|
}
|
|
171125
|
-
const statusClause = buildStatusClause(
|
|
171360
|
+
const statusClause = buildStatusClause(options.status);
|
|
171126
171361
|
if (statusClause) {
|
|
171127
171362
|
clauses.push(statusClause.sql);
|
|
171128
171363
|
params.push(...statusClause.params);
|
|
@@ -171130,9 +171365,9 @@ function getNotes(db, options3 = {}) {
|
|
|
171130
171365
|
const where = clauses.length > 0 ? ` WHERE ${clauses.join(" AND ")}` : "";
|
|
171131
171366
|
return db.prepare(`SELECT * FROM notes${where} ORDER BY created_at ASC, id ASC`).all(...params).filter(isNoteRow).map(toNote);
|
|
171132
171367
|
}
|
|
171133
|
-
function addNote(db, type,
|
|
171368
|
+
function addNote(db, type, options) {
|
|
171134
171369
|
const now = Date.now();
|
|
171135
|
-
const result = type === "session" ? db.prepare("INSERT INTO notes (type, status, content, session_id, created_at, updated_at, harness, anchor_ordinal) VALUES ('session', 'active', ?, ?, ?, ?, ?, ?) RETURNING *").get(
|
|
171370
|
+
const result = type === "session" ? db.prepare("INSERT INTO notes (type, status, content, session_id, created_at, updated_at, harness, anchor_ordinal) VALUES ('session', 'active', ?, ?, ?, ?, ?, ?) RETURNING *").get(options.content, options.sessionId, now, now, getHarness(), options.anchorOrdinal ?? null) : db.prepare("INSERT INTO notes (type, status, content, session_id, project_path, surface_condition, created_at, updated_at, harness, anchor_ordinal) VALUES ('smart', 'pending', ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *").get(options.content, options.sessionId ?? null, options.projectPath, options.surfaceCondition, now, now, getHarness(), options.anchorOrdinal ?? null);
|
|
171136
171371
|
if (!isNoteRow(result)) {
|
|
171137
171372
|
throw new Error("[notes] failed to insert note");
|
|
171138
171373
|
}
|
|
@@ -173000,21 +173235,21 @@ var GIT_TIMEOUT_MS3 = 1e4;
|
|
|
173000
173235
|
var DEFAULT_MAX_COMMITS = 5000;
|
|
173001
173236
|
var RECORD_SEPARATOR = "\x1E";
|
|
173002
173237
|
var FIELD_SEPARATOR = "\x1F";
|
|
173003
|
-
async function readGitCommits(directory,
|
|
173004
|
-
const revision =
|
|
173238
|
+
async function readGitCommits(directory, options = {}) {
|
|
173239
|
+
const revision = options.branch ?? "HEAD";
|
|
173005
173240
|
if (revision.startsWith("-")) {
|
|
173006
173241
|
throw new Error(`readGitCommits: refusing revision that looks like an option: "${revision}"`);
|
|
173007
173242
|
}
|
|
173008
|
-
const projectLabel =
|
|
173243
|
+
const projectLabel = options.projectIdentity ?? "<project>";
|
|
173009
173244
|
const args = [
|
|
173010
173245
|
"log",
|
|
173011
173246
|
revision,
|
|
173012
173247
|
"--no-merges",
|
|
173013
|
-
`--max-count=${
|
|
173248
|
+
`--max-count=${options.maxCommits ?? DEFAULT_MAX_COMMITS}`,
|
|
173014
173249
|
`--format=%H${FIELD_SEPARATOR}%s${FIELD_SEPARATOR}%ae${FIELD_SEPARATOR}%ct${FIELD_SEPARATOR}%b${RECORD_SEPARATOR}`
|
|
173015
173250
|
];
|
|
173016
|
-
if (
|
|
173017
|
-
const iso = new Date(
|
|
173251
|
+
if (options.sinceMs !== undefined && options.sinceMs > 0) {
|
|
173252
|
+
const iso = new Date(options.sinceMs).toISOString();
|
|
173018
173253
|
args.push(`--since=${iso}`);
|
|
173019
173254
|
}
|
|
173020
173255
|
let stdout;
|
|
@@ -173032,7 +173267,7 @@ async function readGitCommits(directory, options3 = {}) {
|
|
|
173032
173267
|
return [];
|
|
173033
173268
|
}
|
|
173034
173269
|
if (stdout.trim().length === 0) {
|
|
173035
|
-
log(`[git-commits] readGitCommits returned empty stdout for ${projectLabel} (sinceMs=${
|
|
173270
|
+
log(`[git-commits] readGitCommits returned empty stdout for ${projectLabel} (sinceMs=${options.sinceMs ?? "none"} args=${args.slice(0, 4).join(" ")})`);
|
|
173036
173271
|
}
|
|
173037
173272
|
return parseGitLogOutput(stdout);
|
|
173038
173273
|
}
|
|
@@ -173084,7 +173319,7 @@ var EMBED_MAX_PER_SWEEP = 500;
|
|
|
173084
173319
|
var EMBED_SWEEP_MAX_WALL_CLOCK_MS = 5 * 60 * 1000;
|
|
173085
173320
|
var indexInProgress = new Set;
|
|
173086
173321
|
var embedInProgress = new Set;
|
|
173087
|
-
async function indexCommitsForProject(db, projectPath, directory,
|
|
173322
|
+
async function indexCommitsForProject(db, projectPath, directory, options) {
|
|
173088
173323
|
const result = {
|
|
173089
173324
|
scanned: 0,
|
|
173090
173325
|
inserted: 0,
|
|
@@ -173099,15 +173334,15 @@ async function indexCommitsForProject(db, projectPath, directory, options3) {
|
|
|
173099
173334
|
indexInProgress.add(projectPath);
|
|
173100
173335
|
try {
|
|
173101
173336
|
const latestIndexed = getLatestIndexedCommitTimeMs(db, projectPath);
|
|
173102
|
-
const sinceMs = latestIndexed !== null ? Math.max(latestIndexed - 60000, Date.now() -
|
|
173337
|
+
const sinceMs = latestIndexed !== null ? Math.max(latestIndexed - 60000, Date.now() - options.sinceDays * MS_PER_DAY) : Date.now() - options.sinceDays * MS_PER_DAY;
|
|
173103
173338
|
const commits = await readGitCommits(directory, {
|
|
173104
173339
|
sinceMs,
|
|
173105
|
-
maxCommits:
|
|
173340
|
+
maxCommits: options.maxCommits,
|
|
173106
173341
|
projectIdentity: projectPath
|
|
173107
173342
|
});
|
|
173108
173343
|
result.scanned = commits.length;
|
|
173109
173344
|
if (commits.length === 0) {
|
|
173110
|
-
result.evicted = enforceProjectCap(db, projectPath,
|
|
173345
|
+
result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
|
|
173111
173346
|
log(`[git-commits] no new commits for ${projectPath} (sinceMs=${sinceMs} latestIndexed=${latestIndexed ?? "none"} evicted=${result.evicted})`);
|
|
173112
173347
|
return result;
|
|
173113
173348
|
}
|
|
@@ -173115,10 +173350,10 @@ async function indexCommitsForProject(db, projectPath, directory, options3) {
|
|
|
173115
173350
|
const upsert = upsertCommits(db, projectPath, commits);
|
|
173116
173351
|
result.inserted = upsert.inserted;
|
|
173117
173352
|
result.updated = upsert.updated;
|
|
173118
|
-
result.evicted = enforceProjectCap(db, projectPath,
|
|
173353
|
+
result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
|
|
173119
173354
|
const snapshot = getProjectEmbeddingSnapshot(projectPath);
|
|
173120
|
-
if (
|
|
173121
|
-
log(`[git-commits] indexed ${projectPath}: scanned=${result.scanned} inserted=${result.inserted} updated=${result.updated} evicted=${result.evicted} embedded=0 (embedding skipped: skipEmbed=${
|
|
173355
|
+
if (options.skipEmbed || !snapshot?.gitCommitEnabled) {
|
|
173356
|
+
log(`[git-commits] indexed ${projectPath}: scanned=${result.scanned} inserted=${result.inserted} updated=${result.updated} evicted=${result.evicted} embedded=0 (embedding skipped: skipEmbed=${options.skipEmbed === true} gitCommitEnabled=${snapshot?.gitCommitEnabled === true})`);
|
|
173122
173357
|
return result;
|
|
173123
173358
|
}
|
|
173124
173359
|
result.embedded = await embedUnembeddedCommits(db, projectPath);
|
|
@@ -173233,14 +173468,14 @@ function clamp01(value) {
|
|
|
173233
173468
|
return 0;
|
|
173234
173469
|
return Math.min(1, Math.max(0, value));
|
|
173235
173470
|
}
|
|
173236
|
-
function searchGitCommitsSync(db, projectPath, query,
|
|
173471
|
+
function searchGitCommitsSync(db, projectPath, query, options) {
|
|
173237
173472
|
const trimmed = query.trim();
|
|
173238
|
-
if (trimmed.length === 0 ||
|
|
173473
|
+
if (trimmed.length === 0 || options.limit <= 0)
|
|
173239
173474
|
return [];
|
|
173240
|
-
const semanticWeight =
|
|
173241
|
-
const ftsWeight =
|
|
173242
|
-
const singleSourcePenalty =
|
|
173243
|
-
const fetchLimit = Math.max(
|
|
173475
|
+
const semanticWeight = options.semanticWeight ?? 0.7;
|
|
173476
|
+
const ftsWeight = options.ftsWeight ?? 0.3;
|
|
173477
|
+
const singleSourcePenalty = options.singleSourcePenalty ?? 0.8;
|
|
173478
|
+
const fetchLimit = Math.max(options.limit * 3, 30);
|
|
173244
173479
|
const ftsCandidates = [];
|
|
173245
173480
|
const sanitized = sanitizeFtsQuery(trimmed);
|
|
173246
173481
|
if (sanitized.length > 0) {
|
|
@@ -173262,10 +173497,10 @@ function searchGitCommitsSync(db, projectPath, query, options3) {
|
|
|
173262
173497
|
ftsScores.set(commit.sha, 1 / (rank + 1));
|
|
173263
173498
|
});
|
|
173264
173499
|
const semanticScores = new Map;
|
|
173265
|
-
if (
|
|
173266
|
-
const embeddings = loadProjectCommitEmbeddings(db, projectPath,
|
|
173500
|
+
if (options.queryEmbedding && options.queryModelId && options.queryModelId !== "off") {
|
|
173501
|
+
const embeddings = loadProjectCommitEmbeddings(db, projectPath, options.queryModelId);
|
|
173267
173502
|
for (const [sha, embedding2] of embeddings.entries()) {
|
|
173268
|
-
const similarity = clamp01(cosineSimilarity(
|
|
173503
|
+
const similarity = clamp01(cosineSimilarity(options.queryEmbedding, embedding2));
|
|
173269
173504
|
if (similarity > 0) {
|
|
173270
173505
|
semanticScores.set(sha, similarity);
|
|
173271
173506
|
}
|
|
@@ -173308,7 +173543,7 @@ function searchGitCommitsSync(db, projectPath, query, options3) {
|
|
|
173308
173543
|
return right.score - left.score;
|
|
173309
173544
|
return right.commit.committedAtMs - left.commit.committedAtMs;
|
|
173310
173545
|
});
|
|
173311
|
-
return results.slice(0,
|
|
173546
|
+
return results.slice(0, options.limit);
|
|
173312
173547
|
}
|
|
173313
173548
|
// ../plugin/src/features/magic-context/literal-probes.ts
|
|
173314
173549
|
var MAX_PROBES = 5;
|
|
@@ -173953,37 +174188,37 @@ function resolveSources(sources) {
|
|
|
173953
174188
|
}
|
|
173954
174189
|
return set2;
|
|
173955
174190
|
}
|
|
173956
|
-
async function unifiedSearch(db, sessionId, projectPath, query,
|
|
174191
|
+
async function unifiedSearch(db, sessionId, projectPath, query, options = {}) {
|
|
173957
174192
|
const trimmedQuery = query.trim();
|
|
173958
174193
|
if (trimmedQuery.length === 0) {
|
|
173959
174194
|
return [];
|
|
173960
174195
|
}
|
|
173961
|
-
const limit = normalizeLimit2(
|
|
174196
|
+
const limit = normalizeLimit2(options.limit);
|
|
173962
174197
|
const tierLimit = Math.max(limit * 3, DEFAULT_UNIFIED_SEARCH_LIMIT);
|
|
173963
|
-
const embeddingEnabled =
|
|
173964
|
-
const embedQuery =
|
|
173965
|
-
const isEmbeddingRuntimeEnabled =
|
|
173966
|
-
const gitCommitsEnabled =
|
|
173967
|
-
const activeSources = resolveSources(
|
|
173968
|
-
const memoryFeatureEnabled =
|
|
174198
|
+
const embeddingEnabled = options.embeddingEnabled ?? true;
|
|
174199
|
+
const embedQuery = options.embedQuery ?? embedText;
|
|
174200
|
+
const isEmbeddingRuntimeEnabled = options.isEmbeddingRuntimeEnabled ?? isEmbeddingEnabled;
|
|
174201
|
+
const gitCommitsEnabled = options.gitCommitsEnabled ?? false;
|
|
174202
|
+
const activeSources = resolveSources(options.sources);
|
|
174203
|
+
const memoryFeatureEnabled = options.memoryEnabled ?? true;
|
|
173969
174204
|
const runMemory = activeSources.has("memory") && memoryFeatureEnabled;
|
|
173970
174205
|
const runMessages = activeSources.has("message");
|
|
173971
174206
|
const runGitCommits = activeSources.has("git_commit") && gitCommitsEnabled;
|
|
173972
174207
|
const runPrimers = activeSources.has("primer") && memoryFeatureEnabled;
|
|
173973
174208
|
const runCompartmentChunks = runMessages && memoryFeatureEnabled && embeddingEnabled;
|
|
173974
174209
|
const needsEmbedding = (runMemory || runGitCommits || runCompartmentChunks || runPrimers) && embeddingEnabled && isEmbeddingRuntimeEnabled();
|
|
173975
|
-
const queryEmbeddingPromise = needsEmbedding ? embedQuery(trimmedQuery,
|
|
174210
|
+
const queryEmbeddingPromise = needsEmbedding ? embedQuery(trimmedQuery, options.signal).catch((error51) => {
|
|
173976
174211
|
log(`[search] query embedding failed: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
173977
174212
|
return null;
|
|
173978
174213
|
}) : Promise.resolve(null);
|
|
173979
174214
|
await Promise.resolve();
|
|
173980
|
-
const messageProbes =
|
|
174215
|
+
const messageProbes = options.explicitSearch ? extractLiteralProbes(trimmedQuery) : [];
|
|
173981
174216
|
const messageResults = runMessages ? searchMessages({
|
|
173982
174217
|
db,
|
|
173983
174218
|
sessionId,
|
|
173984
174219
|
query: trimmedQuery,
|
|
173985
174220
|
limit: tierLimit,
|
|
173986
|
-
maxOrdinal:
|
|
174221
|
+
maxOrdinal: options.maxMessageOrdinal,
|
|
173987
174222
|
probes: messageProbes
|
|
173988
174223
|
}) : [];
|
|
173989
174224
|
const queryEmbedding = await queryEmbeddingPromise;
|
|
@@ -173997,7 +174232,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
173997
174232
|
projectPath,
|
|
173998
174233
|
queryEmbedding,
|
|
173999
174234
|
limit: tierLimit,
|
|
174000
|
-
maxOrdinal:
|
|
174235
|
+
maxOrdinal: options.maxMessageOrdinal,
|
|
174001
174236
|
modelId: chunkModelId && chunkModelId !== "off" ? chunkModelId : null
|
|
174002
174237
|
}) : [];
|
|
174003
174238
|
const messageLikeResults = mergeMessageAndCompartmentResults({
|
|
@@ -174015,7 +174250,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
174015
174250
|
queryEmbedding,
|
|
174016
174251
|
queryModelId: embeddingModelId && embeddingModelId !== "off" ? embeddingModelId : null,
|
|
174017
174252
|
workspace,
|
|
174018
|
-
visibleMemoryIds:
|
|
174253
|
+
visibleMemoryIds: options.visibleMemoryIds
|
|
174019
174254
|
}) : Promise.resolve([]),
|
|
174020
174255
|
runGitCommits ? Promise.resolve(searchGitCommits({
|
|
174021
174256
|
db,
|
|
@@ -174035,7 +174270,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
174035
174270
|
})) : Promise.resolve([])
|
|
174036
174271
|
]);
|
|
174037
174272
|
const results = [...memoryResults, ...primerResults, ...messageLikeResults, ...gitCommitResults].sort(compareUnifiedResults).slice(0, limit);
|
|
174038
|
-
const countRetrievals =
|
|
174273
|
+
const countRetrievals = options.countRetrievals ?? true;
|
|
174039
174274
|
if (countRetrievals) {
|
|
174040
174275
|
const memoryIds = results.filter((result) => result.source === "memory").map((result) => result.memoryId);
|
|
174041
174276
|
if (memoryIds.length > 0) {
|
|
@@ -174204,8 +174439,8 @@ function renderedTier(compartmentIndex, importance, budgetPressure, anchorOverla
|
|
|
174204
174439
|
if (shouldArchive(compartmentIndex, importance, budgetPressure, anchorOverlap)) {
|
|
174205
174440
|
return 5;
|
|
174206
174441
|
}
|
|
174207
|
-
const
|
|
174208
|
-
return Math.min(
|
|
174442
|
+
const base = tier(compartmentIndex, importance, budgetPressure);
|
|
174443
|
+
return Math.min(base, 4);
|
|
174209
174444
|
}
|
|
174210
174445
|
function computeBudgetPressure(compartments, historyBudget) {
|
|
174211
174446
|
if (historyBudget <= 0)
|