perchai-cli 2.4.41 → 2.4.43
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/perch.mjs +763 -625
- package/package.json +1 -1
package/dist/perch.mjs
CHANGED
|
@@ -5267,9 +5267,9 @@ var require_xlsx = __commonJS({
|
|
|
5267
5267
|
}
|
|
5268
5268
|
return o;
|
|
5269
5269
|
}
|
|
5270
|
-
var
|
|
5270
|
+
var fs16;
|
|
5271
5271
|
function get_fs() {
|
|
5272
|
-
return
|
|
5272
|
+
return fs16 || (fs16 = __require("fs"));
|
|
5273
5273
|
}
|
|
5274
5274
|
function parse(file, options) {
|
|
5275
5275
|
if (file[0] == 80 && file[1] == 75) return parse_zip2(file, options);
|
|
@@ -5545,7 +5545,7 @@ var require_xlsx = __commonJS({
|
|
|
5545
5545
|
}
|
|
5546
5546
|
function read_file(filename2, options) {
|
|
5547
5547
|
get_fs();
|
|
5548
|
-
return parse(
|
|
5548
|
+
return parse(fs16.readFileSync(filename2), options);
|
|
5549
5549
|
}
|
|
5550
5550
|
function read(blob, options) {
|
|
5551
5551
|
var type = options && options.type;
|
|
@@ -5822,7 +5822,7 @@ var require_xlsx = __commonJS({
|
|
|
5822
5822
|
}
|
|
5823
5823
|
return o;
|
|
5824
5824
|
}
|
|
5825
|
-
function find2(cfb,
|
|
5825
|
+
function find2(cfb, path16) {
|
|
5826
5826
|
var UCFullPaths = cfb.FullPaths.map(function(x) {
|
|
5827
5827
|
return x.toUpperCase();
|
|
5828
5828
|
});
|
|
@@ -5831,11 +5831,11 @@ var require_xlsx = __commonJS({
|
|
|
5831
5831
|
return y[y.length - (x.slice(-1) == "/" ? 2 : 1)];
|
|
5832
5832
|
});
|
|
5833
5833
|
var k = false;
|
|
5834
|
-
if (
|
|
5834
|
+
if (path16.charCodeAt(0) === 47) {
|
|
5835
5835
|
k = true;
|
|
5836
|
-
|
|
5837
|
-
} else k =
|
|
5838
|
-
var UCPath =
|
|
5836
|
+
path16 = UCFullPaths[0].slice(0, -1) + path16;
|
|
5837
|
+
} else k = path16.indexOf("/") !== -1;
|
|
5838
|
+
var UCPath = path16.toUpperCase();
|
|
5839
5839
|
var w = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);
|
|
5840
5840
|
if (w !== -1) return cfb.FileIndex[w];
|
|
5841
5841
|
var m = !UCPath.match(chr1);
|
|
@@ -5871,7 +5871,7 @@ var require_xlsx = __commonJS({
|
|
|
5871
5871
|
function write_file(cfb, filename2, options) {
|
|
5872
5872
|
get_fs();
|
|
5873
5873
|
var o = _write(cfb, options);
|
|
5874
|
-
|
|
5874
|
+
fs16.writeFileSync(filename2, o);
|
|
5875
5875
|
}
|
|
5876
5876
|
function a2s2(o) {
|
|
5877
5877
|
var out = new Array(o.length);
|
|
@@ -5883,7 +5883,7 @@ var require_xlsx = __commonJS({
|
|
|
5883
5883
|
switch (options && options.type || "buffer") {
|
|
5884
5884
|
case "file":
|
|
5885
5885
|
get_fs();
|
|
5886
|
-
|
|
5886
|
+
fs16.writeFileSync(options.filename, o);
|
|
5887
5887
|
return o;
|
|
5888
5888
|
case "binary":
|
|
5889
5889
|
return typeof o == "string" ? o : a2s2(o);
|
|
@@ -6816,11 +6816,11 @@ var require_xlsx = __commonJS({
|
|
|
6816
6816
|
}
|
|
6817
6817
|
throw new Error("cannot save file " + fname);
|
|
6818
6818
|
}
|
|
6819
|
-
function read_binary(
|
|
6820
|
-
if (typeof _fs !== "undefined") return _fs.readFileSync(
|
|
6821
|
-
if (typeof Deno !== "undefined") return Deno.readFileSync(
|
|
6819
|
+
function read_binary(path16) {
|
|
6820
|
+
if (typeof _fs !== "undefined") return _fs.readFileSync(path16);
|
|
6821
|
+
if (typeof Deno !== "undefined") return Deno.readFileSync(path16);
|
|
6822
6822
|
if (typeof $ !== "undefined" && typeof File !== "undefined" && typeof Folder !== "undefined") try {
|
|
6823
|
-
var infile = File(
|
|
6823
|
+
var infile = File(path16);
|
|
6824
6824
|
infile.open("r");
|
|
6825
6825
|
infile.encoding = "binary";
|
|
6826
6826
|
var data = infile.read();
|
|
@@ -6829,7 +6829,7 @@ var require_xlsx = __commonJS({
|
|
|
6829
6829
|
} catch (e) {
|
|
6830
6830
|
if (!e.message || !e.message.match(/onstruct/)) throw e;
|
|
6831
6831
|
}
|
|
6832
|
-
throw new Error("Cannot access file " +
|
|
6832
|
+
throw new Error("Cannot access file " + path16);
|
|
6833
6833
|
}
|
|
6834
6834
|
function keys2(o) {
|
|
6835
6835
|
var ks = Object.keys(o), o2 = [];
|
|
@@ -7106,16 +7106,16 @@ var require_xlsx = __commonJS({
|
|
|
7106
7106
|
for (var i = 0; i < k.length; ++i) if (k[i].slice(-1) != "/") o.push(k[i].replace(/^Root Entry[\/]/, ""));
|
|
7107
7107
|
return o.sort();
|
|
7108
7108
|
}
|
|
7109
|
-
function zip_add_file(zip,
|
|
7109
|
+
function zip_add_file(zip, path16, content) {
|
|
7110
7110
|
if (zip.FullPaths) {
|
|
7111
7111
|
if (typeof content == "string") {
|
|
7112
7112
|
var res;
|
|
7113
7113
|
if (has_buf) res = Buffer_from(content);
|
|
7114
7114
|
else res = utf8decode(content);
|
|
7115
|
-
return CFB.utils.cfb_add(zip,
|
|
7115
|
+
return CFB.utils.cfb_add(zip, path16, res);
|
|
7116
7116
|
}
|
|
7117
|
-
CFB.utils.cfb_add(zip,
|
|
7118
|
-
} else zip.file(
|
|
7117
|
+
CFB.utils.cfb_add(zip, path16, content);
|
|
7118
|
+
} else zip.file(path16, content);
|
|
7119
7119
|
}
|
|
7120
7120
|
function zip_new() {
|
|
7121
7121
|
return CFB.utils.cfb_new();
|
|
@@ -7132,11 +7132,11 @@ var require_xlsx = __commonJS({
|
|
|
7132
7132
|
}
|
|
7133
7133
|
throw new Error("Unrecognized type " + o.type);
|
|
7134
7134
|
}
|
|
7135
|
-
function resolve_path(
|
|
7136
|
-
if (
|
|
7135
|
+
function resolve_path(path16, base) {
|
|
7136
|
+
if (path16.charAt(0) == "/") return path16.slice(1);
|
|
7137
7137
|
var result2 = base.split("/");
|
|
7138
7138
|
if (base.slice(-1) != "/") result2.pop();
|
|
7139
|
-
var target =
|
|
7139
|
+
var target = path16.split("/");
|
|
7140
7140
|
while (target.length !== 0) {
|
|
7141
7141
|
var step = target.shift();
|
|
7142
7142
|
if (step === "..") result2.pop();
|
|
@@ -10805,9 +10805,9 @@ var require_xlsx = __commonJS({
|
|
|
10805
10805
|
cell.isst = blob.read_shift(4);
|
|
10806
10806
|
return cell;
|
|
10807
10807
|
}
|
|
10808
|
-
function write_LabelSst(R, C, v,
|
|
10808
|
+
function write_LabelSst(R, C, v, os7) {
|
|
10809
10809
|
var o = new_buf(10);
|
|
10810
|
-
write_XLSCell(R, C,
|
|
10810
|
+
write_XLSCell(R, C, os7, o);
|
|
10811
10811
|
o.write_shift(4, v);
|
|
10812
10812
|
return o;
|
|
10813
10813
|
}
|
|
@@ -10820,10 +10820,10 @@ var require_xlsx = __commonJS({
|
|
|
10820
10820
|
cell.val = str;
|
|
10821
10821
|
return cell;
|
|
10822
10822
|
}
|
|
10823
|
-
function write_Label(R, C, v,
|
|
10823
|
+
function write_Label(R, C, v, os7, opts) {
|
|
10824
10824
|
var b8 = !opts || opts.biff == 8;
|
|
10825
10825
|
var o = new_buf(6 + 2 + +b8 + (1 + b8) * v.length);
|
|
10826
|
-
write_XLSCell(R, C,
|
|
10826
|
+
write_XLSCell(R, C, os7, o);
|
|
10827
10827
|
o.write_shift(2, v.length);
|
|
10828
10828
|
if (b8) o.write_shift(1, 1);
|
|
10829
10829
|
o.write_shift((1 + b8) * v.length, v, b8 ? "utf16le" : "sbcs");
|
|
@@ -10977,9 +10977,9 @@ var require_xlsx = __commonJS({
|
|
|
10977
10977
|
cell.t = val === true || val === false ? "b" : "e";
|
|
10978
10978
|
return cell;
|
|
10979
10979
|
}
|
|
10980
|
-
function write_BoolErr(R, C, v,
|
|
10980
|
+
function write_BoolErr(R, C, v, os7, opts, t) {
|
|
10981
10981
|
var o = new_buf(8);
|
|
10982
|
-
write_XLSCell(R, C,
|
|
10982
|
+
write_XLSCell(R, C, os7, o);
|
|
10983
10983
|
write_Bes(v, t, o);
|
|
10984
10984
|
return o;
|
|
10985
10985
|
}
|
|
@@ -10990,9 +10990,9 @@ var require_xlsx = __commonJS({
|
|
|
10990
10990
|
cell.val = xnum;
|
|
10991
10991
|
return cell;
|
|
10992
10992
|
}
|
|
10993
|
-
function write_Number(R, C, v,
|
|
10993
|
+
function write_Number(R, C, v, os7) {
|
|
10994
10994
|
var o = new_buf(14);
|
|
10995
|
-
write_XLSCell(R, C,
|
|
10995
|
+
write_XLSCell(R, C, os7, o);
|
|
10996
10996
|
write_Xnum(v, o);
|
|
10997
10997
|
return o;
|
|
10998
10998
|
}
|
|
@@ -17815,8 +17815,8 @@ var require_xlsx = __commonJS({
|
|
|
17815
17815
|
var cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts);
|
|
17816
17816
|
return { cell, val: val[0], formula: cbf, shared: flags >> 3 & 1, tt: val[1] };
|
|
17817
17817
|
}
|
|
17818
|
-
function write_Formula(cell, R, C, opts,
|
|
17819
|
-
var o1 = write_XLSCell(R, C,
|
|
17818
|
+
function write_Formula(cell, R, C, opts, os7) {
|
|
17819
|
+
var o1 = write_XLSCell(R, C, os7);
|
|
17820
17820
|
var o2 = write_FormulaValue(cell.v);
|
|
17821
17821
|
var o3 = new_buf(6);
|
|
17822
17822
|
var flags = 1 | 32;
|
|
@@ -19395,8 +19395,8 @@ var require_xlsx = __commonJS({
|
|
|
19395
19395
|
break;
|
|
19396
19396
|
}
|
|
19397
19397
|
var v = writetag("v", escapexml(vv)), o = { r: ref };
|
|
19398
|
-
var
|
|
19399
|
-
if (
|
|
19398
|
+
var os7 = get_cell_style(opts.cellXfs, cell, opts);
|
|
19399
|
+
if (os7 !== 0) o.s = os7;
|
|
19400
19400
|
switch (cell.t) {
|
|
19401
19401
|
case "n":
|
|
19402
19402
|
break;
|
|
@@ -23211,8 +23211,8 @@ var require_xlsx = __commonJS({
|
|
|
23211
23211
|
p = escapexlml(cell.v || "");
|
|
23212
23212
|
break;
|
|
23213
23213
|
}
|
|
23214
|
-
var
|
|
23215
|
-
attr["ss:StyleID"] = "s" + (21 +
|
|
23214
|
+
var os7 = get_cell_style(opts.cellXfs, cell, opts);
|
|
23215
|
+
attr["ss:StyleID"] = "s" + (21 + os7);
|
|
23216
23216
|
attr["ss:Index"] = addr.c + 1;
|
|
23217
23217
|
var _v = cell.v != null ? p : "";
|
|
23218
23218
|
var m = cell.t == "z" ? "" : '<Data ss:Type="' + t + '">' + _v + "</Data>";
|
|
@@ -29047,32 +29047,32 @@ var require_xlsx = __commonJS({
|
|
|
29047
29047
|
});
|
|
29048
29048
|
}
|
|
29049
29049
|
function write_ws_biff8_cell(ba, cell, R, C, opts) {
|
|
29050
|
-
var
|
|
29050
|
+
var os7 = 16 + get_cell_style(opts.cellXfs, cell, opts);
|
|
29051
29051
|
if (cell.v == null && !cell.bf) {
|
|
29052
|
-
write_biff_rec(ba, 513, write_XLSCell(R, C,
|
|
29052
|
+
write_biff_rec(ba, 513, write_XLSCell(R, C, os7));
|
|
29053
29053
|
return;
|
|
29054
29054
|
}
|
|
29055
|
-
if (cell.bf) write_biff_rec(ba, 6, write_Formula(cell, R, C, opts,
|
|
29055
|
+
if (cell.bf) write_biff_rec(ba, 6, write_Formula(cell, R, C, opts, os7));
|
|
29056
29056
|
else switch (cell.t) {
|
|
29057
29057
|
case "d":
|
|
29058
29058
|
case "n":
|
|
29059
29059
|
var v = cell.t == "d" ? datenum(parseDate3(cell.v)) : cell.v;
|
|
29060
|
-
write_biff_rec(ba, 515, write_Number(R, C, v,
|
|
29060
|
+
write_biff_rec(ba, 515, write_Number(R, C, v, os7, opts));
|
|
29061
29061
|
break;
|
|
29062
29062
|
case "b":
|
|
29063
29063
|
case "e":
|
|
29064
|
-
write_biff_rec(ba, 517, write_BoolErr(R, C, cell.v,
|
|
29064
|
+
write_biff_rec(ba, 517, write_BoolErr(R, C, cell.v, os7, opts, cell.t));
|
|
29065
29065
|
break;
|
|
29066
29066
|
/* TODO: codepage, sst */
|
|
29067
29067
|
case "s":
|
|
29068
29068
|
case "str":
|
|
29069
29069
|
if (opts.bookSST) {
|
|
29070
29070
|
var isst = get_sst_id(opts.Strings, cell.v, opts.revStrings);
|
|
29071
|
-
write_biff_rec(ba, 253, write_LabelSst(R, C, isst,
|
|
29072
|
-
} else write_biff_rec(ba, 516, write_Label(R, C, (cell.v || "").slice(0, 255),
|
|
29071
|
+
write_biff_rec(ba, 253, write_LabelSst(R, C, isst, os7, opts));
|
|
29072
|
+
} else write_biff_rec(ba, 516, write_Label(R, C, (cell.v || "").slice(0, 255), os7, opts));
|
|
29073
29073
|
break;
|
|
29074
29074
|
default:
|
|
29075
|
-
write_biff_rec(ba, 513, write_XLSCell(R, C,
|
|
29075
|
+
write_biff_rec(ba, 513, write_XLSCell(R, C, os7));
|
|
29076
29076
|
}
|
|
29077
29077
|
}
|
|
29078
29078
|
function write_ws_biff8(idx, opts, wb) {
|
|
@@ -31790,19 +31790,19 @@ var require_xlsx = __commonJS({
|
|
|
31790
31790
|
}
|
|
31791
31791
|
return !wbrels || wbrels.length === 0 ? null : wbrels;
|
|
31792
31792
|
}
|
|
31793
|
-
function safe_parse_sheet(zip,
|
|
31793
|
+
function safe_parse_sheet(zip, path16, relsPath, sheet, idx, sheetRels, sheets, stype, opts, wb, themes, styles6) {
|
|
31794
31794
|
try {
|
|
31795
|
-
sheetRels[sheet] = parse_rels(getzipstr(zip, relsPath, true),
|
|
31796
|
-
var data = getzipdata(zip,
|
|
31795
|
+
sheetRels[sheet] = parse_rels(getzipstr(zip, relsPath, true), path16);
|
|
31796
|
+
var data = getzipdata(zip, path16);
|
|
31797
31797
|
var _ws;
|
|
31798
31798
|
switch (stype) {
|
|
31799
31799
|
case "sheet":
|
|
31800
|
-
_ws = parse_ws(data,
|
|
31800
|
+
_ws = parse_ws(data, path16, idx, opts, sheetRels[sheet], wb, themes, styles6);
|
|
31801
31801
|
break;
|
|
31802
31802
|
case "chart":
|
|
31803
|
-
_ws = parse_cs(data,
|
|
31803
|
+
_ws = parse_cs(data, path16, idx, opts, sheetRels[sheet], wb, themes, styles6);
|
|
31804
31804
|
if (!_ws || !_ws["!drawel"]) break;
|
|
31805
|
-
var dfile = resolve_path(_ws["!drawel"].Target,
|
|
31805
|
+
var dfile = resolve_path(_ws["!drawel"].Target, path16);
|
|
31806
31806
|
var drelsp = get_rels_path(dfile);
|
|
31807
31807
|
var draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));
|
|
31808
31808
|
var chartp = resolve_path(draw, dfile);
|
|
@@ -31810,10 +31810,10 @@ var require_xlsx = __commonJS({
|
|
|
31810
31810
|
_ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);
|
|
31811
31811
|
break;
|
|
31812
31812
|
case "macro":
|
|
31813
|
-
_ws = parse_ms(data,
|
|
31813
|
+
_ws = parse_ms(data, path16, idx, opts, sheetRels[sheet], wb, themes, styles6);
|
|
31814
31814
|
break;
|
|
31815
31815
|
case "dialog":
|
|
31816
|
-
_ws = parse_ds(data,
|
|
31816
|
+
_ws = parse_ds(data, path16, idx, opts, sheetRels[sheet], wb, themes, styles6);
|
|
31817
31817
|
break;
|
|
31818
31818
|
default:
|
|
31819
31819
|
throw new Error("Unrecognized sheet type " + stype);
|
|
@@ -31823,13 +31823,13 @@ var require_xlsx = __commonJS({
|
|
|
31823
31823
|
if (sheetRels && sheetRels[sheet]) keys2(sheetRels[sheet]).forEach(function(n) {
|
|
31824
31824
|
var dfile2 = "";
|
|
31825
31825
|
if (sheetRels[sheet][n].Type == RELS.CMNT) {
|
|
31826
|
-
dfile2 = resolve_path(sheetRels[sheet][n].Target,
|
|
31826
|
+
dfile2 = resolve_path(sheetRels[sheet][n].Target, path16);
|
|
31827
31827
|
var comments = parse_cmnt(getzipdata(zip, dfile2, true), dfile2, opts);
|
|
31828
31828
|
if (!comments || !comments.length) return;
|
|
31829
31829
|
sheet_insert_comments(_ws, comments, false);
|
|
31830
31830
|
}
|
|
31831
31831
|
if (sheetRels[sheet][n].Type == RELS.TCMNT) {
|
|
31832
|
-
dfile2 = resolve_path(sheetRels[sheet][n].Target,
|
|
31832
|
+
dfile2 = resolve_path(sheetRels[sheet][n].Target, path16);
|
|
31833
31833
|
tcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile2, true), opts));
|
|
31834
31834
|
}
|
|
31835
31835
|
});
|
|
@@ -31933,7 +31933,7 @@ var require_xlsx = __commonJS({
|
|
|
31933
31933
|
if (opts.bookDeps && dir.calcchain) deps = parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)), dir.calcchain, opts);
|
|
31934
31934
|
var i = 0;
|
|
31935
31935
|
var sheetRels = {};
|
|
31936
|
-
var
|
|
31936
|
+
var path16, relsPath;
|
|
31937
31937
|
{
|
|
31938
31938
|
var wbsheets = wb.Sheets;
|
|
31939
31939
|
props.Worksheets = wbsheets.length;
|
|
@@ -31958,15 +31958,15 @@ var require_xlsx = __commonJS({
|
|
|
31958
31958
|
wsloop: for (i = 0; i != props.Worksheets; ++i) {
|
|
31959
31959
|
var stype = "sheet";
|
|
31960
31960
|
if (wbrels && wbrels[i]) {
|
|
31961
|
-
|
|
31962
|
-
if (!safegetzipfile(zip,
|
|
31963
|
-
if (!safegetzipfile(zip,
|
|
31961
|
+
path16 = "xl/" + wbrels[i][1].replace(/[\/]?xl\//, "");
|
|
31962
|
+
if (!safegetzipfile(zip, path16)) path16 = wbrels[i][1];
|
|
31963
|
+
if (!safegetzipfile(zip, path16)) path16 = wbrelsfile.replace(/_rels\/.*$/, "") + wbrels[i][1];
|
|
31964
31964
|
stype = wbrels[i][2];
|
|
31965
31965
|
} else {
|
|
31966
|
-
|
|
31967
|
-
|
|
31966
|
+
path16 = "xl/worksheets/sheet" + (i + 1 - nmode) + "." + wbext;
|
|
31967
|
+
path16 = path16.replace(/sheet0\./, "sheet.");
|
|
31968
31968
|
}
|
|
31969
|
-
relsPath =
|
|
31969
|
+
relsPath = path16.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
|
|
31970
31970
|
if (opts && opts.sheets != null) switch (typeof opts.sheets) {
|
|
31971
31971
|
case "number":
|
|
31972
31972
|
if (i != opts.sheets) continue wsloop;
|
|
@@ -31984,7 +31984,7 @@ var require_xlsx = __commonJS({
|
|
|
31984
31984
|
if (!snjseen) continue wsloop;
|
|
31985
31985
|
}
|
|
31986
31986
|
}
|
|
31987
|
-
safe_parse_sheet(zip,
|
|
31987
|
+
safe_parse_sheet(zip, path16, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles6);
|
|
31988
31988
|
}
|
|
31989
31989
|
out = {
|
|
31990
31990
|
Directory: dir,
|
|
@@ -32873,7 +32873,7 @@ var require_xlsx = __commonJS({
|
|
|
32873
32873
|
return out;
|
|
32874
32874
|
}
|
|
32875
32875
|
var qreg = /"/g;
|
|
32876
|
-
function make_csv_row(sheet, r, R, cols,
|
|
32876
|
+
function make_csv_row(sheet, r, R, cols, fs16, rs, FS, o) {
|
|
32877
32877
|
var isempty = true;
|
|
32878
32878
|
var row = [], txt = "", rr = encode_row(R);
|
|
32879
32879
|
for (var C = r.s.c; C <= r.e.c; ++C) {
|
|
@@ -32883,7 +32883,7 @@ var require_xlsx = __commonJS({
|
|
|
32883
32883
|
else if (val.v != null) {
|
|
32884
32884
|
isempty = false;
|
|
32885
32885
|
txt = "" + (o.rawNumbers && val.t == "n" ? val.v : format_cell(val, null, o));
|
|
32886
|
-
for (var i = 0, cc = 0; i !== txt.length; ++i) if ((cc = txt.charCodeAt(i)) ===
|
|
32886
|
+
for (var i = 0, cc = 0; i !== txt.length; ++i) if ((cc = txt.charCodeAt(i)) === fs16 || cc === rs || cc === 34 || o.forceQuotes) {
|
|
32887
32887
|
txt = '"' + txt.replace(qreg, '""') + '"';
|
|
32888
32888
|
break;
|
|
32889
32889
|
}
|
|
@@ -32903,7 +32903,7 @@ var require_xlsx = __commonJS({
|
|
|
32903
32903
|
var o = opts == null ? {} : opts;
|
|
32904
32904
|
if (sheet == null || sheet["!ref"] == null) return "";
|
|
32905
32905
|
var r = safe_decode_range(sheet["!ref"]);
|
|
32906
|
-
var FS = o.FS !== void 0 ? o.FS : ",",
|
|
32906
|
+
var FS = o.FS !== void 0 ? o.FS : ",", fs16 = FS.charCodeAt(0);
|
|
32907
32907
|
var RS = o.RS !== void 0 ? o.RS : "\n", rs = RS.charCodeAt(0);
|
|
32908
32908
|
var endregex = new RegExp((FS == "|" ? "\\|" : FS) + "+$");
|
|
32909
32909
|
var row = "", cols = [];
|
|
@@ -32914,7 +32914,7 @@ var require_xlsx = __commonJS({
|
|
|
32914
32914
|
var w = 0;
|
|
32915
32915
|
for (var R = r.s.r; R <= r.e.r; ++R) {
|
|
32916
32916
|
if ((rowinfo[R] || {}).hidden) continue;
|
|
32917
|
-
row = make_csv_row(sheet, r, R, cols,
|
|
32917
|
+
row = make_csv_row(sheet, r, R, cols, fs16, rs, FS, o);
|
|
32918
32918
|
if (row == null) {
|
|
32919
32919
|
continue;
|
|
32920
32920
|
}
|
|
@@ -33186,7 +33186,7 @@ var require_xlsx = __commonJS({
|
|
|
33186
33186
|
return stream;
|
|
33187
33187
|
}
|
|
33188
33188
|
var r = safe_decode_range(sheet["!ref"]);
|
|
33189
|
-
var FS = o.FS !== void 0 ? o.FS : ",",
|
|
33189
|
+
var FS = o.FS !== void 0 ? o.FS : ",", fs16 = FS.charCodeAt(0);
|
|
33190
33190
|
var RS = o.RS !== void 0 ? o.RS : "\n", rs = RS.charCodeAt(0);
|
|
33191
33191
|
var endregex = new RegExp((FS == "|" ? "\\|" : FS) + "+$");
|
|
33192
33192
|
var row = "", cols = [];
|
|
@@ -33204,7 +33204,7 @@ var require_xlsx = __commonJS({
|
|
|
33204
33204
|
while (R <= r.e.r) {
|
|
33205
33205
|
++R;
|
|
33206
33206
|
if ((rowinfo[R - 1] || {}).hidden) continue;
|
|
33207
|
-
row = make_csv_row(sheet, r, R - 1, cols,
|
|
33207
|
+
row = make_csv_row(sheet, r, R - 1, cols, fs16, rs, FS, o);
|
|
33208
33208
|
if (row != null) {
|
|
33209
33209
|
if (o.strip) row = row.replace(endregex, "");
|
|
33210
33210
|
if (row || o.blankrows !== false) return stream.push((w++ ? RS : "") + row);
|
|
@@ -47774,8 +47774,8 @@ var require_html2canvas = __commonJS({
|
|
|
47774
47774
|
return BezierCurve2;
|
|
47775
47775
|
})()
|
|
47776
47776
|
);
|
|
47777
|
-
var isBezierCurve = function(
|
|
47778
|
-
return
|
|
47777
|
+
var isBezierCurve = function(path16) {
|
|
47778
|
+
return path16.type === 1;
|
|
47779
47779
|
};
|
|
47780
47780
|
var BoundCurves = (
|
|
47781
47781
|
/** @class */
|
|
@@ -47903,8 +47903,8 @@ var require_html2canvas = __commonJS({
|
|
|
47903
47903
|
var ClipEffect = (
|
|
47904
47904
|
/** @class */
|
|
47905
47905
|
/* @__PURE__ */ (function() {
|
|
47906
|
-
function ClipEffect2(
|
|
47907
|
-
this.path =
|
|
47906
|
+
function ClipEffect2(path16, target) {
|
|
47907
|
+
this.path = path16;
|
|
47908
47908
|
this.target = target;
|
|
47909
47909
|
this.type = 1;
|
|
47910
47910
|
}
|
|
@@ -47939,8 +47939,8 @@ var require_html2canvas = __commonJS({
|
|
|
47939
47939
|
}
|
|
47940
47940
|
return false;
|
|
47941
47941
|
};
|
|
47942
|
-
var transformPath = function(
|
|
47943
|
-
return
|
|
47942
|
+
var transformPath = function(path16, deltaX, deltaY, deltaW, deltaH) {
|
|
47943
|
+
return path16.map(function(point, index) {
|
|
47944
47944
|
switch (index) {
|
|
47945
47945
|
case 0:
|
|
47946
47946
|
return point.add(deltaX, deltaY);
|
|
@@ -48207,42 +48207,42 @@ var require_html2canvas = __commonJS({
|
|
|
48207
48207
|
}
|
|
48208
48208
|
};
|
|
48209
48209
|
var createStrokePathFromCurves = function(outer1, outer2) {
|
|
48210
|
-
var
|
|
48210
|
+
var path16 = [];
|
|
48211
48211
|
if (isBezierCurve(outer1)) {
|
|
48212
|
-
|
|
48212
|
+
path16.push(outer1.subdivide(0.5, false));
|
|
48213
48213
|
} else {
|
|
48214
|
-
|
|
48214
|
+
path16.push(outer1);
|
|
48215
48215
|
}
|
|
48216
48216
|
if (isBezierCurve(outer2)) {
|
|
48217
|
-
|
|
48217
|
+
path16.push(outer2.subdivide(0.5, true));
|
|
48218
48218
|
} else {
|
|
48219
|
-
|
|
48219
|
+
path16.push(outer2);
|
|
48220
48220
|
}
|
|
48221
|
-
return
|
|
48221
|
+
return path16;
|
|
48222
48222
|
};
|
|
48223
48223
|
var createPathFromCurves = function(outer1, inner1, outer2, inner2) {
|
|
48224
|
-
var
|
|
48224
|
+
var path16 = [];
|
|
48225
48225
|
if (isBezierCurve(outer1)) {
|
|
48226
|
-
|
|
48226
|
+
path16.push(outer1.subdivide(0.5, false));
|
|
48227
48227
|
} else {
|
|
48228
|
-
|
|
48228
|
+
path16.push(outer1);
|
|
48229
48229
|
}
|
|
48230
48230
|
if (isBezierCurve(outer2)) {
|
|
48231
|
-
|
|
48231
|
+
path16.push(outer2.subdivide(0.5, true));
|
|
48232
48232
|
} else {
|
|
48233
|
-
|
|
48233
|
+
path16.push(outer2);
|
|
48234
48234
|
}
|
|
48235
48235
|
if (isBezierCurve(inner2)) {
|
|
48236
|
-
|
|
48236
|
+
path16.push(inner2.subdivide(0.5, true).reverse());
|
|
48237
48237
|
} else {
|
|
48238
|
-
|
|
48238
|
+
path16.push(inner2);
|
|
48239
48239
|
}
|
|
48240
48240
|
if (isBezierCurve(inner1)) {
|
|
48241
|
-
|
|
48241
|
+
path16.push(inner1.subdivide(0.5, false).reverse());
|
|
48242
48242
|
} else {
|
|
48243
|
-
|
|
48243
|
+
path16.push(inner1);
|
|
48244
48244
|
}
|
|
48245
|
-
return
|
|
48245
|
+
return path16;
|
|
48246
48246
|
};
|
|
48247
48247
|
var paddingBox = function(element) {
|
|
48248
48248
|
var bounds = element.bounds;
|
|
@@ -48282,10 +48282,10 @@ var require_html2canvas = __commonJS({
|
|
|
48282
48282
|
var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index), intrinsicSize, backgroundPositioningArea);
|
|
48283
48283
|
var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];
|
|
48284
48284
|
var position2 = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
|
|
48285
|
-
var
|
|
48285
|
+
var path16 = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index), position2, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
|
|
48286
48286
|
var offsetX = Math.round(backgroundPositioningArea.left + position2[0]);
|
|
48287
48287
|
var offsetY = Math.round(backgroundPositioningArea.top + position2[1]);
|
|
48288
|
-
return [
|
|
48288
|
+
return [path16, offsetX, offsetY, sizeWidth, sizeHeight];
|
|
48289
48289
|
};
|
|
48290
48290
|
var isAuto = function(token) {
|
|
48291
48291
|
return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO;
|
|
@@ -48666,8 +48666,8 @@ var require_html2canvas = __commonJS({
|
|
|
48666
48666
|
CanvasRenderer2.prototype.renderReplacedElement = function(container, curves, image3) {
|
|
48667
48667
|
if (image3 && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {
|
|
48668
48668
|
var box = contentBox(container);
|
|
48669
|
-
var
|
|
48670
|
-
this.path(
|
|
48669
|
+
var path16 = calculatePaddingBoxPath(curves);
|
|
48670
|
+
this.path(path16);
|
|
48671
48671
|
this.ctx.save();
|
|
48672
48672
|
this.ctx.clip();
|
|
48673
48673
|
this.ctx.drawImage(image3, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);
|
|
@@ -49001,8 +49001,8 @@ var require_html2canvas = __commonJS({
|
|
|
49001
49001
|
}
|
|
49002
49002
|
});
|
|
49003
49003
|
};
|
|
49004
|
-
CanvasRenderer2.prototype.renderRepeat = function(
|
|
49005
|
-
this.path(
|
|
49004
|
+
CanvasRenderer2.prototype.renderRepeat = function(path16, pattern, offsetX, offsetY) {
|
|
49005
|
+
this.path(path16);
|
|
49006
49006
|
this.ctx.fillStyle = pattern;
|
|
49007
49007
|
this.ctx.translate(offsetX, offsetY);
|
|
49008
49008
|
this.ctx.fill();
|
|
@@ -49029,7 +49029,7 @@ var require_html2canvas = __commonJS({
|
|
|
49029
49029
|
case 0:
|
|
49030
49030
|
index = container.styles.backgroundImage.length - 1;
|
|
49031
49031
|
_loop_1 = function(backgroundImage3) {
|
|
49032
|
-
var image3, url, _c,
|
|
49032
|
+
var image3, url, _c, path16, x, y, width, height, pattern, _d, path16, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path16, left, top_1, width, height, position2, x, y, _g, rx, ry, radialGradient_1, midX, midY, f2, invF;
|
|
49033
49033
|
return __generator2(this, function(_h) {
|
|
49034
49034
|
switch (_h.label) {
|
|
49035
49035
|
case 0:
|
|
@@ -49053,14 +49053,14 @@ var require_html2canvas = __commonJS({
|
|
|
49053
49053
|
image3.width,
|
|
49054
49054
|
image3.height,
|
|
49055
49055
|
image3.width / image3.height
|
|
49056
|
-
]),
|
|
49056
|
+
]), path16 = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];
|
|
49057
49057
|
pattern = this_1.ctx.createPattern(this_1.resizeImage(image3, width, height), "repeat");
|
|
49058
|
-
this_1.renderRepeat(
|
|
49058
|
+
this_1.renderRepeat(path16, pattern, x, y);
|
|
49059
49059
|
}
|
|
49060
49060
|
return [3, 6];
|
|
49061
49061
|
case 5:
|
|
49062
49062
|
if (isLinearGradient(backgroundImage3)) {
|
|
49063
|
-
_d = calculateBackgroundRendering(container, index, [null, null, null]),
|
|
49063
|
+
_d = calculateBackgroundRendering(container, index, [null, null, null]), path16 = _d[0], x = _d[1], y = _d[2], width = _d[3], height = _d[4];
|
|
49064
49064
|
_e = calculateGradientDirection(backgroundImage3.angle, width, height), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4];
|
|
49065
49065
|
canvas = document.createElement("canvas");
|
|
49066
49066
|
canvas.width = width;
|
|
@@ -49074,14 +49074,14 @@ var require_html2canvas = __commonJS({
|
|
|
49074
49074
|
ctx.fillRect(0, 0, width, height);
|
|
49075
49075
|
if (width > 0 && height > 0) {
|
|
49076
49076
|
pattern = this_1.ctx.createPattern(canvas, "repeat");
|
|
49077
|
-
this_1.renderRepeat(
|
|
49077
|
+
this_1.renderRepeat(path16, pattern, x, y);
|
|
49078
49078
|
}
|
|
49079
49079
|
} else if (isRadialGradient(backgroundImage3)) {
|
|
49080
49080
|
_f = calculateBackgroundRendering(container, index, [
|
|
49081
49081
|
null,
|
|
49082
49082
|
null,
|
|
49083
49083
|
null
|
|
49084
|
-
]),
|
|
49084
|
+
]), path16 = _f[0], left = _f[1], top_1 = _f[2], width = _f[3], height = _f[4];
|
|
49085
49085
|
position2 = backgroundImage3.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage3.position;
|
|
49086
49086
|
x = getAbsoluteValue(position2[0], width);
|
|
49087
49087
|
y = getAbsoluteValue(position2[position2.length - 1], height);
|
|
@@ -49091,7 +49091,7 @@ var require_html2canvas = __commonJS({
|
|
|
49091
49091
|
processColorStops(backgroundImage3.stops, rx * 2).forEach(function(colorStop) {
|
|
49092
49092
|
return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
|
|
49093
49093
|
});
|
|
49094
|
-
this_1.path(
|
|
49094
|
+
this_1.path(path16);
|
|
49095
49095
|
this_1.ctx.fillStyle = radialGradient_1;
|
|
49096
49096
|
if (rx !== ry) {
|
|
49097
49097
|
midX = container.bounds.left + 0.5 * container.bounds.width;
|
|
@@ -52739,7 +52739,7 @@ var require_es_promise_constructor = __commonJS({
|
|
|
52739
52739
|
var IS_PURE = require_is_pure();
|
|
52740
52740
|
var IS_NODE = require_environment_is_node();
|
|
52741
52741
|
var globalThis2 = require_global_this();
|
|
52742
|
-
var
|
|
52742
|
+
var path16 = require_path();
|
|
52743
52743
|
var call = require_function_call();
|
|
52744
52744
|
var defineBuiltIn = require_define_built_in();
|
|
52745
52745
|
var setPrototypeOf = require_object_set_prototype_of();
|
|
@@ -52989,7 +52989,7 @@ var require_es_promise_constructor = __commonJS({
|
|
|
52989
52989
|
$2({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
52990
52990
|
Promise: PromiseConstructor
|
|
52991
52991
|
});
|
|
52992
|
-
PromiseWrapper =
|
|
52992
|
+
PromiseWrapper = path16.Promise;
|
|
52993
52993
|
setToStringTag(PromiseConstructor, PROMISE, false, true);
|
|
52994
52994
|
setSpecies(PROMISE);
|
|
52995
52995
|
}
|
|
@@ -56483,7 +56483,7 @@ var require_es_number_constructor = __commonJS({
|
|
|
56483
56483
|
var IS_PURE = require_is_pure();
|
|
56484
56484
|
var DESCRIPTORS = require_descriptors();
|
|
56485
56485
|
var globalThis2 = require_global_this();
|
|
56486
|
-
var
|
|
56486
|
+
var path16 = require_path();
|
|
56487
56487
|
var uncurryThis = require_function_uncurry_this();
|
|
56488
56488
|
var isForced = require_is_forced();
|
|
56489
56489
|
var hasOwn = require_has_own_property();
|
|
@@ -56499,7 +56499,7 @@ var require_es_number_constructor = __commonJS({
|
|
|
56499
56499
|
var trim = require_string_trim().trim;
|
|
56500
56500
|
var NUMBER = "Number";
|
|
56501
56501
|
var NativeNumber = globalThis2[NUMBER];
|
|
56502
|
-
var PureNumberNamespace =
|
|
56502
|
+
var PureNumberNamespace = path16[NUMBER];
|
|
56503
56503
|
var NumberPrototype = NativeNumber.prototype;
|
|
56504
56504
|
var TypeError2 = globalThis2.TypeError;
|
|
56505
56505
|
var stringSlice = uncurryThis("".slice);
|
|
@@ -56571,8 +56571,8 @@ var require_es_number_constructor = __commonJS({
|
|
|
56571
56571
|
}
|
|
56572
56572
|
}
|
|
56573
56573
|
};
|
|
56574
|
-
if (IS_PURE && PureNumberNamespace) copyConstructorProperties(
|
|
56575
|
-
if (FORCED || IS_PURE) copyConstructorProperties(
|
|
56574
|
+
if (IS_PURE && PureNumberNamespace) copyConstructorProperties(path16[NUMBER], PureNumberNamespace);
|
|
56575
|
+
if (FORCED || IS_PURE) copyConstructorProperties(path16[NUMBER], NativeNumber);
|
|
56576
56576
|
}
|
|
56577
56577
|
});
|
|
56578
56578
|
|
|
@@ -58687,8 +58687,8 @@ var require_lib2 = __commonJS({
|
|
|
58687
58687
|
}
|
|
58688
58688
|
}, {
|
|
58689
58689
|
key: "parsePath",
|
|
58690
|
-
value: function parsePath(
|
|
58691
|
-
var points = toNumbers(
|
|
58690
|
+
value: function parsePath(path16) {
|
|
58691
|
+
var points = toNumbers(path16);
|
|
58692
58692
|
var len = points.length;
|
|
58693
58693
|
var pathPoints = [];
|
|
58694
58694
|
for (var i = 0; i < len; i += 2) {
|
|
@@ -60189,10 +60189,10 @@ var require_lib2 = __commonJS({
|
|
|
60189
60189
|
var PathParser = /* @__PURE__ */ (function(_SVGPathData) {
|
|
60190
60190
|
_inherits__default["default"](PathParser2, _SVGPathData);
|
|
60191
60191
|
var _super = _createSuper$I(PathParser2);
|
|
60192
|
-
function PathParser2(
|
|
60192
|
+
function PathParser2(path16) {
|
|
60193
60193
|
var _this;
|
|
60194
60194
|
_classCallCheck__default["default"](this, PathParser2);
|
|
60195
|
-
_this = _super.call(this,
|
|
60195
|
+
_this = _super.call(this, path16.replace(/([+\-.])\s+/gm, "$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ""));
|
|
60196
60196
|
_this.control = null;
|
|
60197
60197
|
_this.start = null;
|
|
60198
60198
|
_this.current = null;
|
|
@@ -60520,7 +60520,7 @@ var require_lib2 = __commonJS({
|
|
|
60520
60520
|
}
|
|
60521
60521
|
_createClass__default["default"](PathElement2, [{
|
|
60522
60522
|
key: "path",
|
|
60523
|
-
value: function
|
|
60523
|
+
value: function path16(ctx) {
|
|
60524
60524
|
var pathParser = this.pathParser;
|
|
60525
60525
|
var boundingBox = new BoundingBox();
|
|
60526
60526
|
pathParser.reset();
|
|
@@ -61644,7 +61644,7 @@ var require_lib2 = __commonJS({
|
|
|
61644
61644
|
}
|
|
61645
61645
|
_createClass__default["default"](RectElement2, [{
|
|
61646
61646
|
key: "path",
|
|
61647
|
-
value: function
|
|
61647
|
+
value: function path16(ctx) {
|
|
61648
61648
|
var x = this.getAttribute("x").getPixels("x");
|
|
61649
61649
|
var y = this.getAttribute("y").getPixels("y");
|
|
61650
61650
|
var width = this.getStyle("width", false, true).getPixels("x");
|
|
@@ -61724,7 +61724,7 @@ var require_lib2 = __commonJS({
|
|
|
61724
61724
|
}
|
|
61725
61725
|
_createClass__default["default"](CircleElement2, [{
|
|
61726
61726
|
key: "path",
|
|
61727
|
-
value: function
|
|
61727
|
+
value: function path16(ctx) {
|
|
61728
61728
|
var cx = this.getAttribute("cx").getPixels("x");
|
|
61729
61729
|
var cy = this.getAttribute("cy").getPixels("y");
|
|
61730
61730
|
var r = this.getAttribute("r").getPixels();
|
|
@@ -61780,7 +61780,7 @@ var require_lib2 = __commonJS({
|
|
|
61780
61780
|
}
|
|
61781
61781
|
_createClass__default["default"](EllipseElement2, [{
|
|
61782
61782
|
key: "path",
|
|
61783
|
-
value: function
|
|
61783
|
+
value: function path16(ctx) {
|
|
61784
61784
|
var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
|
|
61785
61785
|
var rx = this.getAttribute("rx").getPixels("x");
|
|
61786
61786
|
var ry = this.getAttribute("ry").getPixels("y");
|
|
@@ -61847,7 +61847,7 @@ var require_lib2 = __commonJS({
|
|
|
61847
61847
|
}
|
|
61848
61848
|
}, {
|
|
61849
61849
|
key: "path",
|
|
61850
|
-
value: function
|
|
61850
|
+
value: function path16(ctx) {
|
|
61851
61851
|
var _this$getPoints = this.getPoints(), _this$getPoints2 = _slicedToArray__default["default"](_this$getPoints, 2), _this$getPoints2$ = _this$getPoints2[0], x0 = _this$getPoints2$.x, y0 = _this$getPoints2$.y, _this$getPoints2$2 = _this$getPoints2[1], x1 = _this$getPoints2$2.x, y1 = _this$getPoints2$2.y;
|
|
61852
61852
|
if (ctx) {
|
|
61853
61853
|
ctx.beginPath();
|
|
@@ -61905,7 +61905,7 @@ var require_lib2 = __commonJS({
|
|
|
61905
61905
|
}
|
|
61906
61906
|
_createClass__default["default"](PolylineElement2, [{
|
|
61907
61907
|
key: "path",
|
|
61908
|
-
value: function
|
|
61908
|
+
value: function path16(ctx) {
|
|
61909
61909
|
var points = this.points;
|
|
61910
61910
|
var _points = _slicedToArray__default["default"](points, 1), _points$ = _points[0], x0 = _points$.x, y0 = _points$.y;
|
|
61911
61911
|
var boundingBox = new BoundingBox(x0, y0);
|
|
@@ -61979,7 +61979,7 @@ var require_lib2 = __commonJS({
|
|
|
61979
61979
|
}
|
|
61980
61980
|
_createClass__default["default"](PolygonElement2, [{
|
|
61981
61981
|
key: "path",
|
|
61982
|
-
value: function
|
|
61982
|
+
value: function path16(ctx) {
|
|
61983
61983
|
var boundingBox = _get__default["default"](_getPrototypeOf__default["default"](PolygonElement2.prototype), "path", this).call(this, ctx);
|
|
61984
61984
|
var _this$points = _slicedToArray__default["default"](this.points, 1), _this$points$ = _this$points[0], x = _this$points$.x, y = _this$points$.y;
|
|
61985
61985
|
if (ctx) {
|
|
@@ -63230,7 +63230,7 @@ var require_lib2 = __commonJS({
|
|
|
63230
63230
|
}
|
|
63231
63231
|
}, {
|
|
63232
63232
|
key: "path",
|
|
63233
|
-
value: function
|
|
63233
|
+
value: function path16(ctx) {
|
|
63234
63234
|
var dataArray = this.dataArray;
|
|
63235
63235
|
if (ctx) {
|
|
63236
63236
|
ctx.beginPath();
|
|
@@ -63259,7 +63259,7 @@ var require_lib2 = __commonJS({
|
|
|
63259
63259
|
}
|
|
63260
63260
|
break;
|
|
63261
63261
|
case PathParser.ARC: {
|
|
63262
|
-
var _points = _slicedToArray__default["default"](points, 8), cx = _points[0], cy = _points[1], rx = _points[2], ry = _points[3], theta = _points[4], dTheta = _points[5], psi = _points[6],
|
|
63262
|
+
var _points = _slicedToArray__default["default"](points, 8), cx = _points[0], cy = _points[1], rx = _points[2], ry = _points[3], theta = _points[4], dTheta = _points[5], psi = _points[6], fs16 = _points[7];
|
|
63263
63263
|
var r = rx > ry ? rx : ry;
|
|
63264
63264
|
var scaleX = rx > ry ? 1 : rx / ry;
|
|
63265
63265
|
var scaleY = rx > ry ? ry / rx : 1;
|
|
@@ -63267,7 +63267,7 @@ var require_lib2 = __commonJS({
|
|
|
63267
63267
|
ctx.translate(cx, cy);
|
|
63268
63268
|
ctx.rotate(psi);
|
|
63269
63269
|
ctx.scale(scaleX, scaleY);
|
|
63270
|
-
ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 -
|
|
63270
|
+
ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs16));
|
|
63271
63271
|
ctx.scale(1 / scaleX, 1 / scaleY);
|
|
63272
63272
|
ctx.rotate(-psi);
|
|
63273
63273
|
ctx.translate(-cx, -cy);
|
|
@@ -63447,13 +63447,13 @@ var require_lib2 = __commonJS({
|
|
|
63447
63447
|
}
|
|
63448
63448
|
}, {
|
|
63449
63449
|
key: "parsePathData",
|
|
63450
|
-
value: function parsePathData(
|
|
63450
|
+
value: function parsePathData(path16) {
|
|
63451
63451
|
this.pathLength = -1;
|
|
63452
|
-
if (!
|
|
63452
|
+
if (!path16) {
|
|
63453
63453
|
return [];
|
|
63454
63454
|
}
|
|
63455
63455
|
var pathCommands = [];
|
|
63456
|
-
var pathParser =
|
|
63456
|
+
var pathParser = path16.pathParser;
|
|
63457
63457
|
pathParser.reset();
|
|
63458
63458
|
while (!pathParser.isEnd()) {
|
|
63459
63459
|
var current = pathParser.current;
|
|
@@ -64259,7 +64259,7 @@ var require_lib2 = __commonJS({
|
|
|
64259
64259
|
}
|
|
64260
64260
|
}, {
|
|
64261
64261
|
key: "path",
|
|
64262
|
-
value: function
|
|
64262
|
+
value: function path16(ctx) {
|
|
64263
64263
|
var element = this.element;
|
|
64264
64264
|
if (element) {
|
|
64265
64265
|
element.path(ctx);
|
|
@@ -75566,6 +75566,7 @@ var init_payroll = __esm({
|
|
|
75566
75566
|
// lib/perchBusinessTools/index.ts
|
|
75567
75567
|
var init_perchBusinessTools = __esm({
|
|
75568
75568
|
"lib/perchBusinessTools/index.ts"() {
|
|
75569
|
+
"use strict";
|
|
75569
75570
|
init_generateAPAuditPacket();
|
|
75570
75571
|
init_inventoryFolder();
|
|
75571
75572
|
init_loadBusinessTables();
|
|
@@ -86340,14 +86341,14 @@ function extractOne(tc, ts) {
|
|
|
86340
86341
|
}
|
|
86341
86342
|
if (tc.toolName === "readLocalFile" || tc.toolName === "readLocalSourceFile") {
|
|
86342
86343
|
const content = String(parsed?.content ?? tc.result ?? "").trim();
|
|
86343
|
-
const
|
|
86344
|
+
const path16 = String(tc.input?.path ?? "");
|
|
86344
86345
|
return {
|
|
86345
86346
|
id: `ev-${tc.toolCallId}-fileread`,
|
|
86346
86347
|
type: "fileRead",
|
|
86347
86348
|
toolName: tc.toolName,
|
|
86348
|
-
title: `readFile: ${
|
|
86349
|
+
title: `readFile: ${path16 || "local file"}`,
|
|
86349
86350
|
excerpt: truncate2(content, RICH_EXCERPT_CHARS),
|
|
86350
|
-
workspacePath:
|
|
86351
|
+
workspacePath: path16 || null,
|
|
86351
86352
|
timestamp: ts,
|
|
86352
86353
|
ok: tc.ok
|
|
86353
86354
|
};
|
|
@@ -86436,8 +86437,8 @@ function serializeThreadEvidenceForPrompt(items) {
|
|
|
86436
86437
|
"The following tool results from prior turns are available for this turn. Treat them as already-completed work. Do not repeat searches, reads, drafts, or deliveries unless the user explicitly asks to redo them.",
|
|
86437
86438
|
...recent.map((item, idx) => {
|
|
86438
86439
|
const status = item.ok ? "ok" : "failed";
|
|
86439
|
-
const
|
|
86440
|
-
return `[E${idx + 1}] ${item.type} via ${item.toolName} (${status}): ${item.title}${
|
|
86440
|
+
const path16 = item.workspacePath ? ` path=${item.workspacePath}` : "";
|
|
86441
|
+
return `[E${idx + 1}] ${item.type} via ${item.toolName} (${status}): ${item.title}${path16}
|
|
86441
86442
|
${item.excerpt}`;
|
|
86442
86443
|
})
|
|
86443
86444
|
].join("\n");
|
|
@@ -86722,7 +86723,6 @@ function truncateHistoryLine(value, max2) {
|
|
|
86722
86723
|
}
|
|
86723
86724
|
var init_operatorTruth = __esm({
|
|
86724
86725
|
"features/perchTerminal/runtime/operatorTruth.ts"() {
|
|
86725
|
-
"use strict";
|
|
86726
86726
|
}
|
|
86727
86727
|
});
|
|
86728
86728
|
|
|
@@ -92918,6 +92918,39 @@ var init_agentSkillRegistry = __esm({
|
|
|
92918
92918
|
"readLocalFile"
|
|
92919
92919
|
]
|
|
92920
92920
|
},
|
|
92921
|
+
{
|
|
92922
|
+
"id": "release",
|
|
92923
|
+
"name": "release",
|
|
92924
|
+
"description": "Prepare and ship a Perch release \u2014 bump, build, pack, commit, tag, and push the CLI up to the publish handoff, or trigger the desktop release workflow, with strict permission gates.",
|
|
92925
|
+
"path": "features/perchTerminal/agentPlatform/skills/release/SKILL.md",
|
|
92926
|
+
"body": "\n# release\n\nUse this skill when the user asks Perch to cut a release: ship a new `perchai-cli` version, repackage the CLI, bump the version, or trigger a desktop build. This runs on any surface with a local shell (the field CLI and the desktop app); a hosted-only surface cannot release.\n\n## CLI release\n\nThe CLI release is a single audited command \u2014 do not improvise raw `git`/`npm` sequences. Use `npm run cli:release`.\n\n1. Always start with a dry run: `npm run cli:release` (or `npm run cli:release -- --minor` / `-- --set X.Y.Z`). It prints the ordered plan and runs read-only preflight (clean tree, unused tag, test gate) without changing anything.\n2. Show the user the planned version, tag, and steps. Get an explicit yes before mutating.\n3. Execute with `npm run cli:release -- --execute`. It bumps `packages/cli/package.json`, rebuilds the bundle, packs the tarball, commits, tags `cli-vX.Y.Z`, and pushes \u2014 then STOPS.\n4. It never publishes. Hand the publish back to the user verbatim: `cd packages/cli && npm publish`, run with their own npm token. State the prepared version, the commit, the tag, and the tarball path.\n\nUse `-- --no-push` to keep the commit and tag local; `-- --skip-tests` only when the user explicitly accepts skipping the gate.\n\n## Desktop release\n\nThe desktop installers build in CI, not locally. Use `npm run desktop:release` (optionally with a version and channel). It triggers the desktop release workflow through the GitHub CLI, which builds the macOS and Windows installers and publishes them to the configured download bucket. This requires the GitHub CLI to be installed and authenticated; if it is missing, say so and stop rather than guessing.\n\nPair this with `wait-operator` when the user wants to watch the workflow to completion: poll bounded status, read the failing job logs when available, and report the final result with the run URL.\n\n## Permission and verification\n\n- Protect unrelated work. The CLI release refuses to run with a dirty tree on purpose, so only the bump, bundle, and tarball land in the release commit. Never stage or sweep unrelated changes to satisfy it \u2014 commit or stash those first.\n- Treat push and publish as irreversible. Confirm before push; never publish on the user's behalf.\n- Before finishing, report the resolved version, commit SHA, tag, push target, tarball path, the exact publish command left for the user, and any workflow or run URL when a desktop release was triggered.",
|
|
92927
|
+
"surface": {
|
|
92928
|
+
"gui": "supported",
|
|
92929
|
+
"cli": "supported"
|
|
92930
|
+
},
|
|
92931
|
+
"triggerHints": [
|
|
92932
|
+
"release the cli",
|
|
92933
|
+
"ship the cli",
|
|
92934
|
+
"publish the cli",
|
|
92935
|
+
"cut a release",
|
|
92936
|
+
"bump version",
|
|
92937
|
+
"package the cli",
|
|
92938
|
+
"desktop release",
|
|
92939
|
+
"tag and push"
|
|
92940
|
+
],
|
|
92941
|
+
"companionSkills": [
|
|
92942
|
+
"github",
|
|
92943
|
+
"wait-operator",
|
|
92944
|
+
"workspace"
|
|
92945
|
+
],
|
|
92946
|
+
"preferredTools": [
|
|
92947
|
+
"bash",
|
|
92948
|
+
"runBashTerminalCommand",
|
|
92949
|
+
"grep",
|
|
92950
|
+
"readLocalFile",
|
|
92951
|
+
"writeLocalFile"
|
|
92952
|
+
]
|
|
92953
|
+
},
|
|
92921
92954
|
{
|
|
92922
92955
|
"id": "research",
|
|
92923
92956
|
"name": "research",
|
|
@@ -93262,6 +93295,7 @@ var init_skillSelector = __esm({
|
|
|
93262
93295
|
]);
|
|
93263
93296
|
CORE_PRIORITY = [
|
|
93264
93297
|
"wait-operator",
|
|
93298
|
+
"release",
|
|
93265
93299
|
"github",
|
|
93266
93300
|
"data-quality",
|
|
93267
93301
|
"presentations",
|
|
@@ -93302,6 +93336,10 @@ var init_skillSelector = __esm({
|
|
|
93302
93336
|
/\b(github|git\s+(?:status|diff|log|show|commit|push|pull|branch)|commit\s+(?:these|changes|and\s+push)|push\s+(?:this|the|branch)|pull\s+request|pr\s+#?\d*|review\s+commits?|github\s+checks?|ci\s+(?:failure|checks?|run)|release\s+branch)\b/i,
|
|
93303
93337
|
/\b(stage|commit|push)\b.{0,56}\b(changes?|branch|repo|github)\b/i
|
|
93304
93338
|
],
|
|
93339
|
+
release: [
|
|
93340
|
+
/\b(release|ship|publish|repackage)\b.{0,32}\b(cli|perch|desktop|app|version|build|package|installer)\b/i,
|
|
93341
|
+
/\b(cut\s+a\s+release|bump\s+(?:the\s+)?version|tag\s+and\s+push|new\s+(?:cli\s+)?version)\b/i
|
|
93342
|
+
],
|
|
93305
93343
|
"wait-operator": [
|
|
93306
93344
|
/\b(wait\s+(?:for|until)|watch\s+(?:the|this)?|poll\s+(?:status|until|for)|keep\s+checking|check\s+(?:until|back|again)|monitor\s+(?:progress|status|deploy)|long[-\s]?running\s+task|deployment\s+status|wake\s+when\s+done)\b/i,
|
|
93307
93345
|
/\b(vercel|deploy(?:ment)?|github\s+actions?|ci|checks?|background\s+job|server|localhost)\b.{0,64}\b(ready|done|finish(?:ed)?|complete|succeed(?:ed)?|fail(?:ed)?|status)\b/i
|
|
@@ -94618,13 +94656,13 @@ function __disposeResources(env4) {
|
|
|
94618
94656
|
}
|
|
94619
94657
|
return next();
|
|
94620
94658
|
}
|
|
94621
|
-
function __rewriteRelativeImportExtension(
|
|
94622
|
-
if (typeof
|
|
94623
|
-
return
|
|
94659
|
+
function __rewriteRelativeImportExtension(path16, preserveJsx) {
|
|
94660
|
+
if (typeof path16 === "string" && /^\.\.?\//.test(path16)) {
|
|
94661
|
+
return path16.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
94624
94662
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
94625
94663
|
});
|
|
94626
94664
|
}
|
|
94627
|
-
return
|
|
94665
|
+
return path16;
|
|
94628
94666
|
}
|
|
94629
94667
|
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
94630
94668
|
var init_tslib_es6 = __esm({
|
|
@@ -104146,8 +104184,8 @@ var require_main2 = __commonJS({
|
|
|
104146
104184
|
});
|
|
104147
104185
|
|
|
104148
104186
|
// node_modules/iceberg-js/dist/index.mjs
|
|
104149
|
-
function buildUrl(baseUrl,
|
|
104150
|
-
const url = new URL(
|
|
104187
|
+
function buildUrl(baseUrl, path16, query) {
|
|
104188
|
+
const url = new URL(path16, baseUrl);
|
|
104151
104189
|
if (query) {
|
|
104152
104190
|
for (const [key, value] of Object.entries(query)) {
|
|
104153
104191
|
if (value !== void 0) {
|
|
@@ -104177,12 +104215,12 @@ function createFetchClient(options) {
|
|
|
104177
104215
|
return {
|
|
104178
104216
|
async request({
|
|
104179
104217
|
method,
|
|
104180
|
-
path:
|
|
104218
|
+
path: path16,
|
|
104181
104219
|
query,
|
|
104182
104220
|
body,
|
|
104183
104221
|
headers
|
|
104184
104222
|
}) {
|
|
104185
|
-
const url = buildUrl(options.baseUrl,
|
|
104223
|
+
const url = buildUrl(options.baseUrl, path16, query);
|
|
104186
104224
|
const authHeaders = await buildAuthHeaders(options.auth);
|
|
104187
104225
|
const res = await fetchFn(url, {
|
|
104188
104226
|
method,
|
|
@@ -105080,7 +105118,7 @@ var init_dist3 = __esm({
|
|
|
105080
105118
|
* @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
|
|
105081
105119
|
* @param fileBody The body of the file to be stored in the bucket.
|
|
105082
105120
|
*/
|
|
105083
|
-
async uploadOrUpdate(method,
|
|
105121
|
+
async uploadOrUpdate(method, path16, fileBody, fileOptions) {
|
|
105084
105122
|
var _this = this;
|
|
105085
105123
|
return _this.handleOperation(async () => {
|
|
105086
105124
|
let body;
|
|
@@ -105104,7 +105142,7 @@ var init_dist3 = __esm({
|
|
|
105104
105142
|
if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
|
|
105105
105143
|
}
|
|
105106
105144
|
if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
|
|
105107
|
-
const cleanPath = _this._removeEmptyFolders(
|
|
105145
|
+
const cleanPath = _this._removeEmptyFolders(path16);
|
|
105108
105146
|
const _path = _this._getFinalPath(cleanPath);
|
|
105109
105147
|
const data = await (method == "PUT" ? put : post)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread22({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}));
|
|
105110
105148
|
return {
|
|
@@ -105166,8 +105204,8 @@ var init_dist3 = __esm({
|
|
|
105166
105204
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105167
105205
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
105168
105206
|
*/
|
|
105169
|
-
async upload(
|
|
105170
|
-
return this.uploadOrUpdate("POST",
|
|
105207
|
+
async upload(path16, fileBody, fileOptions) {
|
|
105208
|
+
return this.uploadOrUpdate("POST", path16, fileBody, fileOptions);
|
|
105171
105209
|
}
|
|
105172
105210
|
/**
|
|
105173
105211
|
* Upload a file with a token generated from `createSignedUploadUrl`.
|
|
@@ -105207,9 +105245,9 @@ var init_dist3 = __esm({
|
|
|
105207
105245
|
* - `objects` table permissions: none
|
|
105208
105246
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105209
105247
|
*/
|
|
105210
|
-
async uploadToSignedUrl(
|
|
105248
|
+
async uploadToSignedUrl(path16, token, fileBody, fileOptions) {
|
|
105211
105249
|
var _this3 = this;
|
|
105212
|
-
const cleanPath = _this3._removeEmptyFolders(
|
|
105250
|
+
const cleanPath = _this3._removeEmptyFolders(path16);
|
|
105213
105251
|
const _path = _this3._getFinalPath(cleanPath);
|
|
105214
105252
|
const url = new URL(_this3.url + `/object/upload/sign/${_path}`);
|
|
105215
105253
|
url.searchParams.set("token", token);
|
|
@@ -105278,10 +105316,10 @@ var init_dist3 = __esm({
|
|
|
105278
105316
|
* - `objects` table permissions: `insert`
|
|
105279
105317
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105280
105318
|
*/
|
|
105281
|
-
async createSignedUploadUrl(
|
|
105319
|
+
async createSignedUploadUrl(path16, options) {
|
|
105282
105320
|
var _this4 = this;
|
|
105283
105321
|
return _this4.handleOperation(async () => {
|
|
105284
|
-
let _path = _this4._getFinalPath(
|
|
105322
|
+
let _path = _this4._getFinalPath(path16);
|
|
105285
105323
|
const headers = _objectSpread22({}, _this4.headers);
|
|
105286
105324
|
if (options === null || options === void 0 ? void 0 : options.upsert) headers["x-upsert"] = "true";
|
|
105287
105325
|
const data = await post(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
|
|
@@ -105290,7 +105328,7 @@ var init_dist3 = __esm({
|
|
|
105290
105328
|
if (!token) throw new StorageError("No token returned by API");
|
|
105291
105329
|
return {
|
|
105292
105330
|
signedUrl: url.toString(),
|
|
105293
|
-
path:
|
|
105331
|
+
path: path16,
|
|
105294
105332
|
token
|
|
105295
105333
|
};
|
|
105296
105334
|
});
|
|
@@ -105350,8 +105388,8 @@ var init_dist3 = __esm({
|
|
|
105350
105388
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105351
105389
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
105352
105390
|
*/
|
|
105353
|
-
async update(
|
|
105354
|
-
return this.uploadOrUpdate("PUT",
|
|
105391
|
+
async update(path16, fileBody, fileOptions) {
|
|
105392
|
+
return this.uploadOrUpdate("PUT", path16, fileBody, fileOptions);
|
|
105355
105393
|
}
|
|
105356
105394
|
/**
|
|
105357
105395
|
* Moves an existing file to a new path in the same bucket.
|
|
@@ -105502,10 +105540,10 @@ var init_dist3 = __esm({
|
|
|
105502
105540
|
* - `objects` table permissions: `select`
|
|
105503
105541
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105504
105542
|
*/
|
|
105505
|
-
async createSignedUrl(
|
|
105543
|
+
async createSignedUrl(path16, expiresIn, options) {
|
|
105506
105544
|
var _this8 = this;
|
|
105507
105545
|
return _this8.handleOperation(async () => {
|
|
105508
|
-
let _path = _this8._getFinalPath(
|
|
105546
|
+
let _path = _this8._getFinalPath(path16);
|
|
105509
105547
|
const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
|
|
105510
105548
|
let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread22({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
|
|
105511
105549
|
const query = new URLSearchParams();
|
|
@@ -105641,13 +105679,13 @@ var init_dist3 = __esm({
|
|
|
105641
105679
|
* - `objects` table permissions: `select`
|
|
105642
105680
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105643
105681
|
*/
|
|
105644
|
-
download(
|
|
105682
|
+
download(path16, options, parameters) {
|
|
105645
105683
|
const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0 ? "render/image/authenticated" : "object";
|
|
105646
105684
|
const query = new URLSearchParams();
|
|
105647
105685
|
if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
|
|
105648
105686
|
if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
|
|
105649
105687
|
const queryString = query.toString();
|
|
105650
|
-
const _path = this._getFinalPath(
|
|
105688
|
+
const _path = this._getFinalPath(path16);
|
|
105651
105689
|
const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
|
|
105652
105690
|
headers: this.headers,
|
|
105653
105691
|
noResolveJson: true
|
|
@@ -105678,9 +105716,9 @@ var init_dist3 = __esm({
|
|
|
105678
105716
|
* }
|
|
105679
105717
|
* ```
|
|
105680
105718
|
*/
|
|
105681
|
-
async info(
|
|
105719
|
+
async info(path16) {
|
|
105682
105720
|
var _this10 = this;
|
|
105683
|
-
const _path = _this10._getFinalPath(
|
|
105721
|
+
const _path = _this10._getFinalPath(path16);
|
|
105684
105722
|
return _this10.handleOperation(async () => {
|
|
105685
105723
|
return recursiveToCamel(await get(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
|
|
105686
105724
|
});
|
|
@@ -105701,9 +105739,9 @@ var init_dist3 = __esm({
|
|
|
105701
105739
|
* .exists('folder/avatar1.png')
|
|
105702
105740
|
* ```
|
|
105703
105741
|
*/
|
|
105704
|
-
async exists(
|
|
105742
|
+
async exists(path16) {
|
|
105705
105743
|
var _this11 = this;
|
|
105706
|
-
const _path = _this11._getFinalPath(
|
|
105744
|
+
const _path = _this11._getFinalPath(path16);
|
|
105707
105745
|
try {
|
|
105708
105746
|
await head(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
|
|
105709
105747
|
return {
|
|
@@ -105782,8 +105820,8 @@ var init_dist3 = __esm({
|
|
|
105782
105820
|
* - `objects` table permissions: none
|
|
105783
105821
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105784
105822
|
*/
|
|
105785
|
-
getPublicUrl(
|
|
105786
|
-
const _path = this._getFinalPath(
|
|
105823
|
+
getPublicUrl(path16, options) {
|
|
105824
|
+
const _path = this._getFinalPath(path16);
|
|
105787
105825
|
const query = new URLSearchParams();
|
|
105788
105826
|
if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
|
|
105789
105827
|
if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
|
|
@@ -105922,10 +105960,10 @@ var init_dist3 = __esm({
|
|
|
105922
105960
|
* - `objects` table permissions: `select`
|
|
105923
105961
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
105924
105962
|
*/
|
|
105925
|
-
async list(
|
|
105963
|
+
async list(path16, options, parameters) {
|
|
105926
105964
|
var _this13 = this;
|
|
105927
105965
|
return _this13.handleOperation(async () => {
|
|
105928
|
-
const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options), {}, { prefix:
|
|
105966
|
+
const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options), {}, { prefix: path16 || "" });
|
|
105929
105967
|
return await post(_this13.fetch, `${_this13.url}/object/list/${_this13.bucketId}`, body, { headers: _this13.headers }, parameters);
|
|
105930
105968
|
});
|
|
105931
105969
|
}
|
|
@@ -105990,11 +106028,11 @@ var init_dist3 = __esm({
|
|
|
105990
106028
|
if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
|
|
105991
106029
|
return btoa(data);
|
|
105992
106030
|
}
|
|
105993
|
-
_getFinalPath(
|
|
105994
|
-
return `${this.bucketId}/${
|
|
106031
|
+
_getFinalPath(path16) {
|
|
106032
|
+
return `${this.bucketId}/${path16.replace(/^\/+/, "")}`;
|
|
105995
106033
|
}
|
|
105996
|
-
_removeEmptyFolders(
|
|
105997
|
-
return
|
|
106034
|
+
_removeEmptyFolders(path16) {
|
|
106035
|
+
return path16.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
|
|
105998
106036
|
}
|
|
105999
106037
|
/** Modifies the `query`, appending values the from `transform` */
|
|
106000
106038
|
applyTransformOptsToQuery(query, transform) {
|
|
@@ -117472,9 +117510,9 @@ function fetchClaudeCodeMessages(option, opts, model) {
|
|
|
117472
117510
|
signal: providerAbort.signal
|
|
117473
117511
|
}).finally(providerAbort.clear);
|
|
117474
117512
|
}
|
|
117475
|
-
function claudeCodeEndpoint(
|
|
117513
|
+
function claudeCodeEndpoint(path16) {
|
|
117476
117514
|
const base = (envVar("CLAUDE_CODE_BASE_URL") ?? envVar("CLAUDE_CODE_BACKEND_BASE_URL") ?? "https://api.anthropic.com").replace(/\/$/, "");
|
|
117477
|
-
const endpoint = base.endsWith(`/v1/${
|
|
117515
|
+
const endpoint = base.endsWith(`/v1/${path16}`) || base.endsWith(`/${path16}`) ? base : `${base}/v1/${path16}`;
|
|
117478
117516
|
const url = new URL(endpoint);
|
|
117479
117517
|
url.searchParams.set("beta", "true");
|
|
117480
117518
|
return url.toString();
|
|
@@ -117728,9 +117766,9 @@ function parseCodexToolCallItem(item, index) {
|
|
|
117728
117766
|
rawArgumentsText
|
|
117729
117767
|
};
|
|
117730
117768
|
}
|
|
117731
|
-
function codexEndpoint(
|
|
117769
|
+
function codexEndpoint(path16) {
|
|
117732
117770
|
const base = (envVar("CODEX_BACKEND_BASE_URL") ?? envVar("CODEX_OAUTH_BASE_URL") ?? "https://chatgpt.com/backend-api/codex").replace(/\/$/, "");
|
|
117733
|
-
const endpoint = base.endsWith(`/${
|
|
117771
|
+
const endpoint = base.endsWith(`/${path16}`) ? base : `${base}/${path16}`;
|
|
117734
117772
|
const url = new URL(endpoint);
|
|
117735
117773
|
url.searchParams.set("client_version", codexClientVersion());
|
|
117736
117774
|
return url.toString();
|
|
@@ -125354,8 +125392,8 @@ var require_dist2 = __commonJS({
|
|
|
125354
125392
|
return this.status === 419;
|
|
125355
125393
|
}
|
|
125356
125394
|
};
|
|
125357
|
-
function buildUrl2(baseUrl,
|
|
125358
|
-
const url = new URL(
|
|
125395
|
+
function buildUrl2(baseUrl, path16, query) {
|
|
125396
|
+
const url = new URL(path16, baseUrl);
|
|
125359
125397
|
if (query) {
|
|
125360
125398
|
for (const [key, value] of Object.entries(query)) {
|
|
125361
125399
|
if (value !== void 0) {
|
|
@@ -125385,12 +125423,12 @@ var require_dist2 = __commonJS({
|
|
|
125385
125423
|
return {
|
|
125386
125424
|
async request({
|
|
125387
125425
|
method,
|
|
125388
|
-
path:
|
|
125426
|
+
path: path16,
|
|
125389
125427
|
query,
|
|
125390
125428
|
body,
|
|
125391
125429
|
headers
|
|
125392
125430
|
}) {
|
|
125393
|
-
const url = buildUrl2(options.baseUrl,
|
|
125431
|
+
const url = buildUrl2(options.baseUrl, path16, query);
|
|
125394
125432
|
const authHeaders = await buildAuthHeaders2(options.auth);
|
|
125395
125433
|
const res = await fetchFn(url, {
|
|
125396
125434
|
method,
|
|
@@ -126331,7 +126369,7 @@ var require_dist3 = __commonJS({
|
|
|
126331
126369
|
* @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
|
|
126332
126370
|
* @param fileBody The body of the file to be stored in the bucket.
|
|
126333
126371
|
*/
|
|
126334
|
-
async uploadOrUpdate(method,
|
|
126372
|
+
async uploadOrUpdate(method, path16, fileBody, fileOptions) {
|
|
126335
126373
|
var _this = this;
|
|
126336
126374
|
return _this.handleOperation(async () => {
|
|
126337
126375
|
let body;
|
|
@@ -126355,7 +126393,7 @@ var require_dist3 = __commonJS({
|
|
|
126355
126393
|
if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
|
|
126356
126394
|
}
|
|
126357
126395
|
if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader2(headers, key, value);
|
|
126358
|
-
const cleanPath = _this._removeEmptyFolders(
|
|
126396
|
+
const cleanPath = _this._removeEmptyFolders(path16);
|
|
126359
126397
|
const _path = _this._getFinalPath(cleanPath);
|
|
126360
126398
|
const data = await (method == "PUT" ? put2 : post2)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread24({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}));
|
|
126361
126399
|
return {
|
|
@@ -126417,8 +126455,8 @@ var require_dist3 = __commonJS({
|
|
|
126417
126455
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126418
126456
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
126419
126457
|
*/
|
|
126420
|
-
async upload(
|
|
126421
|
-
return this.uploadOrUpdate("POST",
|
|
126458
|
+
async upload(path16, fileBody, fileOptions) {
|
|
126459
|
+
return this.uploadOrUpdate("POST", path16, fileBody, fileOptions);
|
|
126422
126460
|
}
|
|
126423
126461
|
/**
|
|
126424
126462
|
* Upload a file with a token generated from `createSignedUploadUrl`.
|
|
@@ -126458,9 +126496,9 @@ var require_dist3 = __commonJS({
|
|
|
126458
126496
|
* - `objects` table permissions: none
|
|
126459
126497
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126460
126498
|
*/
|
|
126461
|
-
async uploadToSignedUrl(
|
|
126499
|
+
async uploadToSignedUrl(path16, token, fileBody, fileOptions) {
|
|
126462
126500
|
var _this3 = this;
|
|
126463
|
-
const cleanPath = _this3._removeEmptyFolders(
|
|
126501
|
+
const cleanPath = _this3._removeEmptyFolders(path16);
|
|
126464
126502
|
const _path = _this3._getFinalPath(cleanPath);
|
|
126465
126503
|
const url = new URL(_this3.url + `/object/upload/sign/${_path}`);
|
|
126466
126504
|
url.searchParams.set("token", token);
|
|
@@ -126529,10 +126567,10 @@ var require_dist3 = __commonJS({
|
|
|
126529
126567
|
* - `objects` table permissions: `insert`
|
|
126530
126568
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126531
126569
|
*/
|
|
126532
|
-
async createSignedUploadUrl(
|
|
126570
|
+
async createSignedUploadUrl(path16, options) {
|
|
126533
126571
|
var _this4 = this;
|
|
126534
126572
|
return _this4.handleOperation(async () => {
|
|
126535
|
-
let _path = _this4._getFinalPath(
|
|
126573
|
+
let _path = _this4._getFinalPath(path16);
|
|
126536
126574
|
const headers = _objectSpread24({}, _this4.headers);
|
|
126537
126575
|
if (options === null || options === void 0 ? void 0 : options.upsert) headers["x-upsert"] = "true";
|
|
126538
126576
|
const data = await post2(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
|
|
@@ -126541,7 +126579,7 @@ var require_dist3 = __commonJS({
|
|
|
126541
126579
|
if (!token) throw new StorageError2("No token returned by API");
|
|
126542
126580
|
return {
|
|
126543
126581
|
signedUrl: url.toString(),
|
|
126544
|
-
path:
|
|
126582
|
+
path: path16,
|
|
126545
126583
|
token
|
|
126546
126584
|
};
|
|
126547
126585
|
});
|
|
@@ -126601,8 +126639,8 @@ var require_dist3 = __commonJS({
|
|
|
126601
126639
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126602
126640
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
126603
126641
|
*/
|
|
126604
|
-
async update(
|
|
126605
|
-
return this.uploadOrUpdate("PUT",
|
|
126642
|
+
async update(path16, fileBody, fileOptions) {
|
|
126643
|
+
return this.uploadOrUpdate("PUT", path16, fileBody, fileOptions);
|
|
126606
126644
|
}
|
|
126607
126645
|
/**
|
|
126608
126646
|
* Moves an existing file to a new path in the same bucket.
|
|
@@ -126753,10 +126791,10 @@ var require_dist3 = __commonJS({
|
|
|
126753
126791
|
* - `objects` table permissions: `select`
|
|
126754
126792
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126755
126793
|
*/
|
|
126756
|
-
async createSignedUrl(
|
|
126794
|
+
async createSignedUrl(path16, expiresIn, options) {
|
|
126757
126795
|
var _this8 = this;
|
|
126758
126796
|
return _this8.handleOperation(async () => {
|
|
126759
|
-
let _path = _this8._getFinalPath(
|
|
126797
|
+
let _path = _this8._getFinalPath(path16);
|
|
126760
126798
|
const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
|
|
126761
126799
|
let data = await post2(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread24({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
|
|
126762
126800
|
const query = new URLSearchParams();
|
|
@@ -126892,13 +126930,13 @@ var require_dist3 = __commonJS({
|
|
|
126892
126930
|
* - `objects` table permissions: `select`
|
|
126893
126931
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
126894
126932
|
*/
|
|
126895
|
-
download(
|
|
126933
|
+
download(path16, options, parameters) {
|
|
126896
126934
|
const renderPath = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0 ? "render/image/authenticated" : "object";
|
|
126897
126935
|
const query = new URLSearchParams();
|
|
126898
126936
|
if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
|
|
126899
126937
|
if ((options === null || options === void 0 ? void 0 : options.cacheNonce) != null) query.set("cacheNonce", String(options.cacheNonce));
|
|
126900
126938
|
const queryString = query.toString();
|
|
126901
|
-
const _path = this._getFinalPath(
|
|
126939
|
+
const _path = this._getFinalPath(path16);
|
|
126902
126940
|
const downloadFn = () => get3(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
|
|
126903
126941
|
headers: this.headers,
|
|
126904
126942
|
noResolveJson: true
|
|
@@ -126929,9 +126967,9 @@ var require_dist3 = __commonJS({
|
|
|
126929
126967
|
* }
|
|
126930
126968
|
* ```
|
|
126931
126969
|
*/
|
|
126932
|
-
async info(
|
|
126970
|
+
async info(path16) {
|
|
126933
126971
|
var _this10 = this;
|
|
126934
|
-
const _path = _this10._getFinalPath(
|
|
126972
|
+
const _path = _this10._getFinalPath(path16);
|
|
126935
126973
|
return _this10.handleOperation(async () => {
|
|
126936
126974
|
return recursiveToCamel2(await get3(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
|
|
126937
126975
|
});
|
|
@@ -126952,9 +126990,9 @@ var require_dist3 = __commonJS({
|
|
|
126952
126990
|
* .exists('folder/avatar1.png')
|
|
126953
126991
|
* ```
|
|
126954
126992
|
*/
|
|
126955
|
-
async exists(
|
|
126993
|
+
async exists(path16) {
|
|
126956
126994
|
var _this11 = this;
|
|
126957
|
-
const _path = _this11._getFinalPath(
|
|
126995
|
+
const _path = _this11._getFinalPath(path16);
|
|
126958
126996
|
try {
|
|
126959
126997
|
await head2(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
|
|
126960
126998
|
return {
|
|
@@ -127033,8 +127071,8 @@ var require_dist3 = __commonJS({
|
|
|
127033
127071
|
* - `objects` table permissions: none
|
|
127034
127072
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
127035
127073
|
*/
|
|
127036
|
-
getPublicUrl(
|
|
127037
|
-
const _path = this._getFinalPath(
|
|
127074
|
+
getPublicUrl(path16, options) {
|
|
127075
|
+
const _path = this._getFinalPath(path16);
|
|
127038
127076
|
const query = new URLSearchParams();
|
|
127039
127077
|
if (options === null || options === void 0 ? void 0 : options.download) query.set("download", options.download === true ? "" : options.download);
|
|
127040
127078
|
if (options === null || options === void 0 ? void 0 : options.transform) this.applyTransformOptsToQuery(query, options.transform);
|
|
@@ -127173,10 +127211,10 @@ var require_dist3 = __commonJS({
|
|
|
127173
127211
|
* - `objects` table permissions: `select`
|
|
127174
127212
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
127175
127213
|
*/
|
|
127176
|
-
async list(
|
|
127214
|
+
async list(path16, options, parameters) {
|
|
127177
127215
|
var _this13 = this;
|
|
127178
127216
|
return _this13.handleOperation(async () => {
|
|
127179
|
-
const body = _objectSpread24(_objectSpread24(_objectSpread24({}, DEFAULT_SEARCH_OPTIONS2), options), {}, { prefix:
|
|
127217
|
+
const body = _objectSpread24(_objectSpread24(_objectSpread24({}, DEFAULT_SEARCH_OPTIONS2), options), {}, { prefix: path16 || "" });
|
|
127180
127218
|
return await post2(_this13.fetch, `${_this13.url}/object/list/${_this13.bucketId}`, body, { headers: _this13.headers }, parameters);
|
|
127181
127219
|
});
|
|
127182
127220
|
}
|
|
@@ -127241,11 +127279,11 @@ var require_dist3 = __commonJS({
|
|
|
127241
127279
|
if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
|
|
127242
127280
|
return btoa(data);
|
|
127243
127281
|
}
|
|
127244
|
-
_getFinalPath(
|
|
127245
|
-
return `${this.bucketId}/${
|
|
127282
|
+
_getFinalPath(path16) {
|
|
127283
|
+
return `${this.bucketId}/${path16.replace(/^\/+/, "")}`;
|
|
127246
127284
|
}
|
|
127247
|
-
_removeEmptyFolders(
|
|
127248
|
-
return
|
|
127285
|
+
_removeEmptyFolders(path16) {
|
|
127286
|
+
return path16.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
|
|
127249
127287
|
}
|
|
127250
127288
|
/** Modifies the `query`, appending values the from `transform` */
|
|
127251
127289
|
applyTransformOptsToQuery(query, transform) {
|
|
@@ -138279,11 +138317,11 @@ async function pickFolder(request) {
|
|
|
138279
138317
|
if (result2.ok) notifyApprovedRootsChanged();
|
|
138280
138318
|
return result2;
|
|
138281
138319
|
}
|
|
138282
|
-
async function approveFolderAccess(
|
|
138320
|
+
async function approveFolderAccess(path16, options) {
|
|
138283
138321
|
const bridge = getDesktopBridge();
|
|
138284
138322
|
if (!bridge) return { ok: false, error: LOCAL_WORKSPACE_ACCESS_UNAVAILABLE };
|
|
138285
138323
|
const result2 = await bridge.approveFolderAccess({
|
|
138286
|
-
path:
|
|
138324
|
+
path: path16,
|
|
138287
138325
|
permissionMode: currentPermissionMode(),
|
|
138288
138326
|
grantedVia: options?.grantedVia ?? null
|
|
138289
138327
|
});
|
|
@@ -139308,8 +139346,8 @@ function wrapReason(ex) {
|
|
|
139308
139346
|
return new UnknownErrorException(ex.message, ex.toString());
|
|
139309
139347
|
}
|
|
139310
139348
|
async function node_utils_fetchData(url) {
|
|
139311
|
-
const
|
|
139312
|
-
const data = await
|
|
139349
|
+
const fs16 = process.getBuiltinModule("fs");
|
|
139350
|
+
const data = await fs16.promises.readFile(url);
|
|
139313
139351
|
return new Uint8Array(data);
|
|
139314
139352
|
}
|
|
139315
139353
|
function applyBoundingBox(ctx, bbox) {
|
|
@@ -139710,7 +139748,7 @@ function compileType3Glyph(imgData) {
|
|
|
139710
139748
|
return null;
|
|
139711
139749
|
}
|
|
139712
139750
|
const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);
|
|
139713
|
-
const
|
|
139751
|
+
const path16 = new Path2D();
|
|
139714
139752
|
for (i = 0; count && i <= height; i++) {
|
|
139715
139753
|
let p = i * width1;
|
|
139716
139754
|
const end = p + width;
|
|
@@ -139720,7 +139758,7 @@ function compileType3Glyph(imgData) {
|
|
|
139720
139758
|
if (p === end) {
|
|
139721
139759
|
continue;
|
|
139722
139760
|
}
|
|
139723
|
-
|
|
139761
|
+
path16.moveTo(p % width1, i);
|
|
139724
139762
|
const p0 = p;
|
|
139725
139763
|
let type = points[p];
|
|
139726
139764
|
do {
|
|
@@ -139736,7 +139774,7 @@ function compileType3Glyph(imgData) {
|
|
|
139736
139774
|
type = pp & 51 * type >> 4;
|
|
139737
139775
|
points[p] &= type >> 2 | type << 2;
|
|
139738
139776
|
}
|
|
139739
|
-
|
|
139777
|
+
path16.lineTo(p % width1, p / width1 | 0);
|
|
139740
139778
|
if (!points[p]) {
|
|
139741
139779
|
--count;
|
|
139742
139780
|
}
|
|
@@ -139749,7 +139787,7 @@ function compileType3Glyph(imgData) {
|
|
|
139749
139787
|
c.save();
|
|
139750
139788
|
c.scale(1 / width, -1 / height);
|
|
139751
139789
|
c.translate(0, -height);
|
|
139752
|
-
c.fill(
|
|
139790
|
+
c.fill(path16);
|
|
139753
139791
|
c.beginPath();
|
|
139754
139792
|
c.restore();
|
|
139755
139793
|
};
|
|
@@ -149336,11 +149374,11 @@ var init_pdf = __esm({
|
|
|
149336
149374
|
} catch (ex) {
|
|
149337
149375
|
warn(`getPathGenerator - ignoring character: "${ex}".`);
|
|
149338
149376
|
}
|
|
149339
|
-
const
|
|
149377
|
+
const path16 = new Path2D(cmds || "");
|
|
149340
149378
|
if (!this.fontExtraProperties) {
|
|
149341
149379
|
objs.delete(objId);
|
|
149342
149380
|
}
|
|
149343
|
-
return this.compiledGlyphs[character] =
|
|
149381
|
+
return this.compiledGlyphs[character] = path16;
|
|
149344
149382
|
}
|
|
149345
149383
|
};
|
|
149346
149384
|
CallbackKind = {
|
|
@@ -151351,9 +151389,9 @@ var init_pdf = __esm({
|
|
|
151351
151389
|
x,
|
|
151352
151390
|
y,
|
|
151353
151391
|
fontSize,
|
|
151354
|
-
path:
|
|
151392
|
+
path: path16
|
|
151355
151393
|
} of paths) {
|
|
151356
|
-
newPath.addPath(
|
|
151394
|
+
newPath.addPath(path16, new DOMMatrix(transform).preMultiplySelf(invTransf).translate(x, y).scale(fontSize, -fontSize));
|
|
151357
151395
|
}
|
|
151358
151396
|
ctx.clip(newPath);
|
|
151359
151397
|
ctx.beginPath();
|
|
@@ -151433,9 +151471,9 @@ var init_pdf = __esm({
|
|
|
151433
151471
|
nextLine() {
|
|
151434
151472
|
this.moveText(0, this.current.leading);
|
|
151435
151473
|
}
|
|
151436
|
-
#getScaledPath(
|
|
151474
|
+
#getScaledPath(path16, currentTransform, transform) {
|
|
151437
151475
|
const newPath = new Path2D();
|
|
151438
|
-
newPath.addPath(
|
|
151476
|
+
newPath.addPath(path16, new DOMMatrix(transform).invertSelf().multiplySelf(currentTransform));
|
|
151439
151477
|
return newPath;
|
|
151440
151478
|
}
|
|
151441
151479
|
paintChar(character, x, y, patternFillTransform, patternStrokeTransform) {
|
|
@@ -151448,9 +151486,9 @@ var init_pdf = __esm({
|
|
|
151448
151486
|
const isAddToPathSet = !!(textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG);
|
|
151449
151487
|
const patternFill = current.patternFill && !font.missingFile;
|
|
151450
151488
|
const patternStroke = current.patternStroke && !font.missingFile;
|
|
151451
|
-
let
|
|
151489
|
+
let path16;
|
|
151452
151490
|
if (font.disableFontFace || isAddToPathSet || patternFill || patternStroke) {
|
|
151453
|
-
|
|
151491
|
+
path16 = font.getPathGenerator(this.commonObjs, character);
|
|
151454
151492
|
}
|
|
151455
151493
|
if (font.disableFontFace || patternFill || patternStroke) {
|
|
151456
151494
|
ctx.save();
|
|
@@ -151460,19 +151498,19 @@ var init_pdf = __esm({
|
|
|
151460
151498
|
if (patternFillTransform) {
|
|
151461
151499
|
const currentTransform = ctx.getTransform();
|
|
151462
151500
|
ctx.setTransform(...patternFillTransform);
|
|
151463
|
-
ctx.fill(this.#getScaledPath(
|
|
151501
|
+
ctx.fill(this.#getScaledPath(path16, currentTransform, patternFillTransform));
|
|
151464
151502
|
} else {
|
|
151465
|
-
ctx.fill(
|
|
151503
|
+
ctx.fill(path16);
|
|
151466
151504
|
}
|
|
151467
151505
|
}
|
|
151468
151506
|
if (fillStrokeMode === TextRenderingMode.STROKE || fillStrokeMode === TextRenderingMode.FILL_STROKE) {
|
|
151469
151507
|
if (patternStrokeTransform) {
|
|
151470
151508
|
const currentTransform = ctx.getTransform();
|
|
151471
151509
|
ctx.setTransform(...patternStrokeTransform);
|
|
151472
|
-
ctx.stroke(this.#getScaledPath(
|
|
151510
|
+
ctx.stroke(this.#getScaledPath(path16, currentTransform, patternStrokeTransform));
|
|
151473
151511
|
} else {
|
|
151474
151512
|
ctx.lineWidth /= fontSize;
|
|
151475
|
-
ctx.stroke(
|
|
151513
|
+
ctx.stroke(path16);
|
|
151476
151514
|
}
|
|
151477
151515
|
}
|
|
151478
151516
|
ctx.restore();
|
|
@@ -151491,7 +151529,7 @@ var init_pdf = __esm({
|
|
|
151491
151529
|
x,
|
|
151492
151530
|
y,
|
|
151493
151531
|
fontSize,
|
|
151494
|
-
path:
|
|
151532
|
+
path: path16
|
|
151495
151533
|
});
|
|
151496
151534
|
}
|
|
151497
151535
|
}
|
|
@@ -153506,10 +153544,10 @@ var init_pdf = __esm({
|
|
|
153506
153544
|
this._readableStream = null;
|
|
153507
153545
|
this._readCapability = Promise.withResolvers();
|
|
153508
153546
|
this._headersCapability = Promise.withResolvers();
|
|
153509
|
-
const
|
|
153510
|
-
|
|
153547
|
+
const fs16 = process.getBuiltinModule("fs");
|
|
153548
|
+
fs16.promises.lstat(this._url).then((stat2) => {
|
|
153511
153549
|
this._contentLength = stat2.size;
|
|
153512
|
-
this._setReadableStream(
|
|
153550
|
+
this._setReadableStream(fs16.createReadStream(this._url));
|
|
153513
153551
|
this._headersCapability.resolve();
|
|
153514
153552
|
}, (error) => {
|
|
153515
153553
|
if (error.code === "ENOENT") {
|
|
@@ -153604,8 +153642,8 @@ var init_pdf = __esm({
|
|
|
153604
153642
|
this._readCapability = Promise.withResolvers();
|
|
153605
153643
|
const source = stream.source;
|
|
153606
153644
|
this._isStreamingSupported = !source.disableStream;
|
|
153607
|
-
const
|
|
153608
|
-
this._setReadableStream(
|
|
153645
|
+
const fs16 = process.getBuiltinModule("fs");
|
|
153646
|
+
this._setReadableStream(fs16.createReadStream(this._url, {
|
|
153609
153647
|
start,
|
|
153610
153648
|
end: end - 1
|
|
153611
153649
|
}));
|
|
@@ -163829,13 +163867,13 @@ var init_pdf = __esm({
|
|
|
163829
163867
|
const root2 = this.#createSVG();
|
|
163830
163868
|
const defs = _DrawLayer._svgFactory.createElement("defs");
|
|
163831
163869
|
root2.append(defs);
|
|
163832
|
-
const
|
|
163833
|
-
defs.append(
|
|
163870
|
+
const path16 = _DrawLayer._svgFactory.createElement("path");
|
|
163871
|
+
defs.append(path16);
|
|
163834
163872
|
const pathId = `path_p${this.pageIndex}_${id}`;
|
|
163835
|
-
|
|
163836
|
-
|
|
163873
|
+
path16.setAttribute("id", pathId);
|
|
163874
|
+
path16.setAttribute("vector-effect", "non-scaling-stroke");
|
|
163837
163875
|
if (isPathUpdatable) {
|
|
163838
|
-
this.#toUpdate.set(id,
|
|
163876
|
+
this.#toUpdate.set(id, path16);
|
|
163839
163877
|
}
|
|
163840
163878
|
const clipPathId = hasClip ? this.#createClipPath(defs, pathId) : null;
|
|
163841
163879
|
const use = _DrawLayer._svgFactory.createElement("use");
|
|
@@ -163853,11 +163891,11 @@ var init_pdf = __esm({
|
|
|
163853
163891
|
const root2 = this.#createSVG();
|
|
163854
163892
|
const defs = _DrawLayer._svgFactory.createElement("defs");
|
|
163855
163893
|
root2.append(defs);
|
|
163856
|
-
const
|
|
163857
|
-
defs.append(
|
|
163894
|
+
const path16 = _DrawLayer._svgFactory.createElement("path");
|
|
163895
|
+
defs.append(path16);
|
|
163858
163896
|
const pathId = `path_p${this.pageIndex}_${id}`;
|
|
163859
|
-
|
|
163860
|
-
|
|
163897
|
+
path16.setAttribute("id", pathId);
|
|
163898
|
+
path16.setAttribute("vector-effect", "non-scaling-stroke");
|
|
163861
163899
|
let maskId;
|
|
163862
163900
|
if (mustRemoveSelfIntersections) {
|
|
163863
163901
|
const mask = _DrawLayer._svgFactory.createElement("mask");
|
|
@@ -163904,7 +163942,7 @@ var init_pdf = __esm({
|
|
|
163904
163942
|
root: root2,
|
|
163905
163943
|
bbox,
|
|
163906
163944
|
rootClass,
|
|
163907
|
-
path:
|
|
163945
|
+
path: path16
|
|
163908
163946
|
} = properties;
|
|
163909
163947
|
const element = typeof elementOrId === "number" ? this.#mapping.get(elementOrId) : elementOrId;
|
|
163910
163948
|
if (!element) {
|
|
@@ -163924,10 +163962,10 @@ var init_pdf = __esm({
|
|
|
163924
163962
|
classList.toggle(className, value);
|
|
163925
163963
|
}
|
|
163926
163964
|
}
|
|
163927
|
-
if (
|
|
163965
|
+
if (path16) {
|
|
163928
163966
|
const defs = element.firstChild;
|
|
163929
163967
|
const pathElement = defs.firstChild;
|
|
163930
|
-
this.#updateProperties(pathElement,
|
|
163968
|
+
this.#updateProperties(pathElement, path16);
|
|
163931
163969
|
}
|
|
163932
163970
|
}
|
|
163933
163971
|
updateParent(id, layer) {
|
|
@@ -164884,8 +164922,8 @@ var init_tap = __esm({
|
|
|
164884
164922
|
});
|
|
164885
164923
|
|
|
164886
164924
|
// node_modules/underscore/modules/toPath.js
|
|
164887
|
-
function toPath(
|
|
164888
|
-
return isArray_default(
|
|
164925
|
+
function toPath(path16) {
|
|
164926
|
+
return isArray_default(path16) ? path16 : [path16];
|
|
164889
164927
|
}
|
|
164890
164928
|
var init_toPath = __esm({
|
|
164891
164929
|
"node_modules/underscore/modules/toPath.js"() {
|
|
@@ -164896,8 +164934,8 @@ var init_toPath = __esm({
|
|
|
164896
164934
|
});
|
|
164897
164935
|
|
|
164898
164936
|
// node_modules/underscore/modules/_toPath.js
|
|
164899
|
-
function toPath2(
|
|
164900
|
-
return _.toPath(
|
|
164937
|
+
function toPath2(path16) {
|
|
164938
|
+
return _.toPath(path16);
|
|
164901
164939
|
}
|
|
164902
164940
|
var init_toPath2 = __esm({
|
|
164903
164941
|
"node_modules/underscore/modules/_toPath.js"() {
|
|
@@ -164907,11 +164945,11 @@ var init_toPath2 = __esm({
|
|
|
164907
164945
|
});
|
|
164908
164946
|
|
|
164909
164947
|
// node_modules/underscore/modules/_deepGet.js
|
|
164910
|
-
function deepGet(obj2,
|
|
164911
|
-
var length =
|
|
164948
|
+
function deepGet(obj2, path16) {
|
|
164949
|
+
var length = path16.length;
|
|
164912
164950
|
for (var i = 0; i < length; i++) {
|
|
164913
164951
|
if (obj2 == null) return void 0;
|
|
164914
|
-
obj2 = obj2[
|
|
164952
|
+
obj2 = obj2[path16[i]];
|
|
164915
164953
|
}
|
|
164916
164954
|
return length ? obj2 : void 0;
|
|
164917
164955
|
}
|
|
@@ -164921,8 +164959,8 @@ var init_deepGet = __esm({
|
|
|
164921
164959
|
});
|
|
164922
164960
|
|
|
164923
164961
|
// node_modules/underscore/modules/get.js
|
|
164924
|
-
function get2(object2,
|
|
164925
|
-
var value = deepGet(object2, toPath2(
|
|
164962
|
+
function get2(object2, path16, defaultValue) {
|
|
164963
|
+
var value = deepGet(object2, toPath2(path16));
|
|
164926
164964
|
return isUndefined(value) ? defaultValue : value;
|
|
164927
164965
|
}
|
|
164928
164966
|
var init_get = __esm({
|
|
@@ -164934,11 +164972,11 @@ var init_get = __esm({
|
|
|
164934
164972
|
});
|
|
164935
164973
|
|
|
164936
164974
|
// node_modules/underscore/modules/has.js
|
|
164937
|
-
function has2(obj2,
|
|
164938
|
-
|
|
164939
|
-
var length =
|
|
164975
|
+
function has2(obj2, path16) {
|
|
164976
|
+
path16 = toPath2(path16);
|
|
164977
|
+
var length = path16.length;
|
|
164940
164978
|
for (var i = 0; i < length; i++) {
|
|
164941
|
-
var key =
|
|
164979
|
+
var key = path16[i];
|
|
164942
164980
|
if (!has(obj2, key)) return false;
|
|
164943
164981
|
obj2 = obj2[key];
|
|
164944
164982
|
}
|
|
@@ -164975,10 +165013,10 @@ var init_matcher = __esm({
|
|
|
164975
165013
|
});
|
|
164976
165014
|
|
|
164977
165015
|
// node_modules/underscore/modules/property.js
|
|
164978
|
-
function property(
|
|
164979
|
-
|
|
165016
|
+
function property(path16) {
|
|
165017
|
+
path16 = toPath2(path16);
|
|
164980
165018
|
return function(obj2) {
|
|
164981
|
-
return deepGet(obj2,
|
|
165019
|
+
return deepGet(obj2, path16);
|
|
164982
165020
|
};
|
|
164983
165021
|
}
|
|
164984
165022
|
var init_property = __esm({
|
|
@@ -165087,8 +165125,8 @@ var init_noop = __esm({
|
|
|
165087
165125
|
// node_modules/underscore/modules/propertyOf.js
|
|
165088
165126
|
function propertyOf(obj2) {
|
|
165089
165127
|
if (obj2 == null) return noop;
|
|
165090
|
-
return function(
|
|
165091
|
-
return get2(obj2,
|
|
165128
|
+
return function(path16) {
|
|
165129
|
+
return get2(obj2, path16);
|
|
165092
165130
|
};
|
|
165093
165131
|
}
|
|
165094
165132
|
var init_propertyOf = __esm({
|
|
@@ -165282,14 +165320,14 @@ var init_template = __esm({
|
|
|
165282
165320
|
});
|
|
165283
165321
|
|
|
165284
165322
|
// node_modules/underscore/modules/result.js
|
|
165285
|
-
function result(obj2,
|
|
165286
|
-
|
|
165287
|
-
var length =
|
|
165323
|
+
function result(obj2, path16, fallback) {
|
|
165324
|
+
path16 = toPath2(path16);
|
|
165325
|
+
var length = path16.length;
|
|
165288
165326
|
if (!length) {
|
|
165289
165327
|
return isFunction_default(fallback) ? fallback.call(obj2) : fallback;
|
|
165290
165328
|
}
|
|
165291
165329
|
for (var i = 0; i < length; i++) {
|
|
165292
|
-
var prop = obj2 == null ? void 0 : obj2[
|
|
165330
|
+
var prop = obj2 == null ? void 0 : obj2[path16[i]];
|
|
165293
165331
|
if (prop === void 0) {
|
|
165294
165332
|
prop = fallback;
|
|
165295
165333
|
i = length;
|
|
@@ -165972,14 +166010,14 @@ var init_invoke = __esm({
|
|
|
165972
166010
|
init_map();
|
|
165973
166011
|
init_deepGet();
|
|
165974
166012
|
init_toPath2();
|
|
165975
|
-
invoke_default = restArguments(function(obj2,
|
|
166013
|
+
invoke_default = restArguments(function(obj2, path16, args) {
|
|
165976
166014
|
var contextPath, func;
|
|
165977
|
-
if (isFunction_default(
|
|
165978
|
-
func =
|
|
166015
|
+
if (isFunction_default(path16)) {
|
|
166016
|
+
func = path16;
|
|
165979
166017
|
} else {
|
|
165980
|
-
|
|
165981
|
-
contextPath =
|
|
165982
|
-
|
|
166018
|
+
path16 = toPath2(path16);
|
|
166019
|
+
contextPath = path16.slice(0, -1);
|
|
166020
|
+
path16 = path16[path16.length - 1];
|
|
165983
166021
|
}
|
|
165984
166022
|
return map(obj2, function(context) {
|
|
165985
166023
|
var method = func;
|
|
@@ -165988,7 +166026,7 @@ var init_invoke = __esm({
|
|
|
165988
166026
|
context = deepGet(context, contextPath);
|
|
165989
166027
|
}
|
|
165990
166028
|
if (context == null) return void 0;
|
|
165991
|
-
method = context[
|
|
166029
|
+
method = context[path16];
|
|
165992
166030
|
}
|
|
165993
166031
|
return method == null ? method : method.apply(context, args);
|
|
165994
166032
|
});
|
|
@@ -175454,8 +175492,8 @@ var require_utils2 = __commonJS({
|
|
|
175454
175492
|
var result2 = transform[inputType][outputType](input);
|
|
175455
175493
|
return result2;
|
|
175456
175494
|
};
|
|
175457
|
-
exports2.resolve = function(
|
|
175458
|
-
var parts =
|
|
175495
|
+
exports2.resolve = function(path16) {
|
|
175496
|
+
var parts = path16.split("/");
|
|
175459
175497
|
var result2 = [];
|
|
175460
175498
|
for (var index = 0; index < parts.length; index++) {
|
|
175461
175499
|
var part = parts[index];
|
|
@@ -181308,18 +181346,18 @@ var require_object = __commonJS({
|
|
|
181308
181346
|
var object2 = new ZipObject(name, zipObjectContent, o);
|
|
181309
181347
|
this.files[name] = object2;
|
|
181310
181348
|
};
|
|
181311
|
-
var parentFolder = function(
|
|
181312
|
-
if (
|
|
181313
|
-
|
|
181349
|
+
var parentFolder = function(path16) {
|
|
181350
|
+
if (path16.slice(-1) === "/") {
|
|
181351
|
+
path16 = path16.substring(0, path16.length - 1);
|
|
181314
181352
|
}
|
|
181315
|
-
var lastSlash =
|
|
181316
|
-
return lastSlash > 0 ?
|
|
181353
|
+
var lastSlash = path16.lastIndexOf("/");
|
|
181354
|
+
return lastSlash > 0 ? path16.substring(0, lastSlash) : "";
|
|
181317
181355
|
};
|
|
181318
|
-
var forceTrailingSlash = function(
|
|
181319
|
-
if (
|
|
181320
|
-
|
|
181356
|
+
var forceTrailingSlash = function(path16) {
|
|
181357
|
+
if (path16.slice(-1) !== "/") {
|
|
181358
|
+
path16 += "/";
|
|
181321
181359
|
}
|
|
181322
|
-
return
|
|
181360
|
+
return path16;
|
|
181323
181361
|
};
|
|
181324
181362
|
var folderAdd = function(name, createFolders) {
|
|
181325
181363
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
|
|
@@ -182357,27 +182395,27 @@ var require_zipfile = __commonJS({
|
|
|
182357
182395
|
};
|
|
182358
182396
|
});
|
|
182359
182397
|
}
|
|
182360
|
-
function splitPath(
|
|
182361
|
-
var lastIndex =
|
|
182398
|
+
function splitPath(path16) {
|
|
182399
|
+
var lastIndex = path16.lastIndexOf("/");
|
|
182362
182400
|
if (lastIndex === -1) {
|
|
182363
|
-
return { dirname: "", basename:
|
|
182401
|
+
return { dirname: "", basename: path16 };
|
|
182364
182402
|
} else {
|
|
182365
182403
|
return {
|
|
182366
|
-
dirname:
|
|
182367
|
-
basename:
|
|
182404
|
+
dirname: path16.substring(0, lastIndex),
|
|
182405
|
+
basename: path16.substring(lastIndex + 1)
|
|
182368
182406
|
};
|
|
182369
182407
|
}
|
|
182370
182408
|
}
|
|
182371
182409
|
function joinPath() {
|
|
182372
|
-
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(
|
|
182373
|
-
return
|
|
182410
|
+
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path16) {
|
|
182411
|
+
return path16;
|
|
182374
182412
|
});
|
|
182375
182413
|
var relevantPaths = [];
|
|
182376
|
-
nonEmptyPaths.forEach(function(
|
|
182377
|
-
if (/^\//.test(
|
|
182378
|
-
relevantPaths = [
|
|
182414
|
+
nonEmptyPaths.forEach(function(path16) {
|
|
182415
|
+
if (/^\//.test(path16)) {
|
|
182416
|
+
relevantPaths = [path16];
|
|
182379
182417
|
} else {
|
|
182380
|
-
relevantPaths.push(
|
|
182418
|
+
relevantPaths.push(path16);
|
|
182381
182419
|
}
|
|
182382
182420
|
});
|
|
182383
182421
|
return relevantPaths.join("/");
|
|
@@ -189769,9 +189807,9 @@ var require_office_xml_reader = __commonJS({
|
|
|
189769
189807
|
return collapseAlternateContent(document2)[0];
|
|
189770
189808
|
});
|
|
189771
189809
|
}
|
|
189772
|
-
function readXmlFromZipFile(docxFile,
|
|
189773
|
-
if (docxFile.exists(
|
|
189774
|
-
return docxFile.read(
|
|
189810
|
+
function readXmlFromZipFile(docxFile, path16) {
|
|
189811
|
+
if (docxFile.exists(path16)) {
|
|
189812
|
+
return docxFile.read(path16, "utf-8").then(stripUtf8Bom).then(read);
|
|
189775
189813
|
} else {
|
|
189776
189814
|
return promises.resolve(null);
|
|
189777
189815
|
}
|
|
@@ -191535,10 +191573,10 @@ var require_body_reader = __commonJS({
|
|
|
191535
191573
|
}
|
|
191536
191574
|
}
|
|
191537
191575
|
function findEmbeddedImageFile(relationshipId) {
|
|
191538
|
-
var
|
|
191576
|
+
var path16 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
|
|
191539
191577
|
return {
|
|
191540
|
-
path:
|
|
191541
|
-
read: docxFile.read.bind(docxFile,
|
|
191578
|
+
path: path16,
|
|
191579
|
+
read: docxFile.read.bind(docxFile, path16)
|
|
191542
191580
|
};
|
|
191543
191581
|
}
|
|
191544
191582
|
function readImage(imageFile, altText) {
|
|
@@ -191775,12 +191813,12 @@ var require_content_types_reader = __commonJS({
|
|
|
191775
191813
|
}
|
|
191776
191814
|
function contentTypes(overrides, extensionDefaults) {
|
|
191777
191815
|
return {
|
|
191778
|
-
findContentType: function(
|
|
191779
|
-
var overrideContentType = overrides[
|
|
191816
|
+
findContentType: function(path16) {
|
|
191817
|
+
var overrideContentType = overrides[path16];
|
|
191780
191818
|
if (overrideContentType) {
|
|
191781
191819
|
return overrideContentType;
|
|
191782
191820
|
} else {
|
|
191783
|
-
var pathParts =
|
|
191821
|
+
var pathParts = path16.split(".");
|
|
191784
191822
|
var extension2 = pathParts[pathParts.length - 1];
|
|
191785
191823
|
if (extensionDefaults.hasOwnProperty(extension2)) {
|
|
191786
191824
|
return extensionDefaults[extension2];
|
|
@@ -192023,12 +192061,12 @@ var require_comments_reader = __commonJS({
|
|
|
192023
192061
|
var require_path_is_absolute = __commonJS({
|
|
192024
192062
|
"node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
192025
192063
|
"use strict";
|
|
192026
|
-
function posix(
|
|
192027
|
-
return
|
|
192064
|
+
function posix(path16) {
|
|
192065
|
+
return path16.charAt(0) === "/";
|
|
192028
192066
|
}
|
|
192029
|
-
function win32(
|
|
192067
|
+
function win32(path16) {
|
|
192030
192068
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
192031
|
-
var result2 = splitDeviceRe.exec(
|
|
192069
|
+
var result2 = splitDeviceRe.exec(path16);
|
|
192032
192070
|
var device = result2[1] || "";
|
|
192033
192071
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
192034
192072
|
return Boolean(result2[2] || isUnc);
|
|
@@ -192042,9 +192080,9 @@ var require_path_is_absolute = __commonJS({
|
|
|
192042
192080
|
// node_modules/mammoth/lib/docx/files.js
|
|
192043
192081
|
var require_files = __commonJS({
|
|
192044
192082
|
"node_modules/mammoth/lib/docx/files.js"(exports2) {
|
|
192045
|
-
var
|
|
192083
|
+
var fs16 = __require("fs");
|
|
192046
192084
|
var url = __require("url");
|
|
192047
|
-
var
|
|
192085
|
+
var os7 = __require("os");
|
|
192048
192086
|
var dirname2 = __require("path").dirname;
|
|
192049
192087
|
var resolvePath2 = __require("path").resolve;
|
|
192050
192088
|
var isAbsolutePath2 = require_path_is_absolute();
|
|
@@ -192062,19 +192100,19 @@ var require_files = __commonJS({
|
|
|
192062
192100
|
}
|
|
192063
192101
|
var base = options.relativeToFile ? dirname2(options.relativeToFile) : null;
|
|
192064
192102
|
function read(uri, encoding) {
|
|
192065
|
-
return resolveUri(uri).then(function(
|
|
192066
|
-
return readFile4(
|
|
192103
|
+
return resolveUri(uri).then(function(path16) {
|
|
192104
|
+
return readFile4(path16, encoding).caught(function(error) {
|
|
192067
192105
|
var message = "could not open external image: '" + uri + "' (document directory: '" + base + "')\n" + error.message;
|
|
192068
192106
|
return promises.reject(new Error(message));
|
|
192069
192107
|
});
|
|
192070
192108
|
});
|
|
192071
192109
|
}
|
|
192072
192110
|
function resolveUri(uri) {
|
|
192073
|
-
var
|
|
192074
|
-
if (isAbsolutePath2(
|
|
192075
|
-
return promises.resolve(
|
|
192111
|
+
var path16 = uriToPath(uri);
|
|
192112
|
+
if (isAbsolutePath2(path16)) {
|
|
192113
|
+
return promises.resolve(path16);
|
|
192076
192114
|
} else if (base) {
|
|
192077
|
-
return promises.resolve(resolvePath2(base,
|
|
192115
|
+
return promises.resolve(resolvePath2(base, path16));
|
|
192078
192116
|
} else {
|
|
192079
192117
|
return promises.reject(new Error("could not find external image '" + uri + "', path of input document is unknown"));
|
|
192080
192118
|
}
|
|
@@ -192083,18 +192121,18 @@ var require_files = __commonJS({
|
|
|
192083
192121
|
read
|
|
192084
192122
|
};
|
|
192085
192123
|
}
|
|
192086
|
-
var readFile4 = promises.promisify(
|
|
192124
|
+
var readFile4 = promises.promisify(fs16.readFile.bind(fs16));
|
|
192087
192125
|
function uriToPath(uriString, platform3) {
|
|
192088
192126
|
if (!platform3) {
|
|
192089
|
-
platform3 =
|
|
192127
|
+
platform3 = os7.platform();
|
|
192090
192128
|
}
|
|
192091
192129
|
var uri = url.parse(uriString);
|
|
192092
192130
|
if (isLocalFileUri(uri) || isRelativeUri(uri)) {
|
|
192093
|
-
var
|
|
192094
|
-
if (platform3 === "win32" && /^\/[a-z]:/i.test(
|
|
192095
|
-
return
|
|
192131
|
+
var path16 = decodeURIComponent(uri.path);
|
|
192132
|
+
if (platform3 === "win32" && /^\/[a-z]:/i.test(path16)) {
|
|
192133
|
+
return path16.slice(1);
|
|
192096
192134
|
} else {
|
|
192097
|
-
return
|
|
192135
|
+
return path16;
|
|
192098
192136
|
}
|
|
192099
192137
|
} else {
|
|
192100
192138
|
throw new Error("Could not convert URI to path: " + uriString);
|
|
@@ -192294,18 +192332,18 @@ var require_docx_reader = __commonJS({
|
|
|
192294
192332
|
readElement: contentTypesReader.readContentTypesFromXml,
|
|
192295
192333
|
defaultValue: contentTypesReader.defaultContentTypes
|
|
192296
192334
|
});
|
|
192297
|
-
function readNumberingFromZipFile(zipFile,
|
|
192335
|
+
function readNumberingFromZipFile(zipFile, path16, styles6) {
|
|
192298
192336
|
return xmlFileReader({
|
|
192299
|
-
filename:
|
|
192337
|
+
filename: path16,
|
|
192300
192338
|
readElement: function(element) {
|
|
192301
192339
|
return numberingXml.readNumberingXml(element, { styles: styles6 });
|
|
192302
192340
|
},
|
|
192303
192341
|
defaultValue: numberingXml.defaultNumbering
|
|
192304
192342
|
})(zipFile);
|
|
192305
192343
|
}
|
|
192306
|
-
function readStylesFromZipFile(zipFile,
|
|
192344
|
+
function readStylesFromZipFile(zipFile, path16) {
|
|
192307
192345
|
return xmlFileReader({
|
|
192308
|
-
filename:
|
|
192346
|
+
filename: path16,
|
|
192309
192347
|
readElement: stylesReader.readStylesXml,
|
|
192310
192348
|
defaultValue: stylesReader.defaultStyles
|
|
192311
192349
|
})(zipFile);
|
|
@@ -192336,10 +192374,10 @@ var require_style_map = __commonJS({
|
|
|
192336
192374
|
});
|
|
192337
192375
|
}
|
|
192338
192376
|
function updateRelationships(docxFile) {
|
|
192339
|
-
var
|
|
192377
|
+
var path16 = "word/_rels/document.xml.rels";
|
|
192340
192378
|
var relationshipsUri = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
192341
192379
|
var relationshipElementName = "{" + relationshipsUri + "}Relationship";
|
|
192342
|
-
return docxFile.read(
|
|
192380
|
+
return docxFile.read(path16, "utf8").then(xml.readString).then(function(relationshipsContainer) {
|
|
192343
192381
|
var relationships = relationshipsContainer.children;
|
|
192344
192382
|
addOrUpdateElement(relationships, relationshipElementName, "Id", {
|
|
192345
192383
|
"Id": "rMammothStyleMap",
|
|
@@ -192347,21 +192385,21 @@ var require_style_map = __commonJS({
|
|
|
192347
192385
|
"Target": styleMapAbsolutePath
|
|
192348
192386
|
});
|
|
192349
192387
|
var namespaces = { "": relationshipsUri };
|
|
192350
|
-
return docxFile.write(
|
|
192388
|
+
return docxFile.write(path16, xml.writeString(relationshipsContainer, namespaces));
|
|
192351
192389
|
});
|
|
192352
192390
|
}
|
|
192353
192391
|
function updateContentTypes(docxFile) {
|
|
192354
|
-
var
|
|
192392
|
+
var path16 = "[Content_Types].xml";
|
|
192355
192393
|
var contentTypesUri = "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
192356
192394
|
var overrideName = "{" + contentTypesUri + "}Override";
|
|
192357
|
-
return docxFile.read(
|
|
192395
|
+
return docxFile.read(path16, "utf8").then(xml.readString).then(function(typesElement) {
|
|
192358
192396
|
var children = typesElement.children;
|
|
192359
192397
|
addOrUpdateElement(children, overrideName, "PartName", {
|
|
192360
192398
|
"PartName": styleMapAbsolutePath,
|
|
192361
192399
|
"ContentType": "text/prs.mammoth.style-map"
|
|
192362
192400
|
});
|
|
192363
192401
|
var namespaces = { "": contentTypesUri };
|
|
192364
|
-
return docxFile.write(
|
|
192402
|
+
return docxFile.write(path16, xml.writeString(typesElement, namespaces));
|
|
192365
192403
|
});
|
|
192366
192404
|
}
|
|
192367
192405
|
function addOrUpdateElement(elements, name, identifyingAttribute, attributes) {
|
|
@@ -193049,9 +193087,9 @@ var require_document_to_html = __commonJS({
|
|
|
193049
193087
|
};
|
|
193050
193088
|
var paths = [];
|
|
193051
193089
|
if (run.highlight !== null) {
|
|
193052
|
-
var
|
|
193053
|
-
if (
|
|
193054
|
-
paths.push(
|
|
193090
|
+
var path16 = findHtmlPath({ type: "highlight", color: run.highlight });
|
|
193091
|
+
if (path16) {
|
|
193092
|
+
paths.push(path16);
|
|
193055
193093
|
}
|
|
193056
193094
|
}
|
|
193057
193095
|
if (run.isSmallCaps) {
|
|
@@ -193086,15 +193124,15 @@ var require_document_to_html = __commonJS({
|
|
|
193086
193124
|
messages.push(unrecognisedStyleWarning("run", run));
|
|
193087
193125
|
}
|
|
193088
193126
|
paths.push(stylePath);
|
|
193089
|
-
paths.forEach(function(
|
|
193090
|
-
nodes =
|
|
193127
|
+
paths.forEach(function(path17) {
|
|
193128
|
+
nodes = path17.wrap.bind(path17, nodes);
|
|
193091
193129
|
});
|
|
193092
193130
|
return nodes();
|
|
193093
193131
|
}
|
|
193094
193132
|
function findHtmlPathForRunProperty(elementType, defaultTagName) {
|
|
193095
|
-
var
|
|
193096
|
-
if (
|
|
193097
|
-
return
|
|
193133
|
+
var path16 = findHtmlPath({ type: elementType });
|
|
193134
|
+
if (path16) {
|
|
193135
|
+
return path16;
|
|
193098
193136
|
} else if (defaultTagName) {
|
|
193099
193137
|
return htmlPaths.element(defaultTagName, {}, { fresh: false });
|
|
193100
193138
|
} else {
|
|
@@ -194796,11 +194834,11 @@ var require_options_reader = __commonJS({
|
|
|
194796
194834
|
// node_modules/mammoth/lib/unzip.js
|
|
194797
194835
|
var require_unzip = __commonJS({
|
|
194798
194836
|
"node_modules/mammoth/lib/unzip.js"(exports2) {
|
|
194799
|
-
var
|
|
194837
|
+
var fs16 = __require("fs");
|
|
194800
194838
|
var promises = require_promises();
|
|
194801
194839
|
var zipfile = require_zipfile();
|
|
194802
194840
|
exports2.openZip = openZip;
|
|
194803
|
-
var readFile4 = promises.promisify(
|
|
194841
|
+
var readFile4 = promises.promisify(fs16.readFile);
|
|
194804
194842
|
function openZip(options) {
|
|
194805
194843
|
if (options.path) {
|
|
194806
194844
|
return readFile4(options.path).then(zipfile.openArrayBuffer);
|
|
@@ -195518,8 +195556,8 @@ function decodeBase64ToBuffer(value) {
|
|
|
195518
195556
|
function fileNameFromLocalId(localSourceId) {
|
|
195519
195557
|
const sep = localSourceId.lastIndexOf("::");
|
|
195520
195558
|
if (sep >= 0) {
|
|
195521
|
-
const
|
|
195522
|
-
return
|
|
195559
|
+
const path16 = localSourceId.slice(sep + 2);
|
|
195560
|
+
return path16.split("/").pop() ?? path16;
|
|
195523
195561
|
}
|
|
195524
195562
|
return localSourceId;
|
|
195525
195563
|
}
|
|
@@ -195888,7 +195926,7 @@ function normalizeInputPath(pathValue) {
|
|
|
195888
195926
|
}
|
|
195889
195927
|
function expandHomePath(pathValue, roots) {
|
|
195890
195928
|
if (!pathValue?.startsWith("~/")) return pathValue;
|
|
195891
|
-
const homePrefix = roots.map((root2) => root2.path.replace(/\\/g, "/")).find((
|
|
195929
|
+
const homePrefix = roots.map((root2) => root2.path.replace(/\\/g, "/")).find((path16) => /^\/Users\/[^/]+/.test(path16))?.match(/^\/Users\/[^/]+/)?.[0];
|
|
195892
195930
|
return homePrefix ? `${homePrefix}${pathValue.slice(1)}` : pathValue;
|
|
195893
195931
|
}
|
|
195894
195932
|
function normalizeRelativePath(pathValue) {
|
|
@@ -207174,62 +207212,62 @@ var init_initPacks = __esm({
|
|
|
207174
207212
|
});
|
|
207175
207213
|
|
|
207176
207214
|
// lib/perchManagedAgents/runtime.ts
|
|
207177
|
-
function validateJsonSchema(value, schema,
|
|
207215
|
+
function validateJsonSchema(value, schema, path16 = "") {
|
|
207178
207216
|
const errors = [];
|
|
207179
207217
|
if (schema.type === "object" && value != null && typeof value === "object" && !Array.isArray(value)) {
|
|
207180
207218
|
const obj2 = value;
|
|
207181
207219
|
if (schema.required) {
|
|
207182
207220
|
for (const key of schema.required) {
|
|
207183
|
-
if (!(key in obj2)) errors.push(`${
|
|
207221
|
+
if (!(key in obj2)) errors.push(`${path16 || "root"}: missing required field "${key}"`);
|
|
207184
207222
|
}
|
|
207185
207223
|
}
|
|
207186
207224
|
if (schema.additionalProperties === false && schema.properties) {
|
|
207187
207225
|
const allowed = new Set(Object.keys(schema.properties));
|
|
207188
207226
|
for (const key of Object.keys(obj2)) {
|
|
207189
|
-
if (!allowed.has(key)) errors.push(`${
|
|
207227
|
+
if (!allowed.has(key)) errors.push(`${path16 || "root"}: unexpected field "${key}"`);
|
|
207190
207228
|
}
|
|
207191
207229
|
}
|
|
207192
207230
|
if (schema.properties) {
|
|
207193
207231
|
for (const [key, subSchema] of Object.entries(schema.properties)) {
|
|
207194
207232
|
if (key in obj2) {
|
|
207195
|
-
errors.push(...validateJsonSchema(obj2[key], subSchema, `${
|
|
207233
|
+
errors.push(...validateJsonSchema(obj2[key], subSchema, `${path16}.${key}`));
|
|
207196
207234
|
}
|
|
207197
207235
|
}
|
|
207198
207236
|
}
|
|
207199
207237
|
} else if (schema.type === "array" && Array.isArray(value)) {
|
|
207200
207238
|
if (schema.maxItems != null && value.length > schema.maxItems) {
|
|
207201
|
-
errors.push(`${
|
|
207239
|
+
errors.push(`${path16 || "root"}: array exceeds maxItems (${value.length} > ${schema.maxItems})`);
|
|
207202
207240
|
}
|
|
207203
207241
|
if (schema.items) {
|
|
207204
207242
|
for (let i = 0; i < Math.min(value.length, 10); i += 1) {
|
|
207205
|
-
errors.push(...validateJsonSchema(value[i], schema.items, `${
|
|
207243
|
+
errors.push(...validateJsonSchema(value[i], schema.items, `${path16}[${i}]`));
|
|
207206
207244
|
}
|
|
207207
207245
|
}
|
|
207208
207246
|
} else if (schema.type === "string" && typeof value === "string") {
|
|
207209
207247
|
if (schema.maxLength != null && value.length > schema.maxLength) {
|
|
207210
|
-
errors.push(`${
|
|
207248
|
+
errors.push(`${path16 || "root"}: string exceeds maxLength (${value.length} > ${schema.maxLength})`);
|
|
207211
207249
|
}
|
|
207212
207250
|
if (schema.pattern) {
|
|
207213
207251
|
try {
|
|
207214
207252
|
if (!new RegExp(schema.pattern).test(value)) {
|
|
207215
|
-
errors.push(`${
|
|
207253
|
+
errors.push(`${path16 || "root"}: string does not match pattern "${schema.pattern}"`);
|
|
207216
207254
|
}
|
|
207217
207255
|
} catch {
|
|
207218
207256
|
}
|
|
207219
207257
|
}
|
|
207220
207258
|
} else if (schema.type === "number" && typeof value !== "number") {
|
|
207221
|
-
errors.push(`${
|
|
207259
|
+
errors.push(`${path16 || "root"}: expected number, got ${typeof value}`);
|
|
207222
207260
|
} else if (schema.type === "boolean" && typeof value !== "boolean") {
|
|
207223
|
-
errors.push(`${
|
|
207261
|
+
errors.push(`${path16 || "root"}: expected boolean, got ${typeof value}`);
|
|
207224
207262
|
} else if (schema.type === "string" && typeof value !== "string" && value != null) {
|
|
207225
|
-
errors.push(`${
|
|
207263
|
+
errors.push(`${path16 || "root"}: expected string, got ${typeof value}`);
|
|
207226
207264
|
} else if (schema.type === "object" && (value == null || typeof value !== "object" || Array.isArray(value))) {
|
|
207227
|
-
if (value != null) errors.push(`${
|
|
207265
|
+
if (value != null) errors.push(`${path16 || "root"}: expected object, got ${typeof value}`);
|
|
207228
207266
|
} else if (schema.type === "array" && !Array.isArray(value) && value != null) {
|
|
207229
|
-
errors.push(`${
|
|
207267
|
+
errors.push(`${path16 || "root"}: expected array, got ${typeof value}`);
|
|
207230
207268
|
}
|
|
207231
207269
|
if (schema.enum && !schema.enum.includes(value)) {
|
|
207232
|
-
errors.push(`${
|
|
207270
|
+
errors.push(`${path16 || "root"}: value not in enum [${schema.enum.join(", ")}]`);
|
|
207233
207271
|
}
|
|
207234
207272
|
return errors;
|
|
207235
207273
|
}
|
|
@@ -211588,12 +211626,12 @@ var init_fileSystem = __esm({
|
|
|
211588
211626
|
classification: { native: false },
|
|
211589
211627
|
handler: async (args, ctx) => {
|
|
211590
211628
|
const pattern = args.pattern ? String(args.pattern) : void 0;
|
|
211591
|
-
const
|
|
211629
|
+
const path16 = args.path ? String(args.path) : void 0;
|
|
211592
211630
|
const maxResults = typeof args.maxResults === "number" ? args.maxResults : void 0;
|
|
211593
211631
|
return listWorkspaceFilesGlob({
|
|
211594
211632
|
workspaceRoot: effectiveWorkspaceRoot(ctx),
|
|
211595
211633
|
pattern,
|
|
211596
|
-
path:
|
|
211634
|
+
path: path16,
|
|
211597
211635
|
maxResults,
|
|
211598
211636
|
fsAccessOverride: ctx.fsAccessOverride
|
|
211599
211637
|
});
|
|
@@ -211604,14 +211642,14 @@ var init_fileSystem = __esm({
|
|
|
211604
211642
|
classification: { native: false },
|
|
211605
211643
|
handler: async (args, ctx) => {
|
|
211606
211644
|
const query = String(args.query ?? "");
|
|
211607
|
-
const
|
|
211645
|
+
const path16 = args.path ? String(args.path) : void 0;
|
|
211608
211646
|
const include = args.include ? String(args.include) : void 0;
|
|
211609
211647
|
const caseSensitive = typeof args.caseSensitive === "boolean" ? args.caseSensitive : void 0;
|
|
211610
211648
|
const maxResults = typeof args.maxResults === "number" ? args.maxResults : void 0;
|
|
211611
211649
|
return searchWorkspaceFilesGrep({
|
|
211612
211650
|
workspaceRoot: effectiveWorkspaceRoot(ctx),
|
|
211613
211651
|
query,
|
|
211614
|
-
path:
|
|
211652
|
+
path: path16,
|
|
211615
211653
|
include,
|
|
211616
211654
|
caseSensitive,
|
|
211617
211655
|
maxResults,
|
|
@@ -211674,24 +211712,24 @@ var init_fileSystem = __esm({
|
|
|
211674
211712
|
name: TOOL_NAMES.createDirectory,
|
|
211675
211713
|
classification: { native: false },
|
|
211676
211714
|
handler: async (args, ctx) => {
|
|
211677
|
-
const
|
|
211678
|
-
return createDirectory({ path: resolveWorkspacePath(ctx,
|
|
211715
|
+
const path16 = String(args.path ?? "");
|
|
211716
|
+
return createDirectory({ path: resolveWorkspacePath(ctx, path16), fsAccessOverride: ctx.fsAccessOverride });
|
|
211679
211717
|
}
|
|
211680
211718
|
};
|
|
211681
211719
|
deleteLocalFileTool = {
|
|
211682
211720
|
name: TOOL_NAMES.deleteLocalFile,
|
|
211683
211721
|
classification: { native: false },
|
|
211684
211722
|
handler: async (args, ctx) => {
|
|
211685
|
-
const
|
|
211686
|
-
return deleteLocalFile({ path: resolveWorkspacePath(ctx,
|
|
211723
|
+
const path16 = String(args.path ?? "");
|
|
211724
|
+
return deleteLocalFile({ path: resolveWorkspacePath(ctx, path16), fsAccessOverride: ctx.fsAccessOverride });
|
|
211687
211725
|
}
|
|
211688
211726
|
};
|
|
211689
211727
|
printFileTool = {
|
|
211690
211728
|
name: TOOL_NAMES.printFile,
|
|
211691
211729
|
classification: { native: false },
|
|
211692
211730
|
handler: async (args, ctx) => {
|
|
211693
|
-
const
|
|
211694
|
-
return printFile({ path: resolveWorkspacePath(ctx,
|
|
211731
|
+
const path16 = String(args.path ?? "");
|
|
211732
|
+
return printFile({ path: resolveWorkspacePath(ctx, path16), fsAccessOverride: ctx.fsAccessOverride });
|
|
211695
211733
|
}
|
|
211696
211734
|
};
|
|
211697
211735
|
statPathTool = {
|
|
@@ -215011,11 +215049,11 @@ function extractEvidenceFromToolResult(input) {
|
|
|
215011
215049
|
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
215012
215050
|
const result2 = input.result;
|
|
215013
215051
|
if (input.toolName === TOOL_NAMES.readLocalFile) {
|
|
215014
|
-
const
|
|
215052
|
+
const path16 = stringValue6(result2.relativePath);
|
|
215015
215053
|
return [{
|
|
215016
215054
|
source: input.toolName,
|
|
215017
|
-
title:
|
|
215018
|
-
path:
|
|
215055
|
+
title: path16 ? `Read ${path16}` : "Read local file",
|
|
215056
|
+
path: path16,
|
|
215019
215057
|
snippet: stringValue6(result2.content)?.slice(0, 500),
|
|
215020
215058
|
metadata: pickMetadata(result2, ["sizeBytes", "executionHost"]),
|
|
215021
215059
|
createdAt
|
|
@@ -215076,11 +215114,11 @@ function extractEvidenceFromToolResult(input) {
|
|
|
215076
215114
|
}];
|
|
215077
215115
|
}
|
|
215078
215116
|
if (input.toolName === TOOL_NAMES.statPath) {
|
|
215079
|
-
const
|
|
215117
|
+
const path16 = stringValue6(result2.relativePath);
|
|
215080
215118
|
return [{
|
|
215081
215119
|
source: input.toolName,
|
|
215082
|
-
title:
|
|
215083
|
-
path:
|
|
215120
|
+
title: path16 ? `Stat ${path16}` : "Path metadata",
|
|
215121
|
+
path: path16,
|
|
215084
215122
|
summary: summarizeStat(result2),
|
|
215085
215123
|
metadata: pickMetadata(result2, ["exists", "isFile", "isDirectory", "sizeBytes", "modifiedAt", "executionHost"]),
|
|
215086
215124
|
createdAt
|
|
@@ -217647,8 +217685,8 @@ function sourceReadFamilyForToolCall(toolName, args) {
|
|
|
217647
217685
|
}
|
|
217648
217686
|
}
|
|
217649
217687
|
if (toolName === TOOL_NAMES.readLocalFile) {
|
|
217650
|
-
const
|
|
217651
|
-
return
|
|
217688
|
+
const path16 = typeof record.path === "string" ? record.path.trim() : "";
|
|
217689
|
+
return path16 ? `${toolName}:${path16}` : null;
|
|
217652
217690
|
}
|
|
217653
217691
|
if (toolName === TOOL_NAMES.readLocalSourceFile) {
|
|
217654
217692
|
const source = typeof record.localSourceId === "string" ? record.localSourceId.trim() : typeof record.sourceId === "string" ? record.sourceId.trim() : typeof record.path === "string" ? record.path.trim() : "";
|
|
@@ -218330,13 +218368,13 @@ function extractProviderReasoning(value) {
|
|
|
218330
218368
|
fields: Array.from(new Set(fields))
|
|
218331
218369
|
};
|
|
218332
218370
|
}
|
|
218333
|
-
function visit(value,
|
|
218371
|
+
function visit(value, path16, chunks, fields, seen) {
|
|
218334
218372
|
if (!value || typeof value !== "object") return;
|
|
218335
218373
|
if (seen.has(value)) return;
|
|
218336
218374
|
seen.add(value);
|
|
218337
218375
|
if (Array.isArray(value)) {
|
|
218338
218376
|
value.forEach(
|
|
218339
|
-
(item, index) => visit(item, `${
|
|
218377
|
+
(item, index) => visit(item, `${path16}[${index}]`, chunks, fields, seen)
|
|
218340
218378
|
);
|
|
218341
218379
|
return;
|
|
218342
218380
|
}
|
|
@@ -218345,23 +218383,23 @@ function visit(value, path15, chunks, fields, seen) {
|
|
|
218345
218383
|
const maybe = obj2[key];
|
|
218346
218384
|
if (typeof maybe === "string" && maybe.trim()) {
|
|
218347
218385
|
chunks.push(maybe);
|
|
218348
|
-
fields.push(`${
|
|
218386
|
+
fields.push(`${path16}.${key}`);
|
|
218349
218387
|
}
|
|
218350
218388
|
}
|
|
218351
218389
|
const type = typeof obj2.type === "string" ? obj2.type.toLowerCase() : "";
|
|
218352
218390
|
if ((type === "thinking" || type === "reasoning") && typeof obj2.content === "string" && obj2.content.trim()) {
|
|
218353
218391
|
chunks.push(obj2.content);
|
|
218354
|
-
fields.push(`${
|
|
218392
|
+
fields.push(`${path16}.content[type=${type}]`);
|
|
218355
218393
|
}
|
|
218356
218394
|
if ((type === "thinking" || type === "reasoning") && typeof obj2.text === "string" && obj2.text.trim()) {
|
|
218357
218395
|
chunks.push(obj2.text);
|
|
218358
|
-
fields.push(`${
|
|
218396
|
+
fields.push(`${path16}.text[type=${type}]`);
|
|
218359
218397
|
}
|
|
218360
218398
|
for (const [key, child] of Object.entries(obj2)) {
|
|
218361
218399
|
if (key.toLowerCase().includes("api") || key.toLowerCase().includes("authorization"))
|
|
218362
218400
|
continue;
|
|
218363
218401
|
if (typeof child === "object" && child !== null)
|
|
218364
|
-
visit(child, `${
|
|
218402
|
+
visit(child, `${path16}.${key}`, chunks, fields, seen);
|
|
218365
218403
|
}
|
|
218366
218404
|
}
|
|
218367
218405
|
var REASONING_KEYS;
|
|
@@ -227472,8 +227510,8 @@ async function resolveLocalSelectedSourceBundleForTurn(input) {
|
|
|
227472
227510
|
function extractFileNameFromId(localSourceId) {
|
|
227473
227511
|
const sep = localSourceId.lastIndexOf("::");
|
|
227474
227512
|
if (sep >= 0) {
|
|
227475
|
-
const
|
|
227476
|
-
return
|
|
227513
|
+
const path16 = localSourceId.slice(sep + 2);
|
|
227514
|
+
return path16.split("/").pop() ?? path16;
|
|
227477
227515
|
}
|
|
227478
227516
|
return localSourceId;
|
|
227479
227517
|
}
|
|
@@ -230693,7 +230731,7 @@ function buildSeatbeltProfile(workspaceRoot) {
|
|
|
230693
230731
|
home,
|
|
230694
230732
|
"/Users/Shared",
|
|
230695
230733
|
"/Volumes"
|
|
230696
|
-
])).map((
|
|
230734
|
+
])).map((path16) => `(subpath ${seatbeltString(path16)})`).join("\n ");
|
|
230697
230735
|
return `
|
|
230698
230736
|
(version 1)
|
|
230699
230737
|
(allow default)
|
|
@@ -233072,6 +233110,99 @@ var init_learningMemory = __esm({
|
|
|
233072
233110
|
}
|
|
233073
233111
|
});
|
|
233074
233112
|
|
|
233113
|
+
// features/perchTerminal/runtime/cliHost/cliUpdateCheck.ts
|
|
233114
|
+
import fs12 from "node:fs";
|
|
233115
|
+
import os3 from "node:os";
|
|
233116
|
+
import path14 from "node:path";
|
|
233117
|
+
function compareCliVersions(a, b2) {
|
|
233118
|
+
const ma = SEMVER_RE.exec(a);
|
|
233119
|
+
const mb = SEMVER_RE.exec(b2);
|
|
233120
|
+
if (!ma || !mb) return null;
|
|
233121
|
+
for (let i = 1; i <= 3; i += 1) {
|
|
233122
|
+
const da = Number(ma[i]);
|
|
233123
|
+
const db = Number(mb[i]);
|
|
233124
|
+
if (da !== db) return da < db ? -1 : 1;
|
|
233125
|
+
}
|
|
233126
|
+
return 0;
|
|
233127
|
+
}
|
|
233128
|
+
function updateNoticeLine(installed, latest) {
|
|
233129
|
+
if (!latest) return null;
|
|
233130
|
+
const cmp = compareCliVersions(installed, latest);
|
|
233131
|
+
if (cmp === null || cmp >= 0) return null;
|
|
233132
|
+
return `Update available: v${installed} \u2192 v${latest} \xB7 run: npm i -g perchai-cli@latest`;
|
|
233133
|
+
}
|
|
233134
|
+
function shouldRefresh(checkedAt, now23, ttlMs = CACHE_TTL_MS2) {
|
|
233135
|
+
if (checkedAt === null) return true;
|
|
233136
|
+
return now23 - checkedAt >= ttlMs;
|
|
233137
|
+
}
|
|
233138
|
+
function updateChecksDisabled(env4 = process.env) {
|
|
233139
|
+
return Boolean(env4.CI || env4.PERCH_NO_UPDATE_NOTIFIER || env4.NO_UPDATE_NOTIFIER);
|
|
233140
|
+
}
|
|
233141
|
+
function cacheFile() {
|
|
233142
|
+
const override = process.env.PERCH_UPDATE_CACHE_FILE?.trim();
|
|
233143
|
+
if (override) return override;
|
|
233144
|
+
return path14.join(os3.homedir(), ".perch", "update-check.json");
|
|
233145
|
+
}
|
|
233146
|
+
function readCache() {
|
|
233147
|
+
try {
|
|
233148
|
+
const raw = fs12.readFileSync(cacheFile(), "utf8");
|
|
233149
|
+
const parsed = JSON.parse(raw);
|
|
233150
|
+
if (typeof parsed.latestVersion === "string" && typeof parsed.checkedAt === "number") {
|
|
233151
|
+
return { latestVersion: parsed.latestVersion, checkedAt: parsed.checkedAt };
|
|
233152
|
+
}
|
|
233153
|
+
} catch {
|
|
233154
|
+
}
|
|
233155
|
+
return null;
|
|
233156
|
+
}
|
|
233157
|
+
function writeCache(cache3) {
|
|
233158
|
+
try {
|
|
233159
|
+
const file = cacheFile();
|
|
233160
|
+
fs12.mkdirSync(path14.dirname(file), { recursive: true });
|
|
233161
|
+
fs12.writeFileSync(file, JSON.stringify(cache3));
|
|
233162
|
+
} catch {
|
|
233163
|
+
}
|
|
233164
|
+
}
|
|
233165
|
+
async function fetchLatestVersion() {
|
|
233166
|
+
const controller = new AbortController();
|
|
233167
|
+
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
233168
|
+
if (typeof timer.unref === "function") timer.unref();
|
|
233169
|
+
try {
|
|
233170
|
+
const response = await fetch(REGISTRY_LATEST_URL, {
|
|
233171
|
+
signal: controller.signal,
|
|
233172
|
+
headers: { accept: "application/json" }
|
|
233173
|
+
});
|
|
233174
|
+
if (!response.ok) return null;
|
|
233175
|
+
const body = await response.json();
|
|
233176
|
+
return typeof body.version === "string" ? body.version : null;
|
|
233177
|
+
} catch {
|
|
233178
|
+
return null;
|
|
233179
|
+
} finally {
|
|
233180
|
+
clearTimeout(timer);
|
|
233181
|
+
}
|
|
233182
|
+
}
|
|
233183
|
+
async function refreshCacheInBackground() {
|
|
233184
|
+
const latest = await fetchLatestVersion();
|
|
233185
|
+
if (latest) writeCache({ latestVersion: latest, checkedAt: Date.now() });
|
|
233186
|
+
}
|
|
233187
|
+
function resolveUpdateNotice(installedVersion) {
|
|
233188
|
+
if (updateChecksDisabled()) return null;
|
|
233189
|
+
const cache3 = readCache();
|
|
233190
|
+
if (shouldRefresh(cache3?.checkedAt ?? null, Date.now())) {
|
|
233191
|
+
void refreshCacheInBackground();
|
|
233192
|
+
}
|
|
233193
|
+
return updateNoticeLine(installedVersion, cache3?.latestVersion ?? null);
|
|
233194
|
+
}
|
|
233195
|
+
var REGISTRY_LATEST_URL, CACHE_TTL_MS2, FETCH_TIMEOUT_MS, SEMVER_RE;
|
|
233196
|
+
var init_cliUpdateCheck = __esm({
|
|
233197
|
+
"features/perchTerminal/runtime/cliHost/cliUpdateCheck.ts"() {
|
|
233198
|
+
"use strict";
|
|
233199
|
+
REGISTRY_LATEST_URL = "https://registry.npmjs.org/perchai-cli/latest";
|
|
233200
|
+
CACHE_TTL_MS2 = 24 * 60 * 60 * 1e3;
|
|
233201
|
+
FETCH_TIMEOUT_MS = 3e3;
|
|
233202
|
+
SEMVER_RE = /^(\d+)\.(\d+)\.(\d+)$/;
|
|
233203
|
+
}
|
|
233204
|
+
});
|
|
233205
|
+
|
|
233075
233206
|
// node_modules/react/cjs/react.production.js
|
|
233076
233207
|
var require_react_production = __commonJS({
|
|
233077
233208
|
"node_modules/react/cjs/react.production.js"(exports2) {
|
|
@@ -234683,7 +234814,7 @@ __export(base_exports, {
|
|
|
234683
234814
|
synchronizedOutput: () => synchronizedOutput
|
|
234684
234815
|
});
|
|
234685
234816
|
import process2 from "node:process";
|
|
234686
|
-
import
|
|
234817
|
+
import os4 from "node:os";
|
|
234687
234818
|
var ESC, OSC, BEL, SEP, isTerminalApp, isWindows2, isTmux, cwdFunction, wrapOsc, cursorTo, cursorMove, cursorUp, cursorDown, cursorForward, cursorBackward, cursorLeft, cursorSavePosition, cursorRestorePosition, cursorGetPosition, cursorNextLine, cursorPrevLine, cursorHide, cursorShow, eraseLines, eraseEndLine, eraseStartLine, eraseLine, eraseDown, eraseUp, eraseScreen, scrollUp, scrollDown, clearScreen, clearViewport, isOldWindows, clearTerminal, enterAlternativeScreen, exitAlternativeScreen, beginSynchronizedOutput, endSynchronizedOutput, synchronizedOutput, beep, link, image, iTerm, ConEmu, setCwd;
|
|
234688
234819
|
var init_base = __esm({
|
|
234689
234820
|
"node_modules/ansi-escapes/base.js"() {
|
|
@@ -234766,7 +234897,7 @@ var init_base = __esm({
|
|
|
234766
234897
|
if (isBrowser || !isWindows2) {
|
|
234767
234898
|
return false;
|
|
234768
234899
|
}
|
|
234769
|
-
const parts =
|
|
234900
|
+
const parts = os4.release().split(".");
|
|
234770
234901
|
const major = Number(parts[0]);
|
|
234771
234902
|
const build2 = Number(parts[2] ?? 0);
|
|
234772
234903
|
if (major < 10) {
|
|
@@ -237290,7 +237421,7 @@ var init_wrap_ansi = __esm({
|
|
|
237290
237421
|
// node_modules/terminal-size/index.js
|
|
237291
237422
|
import process3 from "node:process";
|
|
237292
237423
|
import { execFileSync } from "node:child_process";
|
|
237293
|
-
import
|
|
237424
|
+
import fs13 from "node:fs";
|
|
237294
237425
|
import tty from "node:tty";
|
|
237295
237426
|
function terminalSize() {
|
|
237296
237427
|
const { env: env4, stdout, stderr } = process3;
|
|
@@ -237346,7 +237477,7 @@ var init_terminal_size = __esm({
|
|
|
237346
237477
|
return true;
|
|
237347
237478
|
}
|
|
237348
237479
|
try {
|
|
237349
|
-
const statContents =
|
|
237480
|
+
const statContents = fs13.readFileSync("/proc/self/stat", "utf8");
|
|
237350
237481
|
const closingParenthesisIndex = statContents.lastIndexOf(") ");
|
|
237351
237482
|
if (closingParenthesisIndex === -1) {
|
|
237352
237483
|
return false;
|
|
@@ -237367,8 +237498,8 @@ var init_terminal_size = __esm({
|
|
|
237367
237498
|
};
|
|
237368
237499
|
devTty = () => {
|
|
237369
237500
|
try {
|
|
237370
|
-
const flags = process3.platform === "darwin" ?
|
|
237371
|
-
const { columns, rows } = tty.WriteStream(
|
|
237501
|
+
const flags = process3.platform === "darwin" ? fs13.constants.O_EVTONLY | fs13.constants.O_NONBLOCK : fs13.constants.O_NONBLOCK;
|
|
237502
|
+
const { columns, rows } = tty.WriteStream(fs13.openSync("/dev/tty", flags));
|
|
237372
237503
|
return { columns, rows };
|
|
237373
237504
|
} catch {
|
|
237374
237505
|
}
|
|
@@ -246140,10 +246271,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
246140
246271
|
fiber = fiber.next, id--;
|
|
246141
246272
|
return fiber;
|
|
246142
246273
|
}
|
|
246143
|
-
function copyWithSetImpl(obj2,
|
|
246144
|
-
if (index >=
|
|
246145
|
-
var key =
|
|
246146
|
-
updated[key] = copyWithSetImpl(obj2[key],
|
|
246274
|
+
function copyWithSetImpl(obj2, path16, index, value) {
|
|
246275
|
+
if (index >= path16.length) return value;
|
|
246276
|
+
var key = path16[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
|
|
246277
|
+
updated[key] = copyWithSetImpl(obj2[key], path16, index + 1, value);
|
|
246147
246278
|
return updated;
|
|
246148
246279
|
}
|
|
246149
246280
|
function copyWithRename(obj2, oldPath, newPath) {
|
|
@@ -246170,11 +246301,11 @@ var require_react_reconciler_development = __commonJS({
|
|
|
246170
246301
|
);
|
|
246171
246302
|
return updated;
|
|
246172
246303
|
}
|
|
246173
|
-
function copyWithDeleteImpl(obj2,
|
|
246174
|
-
var key =
|
|
246175
|
-
if (index + 1 ===
|
|
246304
|
+
function copyWithDeleteImpl(obj2, path16, index) {
|
|
246305
|
+
var key = path16[index], updated = isArrayImpl(obj2) ? obj2.slice() : assign({}, obj2);
|
|
246306
|
+
if (index + 1 === path16.length)
|
|
246176
246307
|
return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
|
|
246177
|
-
updated[key] = copyWithDeleteImpl(obj2[key],
|
|
246308
|
+
updated[key] = copyWithDeleteImpl(obj2[key], path16, index + 1);
|
|
246178
246309
|
return updated;
|
|
246179
246310
|
}
|
|
246180
246311
|
function shouldSuspendImpl() {
|
|
@@ -259451,29 +259582,29 @@ var require_react_reconciler_development = __commonJS({
|
|
|
259451
259582
|
var didWarnAboutNestedUpdates = false;
|
|
259452
259583
|
var didWarnAboutFindNodeInStrictMode = {};
|
|
259453
259584
|
var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
|
|
259454
|
-
overrideHookState = function(fiber, id,
|
|
259585
|
+
overrideHookState = function(fiber, id, path16, value) {
|
|
259455
259586
|
id = findHook(fiber, id);
|
|
259456
|
-
null !== id && (
|
|
259587
|
+
null !== id && (path16 = copyWithSetImpl(id.memoizedState, path16, 0, value), id.memoizedState = path16, id.baseState = path16, fiber.memoizedProps = assign({}, fiber.memoizedProps), path16 = enqueueConcurrentRenderForLane(fiber, 2), null !== path16 && scheduleUpdateOnFiber(path16, fiber, 2));
|
|
259457
259588
|
};
|
|
259458
|
-
overrideHookStateDeletePath = function(fiber, id,
|
|
259589
|
+
overrideHookStateDeletePath = function(fiber, id, path16) {
|
|
259459
259590
|
id = findHook(fiber, id);
|
|
259460
|
-
null !== id && (
|
|
259591
|
+
null !== id && (path16 = copyWithDeleteImpl(id.memoizedState, path16, 0), id.memoizedState = path16, id.baseState = path16, fiber.memoizedProps = assign({}, fiber.memoizedProps), path16 = enqueueConcurrentRenderForLane(fiber, 2), null !== path16 && scheduleUpdateOnFiber(path16, fiber, 2));
|
|
259461
259592
|
};
|
|
259462
259593
|
overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
|
|
259463
259594
|
id = findHook(fiber, id);
|
|
259464
259595
|
null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
|
|
259465
259596
|
};
|
|
259466
|
-
overrideProps = function(fiber,
|
|
259467
|
-
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps,
|
|
259597
|
+
overrideProps = function(fiber, path16, value) {
|
|
259598
|
+
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path16, 0, value);
|
|
259468
259599
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
259469
|
-
|
|
259470
|
-
null !==
|
|
259600
|
+
path16 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
259601
|
+
null !== path16 && scheduleUpdateOnFiber(path16, fiber, 2);
|
|
259471
259602
|
};
|
|
259472
|
-
overridePropsDeletePath = function(fiber,
|
|
259473
|
-
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps,
|
|
259603
|
+
overridePropsDeletePath = function(fiber, path16) {
|
|
259604
|
+
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path16, 0);
|
|
259474
259605
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
259475
|
-
|
|
259476
|
-
null !==
|
|
259606
|
+
path16 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
259607
|
+
null !== path16 && scheduleUpdateOnFiber(path16, fiber, 2);
|
|
259477
259608
|
};
|
|
259478
259609
|
overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
259479
259610
|
fiber.pendingProps = copyWithRename(
|
|
@@ -269195,8 +269326,8 @@ var require_backend = __commonJS({
|
|
|
269195
269326
|
}
|
|
269196
269327
|
return false;
|
|
269197
269328
|
}
|
|
269198
|
-
function utils_getInObject(object2,
|
|
269199
|
-
return
|
|
269329
|
+
function utils_getInObject(object2, path16) {
|
|
269330
|
+
return path16.reduce(function(reduced, attr) {
|
|
269200
269331
|
if (reduced) {
|
|
269201
269332
|
if (utils_hasOwnProperty.call(reduced, attr)) {
|
|
269202
269333
|
return reduced[attr];
|
|
@@ -269208,11 +269339,11 @@ var require_backend = __commonJS({
|
|
|
269208
269339
|
return null;
|
|
269209
269340
|
}, object2);
|
|
269210
269341
|
}
|
|
269211
|
-
function deletePathInObject(object2,
|
|
269212
|
-
var length =
|
|
269213
|
-
var last2 =
|
|
269342
|
+
function deletePathInObject(object2, path16) {
|
|
269343
|
+
var length = path16.length;
|
|
269344
|
+
var last2 = path16[length - 1];
|
|
269214
269345
|
if (object2 != null) {
|
|
269215
|
-
var parent = utils_getInObject(object2,
|
|
269346
|
+
var parent = utils_getInObject(object2, path16.slice(0, length - 1));
|
|
269216
269347
|
if (parent) {
|
|
269217
269348
|
if (src_isArray(parent)) {
|
|
269218
269349
|
parent.splice(last2, 1);
|
|
@@ -269238,11 +269369,11 @@ var require_backend = __commonJS({
|
|
|
269238
269369
|
}
|
|
269239
269370
|
}
|
|
269240
269371
|
}
|
|
269241
|
-
function utils_setInObject(object2,
|
|
269242
|
-
var length =
|
|
269243
|
-
var last2 =
|
|
269372
|
+
function utils_setInObject(object2, path16, value) {
|
|
269373
|
+
var length = path16.length;
|
|
269374
|
+
var last2 = path16[length - 1];
|
|
269244
269375
|
if (object2 != null) {
|
|
269245
|
-
var parent = utils_getInObject(object2,
|
|
269376
|
+
var parent = utils_getInObject(object2, path16.slice(0, length - 1));
|
|
269246
269377
|
if (parent) {
|
|
269247
269378
|
parent[last2] = value;
|
|
269248
269379
|
}
|
|
@@ -269775,8 +269906,8 @@ var require_backend = __commonJS({
|
|
|
269775
269906
|
unserializable: /* @__PURE__ */ Symbol("unserializable")
|
|
269776
269907
|
};
|
|
269777
269908
|
var LEVEL_THRESHOLD = 2;
|
|
269778
|
-
function createDehydrated(type, inspectable, data, cleaned,
|
|
269779
|
-
cleaned.push(
|
|
269909
|
+
function createDehydrated(type, inspectable, data, cleaned, path16) {
|
|
269910
|
+
cleaned.push(path16);
|
|
269780
269911
|
var dehydrated = {
|
|
269781
269912
|
inspectable,
|
|
269782
269913
|
type,
|
|
@@ -269794,13 +269925,13 @@ var require_backend = __commonJS({
|
|
|
269794
269925
|
}
|
|
269795
269926
|
return dehydrated;
|
|
269796
269927
|
}
|
|
269797
|
-
function dehydrate(data, cleaned, unserializable,
|
|
269928
|
+
function dehydrate(data, cleaned, unserializable, path16, isPathAllowed) {
|
|
269798
269929
|
var level = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0;
|
|
269799
269930
|
var type = getDataType(data);
|
|
269800
269931
|
var isPathAllowedCheck;
|
|
269801
269932
|
switch (type) {
|
|
269802
269933
|
case "html_element":
|
|
269803
|
-
cleaned.push(
|
|
269934
|
+
cleaned.push(path16);
|
|
269804
269935
|
return {
|
|
269805
269936
|
inspectable: false,
|
|
269806
269937
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269809,7 +269940,7 @@ var require_backend = __commonJS({
|
|
|
269809
269940
|
type
|
|
269810
269941
|
};
|
|
269811
269942
|
case "function":
|
|
269812
|
-
cleaned.push(
|
|
269943
|
+
cleaned.push(path16);
|
|
269813
269944
|
return {
|
|
269814
269945
|
inspectable: false,
|
|
269815
269946
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269818,14 +269949,14 @@ var require_backend = __commonJS({
|
|
|
269818
269949
|
type
|
|
269819
269950
|
};
|
|
269820
269951
|
case "string":
|
|
269821
|
-
isPathAllowedCheck = isPathAllowed(
|
|
269952
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269822
269953
|
if (isPathAllowedCheck) {
|
|
269823
269954
|
return data;
|
|
269824
269955
|
} else {
|
|
269825
269956
|
return data.length <= 500 ? data : data.slice(0, 500) + "...";
|
|
269826
269957
|
}
|
|
269827
269958
|
case "bigint":
|
|
269828
|
-
cleaned.push(
|
|
269959
|
+
cleaned.push(path16);
|
|
269829
269960
|
return {
|
|
269830
269961
|
inspectable: false,
|
|
269831
269962
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269834,7 +269965,7 @@ var require_backend = __commonJS({
|
|
|
269834
269965
|
type
|
|
269835
269966
|
};
|
|
269836
269967
|
case "symbol":
|
|
269837
|
-
cleaned.push(
|
|
269968
|
+
cleaned.push(path16);
|
|
269838
269969
|
return {
|
|
269839
269970
|
inspectable: false,
|
|
269840
269971
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269843,9 +269974,9 @@ var require_backend = __commonJS({
|
|
|
269843
269974
|
type
|
|
269844
269975
|
};
|
|
269845
269976
|
case "react_element": {
|
|
269846
|
-
isPathAllowedCheck = isPathAllowed(
|
|
269977
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269847
269978
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
269848
|
-
cleaned.push(
|
|
269979
|
+
cleaned.push(path16);
|
|
269849
269980
|
return {
|
|
269850
269981
|
inspectable: true,
|
|
269851
269982
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269862,19 +269993,19 @@ var require_backend = __commonJS({
|
|
|
269862
269993
|
preview_long: formatDataForPreview(data, true),
|
|
269863
269994
|
name: getDisplayNameForReactElement(data) || "Unknown"
|
|
269864
269995
|
};
|
|
269865
|
-
unserializableValue.key = dehydrate(data.key, cleaned, unserializable,
|
|
269996
|
+
unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path16.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
269866
269997
|
if (data.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {
|
|
269867
|
-
unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable,
|
|
269998
|
+
unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path16.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
269868
269999
|
}
|
|
269869
|
-
unserializableValue.props = dehydrate(data.props, cleaned, unserializable,
|
|
269870
|
-
unserializable.push(
|
|
270000
|
+
unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path16.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270001
|
+
unserializable.push(path16);
|
|
269871
270002
|
return unserializableValue;
|
|
269872
270003
|
}
|
|
269873
270004
|
case "react_lazy": {
|
|
269874
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270005
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269875
270006
|
var payload = data._payload;
|
|
269876
270007
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
269877
|
-
cleaned.push(
|
|
270008
|
+
cleaned.push(path16);
|
|
269878
270009
|
var inspectable = payload !== null && hydration_typeof(payload) === "object" && (payload._status === 1 || payload._status === 2 || payload.status === "fulfilled" || payload.status === "rejected");
|
|
269879
270010
|
return {
|
|
269880
270011
|
inspectable,
|
|
@@ -269891,13 +270022,13 @@ var require_backend = __commonJS({
|
|
|
269891
270022
|
preview_long: formatDataForPreview(data, true),
|
|
269892
270023
|
name: "lazy()"
|
|
269893
270024
|
};
|
|
269894
|
-
_unserializableValue._payload = dehydrate(payload, cleaned, unserializable,
|
|
269895
|
-
unserializable.push(
|
|
270025
|
+
_unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path16.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270026
|
+
unserializable.push(path16);
|
|
269896
270027
|
return _unserializableValue;
|
|
269897
270028
|
}
|
|
269898
270029
|
case "array_buffer":
|
|
269899
270030
|
case "data_view":
|
|
269900
|
-
cleaned.push(
|
|
270031
|
+
cleaned.push(path16);
|
|
269901
270032
|
return {
|
|
269902
270033
|
inspectable: false,
|
|
269903
270034
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269907,21 +270038,21 @@ var require_backend = __commonJS({
|
|
|
269907
270038
|
type
|
|
269908
270039
|
};
|
|
269909
270040
|
case "array":
|
|
269910
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270041
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269911
270042
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
269912
|
-
return createDehydrated(type, true, data, cleaned,
|
|
270043
|
+
return createDehydrated(type, true, data, cleaned, path16);
|
|
269913
270044
|
}
|
|
269914
270045
|
var arr = [];
|
|
269915
270046
|
for (var i = 0; i < data.length; i++) {
|
|
269916
|
-
arr[i] = dehydrateKey(data, i, cleaned, unserializable,
|
|
270047
|
+
arr[i] = dehydrateKey(data, i, cleaned, unserializable, path16.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
269917
270048
|
}
|
|
269918
270049
|
return arr;
|
|
269919
270050
|
case "html_all_collection":
|
|
269920
270051
|
case "typed_array":
|
|
269921
270052
|
case "iterator":
|
|
269922
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270053
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269923
270054
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
269924
|
-
return createDehydrated(type, true, data, cleaned,
|
|
270055
|
+
return createDehydrated(type, true, data, cleaned, path16);
|
|
269925
270056
|
} else {
|
|
269926
270057
|
var _unserializableValue2 = {
|
|
269927
270058
|
unserializable: true,
|
|
@@ -269933,13 +270064,13 @@ var require_backend = __commonJS({
|
|
|
269933
270064
|
name: typeof data.constructor !== "function" || typeof data.constructor.name !== "string" || data.constructor.name === "Object" ? "" : data.constructor.name
|
|
269934
270065
|
};
|
|
269935
270066
|
Array.from(data).forEach(function(item, i2) {
|
|
269936
|
-
return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable,
|
|
270067
|
+
return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path16.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
269937
270068
|
});
|
|
269938
|
-
unserializable.push(
|
|
270069
|
+
unserializable.push(path16);
|
|
269939
270070
|
return _unserializableValue2;
|
|
269940
270071
|
}
|
|
269941
270072
|
case "opaque_iterator":
|
|
269942
|
-
cleaned.push(
|
|
270073
|
+
cleaned.push(path16);
|
|
269943
270074
|
return {
|
|
269944
270075
|
inspectable: false,
|
|
269945
270076
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269948,7 +270079,7 @@ var require_backend = __commonJS({
|
|
|
269948
270079
|
type
|
|
269949
270080
|
};
|
|
269950
270081
|
case "date":
|
|
269951
|
-
cleaned.push(
|
|
270082
|
+
cleaned.push(path16);
|
|
269952
270083
|
return {
|
|
269953
270084
|
inspectable: false,
|
|
269954
270085
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269957,7 +270088,7 @@ var require_backend = __commonJS({
|
|
|
269957
270088
|
type
|
|
269958
270089
|
};
|
|
269959
270090
|
case "regexp":
|
|
269960
|
-
cleaned.push(
|
|
270091
|
+
cleaned.push(path16);
|
|
269961
270092
|
return {
|
|
269962
270093
|
inspectable: false,
|
|
269963
270094
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269966,9 +270097,9 @@ var require_backend = __commonJS({
|
|
|
269966
270097
|
type
|
|
269967
270098
|
};
|
|
269968
270099
|
case "thenable":
|
|
269969
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270100
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
269970
270101
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
269971
|
-
cleaned.push(
|
|
270102
|
+
cleaned.push(path16);
|
|
269972
270103
|
return {
|
|
269973
270104
|
inspectable: data.status === "fulfilled" || data.status === "rejected",
|
|
269974
270105
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -269989,8 +270120,8 @@ var require_backend = __commonJS({
|
|
|
269989
270120
|
preview_long: formatDataForPreview(data, true),
|
|
269990
270121
|
name: "fulfilled Thenable"
|
|
269991
270122
|
};
|
|
269992
|
-
_unserializableValue3.value = dehydrate(data.value, cleaned, unserializable,
|
|
269993
|
-
unserializable.push(
|
|
270123
|
+
_unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path16.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270124
|
+
unserializable.push(path16);
|
|
269994
270125
|
return _unserializableValue3;
|
|
269995
270126
|
}
|
|
269996
270127
|
case "rejected": {
|
|
@@ -270001,12 +270132,12 @@ var require_backend = __commonJS({
|
|
|
270001
270132
|
preview_long: formatDataForPreview(data, true),
|
|
270002
270133
|
name: "rejected Thenable"
|
|
270003
270134
|
};
|
|
270004
|
-
_unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable,
|
|
270005
|
-
unserializable.push(
|
|
270135
|
+
_unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path16.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270136
|
+
unserializable.push(path16);
|
|
270006
270137
|
return _unserializableValue4;
|
|
270007
270138
|
}
|
|
270008
270139
|
default:
|
|
270009
|
-
cleaned.push(
|
|
270140
|
+
cleaned.push(path16);
|
|
270010
270141
|
return {
|
|
270011
270142
|
inspectable: false,
|
|
270012
270143
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -270016,21 +270147,21 @@ var require_backend = __commonJS({
|
|
|
270016
270147
|
};
|
|
270017
270148
|
}
|
|
270018
270149
|
case "object":
|
|
270019
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270150
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
270020
270151
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
270021
|
-
return createDehydrated(type, true, data, cleaned,
|
|
270152
|
+
return createDehydrated(type, true, data, cleaned, path16);
|
|
270022
270153
|
} else {
|
|
270023
270154
|
var object2 = {};
|
|
270024
270155
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
270025
270156
|
var name = key.toString();
|
|
270026
|
-
object2[name] = dehydrateKey(data, key, cleaned, unserializable,
|
|
270157
|
+
object2[name] = dehydrateKey(data, key, cleaned, unserializable, path16.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270027
270158
|
});
|
|
270028
270159
|
return object2;
|
|
270029
270160
|
}
|
|
270030
270161
|
case "class_instance": {
|
|
270031
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270162
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
270032
270163
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
270033
|
-
return createDehydrated(type, true, data, cleaned,
|
|
270164
|
+
return createDehydrated(type, true, data, cleaned, path16);
|
|
270034
270165
|
}
|
|
270035
270166
|
var value = {
|
|
270036
270167
|
unserializable: true,
|
|
@@ -270042,15 +270173,15 @@ var require_backend = __commonJS({
|
|
|
270042
270173
|
};
|
|
270043
270174
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
270044
270175
|
var keyAsString = key.toString();
|
|
270045
|
-
value[keyAsString] = dehydrate(data[key], cleaned, unserializable,
|
|
270176
|
+
value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path16.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270046
270177
|
});
|
|
270047
|
-
unserializable.push(
|
|
270178
|
+
unserializable.push(path16);
|
|
270048
270179
|
return value;
|
|
270049
270180
|
}
|
|
270050
270181
|
case "error": {
|
|
270051
|
-
isPathAllowedCheck = isPathAllowed(
|
|
270182
|
+
isPathAllowedCheck = isPathAllowed(path16);
|
|
270052
270183
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
270053
|
-
return createDehydrated(type, true, data, cleaned,
|
|
270184
|
+
return createDehydrated(type, true, data, cleaned, path16);
|
|
270054
270185
|
}
|
|
270055
270186
|
var _value = {
|
|
270056
270187
|
unserializable: true,
|
|
@@ -270060,22 +270191,22 @@ var require_backend = __commonJS({
|
|
|
270060
270191
|
preview_long: formatDataForPreview(data, true),
|
|
270061
270192
|
name: data.name
|
|
270062
270193
|
};
|
|
270063
|
-
_value.message = dehydrate(data.message, cleaned, unserializable,
|
|
270064
|
-
_value.stack = dehydrate(data.stack, cleaned, unserializable,
|
|
270194
|
+
_value.message = dehydrate(data.message, cleaned, unserializable, path16.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270195
|
+
_value.stack = dehydrate(data.stack, cleaned, unserializable, path16.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270065
270196
|
if ("cause" in data) {
|
|
270066
|
-
_value.cause = dehydrate(data.cause, cleaned, unserializable,
|
|
270197
|
+
_value.cause = dehydrate(data.cause, cleaned, unserializable, path16.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270067
270198
|
}
|
|
270068
270199
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
270069
270200
|
var keyAsString = key.toString();
|
|
270070
|
-
_value[keyAsString] = dehydrate(data[key], cleaned, unserializable,
|
|
270201
|
+
_value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path16.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
270071
270202
|
});
|
|
270072
|
-
unserializable.push(
|
|
270203
|
+
unserializable.push(path16);
|
|
270073
270204
|
return _value;
|
|
270074
270205
|
}
|
|
270075
270206
|
case "infinity":
|
|
270076
270207
|
case "nan":
|
|
270077
270208
|
case "undefined":
|
|
270078
|
-
cleaned.push(
|
|
270209
|
+
cleaned.push(path16);
|
|
270079
270210
|
return {
|
|
270080
270211
|
type
|
|
270081
270212
|
};
|
|
@@ -270083,10 +270214,10 @@ var require_backend = __commonJS({
|
|
|
270083
270214
|
return data;
|
|
270084
270215
|
}
|
|
270085
270216
|
}
|
|
270086
|
-
function dehydrateKey(parent, key, cleaned, unserializable,
|
|
270217
|
+
function dehydrateKey(parent, key, cleaned, unserializable, path16, isPathAllowed) {
|
|
270087
270218
|
var level = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 0;
|
|
270088
270219
|
try {
|
|
270089
|
-
return dehydrate(parent[key], cleaned, unserializable,
|
|
270220
|
+
return dehydrate(parent[key], cleaned, unserializable, path16, isPathAllowed, level);
|
|
270090
270221
|
} catch (error) {
|
|
270091
270222
|
var preview = "";
|
|
270092
270223
|
if (hydration_typeof(error) === "object" && error !== null && typeof error.stack === "string") {
|
|
@@ -270094,7 +270225,7 @@ var require_backend = __commonJS({
|
|
|
270094
270225
|
} else if (typeof error === "string") {
|
|
270095
270226
|
preview = error;
|
|
270096
270227
|
}
|
|
270097
|
-
cleaned.push(
|
|
270228
|
+
cleaned.push(path16);
|
|
270098
270229
|
return {
|
|
270099
270230
|
inspectable: false,
|
|
270100
270231
|
preview_short: "[Exception]",
|
|
@@ -270104,8 +270235,8 @@ var require_backend = __commonJS({
|
|
|
270104
270235
|
};
|
|
270105
270236
|
}
|
|
270106
270237
|
}
|
|
270107
|
-
function fillInPath(object2, data,
|
|
270108
|
-
var target = getInObject(object2,
|
|
270238
|
+
function fillInPath(object2, data, path16, value) {
|
|
270239
|
+
var target = getInObject(object2, path16);
|
|
270109
270240
|
if (target != null) {
|
|
270110
270241
|
if (!target[meta.unserializable]) {
|
|
270111
270242
|
delete target[meta.inspectable];
|
|
@@ -270120,9 +270251,9 @@ var require_backend = __commonJS({
|
|
|
270120
270251
|
}
|
|
270121
270252
|
if (value !== null && data.unserializable.length > 0) {
|
|
270122
270253
|
var unserializablePath = data.unserializable[0];
|
|
270123
|
-
var isMatch2 = unserializablePath.length ===
|
|
270124
|
-
for (var i = 0; i <
|
|
270125
|
-
if (
|
|
270254
|
+
var isMatch2 = unserializablePath.length === path16.length;
|
|
270255
|
+
for (var i = 0; i < path16.length; i++) {
|
|
270256
|
+
if (path16[i] !== unserializablePath[i]) {
|
|
270126
270257
|
isMatch2 = false;
|
|
270127
270258
|
break;
|
|
270128
270259
|
}
|
|
@@ -270131,13 +270262,13 @@ var require_backend = __commonJS({
|
|
|
270131
270262
|
upgradeUnserializable(value, value);
|
|
270132
270263
|
}
|
|
270133
270264
|
}
|
|
270134
|
-
setInObject(object2,
|
|
270265
|
+
setInObject(object2, path16, value);
|
|
270135
270266
|
}
|
|
270136
270267
|
function hydrate(object2, cleaned, unserializable) {
|
|
270137
|
-
cleaned.forEach(function(
|
|
270138
|
-
var length =
|
|
270139
|
-
var last2 =
|
|
270140
|
-
var parent = getInObject(object2,
|
|
270268
|
+
cleaned.forEach(function(path16) {
|
|
270269
|
+
var length = path16.length;
|
|
270270
|
+
var last2 = path16[length - 1];
|
|
270271
|
+
var parent = getInObject(object2, path16.slice(0, length - 1));
|
|
270141
270272
|
if (!parent || !parent.hasOwnProperty(last2)) {
|
|
270142
270273
|
return;
|
|
270143
270274
|
}
|
|
@@ -270163,10 +270294,10 @@ var require_backend = __commonJS({
|
|
|
270163
270294
|
parent[last2] = replaced;
|
|
270164
270295
|
}
|
|
270165
270296
|
});
|
|
270166
|
-
unserializable.forEach(function(
|
|
270167
|
-
var length =
|
|
270168
|
-
var last2 =
|
|
270169
|
-
var parent = getInObject(object2,
|
|
270297
|
+
unserializable.forEach(function(path16) {
|
|
270298
|
+
var length = path16.length;
|
|
270299
|
+
var last2 = path16[length - 1];
|
|
270300
|
+
var parent = getInObject(object2, path16.slice(0, length - 1));
|
|
270170
270301
|
if (!parent || !parent.hasOwnProperty(last2)) {
|
|
270171
270302
|
return;
|
|
270172
270303
|
}
|
|
@@ -270287,11 +270418,11 @@ var require_backend = __commonJS({
|
|
|
270287
270418
|
return gte(version4, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);
|
|
270288
270419
|
}
|
|
270289
270420
|
function cleanForBridge(data, isPathAllowed) {
|
|
270290
|
-
var
|
|
270421
|
+
var path16 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
270291
270422
|
if (data !== null) {
|
|
270292
270423
|
var cleanedPaths = [];
|
|
270293
270424
|
var unserializablePaths = [];
|
|
270294
|
-
var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths,
|
|
270425
|
+
var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path16, isPathAllowed);
|
|
270295
270426
|
return {
|
|
270296
270427
|
data: cleanedData,
|
|
270297
270428
|
cleaned: cleanedPaths,
|
|
@@ -270301,18 +270432,18 @@ var require_backend = __commonJS({
|
|
|
270301
270432
|
return null;
|
|
270302
270433
|
}
|
|
270303
270434
|
}
|
|
270304
|
-
function copyWithDelete(obj2,
|
|
270435
|
+
function copyWithDelete(obj2, path16) {
|
|
270305
270436
|
var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
270306
|
-
var key =
|
|
270437
|
+
var key = path16[index];
|
|
270307
270438
|
var updated = shared_isArray(obj2) ? obj2.slice() : utils_objectSpread({}, obj2);
|
|
270308
|
-
if (index + 1 ===
|
|
270439
|
+
if (index + 1 === path16.length) {
|
|
270309
270440
|
if (shared_isArray(updated)) {
|
|
270310
270441
|
updated.splice(key, 1);
|
|
270311
270442
|
} else {
|
|
270312
270443
|
delete updated[key];
|
|
270313
270444
|
}
|
|
270314
270445
|
} else {
|
|
270315
|
-
updated[key] = copyWithDelete(obj2[key],
|
|
270446
|
+
updated[key] = copyWithDelete(obj2[key], path16, index + 1);
|
|
270316
270447
|
}
|
|
270317
270448
|
return updated;
|
|
270318
270449
|
}
|
|
@@ -270333,14 +270464,14 @@ var require_backend = __commonJS({
|
|
|
270333
270464
|
}
|
|
270334
270465
|
return updated;
|
|
270335
270466
|
}
|
|
270336
|
-
function copyWithSet(obj2,
|
|
270467
|
+
function copyWithSet(obj2, path16, value) {
|
|
270337
270468
|
var index = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
270338
|
-
if (index >=
|
|
270469
|
+
if (index >= path16.length) {
|
|
270339
270470
|
return value;
|
|
270340
270471
|
}
|
|
270341
|
-
var key =
|
|
270472
|
+
var key = path16[index];
|
|
270342
270473
|
var updated = shared_isArray(obj2) ? obj2.slice() : utils_objectSpread({}, obj2);
|
|
270343
|
-
updated[key] = copyWithSet(obj2[key],
|
|
270474
|
+
updated[key] = copyWithSet(obj2[key], path16, value, index + 1);
|
|
270344
270475
|
return updated;
|
|
270345
270476
|
}
|
|
270346
270477
|
function getEffectDurations(root2) {
|
|
@@ -271616,12 +271747,12 @@ var require_backend = __commonJS({
|
|
|
271616
271747
|
}
|
|
271617
271748
|
});
|
|
271618
271749
|
bridge_defineProperty(_this, "overrideValueAtPath", function(_ref) {
|
|
271619
|
-
var id = _ref.id,
|
|
271750
|
+
var id = _ref.id, path16 = _ref.path, rendererID = _ref.rendererID, type = _ref.type, value = _ref.value;
|
|
271620
271751
|
switch (type) {
|
|
271621
271752
|
case "context":
|
|
271622
271753
|
_this.send("overrideContext", {
|
|
271623
271754
|
id,
|
|
271624
|
-
path:
|
|
271755
|
+
path: path16,
|
|
271625
271756
|
rendererID,
|
|
271626
271757
|
wasForwarded: true,
|
|
271627
271758
|
value
|
|
@@ -271630,7 +271761,7 @@ var require_backend = __commonJS({
|
|
|
271630
271761
|
case "hooks":
|
|
271631
271762
|
_this.send("overrideHookState", {
|
|
271632
271763
|
id,
|
|
271633
|
-
path:
|
|
271764
|
+
path: path16,
|
|
271634
271765
|
rendererID,
|
|
271635
271766
|
wasForwarded: true,
|
|
271636
271767
|
value
|
|
@@ -271639,7 +271770,7 @@ var require_backend = __commonJS({
|
|
|
271639
271770
|
case "props":
|
|
271640
271771
|
_this.send("overrideProps", {
|
|
271641
271772
|
id,
|
|
271642
|
-
path:
|
|
271773
|
+
path: path16,
|
|
271643
271774
|
rendererID,
|
|
271644
271775
|
wasForwarded: true,
|
|
271645
271776
|
value
|
|
@@ -271648,7 +271779,7 @@ var require_backend = __commonJS({
|
|
|
271648
271779
|
case "state":
|
|
271649
271780
|
_this.send("overrideState", {
|
|
271650
271781
|
id,
|
|
271651
|
-
path:
|
|
271782
|
+
path: path16,
|
|
271652
271783
|
rendererID,
|
|
271653
271784
|
wasForwarded: true,
|
|
271654
271785
|
value
|
|
@@ -271986,12 +272117,12 @@ var require_backend = __commonJS({
|
|
|
271986
272117
|
}
|
|
271987
272118
|
});
|
|
271988
272119
|
agent_defineProperty(_this, "copyElementPath", function(_ref5) {
|
|
271989
|
-
var id = _ref5.id,
|
|
272120
|
+
var id = _ref5.id, path16 = _ref5.path, rendererID = _ref5.rendererID;
|
|
271990
272121
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
271991
272122
|
if (renderer2 == null) {
|
|
271992
272123
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
271993
272124
|
} else {
|
|
271994
|
-
var value = renderer2.getSerializedElementValueByPath(id,
|
|
272125
|
+
var value = renderer2.getSerializedElementValueByPath(id, path16);
|
|
271995
272126
|
if (value != null) {
|
|
271996
272127
|
_this._bridge.send("saveToClipboard", value);
|
|
271997
272128
|
} else {
|
|
@@ -272000,12 +272131,12 @@ var require_backend = __commonJS({
|
|
|
272000
272131
|
}
|
|
272001
272132
|
});
|
|
272002
272133
|
agent_defineProperty(_this, "deletePath", function(_ref6) {
|
|
272003
|
-
var hookID = _ref6.hookID, id = _ref6.id,
|
|
272134
|
+
var hookID = _ref6.hookID, id = _ref6.id, path16 = _ref6.path, rendererID = _ref6.rendererID, type = _ref6.type;
|
|
272004
272135
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272005
272136
|
if (renderer2 == null) {
|
|
272006
272137
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
272007
272138
|
} else {
|
|
272008
|
-
renderer2.deletePath(type, id, hookID,
|
|
272139
|
+
renderer2.deletePath(type, id, hookID, path16);
|
|
272009
272140
|
}
|
|
272010
272141
|
});
|
|
272011
272142
|
agent_defineProperty(_this, "getBackendVersion", function() {
|
|
@@ -272042,12 +272173,12 @@ var require_backend = __commonJS({
|
|
|
272042
272173
|
}
|
|
272043
272174
|
});
|
|
272044
272175
|
agent_defineProperty(_this, "inspectElement", function(_ref9) {
|
|
272045
|
-
var forceFullData = _ref9.forceFullData, id = _ref9.id,
|
|
272176
|
+
var forceFullData = _ref9.forceFullData, id = _ref9.id, path16 = _ref9.path, rendererID = _ref9.rendererID, requestID = _ref9.requestID;
|
|
272046
272177
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272047
272178
|
if (renderer2 == null) {
|
|
272048
272179
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
272049
272180
|
} else {
|
|
272050
|
-
_this._bridge.send("inspectedElement", renderer2.inspectElement(requestID, id,
|
|
272181
|
+
_this._bridge.send("inspectedElement", renderer2.inspectElement(requestID, id, path16, forceFullData));
|
|
272051
272182
|
if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
|
|
272052
272183
|
_this._persistedSelection = null;
|
|
272053
272184
|
_this._persistedSelectionMatch = null;
|
|
@@ -272081,15 +272212,15 @@ var require_backend = __commonJS({
|
|
|
272081
272212
|
}
|
|
272082
272213
|
for (var rendererID in _this._rendererInterfaces) {
|
|
272083
272214
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272084
|
-
var
|
|
272215
|
+
var path16 = null;
|
|
272085
272216
|
if (suspendedByPathIndex !== null && rendererPath !== null) {
|
|
272086
272217
|
var suspendedByPathRendererIndex = suspendedByPathIndex - suspendedByOffset;
|
|
272087
272218
|
var rendererHasRequestedSuspendedByPath = renderer2.getElementAttributeByPath(id, ["suspendedBy", suspendedByPathRendererIndex]) !== void 0;
|
|
272088
272219
|
if (rendererHasRequestedSuspendedByPath) {
|
|
272089
|
-
|
|
272220
|
+
path16 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
|
|
272090
272221
|
}
|
|
272091
272222
|
}
|
|
272092
|
-
var inspectedRootsPayload = renderer2.inspectElement(requestID, id,
|
|
272223
|
+
var inspectedRootsPayload = renderer2.inspectElement(requestID, id, path16, forceFullData);
|
|
272093
272224
|
switch (inspectedRootsPayload.type) {
|
|
272094
272225
|
case "hydrated-path":
|
|
272095
272226
|
inspectedRootsPayload.path[1] += suspendedByOffset;
|
|
@@ -272183,20 +272314,20 @@ var require_backend = __commonJS({
|
|
|
272183
272314
|
}
|
|
272184
272315
|
});
|
|
272185
272316
|
agent_defineProperty(_this, "overrideValueAtPath", function(_ref15) {
|
|
272186
|
-
var hookID = _ref15.hookID, id = _ref15.id,
|
|
272317
|
+
var hookID = _ref15.hookID, id = _ref15.id, path16 = _ref15.path, rendererID = _ref15.rendererID, type = _ref15.type, value = _ref15.value;
|
|
272187
272318
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272188
272319
|
if (renderer2 == null) {
|
|
272189
272320
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
272190
272321
|
} else {
|
|
272191
|
-
renderer2.overrideValueAtPath(type, id, hookID,
|
|
272322
|
+
renderer2.overrideValueAtPath(type, id, hookID, path16, value);
|
|
272192
272323
|
}
|
|
272193
272324
|
});
|
|
272194
272325
|
agent_defineProperty(_this, "overrideContext", function(_ref16) {
|
|
272195
|
-
var id = _ref16.id,
|
|
272326
|
+
var id = _ref16.id, path16 = _ref16.path, rendererID = _ref16.rendererID, wasForwarded = _ref16.wasForwarded, value = _ref16.value;
|
|
272196
272327
|
if (!wasForwarded) {
|
|
272197
272328
|
_this.overrideValueAtPath({
|
|
272198
272329
|
id,
|
|
272199
|
-
path:
|
|
272330
|
+
path: path16,
|
|
272200
272331
|
rendererID,
|
|
272201
272332
|
type: "context",
|
|
272202
272333
|
value
|
|
@@ -272204,11 +272335,11 @@ var require_backend = __commonJS({
|
|
|
272204
272335
|
}
|
|
272205
272336
|
});
|
|
272206
272337
|
agent_defineProperty(_this, "overrideHookState", function(_ref17) {
|
|
272207
|
-
var id = _ref17.id, hookID = _ref17.hookID,
|
|
272338
|
+
var id = _ref17.id, hookID = _ref17.hookID, path16 = _ref17.path, rendererID = _ref17.rendererID, wasForwarded = _ref17.wasForwarded, value = _ref17.value;
|
|
272208
272339
|
if (!wasForwarded) {
|
|
272209
272340
|
_this.overrideValueAtPath({
|
|
272210
272341
|
id,
|
|
272211
|
-
path:
|
|
272342
|
+
path: path16,
|
|
272212
272343
|
rendererID,
|
|
272213
272344
|
type: "hooks",
|
|
272214
272345
|
value
|
|
@@ -272216,11 +272347,11 @@ var require_backend = __commonJS({
|
|
|
272216
272347
|
}
|
|
272217
272348
|
});
|
|
272218
272349
|
agent_defineProperty(_this, "overrideProps", function(_ref18) {
|
|
272219
|
-
var id = _ref18.id,
|
|
272350
|
+
var id = _ref18.id, path16 = _ref18.path, rendererID = _ref18.rendererID, wasForwarded = _ref18.wasForwarded, value = _ref18.value;
|
|
272220
272351
|
if (!wasForwarded) {
|
|
272221
272352
|
_this.overrideValueAtPath({
|
|
272222
272353
|
id,
|
|
272223
|
-
path:
|
|
272354
|
+
path: path16,
|
|
272224
272355
|
rendererID,
|
|
272225
272356
|
type: "props",
|
|
272226
272357
|
value
|
|
@@ -272228,11 +272359,11 @@ var require_backend = __commonJS({
|
|
|
272228
272359
|
}
|
|
272229
272360
|
});
|
|
272230
272361
|
agent_defineProperty(_this, "overrideState", function(_ref19) {
|
|
272231
|
-
var id = _ref19.id,
|
|
272362
|
+
var id = _ref19.id, path16 = _ref19.path, rendererID = _ref19.rendererID, wasForwarded = _ref19.wasForwarded, value = _ref19.value;
|
|
272232
272363
|
if (!wasForwarded) {
|
|
272233
272364
|
_this.overrideValueAtPath({
|
|
272234
272365
|
id,
|
|
272235
|
-
path:
|
|
272366
|
+
path: path16,
|
|
272236
272367
|
rendererID,
|
|
272237
272368
|
type: "state",
|
|
272238
272369
|
value
|
|
@@ -272299,12 +272430,12 @@ var require_backend = __commonJS({
|
|
|
272299
272430
|
_this._bridge.send("stopInspectingHost", selected);
|
|
272300
272431
|
});
|
|
272301
272432
|
agent_defineProperty(_this, "storeAsGlobal", function(_ref23) {
|
|
272302
|
-
var count = _ref23.count, id = _ref23.id,
|
|
272433
|
+
var count = _ref23.count, id = _ref23.id, path16 = _ref23.path, rendererID = _ref23.rendererID;
|
|
272303
272434
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272304
272435
|
if (renderer2 == null) {
|
|
272305
272436
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
272306
272437
|
} else {
|
|
272307
|
-
renderer2.storeAsGlobal(id,
|
|
272438
|
+
renderer2.storeAsGlobal(id, path16, count);
|
|
272308
272439
|
}
|
|
272309
272440
|
});
|
|
272310
272441
|
agent_defineProperty(_this, "updateHookSettings", function(settings) {
|
|
@@ -272321,12 +272452,12 @@ var require_backend = __commonJS({
|
|
|
272321
272452
|
var rendererID = +rendererIDString;
|
|
272322
272453
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272323
272454
|
if (_this._lastSelectedRendererID === rendererID) {
|
|
272324
|
-
var
|
|
272325
|
-
if (
|
|
272326
|
-
renderer2.setTrackedPath(
|
|
272455
|
+
var path16 = renderer2.getPathForElement(_this._lastSelectedElementID);
|
|
272456
|
+
if (path16 !== null) {
|
|
272457
|
+
renderer2.setTrackedPath(path16);
|
|
272327
272458
|
_this._persistedSelection = {
|
|
272328
272459
|
rendererID,
|
|
272329
|
-
path:
|
|
272460
|
+
path: path16
|
|
272330
272461
|
};
|
|
272331
272462
|
}
|
|
272332
272463
|
}
|
|
@@ -272401,11 +272532,11 @@ var require_backend = __commonJS({
|
|
|
272401
272532
|
var rendererID = _this._lastSelectedRendererID;
|
|
272402
272533
|
var id = _this._lastSelectedElementID;
|
|
272403
272534
|
var renderer2 = _this._rendererInterfaces[rendererID];
|
|
272404
|
-
var
|
|
272405
|
-
if (
|
|
272535
|
+
var path16 = renderer2 != null ? renderer2.getPathForElement(id) : null;
|
|
272536
|
+
if (path16 !== null) {
|
|
272406
272537
|
storage_sessionStorageSetItem(SESSION_STORAGE_LAST_SELECTION_KEY, JSON.stringify({
|
|
272407
272538
|
rendererID,
|
|
272408
|
-
path:
|
|
272539
|
+
path: path16
|
|
272409
272540
|
}));
|
|
272410
272541
|
} else {
|
|
272411
272542
|
storage_sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);
|
|
@@ -273114,7 +273245,7 @@ var require_backend = __commonJS({
|
|
|
273114
273245
|
hasElementWithId: function hasElementWithId() {
|
|
273115
273246
|
return false;
|
|
273116
273247
|
},
|
|
273117
|
-
inspectElement: function inspectElement(requestID, id,
|
|
273248
|
+
inspectElement: function inspectElement(requestID, id, path16) {
|
|
273118
273249
|
return {
|
|
273119
273250
|
id,
|
|
273120
273251
|
responseID: requestID,
|
|
@@ -278365,9 +278496,9 @@ var require_backend = __commonJS({
|
|
|
278365
278496
|
}
|
|
278366
278497
|
return null;
|
|
278367
278498
|
}
|
|
278368
|
-
function getElementAttributeByPath(id,
|
|
278499
|
+
function getElementAttributeByPath(id, path16) {
|
|
278369
278500
|
if (isMostRecentlyInspectedElement(id)) {
|
|
278370
|
-
return utils_getInObject(mostRecentlyInspectedElement,
|
|
278501
|
+
return utils_getInObject(mostRecentlyInspectedElement, path16);
|
|
278371
278502
|
}
|
|
278372
278503
|
return void 0;
|
|
278373
278504
|
}
|
|
@@ -279074,9 +279205,9 @@ var require_backend = __commonJS({
|
|
|
279074
279205
|
function isMostRecentlyInspectedElementCurrent(id) {
|
|
279075
279206
|
return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
|
|
279076
279207
|
}
|
|
279077
|
-
function mergeInspectedPaths(
|
|
279208
|
+
function mergeInspectedPaths(path16) {
|
|
279078
279209
|
var current = currentlyInspectedPaths;
|
|
279079
|
-
|
|
279210
|
+
path16.forEach(function(key) {
|
|
279080
279211
|
if (!current[key]) {
|
|
279081
279212
|
current[key] = {};
|
|
279082
279213
|
}
|
|
@@ -279084,21 +279215,21 @@ var require_backend = __commonJS({
|
|
|
279084
279215
|
});
|
|
279085
279216
|
}
|
|
279086
279217
|
function createIsPathAllowed(key, secondaryCategory) {
|
|
279087
|
-
return function isPathAllowed(
|
|
279218
|
+
return function isPathAllowed(path16) {
|
|
279088
279219
|
switch (secondaryCategory) {
|
|
279089
279220
|
case "hooks":
|
|
279090
|
-
if (
|
|
279221
|
+
if (path16.length === 1) {
|
|
279091
279222
|
return true;
|
|
279092
279223
|
}
|
|
279093
|
-
if (
|
|
279224
|
+
if (path16[path16.length - 2] === "hookSource" && path16[path16.length - 1] === "fileName") {
|
|
279094
279225
|
return true;
|
|
279095
279226
|
}
|
|
279096
|
-
if (
|
|
279227
|
+
if (path16[path16.length - 1] === "subHooks" || path16[path16.length - 2] === "subHooks") {
|
|
279097
279228
|
return true;
|
|
279098
279229
|
}
|
|
279099
279230
|
break;
|
|
279100
279231
|
case "suspendedBy":
|
|
279101
|
-
if (
|
|
279232
|
+
if (path16.length < 5) {
|
|
279102
279233
|
return true;
|
|
279103
279234
|
}
|
|
279104
279235
|
break;
|
|
@@ -279109,8 +279240,8 @@ var require_backend = __commonJS({
|
|
|
279109
279240
|
if (!current) {
|
|
279110
279241
|
return false;
|
|
279111
279242
|
}
|
|
279112
|
-
for (var i = 0; i <
|
|
279113
|
-
current = current[
|
|
279243
|
+
for (var i = 0; i < path16.length; i++) {
|
|
279244
|
+
current = current[path16[i]];
|
|
279114
279245
|
if (!current) {
|
|
279115
279246
|
return false;
|
|
279116
279247
|
}
|
|
@@ -279164,38 +279295,38 @@ var require_backend = __commonJS({
|
|
|
279164
279295
|
break;
|
|
279165
279296
|
}
|
|
279166
279297
|
}
|
|
279167
|
-
function storeAsGlobal(id,
|
|
279298
|
+
function storeAsGlobal(id, path16, count) {
|
|
279168
279299
|
if (isMostRecentlyInspectedElement(id)) {
|
|
279169
|
-
var value = utils_getInObject(mostRecentlyInspectedElement,
|
|
279300
|
+
var value = utils_getInObject(mostRecentlyInspectedElement, path16);
|
|
279170
279301
|
var key = "$reactTemp".concat(count);
|
|
279171
279302
|
window[key] = value;
|
|
279172
279303
|
console.log(key);
|
|
279173
279304
|
console.log(value);
|
|
279174
279305
|
}
|
|
279175
279306
|
}
|
|
279176
|
-
function getSerializedElementValueByPath(id,
|
|
279307
|
+
function getSerializedElementValueByPath(id, path16) {
|
|
279177
279308
|
if (isMostRecentlyInspectedElement(id)) {
|
|
279178
|
-
var valueToCopy = utils_getInObject(mostRecentlyInspectedElement,
|
|
279309
|
+
var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path16);
|
|
279179
279310
|
return serializeToString(valueToCopy);
|
|
279180
279311
|
}
|
|
279181
279312
|
}
|
|
279182
|
-
function inspectElement(requestID, id,
|
|
279183
|
-
if (
|
|
279184
|
-
mergeInspectedPaths(
|
|
279313
|
+
function inspectElement(requestID, id, path16, forceFullData) {
|
|
279314
|
+
if (path16 !== null) {
|
|
279315
|
+
mergeInspectedPaths(path16);
|
|
279185
279316
|
}
|
|
279186
279317
|
if (isMostRecentlyInspectedElement(id) && !forceFullData) {
|
|
279187
279318
|
if (!hasElementUpdatedSinceLastInspected) {
|
|
279188
|
-
if (
|
|
279319
|
+
if (path16 !== null) {
|
|
279189
279320
|
var secondaryCategory = null;
|
|
279190
|
-
if (
|
|
279191
|
-
secondaryCategory =
|
|
279321
|
+
if (path16[0] === "hooks" || path16[0] === "suspendedBy") {
|
|
279322
|
+
secondaryCategory = path16[0];
|
|
279192
279323
|
}
|
|
279193
279324
|
return {
|
|
279194
279325
|
id,
|
|
279195
279326
|
responseID: requestID,
|
|
279196
279327
|
type: "hydrated-path",
|
|
279197
|
-
path:
|
|
279198
|
-
value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement,
|
|
279328
|
+
path: path16,
|
|
279329
|
+
value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path16), createIsPathAllowed(null, secondaryCategory), path16)
|
|
279199
279330
|
};
|
|
279200
279331
|
} else {
|
|
279201
279332
|
return {
|
|
@@ -279384,7 +279515,7 @@ var require_backend = __commonJS({
|
|
|
279384
279515
|
console.groupEnd();
|
|
279385
279516
|
}
|
|
279386
279517
|
}
|
|
279387
|
-
function deletePath(type, id, hookID,
|
|
279518
|
+
function deletePath(type, id, hookID, path16) {
|
|
279388
279519
|
var devtoolsInstance = idToDevToolsInstanceMap.get(id);
|
|
279389
279520
|
if (devtoolsInstance === void 0) {
|
|
279390
279521
|
console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
|
|
@@ -279398,12 +279529,12 @@ var require_backend = __commonJS({
|
|
|
279398
279529
|
var instance = fiber.stateNode;
|
|
279399
279530
|
switch (type) {
|
|
279400
279531
|
case "context":
|
|
279401
|
-
|
|
279532
|
+
path16 = path16.slice(1);
|
|
279402
279533
|
switch (fiber.tag) {
|
|
279403
279534
|
case ClassComponent:
|
|
279404
|
-
if (
|
|
279535
|
+
if (path16.length === 0) {
|
|
279405
279536
|
} else {
|
|
279406
|
-
deletePathInObject(instance.context,
|
|
279537
|
+
deletePathInObject(instance.context, path16);
|
|
279407
279538
|
}
|
|
279408
279539
|
instance.forceUpdate();
|
|
279409
279540
|
break;
|
|
@@ -279413,21 +279544,21 @@ var require_backend = __commonJS({
|
|
|
279413
279544
|
break;
|
|
279414
279545
|
case "hooks":
|
|
279415
279546
|
if (typeof overrideHookStateDeletePath === "function") {
|
|
279416
|
-
overrideHookStateDeletePath(fiber, hookID,
|
|
279547
|
+
overrideHookStateDeletePath(fiber, hookID, path16);
|
|
279417
279548
|
}
|
|
279418
279549
|
break;
|
|
279419
279550
|
case "props":
|
|
279420
279551
|
if (instance === null) {
|
|
279421
279552
|
if (typeof overridePropsDeletePath === "function") {
|
|
279422
|
-
overridePropsDeletePath(fiber,
|
|
279553
|
+
overridePropsDeletePath(fiber, path16);
|
|
279423
279554
|
}
|
|
279424
279555
|
} else {
|
|
279425
|
-
fiber.pendingProps = copyWithDelete(instance.props,
|
|
279556
|
+
fiber.pendingProps = copyWithDelete(instance.props, path16);
|
|
279426
279557
|
instance.forceUpdate();
|
|
279427
279558
|
}
|
|
279428
279559
|
break;
|
|
279429
279560
|
case "state":
|
|
279430
|
-
deletePathInObject(instance.state,
|
|
279561
|
+
deletePathInObject(instance.state, path16);
|
|
279431
279562
|
instance.forceUpdate();
|
|
279432
279563
|
break;
|
|
279433
279564
|
}
|
|
@@ -279483,7 +279614,7 @@ var require_backend = __commonJS({
|
|
|
279483
279614
|
}
|
|
279484
279615
|
}
|
|
279485
279616
|
}
|
|
279486
|
-
function overrideValueAtPath(type, id, hookID,
|
|
279617
|
+
function overrideValueAtPath(type, id, hookID, path16, value) {
|
|
279487
279618
|
var devtoolsInstance = idToDevToolsInstanceMap.get(id);
|
|
279488
279619
|
if (devtoolsInstance === void 0) {
|
|
279489
279620
|
console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
|
|
@@ -279497,13 +279628,13 @@ var require_backend = __commonJS({
|
|
|
279497
279628
|
var instance = fiber.stateNode;
|
|
279498
279629
|
switch (type) {
|
|
279499
279630
|
case "context":
|
|
279500
|
-
|
|
279631
|
+
path16 = path16.slice(1);
|
|
279501
279632
|
switch (fiber.tag) {
|
|
279502
279633
|
case ClassComponent:
|
|
279503
|
-
if (
|
|
279634
|
+
if (path16.length === 0) {
|
|
279504
279635
|
instance.context = value;
|
|
279505
279636
|
} else {
|
|
279506
|
-
utils_setInObject(instance.context,
|
|
279637
|
+
utils_setInObject(instance.context, path16, value);
|
|
279507
279638
|
}
|
|
279508
279639
|
instance.forceUpdate();
|
|
279509
279640
|
break;
|
|
@@ -279513,18 +279644,18 @@ var require_backend = __commonJS({
|
|
|
279513
279644
|
break;
|
|
279514
279645
|
case "hooks":
|
|
279515
279646
|
if (typeof overrideHookState === "function") {
|
|
279516
|
-
overrideHookState(fiber, hookID,
|
|
279647
|
+
overrideHookState(fiber, hookID, path16, value);
|
|
279517
279648
|
}
|
|
279518
279649
|
break;
|
|
279519
279650
|
case "props":
|
|
279520
279651
|
switch (fiber.tag) {
|
|
279521
279652
|
case ClassComponent:
|
|
279522
|
-
fiber.pendingProps = copyWithSet(instance.props,
|
|
279653
|
+
fiber.pendingProps = copyWithSet(instance.props, path16, value);
|
|
279523
279654
|
instance.forceUpdate();
|
|
279524
279655
|
break;
|
|
279525
279656
|
default:
|
|
279526
279657
|
if (typeof overrideProps === "function") {
|
|
279527
|
-
overrideProps(fiber,
|
|
279658
|
+
overrideProps(fiber, path16, value);
|
|
279528
279659
|
}
|
|
279529
279660
|
break;
|
|
279530
279661
|
}
|
|
@@ -279532,7 +279663,7 @@ var require_backend = __commonJS({
|
|
|
279532
279663
|
case "state":
|
|
279533
279664
|
switch (fiber.tag) {
|
|
279534
279665
|
case ClassComponent:
|
|
279535
|
-
utils_setInObject(instance.state,
|
|
279666
|
+
utils_setInObject(instance.state, path16, value);
|
|
279536
279667
|
instance.forceUpdate();
|
|
279537
279668
|
break;
|
|
279538
279669
|
}
|
|
@@ -279818,14 +279949,14 @@ var require_backend = __commonJS({
|
|
|
279818
279949
|
var trackedPathMatchInstance = null;
|
|
279819
279950
|
var trackedPathMatchDepth = -1;
|
|
279820
279951
|
var mightBeOnTrackedPath = false;
|
|
279821
|
-
function setTrackedPath(
|
|
279822
|
-
if (
|
|
279952
|
+
function setTrackedPath(path16) {
|
|
279953
|
+
if (path16 === null) {
|
|
279823
279954
|
trackedPathMatchFiber = null;
|
|
279824
279955
|
trackedPathMatchInstance = null;
|
|
279825
279956
|
trackedPathMatchDepth = -1;
|
|
279826
279957
|
mightBeOnTrackedPath = false;
|
|
279827
279958
|
}
|
|
279828
|
-
trackedPath =
|
|
279959
|
+
trackedPath = path16;
|
|
279829
279960
|
}
|
|
279830
279961
|
function updateTrackedPathStateBeforeMount(fiber, fiberInstance) {
|
|
279831
279962
|
if (trackedPath === null || !mightBeOnTrackedPath) {
|
|
@@ -280593,9 +280724,9 @@ var require_backend = __commonJS({
|
|
|
280593
280724
|
}
|
|
280594
280725
|
var currentlyInspectedElementID = null;
|
|
280595
280726
|
var currentlyInspectedPaths = {};
|
|
280596
|
-
function mergeInspectedPaths(
|
|
280727
|
+
function mergeInspectedPaths(path16) {
|
|
280597
280728
|
var current = currentlyInspectedPaths;
|
|
280598
|
-
|
|
280729
|
+
path16.forEach(function(key) {
|
|
280599
280730
|
if (!current[key]) {
|
|
280600
280731
|
current[key] = {};
|
|
280601
280732
|
}
|
|
@@ -280603,13 +280734,13 @@ var require_backend = __commonJS({
|
|
|
280603
280734
|
});
|
|
280604
280735
|
}
|
|
280605
280736
|
function createIsPathAllowed(key) {
|
|
280606
|
-
return function isPathAllowed(
|
|
280737
|
+
return function isPathAllowed(path16) {
|
|
280607
280738
|
var current = currentlyInspectedPaths[key];
|
|
280608
280739
|
if (!current) {
|
|
280609
280740
|
return false;
|
|
280610
280741
|
}
|
|
280611
|
-
for (var i = 0; i <
|
|
280612
|
-
current = current[
|
|
280742
|
+
for (var i = 0; i < path16.length; i++) {
|
|
280743
|
+
current = current[path16[i]];
|
|
280613
280744
|
if (!current) {
|
|
280614
280745
|
return false;
|
|
280615
280746
|
}
|
|
@@ -280659,24 +280790,24 @@ var require_backend = __commonJS({
|
|
|
280659
280790
|
break;
|
|
280660
280791
|
}
|
|
280661
280792
|
}
|
|
280662
|
-
function storeAsGlobal(id,
|
|
280793
|
+
function storeAsGlobal(id, path16, count) {
|
|
280663
280794
|
var inspectedElement = inspectElementRaw(id);
|
|
280664
280795
|
if (inspectedElement !== null) {
|
|
280665
|
-
var value = utils_getInObject(inspectedElement,
|
|
280796
|
+
var value = utils_getInObject(inspectedElement, path16);
|
|
280666
280797
|
var key = "$reactTemp".concat(count);
|
|
280667
280798
|
window[key] = value;
|
|
280668
280799
|
console.log(key);
|
|
280669
280800
|
console.log(value);
|
|
280670
280801
|
}
|
|
280671
280802
|
}
|
|
280672
|
-
function getSerializedElementValueByPath(id,
|
|
280803
|
+
function getSerializedElementValueByPath(id, path16) {
|
|
280673
280804
|
var inspectedElement = inspectElementRaw(id);
|
|
280674
280805
|
if (inspectedElement !== null) {
|
|
280675
|
-
var valueToCopy = utils_getInObject(inspectedElement,
|
|
280806
|
+
var valueToCopy = utils_getInObject(inspectedElement, path16);
|
|
280676
280807
|
return serializeToString(valueToCopy);
|
|
280677
280808
|
}
|
|
280678
280809
|
}
|
|
280679
|
-
function inspectElement(requestID, id,
|
|
280810
|
+
function inspectElement(requestID, id, path16, forceFullData) {
|
|
280680
280811
|
if (forceFullData || currentlyInspectedElementID !== id) {
|
|
280681
280812
|
currentlyInspectedElementID = id;
|
|
280682
280813
|
currentlyInspectedPaths = {};
|
|
@@ -280689,8 +280820,8 @@ var require_backend = __commonJS({
|
|
|
280689
280820
|
type: "not-found"
|
|
280690
280821
|
};
|
|
280691
280822
|
}
|
|
280692
|
-
if (
|
|
280693
|
-
mergeInspectedPaths(
|
|
280823
|
+
if (path16 !== null) {
|
|
280824
|
+
mergeInspectedPaths(path16);
|
|
280694
280825
|
}
|
|
280695
280826
|
updateSelectedElement(id);
|
|
280696
280827
|
inspectedElement.context = cleanForBridge(inspectedElement.context, createIsPathAllowed("context"));
|
|
@@ -280893,10 +281024,10 @@ var require_backend = __commonJS({
|
|
|
280893
281024
|
console.groupEnd();
|
|
280894
281025
|
}
|
|
280895
281026
|
}
|
|
280896
|
-
function getElementAttributeByPath(id,
|
|
281027
|
+
function getElementAttributeByPath(id, path16) {
|
|
280897
281028
|
var inspectedElement = inspectElementRaw(id);
|
|
280898
281029
|
if (inspectedElement !== null) {
|
|
280899
|
-
return utils_getInObject(inspectedElement,
|
|
281030
|
+
return utils_getInObject(inspectedElement, path16);
|
|
280900
281031
|
}
|
|
280901
281032
|
return void 0;
|
|
280902
281033
|
}
|
|
@@ -280913,14 +281044,14 @@ var require_backend = __commonJS({
|
|
|
280913
281044
|
}
|
|
280914
281045
|
return element.type;
|
|
280915
281046
|
}
|
|
280916
|
-
function deletePath(type, id, hookID,
|
|
281047
|
+
function deletePath(type, id, hookID, path16) {
|
|
280917
281048
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
280918
281049
|
if (internalInstance != null) {
|
|
280919
281050
|
var publicInstance = internalInstance._instance;
|
|
280920
281051
|
if (publicInstance != null) {
|
|
280921
281052
|
switch (type) {
|
|
280922
281053
|
case "context":
|
|
280923
|
-
deletePathInObject(publicInstance.context,
|
|
281054
|
+
deletePathInObject(publicInstance.context, path16);
|
|
280924
281055
|
forceUpdate(publicInstance);
|
|
280925
281056
|
break;
|
|
280926
281057
|
case "hooks":
|
|
@@ -280928,12 +281059,12 @@ var require_backend = __commonJS({
|
|
|
280928
281059
|
case "props":
|
|
280929
281060
|
var element = internalInstance._currentElement;
|
|
280930
281061
|
internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
|
|
280931
|
-
props: copyWithDelete(element.props,
|
|
281062
|
+
props: copyWithDelete(element.props, path16)
|
|
280932
281063
|
});
|
|
280933
281064
|
forceUpdate(publicInstance);
|
|
280934
281065
|
break;
|
|
280935
281066
|
case "state":
|
|
280936
|
-
deletePathInObject(publicInstance.state,
|
|
281067
|
+
deletePathInObject(publicInstance.state, path16);
|
|
280937
281068
|
forceUpdate(publicInstance);
|
|
280938
281069
|
break;
|
|
280939
281070
|
}
|
|
@@ -280967,14 +281098,14 @@ var require_backend = __commonJS({
|
|
|
280967
281098
|
}
|
|
280968
281099
|
}
|
|
280969
281100
|
}
|
|
280970
|
-
function overrideValueAtPath(type, id, hookID,
|
|
281101
|
+
function overrideValueAtPath(type, id, hookID, path16, value) {
|
|
280971
281102
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
280972
281103
|
if (internalInstance != null) {
|
|
280973
281104
|
var publicInstance = internalInstance._instance;
|
|
280974
281105
|
if (publicInstance != null) {
|
|
280975
281106
|
switch (type) {
|
|
280976
281107
|
case "context":
|
|
280977
|
-
utils_setInObject(publicInstance.context,
|
|
281108
|
+
utils_setInObject(publicInstance.context, path16, value);
|
|
280978
281109
|
forceUpdate(publicInstance);
|
|
280979
281110
|
break;
|
|
280980
281111
|
case "hooks":
|
|
@@ -280982,12 +281113,12 @@ var require_backend = __commonJS({
|
|
|
280982
281113
|
case "props":
|
|
280983
281114
|
var element = internalInstance._currentElement;
|
|
280984
281115
|
internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
|
|
280985
|
-
props: copyWithSet(element.props,
|
|
281116
|
+
props: copyWithSet(element.props, path16, value)
|
|
280986
281117
|
});
|
|
280987
281118
|
forceUpdate(publicInstance);
|
|
280988
281119
|
break;
|
|
280989
281120
|
case "state":
|
|
280990
|
-
utils_setInObject(publicInstance.state,
|
|
281121
|
+
utils_setInObject(publicInstance.state, path16, value);
|
|
280991
281122
|
forceUpdate(publicInstance);
|
|
280992
281123
|
break;
|
|
280993
281124
|
}
|
|
@@ -281032,7 +281163,7 @@ var require_backend = __commonJS({
|
|
|
281032
281163
|
}
|
|
281033
281164
|
function setTraceUpdatesEnabled(enabled) {
|
|
281034
281165
|
}
|
|
281035
|
-
function setTrackedPath(
|
|
281166
|
+
function setTrackedPath(path16) {
|
|
281036
281167
|
}
|
|
281037
281168
|
function getOwnersList(id) {
|
|
281038
281169
|
return null;
|
|
@@ -282287,8 +282418,8 @@ var init_devtools = __esm({
|
|
|
282287
282418
|
|
|
282288
282419
|
// node_modules/ink/build/reconciler.js
|
|
282289
282420
|
async function loadPackageJson() {
|
|
282290
|
-
const
|
|
282291
|
-
const content =
|
|
282421
|
+
const fs16 = await import("node:fs");
|
|
282422
|
+
const content = fs16.readFileSync(new URL("../package.json", import.meta.url), "utf8");
|
|
282292
282423
|
return JSON.parse(content);
|
|
282293
282424
|
}
|
|
282294
282425
|
var import_react_reconciler, import_constants8, Scheduler, import_react, diff, cleanupYogaNode, currentUpdatePriority, currentRootNode, packageJson, reconciler_default;
|
|
@@ -282898,7 +283029,7 @@ var init_ansi_styles2 = __esm({
|
|
|
282898
283029
|
|
|
282899
283030
|
// node_modules/ink/node_modules/chalk/source/vendor/supports-color/index.js
|
|
282900
283031
|
import process5 from "node:process";
|
|
282901
|
-
import
|
|
283032
|
+
import os5 from "node:os";
|
|
282902
283033
|
import tty2 from "node:tty";
|
|
282903
283034
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
|
|
282904
283035
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
@@ -282956,7 +283087,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
282956
283087
|
return min2;
|
|
282957
283088
|
}
|
|
282958
283089
|
if (process5.platform === "win32") {
|
|
282959
|
-
const osRelease =
|
|
283090
|
+
const osRelease = os5.release().split(".");
|
|
282960
283091
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
282961
283092
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
282962
283093
|
}
|
|
@@ -285319,7 +285450,7 @@ var init_Text = __esm({
|
|
|
285319
285450
|
});
|
|
285320
285451
|
|
|
285321
285452
|
// node_modules/ink/build/components/ErrorOverview.js
|
|
285322
|
-
import * as
|
|
285453
|
+
import * as fs14 from "node:fs";
|
|
285323
285454
|
import { cwd } from "node:process";
|
|
285324
285455
|
function ErrorOverview({ error }) {
|
|
285325
285456
|
const stack = error.stack ? error.stack.split("\n").slice(1) : void 0;
|
|
@@ -285327,8 +285458,8 @@ function ErrorOverview({ error }) {
|
|
|
285327
285458
|
const filePath = cleanupPath(origin?.file);
|
|
285328
285459
|
let excerpt;
|
|
285329
285460
|
let lineWidth = 0;
|
|
285330
|
-
if (filePath && origin?.line &&
|
|
285331
|
-
const sourceCode =
|
|
285461
|
+
if (filePath && origin?.line && fs14.existsSync(filePath)) {
|
|
285462
|
+
const sourceCode = fs14.readFileSync(filePath, "utf8");
|
|
285332
285463
|
excerpt = dist_default3(sourceCode, origin.line);
|
|
285333
285464
|
if (excerpt) {
|
|
285334
285465
|
for (const { line } of excerpt) {
|
|
@@ -285429,8 +285560,8 @@ var init_ErrorOverview = __esm({
|
|
|
285429
285560
|
init_dist7();
|
|
285430
285561
|
init_Box();
|
|
285431
285562
|
init_Text();
|
|
285432
|
-
cleanupPath = (
|
|
285433
|
-
return
|
|
285563
|
+
cleanupPath = (path16) => {
|
|
285564
|
+
return path16?.replace(`file://${cwd()}/`, "");
|
|
285434
285565
|
};
|
|
285435
285566
|
stackUtils = new import_stack_utils.default({
|
|
285436
285567
|
cwd: cwd(),
|
|
@@ -287349,10 +287480,10 @@ __export(perch_cli_exports, {
|
|
|
287349
287480
|
runPerchCli: () => runPerchCli,
|
|
287350
287481
|
workerEventToCliRow: () => workerEventToCliRow
|
|
287351
287482
|
});
|
|
287352
|
-
import
|
|
287483
|
+
import fs15 from "node:fs";
|
|
287353
287484
|
import { createHash as createHash4 } from "node:crypto";
|
|
287354
|
-
import
|
|
287355
|
-
import
|
|
287485
|
+
import os6 from "node:os";
|
|
287486
|
+
import path15 from "node:path";
|
|
287356
287487
|
import readline from "node:readline/promises";
|
|
287357
287488
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
287358
287489
|
import { execFile as execFile3 } from "node:child_process";
|
|
@@ -287878,6 +288009,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
|
|
|
287878
288009
|
await syncInteractiveCliThreadScope(state, connection);
|
|
287879
288010
|
};
|
|
287880
288011
|
const runTurn = deps.runCliTurn ?? runPerchCliTurn;
|
|
288012
|
+
const updateNotice = resolveUpdateNotice(CLI_PACKAGE_VERSION);
|
|
287881
288013
|
const instance = Ink2.render(
|
|
287882
288014
|
React11.createElement(function PerchInkApp() {
|
|
287883
288015
|
const app = Ink2.useApp();
|
|
@@ -288721,6 +288853,11 @@ async function runInkInteractivePerchCli(writer, deps, options) {
|
|
|
288721
288853
|
React11.createElement(Ink2.Text, { color: "#7a6f66" }, "perch \xB7 field terminal"),
|
|
288722
288854
|
React11.createElement(Ink2.Text, { color: "#7a6f66" }, `v${CLI_PACKAGE_VERSION}`)
|
|
288723
288855
|
),
|
|
288856
|
+
updateNotice ? React11.createElement(
|
|
288857
|
+
Ink2.Box,
|
|
288858
|
+
{ width: PERCH_SPLASH_WIDTH, marginBottom: 1 },
|
|
288859
|
+
React11.createElement(Ink2.Text, { color: CLI_BRAND.bronzeGlint }, updateNotice)
|
|
288860
|
+
) : null,
|
|
288724
288861
|
...PERCH_SPLASH_SCENE.map(
|
|
288725
288862
|
(line, index) => React11.createElement(
|
|
288726
288863
|
Ink2.Box,
|
|
@@ -289225,12 +289362,12 @@ async function persistCliThreadState(input) {
|
|
|
289225
289362
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
289226
289363
|
};
|
|
289227
289364
|
const filePath = cliThreadStatePath(input.threadId, input.threadScopeKey);
|
|
289228
|
-
await
|
|
289229
|
-
await
|
|
289365
|
+
await fs15.promises.mkdir(path15.dirname(filePath), { recursive: true, mode: 448 });
|
|
289366
|
+
await fs15.promises.writeFile(filePath, JSON.stringify(payload, null, 2), { mode: 384 });
|
|
289230
289367
|
}
|
|
289231
289368
|
async function readCliThreadState(threadId, threadScopeKey) {
|
|
289232
289369
|
try {
|
|
289233
|
-
const raw = await
|
|
289370
|
+
const raw = await fs15.promises.readFile(cliThreadStatePath(threadId, threadScopeKey), "utf8");
|
|
289234
289371
|
const parsed = JSON.parse(raw);
|
|
289235
289372
|
if (parsed.version !== 1 || parsed.threadId !== threadId) return null;
|
|
289236
289373
|
return {
|
|
@@ -289246,11 +289383,11 @@ async function readCliThreadState(threadId, threadScopeKey) {
|
|
|
289246
289383
|
}
|
|
289247
289384
|
}
|
|
289248
289385
|
async function deleteCliThreadState(threadId, threadScopeKey) {
|
|
289249
|
-
await
|
|
289386
|
+
await fs15.promises.rm(cliThreadStatePath(threadId, threadScopeKey), { force: true }).catch(() => void 0);
|
|
289250
289387
|
}
|
|
289251
289388
|
function cliThreadStatePath(threadId, threadScopeKey) {
|
|
289252
|
-
const base = process.env.PERCH_CLI_STATE_DIR?.trim() ||
|
|
289253
|
-
return
|
|
289389
|
+
const base = process.env.PERCH_CLI_STATE_DIR?.trim() || path15.join(os6.homedir(), ".perch", "threads");
|
|
289390
|
+
return path15.join(base, safeCliThreadScopeKey(threadScopeKey), `${safeCliThreadId(threadId)}.json`);
|
|
289254
289391
|
}
|
|
289255
289392
|
async function resolveCliThreadScopeKey(connection) {
|
|
289256
289393
|
const session = await readStoredCliAuthSession().catch(() => null);
|
|
@@ -290129,20 +290266,20 @@ function writeAPScenarioResult(result2, json, writer) {
|
|
|
290129
290266
|
}
|
|
290130
290267
|
function resolveFolderPath(input) {
|
|
290131
290268
|
const resolved = resolvePath(input);
|
|
290132
|
-
const stat2 =
|
|
290269
|
+
const stat2 = fs15.existsSync(resolved) ? fs15.statSync(resolved) : null;
|
|
290133
290270
|
if (!stat2?.isDirectory()) throw new Error(`Folder does not exist: ${resolved}`);
|
|
290134
290271
|
return resolved;
|
|
290135
290272
|
}
|
|
290136
290273
|
function resolveExistingDirectory(input) {
|
|
290137
290274
|
const resolved = resolvePath(input);
|
|
290138
|
-
const stat2 =
|
|
290275
|
+
const stat2 = fs15.existsSync(resolved) ? fs15.statSync(resolved) : null;
|
|
290139
290276
|
if (!stat2?.isDirectory()) throw new Error(`Directory does not exist: ${resolved}`);
|
|
290140
290277
|
return resolved;
|
|
290141
290278
|
}
|
|
290142
290279
|
function resolvePath(input) {
|
|
290143
290280
|
if (input === "~") return process.env.HOME ?? input;
|
|
290144
|
-
if (input.startsWith("~/")) return
|
|
290145
|
-
return
|
|
290281
|
+
if (input.startsWith("~/")) return path15.join(process.env.HOME ?? "", input.slice(2));
|
|
290282
|
+
return path15.resolve(input);
|
|
290146
290283
|
}
|
|
290147
290284
|
function requireCliAppUrl(input) {
|
|
290148
290285
|
const resolved = resolveCliAppUrl(input, null);
|
|
@@ -290176,16 +290313,16 @@ function parseExpectation(input) {
|
|
|
290176
290313
|
return { key, value: rawValue };
|
|
290177
290314
|
}
|
|
290178
290315
|
function readCliPackageVersion() {
|
|
290179
|
-
const scriptDir =
|
|
290316
|
+
const scriptDir = path15.dirname(fileURLToPath(import.meta.url));
|
|
290180
290317
|
const candidates = [
|
|
290181
|
-
|
|
290182
|
-
|
|
290183
|
-
|
|
290184
|
-
|
|
290318
|
+
path15.resolve(scriptDir, "../packages/cli/package.json"),
|
|
290319
|
+
path15.resolve(scriptDir, "../package.json"),
|
|
290320
|
+
path15.resolve(process.cwd(), "packages/cli/package.json"),
|
|
290321
|
+
path15.resolve(process.cwd(), "package.json")
|
|
290185
290322
|
];
|
|
290186
290323
|
for (const candidate of candidates) {
|
|
290187
290324
|
try {
|
|
290188
|
-
const raw =
|
|
290325
|
+
const raw = fs15.readFileSync(candidate, "utf8");
|
|
290189
290326
|
const parsed = JSON.parse(raw);
|
|
290190
290327
|
if (typeof parsed.version === "string" && parsed.version.trim()) {
|
|
290191
290328
|
return parsed.version.trim();
|
|
@@ -290198,7 +290335,7 @@ function readCliPackageVersion() {
|
|
|
290198
290335
|
function shortCwd(cwd2) {
|
|
290199
290336
|
const home = process.env.HOME;
|
|
290200
290337
|
if (home && cwd2 === home) return "~";
|
|
290201
|
-
if (home && cwd2.startsWith(`${home}${
|
|
290338
|
+
if (home && cwd2.startsWith(`${home}${path15.sep}`)) {
|
|
290202
290339
|
return `~/${cwd2.slice(home.length + 1)}`;
|
|
290203
290340
|
}
|
|
290204
290341
|
return cwd2;
|
|
@@ -290232,6 +290369,7 @@ var init_perch_cli = __esm({
|
|
|
290232
290369
|
init_sharedSlashCommands();
|
|
290233
290370
|
init_toolDefinitions();
|
|
290234
290371
|
init_nodeLocalBridge();
|
|
290372
|
+
init_cliUpdateCheck();
|
|
290235
290373
|
init_agentSkillRegistry();
|
|
290236
290374
|
execFileAsync3 = promisify3(execFile3);
|
|
290237
290375
|
DEFAULT_CLI_LOGIN_APP_URL = "https://app.perchai.app";
|