@neobiotechlabs/neobiotech-dev-agent 0.1.30 → 0.1.31
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +1217 -876
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1146,12 +1146,12 @@ var require_util = __commonJS({
|
|
|
1146
1146
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1147
1147
|
}
|
|
1148
1148
|
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
1149
|
-
function eachItem(xs,
|
|
1149
|
+
function eachItem(xs, f4) {
|
|
1150
1150
|
if (Array.isArray(xs)) {
|
|
1151
1151
|
for (const x3 of xs)
|
|
1152
|
-
|
|
1152
|
+
f4(x3);
|
|
1153
1153
|
} else {
|
|
1154
|
-
|
|
1154
|
+
f4(xs);
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
exports.eachItem = eachItem;
|
|
@@ -1198,10 +1198,10 @@ var require_util = __commonJS({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
exports.setEvaluated = setEvaluated;
|
|
1200
1200
|
var snippets = {};
|
|
1201
|
-
function useFunc(gen,
|
|
1201
|
+
function useFunc(gen, f4) {
|
|
1202
1202
|
return gen.scopeValue("func", {
|
|
1203
|
-
ref:
|
|
1204
|
-
code: snippets[
|
|
1203
|
+
ref: f4,
|
|
1204
|
+
code: snippets[f4.code] || (snippets[f4.code] = new code_1._Code(f4.code))
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
1207
|
exports.useFunc = useFunc;
|
|
@@ -1339,7 +1339,7 @@ var require_errors = __commonJS({
|
|
|
1339
1339
|
gen.return(false);
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
var
|
|
1342
|
+
var E = {
|
|
1343
1343
|
keyword: new codegen_1.Name("keyword"),
|
|
1344
1344
|
schemaPath: new codegen_1.Name("schemaPath"),
|
|
1345
1345
|
// also used in JTD errors
|
|
@@ -1373,20 +1373,20 @@ var require_errors = __commonJS({
|
|
|
1373
1373
|
if (schemaPath) {
|
|
1374
1374
|
schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
|
|
1375
1375
|
}
|
|
1376
|
-
return [
|
|
1376
|
+
return [E.schemaPath, schPath];
|
|
1377
1377
|
}
|
|
1378
1378
|
function extraErrorProps(cxt, { params, message }, keyValues) {
|
|
1379
1379
|
const { keyword, data, schemaValue, it: it2 } = cxt;
|
|
1380
1380
|
const { opts, propertyName, topSchemaRef, schemaPath } = it2;
|
|
1381
|
-
keyValues.push([
|
|
1381
|
+
keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
|
|
1382
1382
|
if (opts.messages) {
|
|
1383
|
-
keyValues.push([
|
|
1383
|
+
keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
|
|
1384
1384
|
}
|
|
1385
1385
|
if (opts.verbose) {
|
|
1386
|
-
keyValues.push([
|
|
1386
|
+
keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
|
|
1387
1387
|
}
|
|
1388
1388
|
if (propertyName)
|
|
1389
|
-
keyValues.push([
|
|
1389
|
+
keyValues.push([E.propertyName, propertyName]);
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
});
|
|
@@ -3120,9 +3120,28 @@ var require_utils = __commonJS({
|
|
|
3120
3120
|
"use strict";
|
|
3121
3121
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3122
3122
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3123
|
+
var isPort = RegExp.prototype.test.bind(/^\d*$/u);
|
|
3123
3124
|
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3124
3125
|
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3125
|
-
var isPathCharacter = RegExp.prototype.test.bind(/^[
|
|
3126
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
|
|
3127
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
|
|
3128
|
+
var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
|
|
3129
|
+
var BYTE_HEX = new Array(256);
|
|
3130
|
+
{
|
|
3131
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
3132
|
+
for (let i2 = 0; i2 < 256; i2++) {
|
|
3133
|
+
BYTE_HEX[i2] = "%" + HEX_DIGITS[i2 >> 4] + HEX_DIGITS[i2 & 15];
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
function percentEncodeNonAscii(cp) {
|
|
3137
|
+
if (cp < 2048) {
|
|
3138
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
3139
|
+
}
|
|
3140
|
+
if (cp < 65536) {
|
|
3141
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
3142
|
+
}
|
|
3143
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
3144
|
+
}
|
|
3126
3145
|
function stringArrayToHexStripped(input) {
|
|
3127
3146
|
let acc = "";
|
|
3128
3147
|
let code = 0;
|
|
@@ -3147,91 +3166,105 @@ var require_utils = __commonJS({
|
|
|
3147
3166
|
}
|
|
3148
3167
|
return acc;
|
|
3149
3168
|
}
|
|
3169
|
+
var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
|
|
3170
|
+
var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
|
|
3171
|
+
var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
|
|
3150
3172
|
var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
|
|
3151
|
-
function
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
if (hex !== "") {
|
|
3159
|
-
address.push(hex);
|
|
3160
|
-
} else {
|
|
3161
|
-
output.error = true;
|
|
3162
|
-
return false;
|
|
3173
|
+
function isZoneIdentifier(zone) {
|
|
3174
|
+
if (zone.length === 0) return false;
|
|
3175
|
+
for (let i2 = 0; i2 < zone.length; i2++) {
|
|
3176
|
+
if (isZoneCharacter(zone[i2])) continue;
|
|
3177
|
+
if (zone[i2] === "%" && i2 + 2 < zone.length && isHexPair(zone.slice(i2 + 1, i2 + 3))) {
|
|
3178
|
+
i2 += 2;
|
|
3179
|
+
continue;
|
|
3163
3180
|
}
|
|
3164
|
-
|
|
3181
|
+
return false;
|
|
3165
3182
|
}
|
|
3166
3183
|
return true;
|
|
3167
3184
|
}
|
|
3168
|
-
function
|
|
3169
|
-
let
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
let
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
}
|
|
3181
|
-
if (cursor === ":") {
|
|
3182
|
-
if (endipv6Encountered === true) {
|
|
3183
|
-
endIpv6 = true;
|
|
3184
|
-
}
|
|
3185
|
-
if (!consume(buffer, address, output)) {
|
|
3186
|
-
break;
|
|
3187
|
-
}
|
|
3188
|
-
if (++tokenCount > 7) {
|
|
3189
|
-
output.error = true;
|
|
3190
|
-
break;
|
|
3191
|
-
}
|
|
3192
|
-
if (i2 > 0 && input[i2 - 1] === ":") {
|
|
3193
|
-
endipv6Encountered = true;
|
|
3194
|
-
}
|
|
3195
|
-
address.push(":");
|
|
3196
|
-
continue;
|
|
3197
|
-
} else if (cursor === "%") {
|
|
3198
|
-
if (!consume(buffer, address, output)) {
|
|
3199
|
-
break;
|
|
3185
|
+
function compressIPv6ZeroRun(hextets) {
|
|
3186
|
+
let bestStart = -1;
|
|
3187
|
+
let bestLength = 0;
|
|
3188
|
+
let runStart = -1;
|
|
3189
|
+
let runLength = 0;
|
|
3190
|
+
for (let i2 = 0; i2 < hextets.length; i2++) {
|
|
3191
|
+
if (hextets[i2] === "0") {
|
|
3192
|
+
if (runStart === -1) runStart = i2;
|
|
3193
|
+
runLength++;
|
|
3194
|
+
if (runLength > bestLength) {
|
|
3195
|
+
bestLength = runLength;
|
|
3196
|
+
bestStart = runStart;
|
|
3200
3197
|
}
|
|
3201
|
-
consume = consumeIsZone;
|
|
3202
3198
|
} else {
|
|
3203
|
-
|
|
3199
|
+
runStart = -1;
|
|
3200
|
+
runLength = 0;
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
if (bestLength < 2) return hextets.join(":");
|
|
3204
|
+
const head = hextets.slice(0, bestStart).join(":");
|
|
3205
|
+
const tail = hextets.slice(bestStart + bestLength).join(":");
|
|
3206
|
+
return head + "::" + tail;
|
|
3207
|
+
}
|
|
3208
|
+
function normalizeIPv6Address(input) {
|
|
3209
|
+
const compression = input.indexOf("::");
|
|
3210
|
+
if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
|
|
3211
|
+
const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
|
|
3212
|
+
const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
|
|
3213
|
+
if (compression !== -1) {
|
|
3214
|
+
if (left.length === 1 && left[0] === "") left.length = 0;
|
|
3215
|
+
if (right.length === 1 && right[0] === "") right.length = 0;
|
|
3216
|
+
}
|
|
3217
|
+
const parts = left.concat(right);
|
|
3218
|
+
let hextetCount = 0;
|
|
3219
|
+
for (let i2 = 0; i2 < parts.length; i2++) {
|
|
3220
|
+
const part = parts[i2];
|
|
3221
|
+
if (part === "") return void 0;
|
|
3222
|
+
if (part.indexOf(".") !== -1) {
|
|
3223
|
+
if (i2 !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
|
|
3224
|
+
hextetCount += 2;
|
|
3204
3225
|
continue;
|
|
3205
3226
|
}
|
|
3227
|
+
if (!isHextet(part)) return void 0;
|
|
3228
|
+
parts[i2] = parseInt(part, 16).toString(16);
|
|
3229
|
+
hextetCount++;
|
|
3206
3230
|
}
|
|
3207
|
-
if (
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3210
|
-
} else if (endIpv6) {
|
|
3211
|
-
address.push(buffer.join(""));
|
|
3212
|
-
} else {
|
|
3213
|
-
address.push(stringArrayToHexStripped(buffer));
|
|
3214
|
-
}
|
|
3231
|
+
if (compression === -1) {
|
|
3232
|
+
if (hextetCount !== 8) return void 0;
|
|
3233
|
+
return compressIPv6ZeroRun(parts);
|
|
3215
3234
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3235
|
+
if (hextetCount >= 8) return void 0;
|
|
3236
|
+
const expanded = parts.slice(0, left.length);
|
|
3237
|
+
for (let i2 = hextetCount; i2 < 8; i2++) expanded.push("0");
|
|
3238
|
+
for (let i2 = left.length; i2 < parts.length; i2++) expanded.push(parts[i2]);
|
|
3239
|
+
return compressIPv6ZeroRun(expanded);
|
|
3218
3240
|
}
|
|
3219
3241
|
function normalizeIPv6(host) {
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3224
|
-
if (
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3242
|
+
const bracketed = host[0] === "[" && host[host.length - 1] === "]";
|
|
3243
|
+
const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
|
|
3244
|
+
if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
|
|
3245
|
+
let input = bracketed ? host.slice(1, -1) : host;
|
|
3246
|
+
if (bracketed && isIPvFuture(input)) {
|
|
3247
|
+
input = input.toLowerCase();
|
|
3248
|
+
return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
|
|
3249
|
+
}
|
|
3250
|
+
if (findToken(input, ":") < 2) {
|
|
3251
|
+
return { host, isIPV6: false, error: bracketed };
|
|
3252
|
+
}
|
|
3253
|
+
let zoneIdentifier = "";
|
|
3254
|
+
const zoneSeparator = input.indexOf("%");
|
|
3255
|
+
if (zoneSeparator !== -1) {
|
|
3256
|
+
const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
|
|
3257
|
+
zoneIdentifier = input.slice(zoneSeparator + separatorLength);
|
|
3258
|
+
if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
|
|
3259
|
+
input = input.slice(0, zoneSeparator);
|
|
3260
|
+
}
|
|
3261
|
+
const address = normalizeIPv6Address(input);
|
|
3262
|
+
if (address === void 0) return { host, isIPV6: false, error: true };
|
|
3263
|
+
return {
|
|
3264
|
+
host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
|
|
3265
|
+
escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
|
|
3266
|
+
isIPV6: true
|
|
3267
|
+
};
|
|
3235
3268
|
}
|
|
3236
3269
|
function findToken(str, token) {
|
|
3237
3270
|
let ind = 0;
|
|
@@ -3350,7 +3383,8 @@ var require_utils = __commonJS({
|
|
|
3350
3383
|
function normalizePathEncoding(input) {
|
|
3351
3384
|
let output = "";
|
|
3352
3385
|
for (let i2 = 0; i2 < input.length; i2++) {
|
|
3353
|
-
|
|
3386
|
+
const ch = input[i2];
|
|
3387
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
3354
3388
|
const hex = input.slice(i2 + 1, i2 + 3);
|
|
3355
3389
|
if (isHexPair(hex)) {
|
|
3356
3390
|
const normalizedHex = hex.toUpperCase();
|
|
@@ -3364,10 +3398,152 @@ var require_utils = __commonJS({
|
|
|
3364
3398
|
continue;
|
|
3365
3399
|
}
|
|
3366
3400
|
}
|
|
3367
|
-
if (isPathCharacter(
|
|
3368
|
-
output +=
|
|
3401
|
+
if (isPathCharacter(ch)) {
|
|
3402
|
+
output += ch;
|
|
3403
|
+
} else {
|
|
3404
|
+
const code = input.charCodeAt(i2);
|
|
3405
|
+
if (code < 128) {
|
|
3406
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
3407
|
+
} else if (code < 55296 || code > 57343) {
|
|
3408
|
+
output += percentEncodeNonAscii(code);
|
|
3409
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
3410
|
+
const low = input.charCodeAt(i2 + 1);
|
|
3411
|
+
if (low >= 56320 && low <= 57343) {
|
|
3412
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3413
|
+
i2++;
|
|
3414
|
+
} else {
|
|
3415
|
+
output += percentEncodeNonAscii(65533);
|
|
3416
|
+
}
|
|
3417
|
+
} else {
|
|
3418
|
+
output += percentEncodeNonAscii(65533);
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
return output;
|
|
3423
|
+
}
|
|
3424
|
+
function serializePathEncoding(input, pathNoScheme = false) {
|
|
3425
|
+
let output = "";
|
|
3426
|
+
let firstSegment = pathNoScheme && input[0] !== "/";
|
|
3427
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
3428
|
+
const ch = input[i2];
|
|
3429
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
3430
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
3431
|
+
if (isHexPair(hex)) {
|
|
3432
|
+
output += "%" + hex.toUpperCase();
|
|
3433
|
+
i2 += 2;
|
|
3434
|
+
continue;
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
if (ch === "/") {
|
|
3438
|
+
firstSegment = false;
|
|
3439
|
+
}
|
|
3440
|
+
if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
|
|
3441
|
+
output += ch;
|
|
3442
|
+
} else {
|
|
3443
|
+
const code = input.charCodeAt(i2);
|
|
3444
|
+
if (code < 128) {
|
|
3445
|
+
output += BYTE_HEX[code];
|
|
3446
|
+
} else if (code < 55296 || code > 57343) {
|
|
3447
|
+
output += percentEncodeNonAscii(code);
|
|
3448
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
3449
|
+
const low = input.charCodeAt(i2 + 1);
|
|
3450
|
+
if (low >= 56320 && low <= 57343) {
|
|
3451
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3452
|
+
i2++;
|
|
3453
|
+
} else {
|
|
3454
|
+
output += percentEncodeNonAscii(65533);
|
|
3455
|
+
}
|
|
3456
|
+
} else {
|
|
3457
|
+
output += percentEncodeNonAscii(65533);
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
return output;
|
|
3462
|
+
}
|
|
3463
|
+
function encodeComponent(input, isAllowed) {
|
|
3464
|
+
let output = "";
|
|
3465
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
3466
|
+
const ch = input[i2];
|
|
3467
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
3468
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
3469
|
+
if (isHexPair(hex)) {
|
|
3470
|
+
output += "%" + hex.toUpperCase();
|
|
3471
|
+
i2 += 2;
|
|
3472
|
+
continue;
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
if (isAllowed(ch)) {
|
|
3476
|
+
output += ch;
|
|
3369
3477
|
} else {
|
|
3370
|
-
|
|
3478
|
+
const code = input.charCodeAt(i2);
|
|
3479
|
+
if (code < 128) {
|
|
3480
|
+
output += BYTE_HEX[code];
|
|
3481
|
+
} else if (code < 55296 || code > 57343) {
|
|
3482
|
+
output += percentEncodeNonAscii(code);
|
|
3483
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
3484
|
+
const low = input.charCodeAt(i2 + 1);
|
|
3485
|
+
if (low >= 56320 && low <= 57343) {
|
|
3486
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3487
|
+
i2++;
|
|
3488
|
+
} else {
|
|
3489
|
+
output += percentEncodeNonAscii(65533);
|
|
3490
|
+
}
|
|
3491
|
+
} else {
|
|
3492
|
+
output += percentEncodeNonAscii(65533);
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
return output;
|
|
3497
|
+
}
|
|
3498
|
+
function encodeUserinfo(input) {
|
|
3499
|
+
return encodeComponent(input, isUserinfoCharacter);
|
|
3500
|
+
}
|
|
3501
|
+
function encodeQuery(input) {
|
|
3502
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
3503
|
+
}
|
|
3504
|
+
function encodeFragment(input) {
|
|
3505
|
+
return encodeComponent(input, isQueryFragmentCharacter);
|
|
3506
|
+
}
|
|
3507
|
+
function isEscapeSafe(cp) {
|
|
3508
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
3509
|
+
}
|
|
3510
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
3511
|
+
let output = "";
|
|
3512
|
+
for (let i2 = 0; i2 < input.length; i2++) {
|
|
3513
|
+
const ch = input[i2];
|
|
3514
|
+
if (ch === "%" && i2 + 2 < input.length) {
|
|
3515
|
+
const hex = input.slice(i2 + 1, i2 + 3);
|
|
3516
|
+
if (isHexPair(hex)) {
|
|
3517
|
+
const normalizedHex = hex.toUpperCase();
|
|
3518
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3519
|
+
if (isUnreserved(decoded)) {
|
|
3520
|
+
output += decoded;
|
|
3521
|
+
} else {
|
|
3522
|
+
output += "%" + normalizedHex;
|
|
3523
|
+
}
|
|
3524
|
+
i2 += 2;
|
|
3525
|
+
continue;
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
3529
|
+
output += ch;
|
|
3530
|
+
} else {
|
|
3531
|
+
const code = input.charCodeAt(i2);
|
|
3532
|
+
if (code < 128) {
|
|
3533
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
3534
|
+
} else if (code < 55296 || code > 57343) {
|
|
3535
|
+
output += percentEncodeNonAscii(code);
|
|
3536
|
+
} else if (code <= 56319 && i2 + 1 < input.length) {
|
|
3537
|
+
const low = input.charCodeAt(i2 + 1);
|
|
3538
|
+
if (low >= 56320 && low <= 57343) {
|
|
3539
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
3540
|
+
i2++;
|
|
3541
|
+
} else {
|
|
3542
|
+
output += percentEncodeNonAscii(65533);
|
|
3543
|
+
}
|
|
3544
|
+
} else {
|
|
3545
|
+
output += percentEncodeNonAscii(65533);
|
|
3546
|
+
}
|
|
3371
3547
|
}
|
|
3372
3548
|
}
|
|
3373
3549
|
return output;
|
|
@@ -3390,14 +3566,18 @@ var require_utils = __commonJS({
|
|
|
3390
3566
|
function recomposeAuthority(component) {
|
|
3391
3567
|
const uriTokens = [];
|
|
3392
3568
|
if (component.userinfo !== void 0) {
|
|
3393
|
-
uriTokens.push(component.userinfo);
|
|
3569
|
+
uriTokens.push(encodeUserinfo(component.userinfo));
|
|
3394
3570
|
uriTokens.push("@");
|
|
3395
3571
|
}
|
|
3396
3572
|
if (component.host !== void 0) {
|
|
3397
|
-
let host =
|
|
3573
|
+
let host = component.host;
|
|
3398
3574
|
if (!isIPv4(host)) {
|
|
3399
|
-
|
|
3400
|
-
if (ipV6res.isIPV6
|
|
3575
|
+
let ipV6res = normalizeIPv6(host);
|
|
3576
|
+
if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
|
|
3577
|
+
host = normalizePercentEncoding(host, true);
|
|
3578
|
+
ipV6res = normalizeIPv6(host);
|
|
3579
|
+
}
|
|
3580
|
+
if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
|
|
3401
3581
|
host = `[${ipV6res.escapedHost}]`;
|
|
3402
3582
|
} else {
|
|
3403
3583
|
host = reescapeHostDelimiters(host, false);
|
|
@@ -3406,8 +3586,12 @@ var require_utils = __commonJS({
|
|
|
3406
3586
|
uriTokens.push(host);
|
|
3407
3587
|
}
|
|
3408
3588
|
if (typeof component.port === "number" || typeof component.port === "string") {
|
|
3589
|
+
const port = String(component.port);
|
|
3590
|
+
if (!isPort(port)) {
|
|
3591
|
+
throw new TypeError("URI port is malformed.");
|
|
3592
|
+
}
|
|
3409
3593
|
uriTokens.push(":");
|
|
3410
|
-
uriTokens.push(
|
|
3594
|
+
uriTokens.push(port);
|
|
3411
3595
|
}
|
|
3412
3596
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
3413
3597
|
}
|
|
@@ -3417,6 +3601,11 @@ var require_utils = __commonJS({
|
|
|
3417
3601
|
reescapeHostDelimiters,
|
|
3418
3602
|
normalizePercentEncoding,
|
|
3419
3603
|
normalizePathEncoding,
|
|
3604
|
+
serializePathEncoding,
|
|
3605
|
+
normalizeQueryFragmentEncoding,
|
|
3606
|
+
encodeUserinfo,
|
|
3607
|
+
encodeQuery,
|
|
3608
|
+
encodeFragment,
|
|
3420
3609
|
escapePreservingEscapes,
|
|
3421
3610
|
removeDotSegments,
|
|
3422
3611
|
isIPv4,
|
|
@@ -3432,7 +3621,7 @@ var require_schemes = __commonJS({
|
|
|
3432
3621
|
"node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3433
3622
|
"use strict";
|
|
3434
3623
|
var { isUUID } = require_utils();
|
|
3435
|
-
var URN_REG =
|
|
3624
|
+
var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
|
|
3436
3625
|
var supportedSchemeNames = (
|
|
3437
3626
|
/** @type {const} */
|
|
3438
3627
|
[
|
|
@@ -3493,9 +3682,10 @@ var require_schemes = __commonJS({
|
|
|
3493
3682
|
wsComponent.secure = void 0;
|
|
3494
3683
|
}
|
|
3495
3684
|
if (wsComponent.resourceName) {
|
|
3496
|
-
const
|
|
3685
|
+
const queryIndex = wsComponent.resourceName.indexOf("?");
|
|
3686
|
+
const path3 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
|
|
3497
3687
|
wsComponent.path = path3 && path3 !== "/" ? path3 : void 0;
|
|
3498
|
-
wsComponent.query =
|
|
3688
|
+
wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
|
|
3499
3689
|
wsComponent.resourceName = void 0;
|
|
3500
3690
|
}
|
|
3501
3691
|
wsComponent.fragment = void 0;
|
|
@@ -3507,7 +3697,7 @@ var require_schemes = __commonJS({
|
|
|
3507
3697
|
return urnComponent;
|
|
3508
3698
|
}
|
|
3509
3699
|
const matches = urnComponent.path.match(URN_REG);
|
|
3510
|
-
if (matches) {
|
|
3700
|
+
if (matches && matches[0] === urnComponent.path) {
|
|
3511
3701
|
const scheme = options.scheme || urnComponent.scheme || "urn";
|
|
3512
3702
|
urnComponent.nid = matches[1].toLowerCase();
|
|
3513
3703
|
urnComponent.nss = matches[2];
|
|
@@ -3641,8 +3831,17 @@ var require_schemes = __commonJS({
|
|
|
3641
3831
|
var require_fast_uri = __commonJS({
|
|
3642
3832
|
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3643
3833
|
"use strict";
|
|
3644
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding,
|
|
3834
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3645
3835
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3836
|
+
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
3837
|
+
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
3838
|
+
function decodeValidScheme(scheme) {
|
|
3839
|
+
const decodedScheme = unescape(String(scheme));
|
|
3840
|
+
if (!VALID_SCHEME.test(decodedScheme)) {
|
|
3841
|
+
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
3842
|
+
}
|
|
3843
|
+
return decodedScheme;
|
|
3844
|
+
}
|
|
3646
3845
|
function normalize(uri, options) {
|
|
3647
3846
|
if (typeof uri === "string") {
|
|
3648
3847
|
uri = /** @type {T} */
|
|
@@ -3655,7 +3854,34 @@ var require_fast_uri = __commonJS({
|
|
|
3655
3854
|
}
|
|
3656
3855
|
function resolve2(baseURI, relativeURI, options) {
|
|
3657
3856
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3658
|
-
const
|
|
3857
|
+
const {
|
|
3858
|
+
parsed: baseParsed,
|
|
3859
|
+
malformedAuthorityOrPort: baseMalformed,
|
|
3860
|
+
malformedPercentEncoding: baseMalformedPercentEncoding,
|
|
3861
|
+
malformedSchemeSpecific: baseMalformedSchemeSpecific,
|
|
3862
|
+
malformedHost: baseMalformedHost,
|
|
3863
|
+
malformedScheme: baseMalformedScheme
|
|
3864
|
+
} = parseWithStatus(baseURI, schemelessOptions);
|
|
3865
|
+
const {
|
|
3866
|
+
parsed: relativeParsed,
|
|
3867
|
+
malformedAuthorityOrPort: relativeMalformed,
|
|
3868
|
+
malformedPercentEncoding: relativeMalformedPercentEncoding,
|
|
3869
|
+
malformedSchemeSpecific: relativeMalformedSchemeSpecific,
|
|
3870
|
+
malformedHost: relativeMalformedHost,
|
|
3871
|
+
malformedScheme: relativeMalformedScheme
|
|
3872
|
+
} = parseWithStatus(relativeURI, schemelessOptions);
|
|
3873
|
+
if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
|
|
3874
|
+
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
3875
|
+
}
|
|
3876
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
3877
|
+
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
|
|
3878
|
+
const resolvedHost = resolved.host;
|
|
3879
|
+
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
3880
|
+
canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
3881
|
+
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !/\P{ASCII}/u.test(resolvedHost);
|
|
3882
|
+
if (resolved.error && !encodedASCIIHost) {
|
|
3883
|
+
throw new Error(resolved.error);
|
|
3884
|
+
}
|
|
3659
3885
|
schemelessOptions.skipEscape = true;
|
|
3660
3886
|
return serialize(resolved, schemelessOptions);
|
|
3661
3887
|
}
|
|
@@ -3715,7 +3941,7 @@ var require_fast_uri = __commonJS({
|
|
|
3715
3941
|
function equal(uriA, uriB, options) {
|
|
3716
3942
|
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3717
3943
|
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3718
|
-
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA
|
|
3944
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
|
|
3719
3945
|
}
|
|
3720
3946
|
function serialize(cmpts, opts) {
|
|
3721
3947
|
const component = {
|
|
@@ -3736,19 +3962,22 @@ var require_fast_uri = __commonJS({
|
|
|
3736
3962
|
};
|
|
3737
3963
|
const options = Object.assign({}, opts);
|
|
3738
3964
|
const uriTokens = [];
|
|
3965
|
+
if (component.scheme) {
|
|
3966
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
3967
|
+
}
|
|
3739
3968
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
3740
3969
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3970
|
+
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
3971
|
+
const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
|
|
3741
3972
|
if (component.path !== void 0) {
|
|
3742
3973
|
if (!options.skipEscape) {
|
|
3743
|
-
component.path =
|
|
3744
|
-
if (component.scheme !== void 0) {
|
|
3745
|
-
component.path = component.path.split("%3A").join(":");
|
|
3746
|
-
}
|
|
3974
|
+
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
3747
3975
|
} else {
|
|
3748
3976
|
component.path = normalizePercentEncoding(component.path);
|
|
3749
3977
|
}
|
|
3750
3978
|
}
|
|
3751
3979
|
if (options.reference !== "suffix" && component.scheme) {
|
|
3980
|
+
component.scheme = decodeValidScheme(component.scheme);
|
|
3752
3981
|
uriTokens.push(component.scheme, ":");
|
|
3753
3982
|
}
|
|
3754
3983
|
const authority = recomposeAuthority(component);
|
|
@@ -3766,21 +3995,25 @@ var require_fast_uri = __commonJS({
|
|
|
3766
3995
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
3767
3996
|
s2 = removeDotSegments(s2);
|
|
3768
3997
|
}
|
|
3998
|
+
if (pathNoScheme) {
|
|
3999
|
+
s2 = serializePathEncoding(s2, true);
|
|
4000
|
+
}
|
|
3769
4001
|
if (authority === void 0 && s2[0] === "/" && s2[1] === "/") {
|
|
3770
4002
|
s2 = "/%2F" + s2.slice(2);
|
|
3771
4003
|
}
|
|
3772
4004
|
uriTokens.push(s2);
|
|
3773
4005
|
}
|
|
3774
4006
|
if (component.query !== void 0) {
|
|
3775
|
-
uriTokens.push("?", component.query);
|
|
4007
|
+
uriTokens.push("?", encodeQuery(component.query));
|
|
3776
4008
|
}
|
|
3777
4009
|
if (component.fragment !== void 0) {
|
|
3778
|
-
uriTokens.push("#", component.fragment);
|
|
4010
|
+
uriTokens.push("#", encodeFragment(component.fragment));
|
|
3779
4011
|
}
|
|
3780
4012
|
return uriTokens.join("");
|
|
3781
4013
|
}
|
|
3782
4014
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3783
4015
|
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
4016
|
+
var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
3784
4017
|
function getParseError(parsed, matches) {
|
|
3785
4018
|
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3786
4019
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -3790,6 +4023,35 @@ var require_fast_uri = __commonJS({
|
|
|
3790
4023
|
}
|
|
3791
4024
|
return void 0;
|
|
3792
4025
|
}
|
|
4026
|
+
function hasMalformedPercentEncoding(component) {
|
|
4027
|
+
if (component === void 0) return false;
|
|
4028
|
+
let percent = component.indexOf("%");
|
|
4029
|
+
while (percent !== -1) {
|
|
4030
|
+
if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
|
|
4031
|
+
return true;
|
|
4032
|
+
}
|
|
4033
|
+
percent = component.indexOf("%", percent + 3);
|
|
4034
|
+
}
|
|
4035
|
+
return false;
|
|
4036
|
+
}
|
|
4037
|
+
function isIPLiteral(host) {
|
|
4038
|
+
return host[0] === "[" && host[host.length - 1] === "]";
|
|
4039
|
+
}
|
|
4040
|
+
function hasMalformedComponentPercentEncoding(matches) {
|
|
4041
|
+
const host = matches[4];
|
|
4042
|
+
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
4043
|
+
}
|
|
4044
|
+
function canonicalizeHost(parsed, options, schemeHandler, isIP2) {
|
|
4045
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP2 === false && nonSimpleDomain(parsed.host)) {
|
|
4046
|
+
try {
|
|
4047
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
4048
|
+
} catch (e2) {
|
|
4049
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
|
|
4050
|
+
return true;
|
|
4051
|
+
}
|
|
4052
|
+
}
|
|
4053
|
+
return false;
|
|
4054
|
+
}
|
|
3793
4055
|
function parseWithStatus(uri, opts) {
|
|
3794
4056
|
const options = Object.assign({}, opts);
|
|
3795
4057
|
const parsed = {
|
|
@@ -3802,6 +4064,11 @@ var require_fast_uri = __commonJS({
|
|
|
3802
4064
|
fragment: void 0
|
|
3803
4065
|
};
|
|
3804
4066
|
let malformedAuthorityOrPort = false;
|
|
4067
|
+
let malformedPercentEncoding = false;
|
|
4068
|
+
let malformedSchemeSpecific = false;
|
|
4069
|
+
let malformedHost = false;
|
|
4070
|
+
let malformedIPLiteral = false;
|
|
4071
|
+
let malformedScheme = false;
|
|
3805
4072
|
let isIP2 = false;
|
|
3806
4073
|
if (options.reference === "suffix") {
|
|
3807
4074
|
if (options.scheme) {
|
|
@@ -3815,6 +4082,20 @@ var require_fast_uri = __commonJS({
|
|
|
3815
4082
|
parsed.error = "URI authority must not contain a literal backslash.";
|
|
3816
4083
|
malformedAuthorityOrPort = true;
|
|
3817
4084
|
}
|
|
4085
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
4086
|
+
if (introducerMatch !== null) {
|
|
4087
|
+
const region = introducerMatch[1];
|
|
4088
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
4089
|
+
if (normalizedRegion.length >= 2) {
|
|
4090
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
4091
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
4092
|
+
malformedAuthorityOrPort = true;
|
|
4093
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
4094
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
4095
|
+
malformedAuthorityOrPort = true;
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
}
|
|
3818
4099
|
const matches = uri.match(URI_PARSE);
|
|
3819
4100
|
if (matches) {
|
|
3820
4101
|
parsed.scheme = matches[1];
|
|
@@ -3824,6 +4105,19 @@ var require_fast_uri = __commonJS({
|
|
|
3824
4105
|
parsed.path = matches[6] || "";
|
|
3825
4106
|
parsed.query = matches[7];
|
|
3826
4107
|
parsed.fragment = matches[8];
|
|
4108
|
+
if (parsed.scheme !== void 0) {
|
|
4109
|
+
const decodedScheme = unescape(parsed.scheme);
|
|
4110
|
+
if (VALID_SCHEME.test(decodedScheme)) {
|
|
4111
|
+
parsed.scheme = decodedScheme.toLowerCase();
|
|
4112
|
+
} else {
|
|
4113
|
+
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
4114
|
+
malformedScheme = true;
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4117
|
+
malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
|
|
4118
|
+
if (malformedPercentEncoding) {
|
|
4119
|
+
parsed.error = parsed.error || "URI contains malformed percent-encoding.";
|
|
4120
|
+
}
|
|
3827
4121
|
if (isNaN(parsed.port)) {
|
|
3828
4122
|
parsed.port = matches[5];
|
|
3829
4123
|
}
|
|
@@ -3835,9 +4129,16 @@ var require_fast_uri = __commonJS({
|
|
|
3835
4129
|
if (parsed.host) {
|
|
3836
4130
|
const ipv4result = isIPv4(parsed.host);
|
|
3837
4131
|
if (ipv4result === false) {
|
|
4132
|
+
const bracketedIPLiteral = isIPLiteral(parsed.host);
|
|
4133
|
+
const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
|
|
3838
4134
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
3839
|
-
|
|
3840
|
-
|
|
4135
|
+
isIP2 = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
|
|
4136
|
+
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
4137
|
+
parsed.host = isIP2 ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
4138
|
+
if (malformedIPLiteral) {
|
|
4139
|
+
parsed.error = parsed.error || "URI host is malformed.";
|
|
4140
|
+
malformedAuthorityOrPort = true;
|
|
4141
|
+
}
|
|
3841
4142
|
} else {
|
|
3842
4143
|
isIP2 = true;
|
|
3843
4144
|
}
|
|
@@ -3855,42 +4156,36 @@ var require_fast_uri = __commonJS({
|
|
|
3855
4156
|
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
3856
4157
|
}
|
|
3857
4158
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
3858
|
-
if (!
|
|
3859
|
-
|
|
3860
|
-
try {
|
|
3861
|
-
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
3862
|
-
} catch (e2) {
|
|
3863
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
|
|
3864
|
-
}
|
|
3865
|
-
}
|
|
4159
|
+
if (!malformedIPLiteral) {
|
|
4160
|
+
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP2);
|
|
3866
4161
|
}
|
|
3867
4162
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
3868
4163
|
if (uri.indexOf("%") !== -1) {
|
|
3869
|
-
if (parsed.
|
|
3870
|
-
parsed.
|
|
3871
|
-
|
|
3872
|
-
if (parsed.host !== void 0) {
|
|
3873
|
-
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP2);
|
|
4164
|
+
if (parsed.host !== void 0 && !malformedIPLiteral) {
|
|
4165
|
+
const host = isIP2 ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
4166
|
+
parsed.host = reescapeHostDelimiters(host, isIP2);
|
|
3874
4167
|
}
|
|
3875
4168
|
}
|
|
3876
4169
|
if (parsed.path) {
|
|
3877
4170
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
3878
4171
|
}
|
|
4172
|
+
if (parsed.query) {
|
|
4173
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
4174
|
+
}
|
|
3879
4175
|
if (parsed.fragment) {
|
|
3880
|
-
|
|
3881
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3882
|
-
} catch {
|
|
3883
|
-
parsed.error = parsed.error || "URI malformed";
|
|
3884
|
-
}
|
|
4176
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
3885
4177
|
}
|
|
3886
4178
|
}
|
|
3887
4179
|
if (schemeHandler && schemeHandler.parse) {
|
|
3888
4180
|
schemeHandler.parse(parsed, options);
|
|
4181
|
+
if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
|
|
4182
|
+
malformedSchemeSpecific = true;
|
|
4183
|
+
}
|
|
3889
4184
|
}
|
|
3890
4185
|
} else {
|
|
3891
4186
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3892
4187
|
}
|
|
3893
|
-
return { parsed, malformedAuthorityOrPort };
|
|
4188
|
+
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
3894
4189
|
}
|
|
3895
4190
|
function parse4(uri, opts) {
|
|
3896
4191
|
return parseWithStatus(uri, opts).parsed;
|
|
@@ -3899,20 +4194,28 @@ var require_fast_uri = __commonJS({
|
|
|
3899
4194
|
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3900
4195
|
}
|
|
3901
4196
|
function normalizeStringWithStatus(uri, opts) {
|
|
3902
|
-
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
4197
|
+
const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
|
|
3903
4198
|
return {
|
|
3904
|
-
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3905
|
-
malformedAuthorityOrPort
|
|
4199
|
+
normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
|
|
4200
|
+
malformedAuthorityOrPort,
|
|
4201
|
+
malformedPercentEncoding,
|
|
4202
|
+
malformedSchemeSpecific,
|
|
4203
|
+
malformedHost,
|
|
4204
|
+
malformedScheme
|
|
3906
4205
|
};
|
|
3907
4206
|
}
|
|
3908
4207
|
function normalizeComparableURI(uri, opts) {
|
|
3909
|
-
if (typeof uri
|
|
3910
|
-
|
|
3911
|
-
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
4208
|
+
if (typeof uri !== "string" && typeof uri !== "object") {
|
|
4209
|
+
return void 0;
|
|
3912
4210
|
}
|
|
3913
|
-
|
|
3914
|
-
|
|
4211
|
+
let value;
|
|
4212
|
+
try {
|
|
4213
|
+
value = typeof uri === "string" ? uri : serialize(uri, opts);
|
|
4214
|
+
} catch {
|
|
4215
|
+
return void 0;
|
|
3915
4216
|
}
|
|
4217
|
+
const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
|
|
4218
|
+
return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
|
|
3916
4219
|
}
|
|
3917
4220
|
var fastUri = {
|
|
3918
4221
|
SCHEMES,
|
|
@@ -4303,7 +4606,7 @@ var require_core = __commonJS({
|
|
|
4303
4606
|
type: (0, dataType_1.getJSONTypes)(def.type),
|
|
4304
4607
|
schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
|
|
4305
4608
|
};
|
|
4306
|
-
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (
|
|
4609
|
+
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k2) => addRule.call(this, k2, definition) : (k2) => definition.type.forEach((t2) => addRule.call(this, k2, definition, t2)));
|
|
4307
4610
|
return this;
|
|
4308
4611
|
}
|
|
4309
4612
|
getKeyword(keyword) {
|
|
@@ -6888,17 +7191,17 @@ var require_dist = __commonJS({
|
|
|
6888
7191
|
};
|
|
6889
7192
|
formatsPlugin.get = (name, mode = "full") => {
|
|
6890
7193
|
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
6891
|
-
const
|
|
6892
|
-
if (!
|
|
7194
|
+
const f4 = formats[name];
|
|
7195
|
+
if (!f4)
|
|
6893
7196
|
throw new Error(`Unknown format "${name}"`);
|
|
6894
|
-
return
|
|
7197
|
+
return f4;
|
|
6895
7198
|
};
|
|
6896
7199
|
function addFormats(ajv, list, fs4, exportName) {
|
|
6897
7200
|
var _a;
|
|
6898
7201
|
var _b;
|
|
6899
7202
|
(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
6900
|
-
for (const
|
|
6901
|
-
ajv.addFormat(
|
|
7203
|
+
for (const f4 of list)
|
|
7204
|
+
ajv.addFormat(f4, fs4[f4]);
|
|
6902
7205
|
}
|
|
6903
7206
|
module.exports = exports = formatsPlugin;
|
|
6904
7207
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7521,23 +7824,23 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7521
7824
|
function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) {
|
|
7522
7825
|
new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);
|
|
7523
7826
|
}
|
|
7524
|
-
let TransferArrayBuffer = (
|
|
7525
|
-
if (typeof
|
|
7827
|
+
let TransferArrayBuffer = (O) => {
|
|
7828
|
+
if (typeof O.transfer === "function") {
|
|
7526
7829
|
TransferArrayBuffer = (buffer) => buffer.transfer();
|
|
7527
7830
|
} else if (typeof structuredClone === "function") {
|
|
7528
7831
|
TransferArrayBuffer = (buffer) => structuredClone(buffer, { transfer: [buffer] });
|
|
7529
7832
|
} else {
|
|
7530
7833
|
TransferArrayBuffer = (buffer) => buffer;
|
|
7531
7834
|
}
|
|
7532
|
-
return TransferArrayBuffer(
|
|
7835
|
+
return TransferArrayBuffer(O);
|
|
7533
7836
|
};
|
|
7534
|
-
let IsDetachedBuffer = (
|
|
7535
|
-
if (typeof
|
|
7837
|
+
let IsDetachedBuffer = (O) => {
|
|
7838
|
+
if (typeof O.detached === "boolean") {
|
|
7536
7839
|
IsDetachedBuffer = (buffer) => buffer.detached;
|
|
7537
7840
|
} else {
|
|
7538
7841
|
IsDetachedBuffer = (buffer) => buffer.byteLength === 0;
|
|
7539
7842
|
}
|
|
7540
|
-
return IsDetachedBuffer(
|
|
7843
|
+
return IsDetachedBuffer(O);
|
|
7541
7844
|
};
|
|
7542
7845
|
function ArrayBufferSlice(buffer, begin, end) {
|
|
7543
7846
|
if (buffer.slice) {
|
|
@@ -7617,8 +7920,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7617
7920
|
}
|
|
7618
7921
|
return true;
|
|
7619
7922
|
}
|
|
7620
|
-
function CloneAsUint8Array(
|
|
7621
|
-
const buffer = ArrayBufferSlice(
|
|
7923
|
+
function CloneAsUint8Array(O) {
|
|
7924
|
+
const buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength);
|
|
7622
7925
|
return new Uint8Array(buffer);
|
|
7623
7926
|
}
|
|
7624
7927
|
function DequeueValue(container) {
|
|
@@ -11548,7 +11851,7 @@ var init_esm_min = __esm({
|
|
|
11548
11851
|
r = Math.random;
|
|
11549
11852
|
m = "append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(",");
|
|
11550
11853
|
f = (a, b2, c) => (a += "", /^(Blob|File)$/.test(b2 && b2[t]) ? [(c = c !== void 0 ? c + "" : b2[t] == "File" ? b2.name : "blob", a), b2.name !== c || b2[t] == "blob" ? new file_default([b2], c, b2) : b2] : [a, b2 + ""]);
|
|
11551
|
-
e = (c,
|
|
11854
|
+
e = (c, f4) => (f4 ? c : c.replace(/\r?\n|\r/g, "\r\n")).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
|
|
11552
11855
|
x = (n, a, e2) => {
|
|
11553
11856
|
if (a.length < e2) {
|
|
11554
11857
|
throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e2} arguments required, but only ${a.length} present.`);
|
|
@@ -11597,14 +11900,14 @@ var init_esm_min = __esm({
|
|
|
11597
11900
|
}
|
|
11598
11901
|
forEach(a, b2) {
|
|
11599
11902
|
x("forEach", arguments, 1);
|
|
11600
|
-
for (var [c,
|
|
11903
|
+
for (var [c, d] of this) a.call(b2, d, c, this);
|
|
11601
11904
|
}
|
|
11602
11905
|
set(...a) {
|
|
11603
11906
|
x("set", arguments, 2);
|
|
11604
11907
|
var b2 = [], c = true;
|
|
11605
11908
|
a = f(...a);
|
|
11606
|
-
this.#d.forEach((
|
|
11607
|
-
|
|
11909
|
+
this.#d.forEach((d) => {
|
|
11910
|
+
d[0] === a[0] ? c && (c = !b2.push(a)) : b2.push(d);
|
|
11608
11911
|
});
|
|
11609
11912
|
c && b2.push(a);
|
|
11610
11913
|
this.#d = b2;
|
|
@@ -11742,11 +12045,11 @@ function _fileName(headerValue) {
|
|
|
11742
12045
|
});
|
|
11743
12046
|
return filename;
|
|
11744
12047
|
}
|
|
11745
|
-
async function toFormData(Body2,
|
|
11746
|
-
if (!/multipart/i.test(
|
|
12048
|
+
async function toFormData(Body2, ct2) {
|
|
12049
|
+
if (!/multipart/i.test(ct2)) {
|
|
11747
12050
|
throw new TypeError("Failed to fetch");
|
|
11748
12051
|
}
|
|
11749
|
-
const m3 =
|
|
12052
|
+
const m3 = ct2.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
|
11750
12053
|
if (!m3) {
|
|
11751
12054
|
throw new TypeError("no or bad content-type header, no multipart boundary");
|
|
11752
12055
|
}
|
|
@@ -12205,8 +12508,8 @@ var init_body = __esm({
|
|
|
12205
12508
|
return buffer.slice(byteOffset, byteOffset + byteLength2);
|
|
12206
12509
|
}
|
|
12207
12510
|
async formData() {
|
|
12208
|
-
const
|
|
12209
|
-
if (
|
|
12511
|
+
const ct2 = this.headers.get("content-type");
|
|
12512
|
+
if (ct2.startsWith("application/x-www-form-urlencoded")) {
|
|
12210
12513
|
const formData = new FormData();
|
|
12211
12514
|
const parameters2 = new URLSearchParams(await this.text());
|
|
12212
12515
|
for (const [name, value] of parameters2) {
|
|
@@ -12215,7 +12518,7 @@ var init_body = __esm({
|
|
|
12215
12518
|
return formData;
|
|
12216
12519
|
}
|
|
12217
12520
|
const { toFormData: toFormData2 } = await Promise.resolve().then(() => (init_multipart_parser(), multipart_parser_exports));
|
|
12218
|
-
return toFormData2(this.body,
|
|
12521
|
+
return toFormData2(this.body, ct2);
|
|
12219
12522
|
}
|
|
12220
12523
|
/**
|
|
12221
12524
|
* Return raw response as Blob
|
|
@@ -12223,10 +12526,10 @@ var init_body = __esm({
|
|
|
12223
12526
|
* @return Promise
|
|
12224
12527
|
*/
|
|
12225
12528
|
async blob() {
|
|
12226
|
-
const
|
|
12529
|
+
const ct2 = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
|
12227
12530
|
const buf = await this.arrayBuffer();
|
|
12228
12531
|
return new fetch_blob_default([buf], {
|
|
12229
|
-
type:
|
|
12532
|
+
type: ct2
|
|
12230
12533
|
});
|
|
12231
12534
|
}
|
|
12232
12535
|
/**
|
|
@@ -13423,33 +13726,33 @@ var init_adf = __esm({
|
|
|
13423
13726
|
});
|
|
13424
13727
|
|
|
13425
13728
|
// node_modules/marked/lib/marked.esm.js
|
|
13426
|
-
function
|
|
13729
|
+
function A2() {
|
|
13427
13730
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
13428
13731
|
}
|
|
13429
|
-
function
|
|
13430
|
-
|
|
13732
|
+
function j(l3) {
|
|
13733
|
+
R = l3;
|
|
13431
13734
|
}
|
|
13432
|
-
function
|
|
13735
|
+
function I(l3) {
|
|
13433
13736
|
let e2 = [];
|
|
13434
13737
|
return (t2) => {
|
|
13435
13738
|
let n = Math.max(0, Math.min(3, t2 - 1)), s2 = e2[n];
|
|
13436
13739
|
return s2 || (s2 = l3(n), e2[n] = s2), s2;
|
|
13437
13740
|
};
|
|
13438
13741
|
}
|
|
13439
|
-
function
|
|
13742
|
+
function k(l3, e2 = "") {
|
|
13440
13743
|
let t2 = typeof l3 == "string" ? l3 : l3.source, n = { replace: (s2, r2) => {
|
|
13441
13744
|
let i2 = typeof r2 == "string" ? r2 : r2.source;
|
|
13442
13745
|
return i2 = i2.replace(m2.caret, "$1"), t2 = t2.replace(s2, i2), n;
|
|
13443
13746
|
}, getRegex: () => new RegExp(t2, e2) };
|
|
13444
13747
|
return n;
|
|
13445
13748
|
}
|
|
13446
|
-
function
|
|
13749
|
+
function T(l3, e2) {
|
|
13447
13750
|
if (e2) {
|
|
13448
13751
|
if (m2.escapeTest.test(l3)) return l3.replace(m2.escapeReplace, ge);
|
|
13449
13752
|
} else if (m2.escapeTestNoEncode.test(l3)) return l3.replace(m2.escapeReplaceNoEncode, ge);
|
|
13450
13753
|
return l3;
|
|
13451
13754
|
}
|
|
13452
|
-
function
|
|
13755
|
+
function Y(l3) {
|
|
13453
13756
|
try {
|
|
13454
13757
|
l3 = encodeURI(l3).replace(m2.percentDecode, "%");
|
|
13455
13758
|
} catch {
|
|
@@ -13457,7 +13760,7 @@ function V(l3) {
|
|
|
13457
13760
|
}
|
|
13458
13761
|
return l3;
|
|
13459
13762
|
}
|
|
13460
|
-
function
|
|
13763
|
+
function ee(l3, e2) {
|
|
13461
13764
|
let t2 = l3.replace(m2.findPipe, (r2, i2, o) => {
|
|
13462
13765
|
let u = false, a = i2;
|
|
13463
13766
|
for (; --a >= 0 && o[a] === "\\"; ) u = !u;
|
|
@@ -13480,7 +13783,7 @@ function $(l3, e2, t2) {
|
|
|
13480
13783
|
}
|
|
13481
13784
|
return l3.slice(0, n - s2);
|
|
13482
13785
|
}
|
|
13483
|
-
function
|
|
13786
|
+
function te(l3) {
|
|
13484
13787
|
let e2 = l3.split(`
|
|
13485
13788
|
`), t2 = e2.length - 1;
|
|
13486
13789
|
for (; t2 >= 0 && m2.blankLine.test(e2[t2]); ) t2--;
|
|
@@ -13504,12 +13807,21 @@ function me(l3, e2 = 0) {
|
|
|
13504
13807
|
return n;
|
|
13505
13808
|
}
|
|
13506
13809
|
function xe(l3, e2, t2, n, s2) {
|
|
13507
|
-
let r2 = e2.href, i2 = e2.title || null, o = l3[1].replace(s2.other.outputLinkReplace, "$1");
|
|
13810
|
+
let r2 = e2.href, i2 = e2.title || null, o = l3[1].replace(s2.other.outputLinkReplace, "$1"), u = l3[0].charAt(0) === "!";
|
|
13508
13811
|
n.state.inLink = true;
|
|
13509
|
-
let
|
|
13510
|
-
|
|
13812
|
+
let a = n.state.linkEmitted, p = n.state.inRawBlock;
|
|
13813
|
+
n.state.linkEmitted = false;
|
|
13814
|
+
let c = n.inlineTokens(o), h2 = n.state.linkEmitted;
|
|
13815
|
+
if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
|
|
13816
|
+
if (h2) {
|
|
13817
|
+
n.state.inRawBlock = p;
|
|
13818
|
+
return;
|
|
13819
|
+
}
|
|
13820
|
+
n.state.linkEmitted = true;
|
|
13821
|
+
}
|
|
13822
|
+
return { type: u ? "image" : "link", raw: t2, href: r2, title: i2, text: o, tokens: c };
|
|
13511
13823
|
}
|
|
13512
|
-
function
|
|
13824
|
+
function kt(l3, e2, t2) {
|
|
13513
13825
|
let n = l3.match(t2.other.indentCodeCompensation);
|
|
13514
13826
|
if (n === null) return e2;
|
|
13515
13827
|
let s2 = n[1];
|
|
@@ -13522,95 +13834,105 @@ function ot(l3, e2, t2) {
|
|
|
13522
13834
|
}).join(`
|
|
13523
13835
|
`);
|
|
13524
13836
|
}
|
|
13525
|
-
function
|
|
13837
|
+
function f3(l3, e2) {
|
|
13526
13838
|
return M.parse(l3, e2);
|
|
13527
13839
|
}
|
|
13528
|
-
|
|
13840
|
+
function dt(...l3) {
|
|
13841
|
+
return M.use(...l3), f3.defaults = M.defaults, j(f3.defaults), f3;
|
|
13842
|
+
}
|
|
13843
|
+
var R, z, Oe, m2, Te, we, ye, q, Pe, U, oe, ae, Se, K, _e, W, $e, Le, Q, X, Ee, le, ze, Me, Ae, J, se, Ie, Ce, Be, De, ue, qe, _, C, v, ve, He, pe, Ze, Ge, Qe, ce, Ne, je, Fe, Ue, he, Ke, We, Xe, Je, Ve, Ye, et, tt, nt, rt, st, it, ot, at, G, lt, ke, de, ut, ie, V, pt, F2, ct, H, B, ht, ge, y, x2, P, L, b, S2, Z2, M, nn, rn, sn, on, ln, un;
|
|
13529
13844
|
var init_marked_esm = __esm({
|
|
13530
13845
|
"node_modules/marked/lib/marked.esm.js"() {
|
|
13531
13846
|
"use strict";
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13847
|
+
R = A2();
|
|
13848
|
+
z = { exec: () => null };
|
|
13849
|
+
Oe = ((l3 = "") => {
|
|
13535
13850
|
try {
|
|
13536
13851
|
return !!new RegExp("(?<=1)(?<!1)" + l3);
|
|
13537
13852
|
} catch {
|
|
13538
13853
|
return false;
|
|
13539
13854
|
}
|
|
13540
13855
|
})();
|
|
13541
|
-
m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex:
|
|
13542
|
-
|
|
13856
|
+
m2 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l3) => new RegExp(`^ {0,${l3}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}#`)), htmlBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}>`)) };
|
|
13857
|
+
Te = /^(?:[ \t]*(?:\n|$))+/;
|
|
13543
13858
|
we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
13544
13859
|
ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
13545
|
-
|
|
13860
|
+
q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
13546
13861
|
Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
13547
|
-
|
|
13862
|
+
U = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
|
|
13548
13863
|
oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
13549
|
-
ae =
|
|
13550
|
-
Se =
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
le = (l3) =>
|
|
13864
|
+
ae = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
13865
|
+
Se = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
13866
|
+
K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
|
|
13867
|
+
_e = /^[^\n]+/;
|
|
13868
|
+
W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
13869
|
+
$e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
13870
|
+
Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex();
|
|
13871
|
+
Q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
13872
|
+
X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
13873
|
+
Ee = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
13874
|
+
le = (l3) => k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
|
|
13560
13875
|
ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
se =
|
|
13565
|
-
|
|
13566
|
-
|
|
13876
|
+
Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
|
|
13877
|
+
Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex();
|
|
13878
|
+
J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: Ee, lheading: ae, list: Le, newline: Te, paragraph: ze, table: z, text: _e };
|
|
13879
|
+
se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
|
|
13880
|
+
Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex() };
|
|
13881
|
+
Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: z, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
|
|
13567
13882
|
]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
13568
13883
|
Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
13569
|
-
|
|
13884
|
+
De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
13570
13885
|
ue = /^( {2,}|\\)\n(?!\s*$)/;
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
ve =
|
|
13886
|
+
qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
13887
|
+
_ = /[\p{P}\p{S}]/u;
|
|
13888
|
+
C = /[\s\p{P}\p{S}]/u;
|
|
13889
|
+
v = /[^\s\p{P}\p{S}]/u;
|
|
13890
|
+
ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C).getRegex();
|
|
13891
|
+
He = /[\p{Pi}\p{Ps}"']/u;
|
|
13576
13892
|
pe = /(?!~)[\p{P}\p{S}]/u;
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13893
|
+
Ze = /(?!~)[\s\p{P}\p{S}]/u;
|
|
13894
|
+
Ge = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
13895
|
+
Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Oe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
|
|
13580
13896
|
ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
|
|
13581
|
-
Ne =
|
|
13582
|
-
|
|
13897
|
+
Ne = k(ce, "u").replace(/punct/g, _).getRegex();
|
|
13898
|
+
je = k(ce, "u").replace(/punct/g, pe).getRegex();
|
|
13899
|
+
Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
|
|
13900
|
+
Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex();
|
|
13583
13901
|
he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13902
|
+
Ke = k(he, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
13903
|
+
We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex();
|
|
13904
|
+
Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
|
|
13905
|
+
Je = k(Xe, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
13906
|
+
Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
13907
|
+
Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
|
|
13908
|
+
et = k(Ye, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
13909
|
+
tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
|
|
13910
|
+
nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
|
|
13911
|
+
rt = k(nt, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
13912
|
+
st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
|
|
13913
|
+
it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
13914
|
+
ot = k(X).replace("(?:-->|$)", "-->").getRegex();
|
|
13915
|
+
at = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
13916
|
+
G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
|
|
13917
|
+
lt = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
13918
|
+
ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex();
|
|
13919
|
+
de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex();
|
|
13920
|
+
ut = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex();
|
|
13599
13921
|
ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
ge = (l3) =>
|
|
13608
|
-
|
|
13922
|
+
V = { _backpedal: z, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: z, delLDelim: z, delRDelim: z, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: lt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: ut, tag: at, text: qe, url: z };
|
|
13923
|
+
pt = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() };
|
|
13924
|
+
F2 = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
|
|
13925
|
+
ct = { ...F2, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
13926
|
+
H = { normal: J, gfm: Ie, pedantic: Ce };
|
|
13927
|
+
B = { normal: V, gfm: F2, breaks: ct, pedantic: pt };
|
|
13928
|
+
ht = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
13929
|
+
ge = (l3) => ht[l3];
|
|
13930
|
+
y = class {
|
|
13609
13931
|
options;
|
|
13610
13932
|
rules;
|
|
13611
13933
|
lexer;
|
|
13612
13934
|
constructor(e2) {
|
|
13613
|
-
this.options = e2 ||
|
|
13935
|
+
this.options = e2 || R;
|
|
13614
13936
|
}
|
|
13615
13937
|
space(e2) {
|
|
13616
13938
|
let t2 = this.rules.block.newline.exec(e2);
|
|
@@ -13619,14 +13941,14 @@ var init_marked_esm = __esm({
|
|
|
13619
13941
|
code(e2) {
|
|
13620
13942
|
let t2 = this.rules.block.code.exec(e2);
|
|
13621
13943
|
if (t2) {
|
|
13622
|
-
let n = this.options.pedantic ? t2[0] :
|
|
13944
|
+
let n = this.options.pedantic ? t2[0] : te(t2[0]), s2 = n.replace(this.rules.other.codeRemoveIndent, "");
|
|
13623
13945
|
return { type: "code", raw: n, codeBlockStyle: "indented", text: s2 };
|
|
13624
13946
|
}
|
|
13625
13947
|
}
|
|
13626
13948
|
fences(e2) {
|
|
13627
13949
|
let t2 = this.rules.block.fences.exec(e2);
|
|
13628
13950
|
if (t2) {
|
|
13629
|
-
let n = t2[0], s2 =
|
|
13951
|
+
let n = t2[0], s2 = kt(n, t2[3] || "", this.rules);
|
|
13630
13952
|
return { type: "code", raw: n, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: s2 };
|
|
13631
13953
|
}
|
|
13632
13954
|
}
|
|
@@ -13667,19 +13989,20 @@ ${p}` : p, r2 = r2 ? `${r2}
|
|
|
13667
13989
|
${c}` : c;
|
|
13668
13990
|
let h2 = this.lexer.state.top;
|
|
13669
13991
|
if (this.lexer.state.top = true, this.lexer.blockTokens(c, i2, true), this.lexer.state.top = h2, n.length === 0) break;
|
|
13670
|
-
let
|
|
13671
|
-
if (
|
|
13672
|
-
if (
|
|
13673
|
-
let
|
|
13674
|
-
` +
|
|
13675
|
-
`),
|
|
13676
|
-
i2[i2.length - 1] =
|
|
13992
|
+
let d = i2.at(-1);
|
|
13993
|
+
if (d?.type === "code") break;
|
|
13994
|
+
if (d?.type === "blockquote") {
|
|
13995
|
+
let O = d, g = n.join(`
|
|
13996
|
+
`), w = O.raw + `
|
|
13997
|
+
` + g.replace(this.rules.other.blockquoteSetextReplace2, ""), E = this.blockquote(w);
|
|
13998
|
+
i2[i2.length - 1] = E, s2 = `${s2}
|
|
13999
|
+
${g}`, r2 = r2.substring(0, r2.length - O.text.length) + E.text;
|
|
13677
14000
|
break;
|
|
13678
|
-
} else if (
|
|
13679
|
-
let
|
|
14001
|
+
} else if (d?.type === "list") {
|
|
14002
|
+
let O = d, g = O.raw + `
|
|
13680
14003
|
` + n.join(`
|
|
13681
|
-
`),
|
|
13682
|
-
i2[i2.length - 1] =
|
|
14004
|
+
`), w = this.list(g);
|
|
14005
|
+
i2[i2.length - 1] = w, s2 = s2.substring(0, s2.length - d.raw.length) + w.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w.raw, n = g.substring(i2.at(-1).raw.length).split(`
|
|
13683
14006
|
`);
|
|
13684
14007
|
continue;
|
|
13685
14008
|
}
|
|
@@ -13698,24 +14021,24 @@ ${c}` : c;
|
|
|
13698
14021
|
if (!(t2 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
|
|
13699
14022
|
p = t2[0], e2 = e2.substring(p.length);
|
|
13700
14023
|
let h2 = me(t2[2].split(`
|
|
13701
|
-
`, 1)[0], t2[1].length),
|
|
13702
|
-
`, 1)[0],
|
|
13703
|
-
if (this.options.pedantic ? (
|
|
13704
|
-
`, e2 = e2.substring(
|
|
13705
|
-
let
|
|
14024
|
+
`, 1)[0], t2[1].length), d = e2.split(`
|
|
14025
|
+
`, 1)[0], O = !h2.trim(), g = 0;
|
|
14026
|
+
if (this.options.pedantic ? (g = 2, c = h2.trimStart()) : O ? g = t2[1].length + 1 : (g = h2.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = h2.slice(g), g += t2[1].length), O && this.rules.other.blankLine.test(d) && (p += d + `
|
|
14027
|
+
`, e2 = e2.substring(d.length + 1), a = true), !a) {
|
|
14028
|
+
let w = this.rules.other.nextBulletRegex(g), E = this.rules.other.hrRegex(g), ne = this.rules.other.fencesBeginRegex(g), re = this.rules.other.headingBeginRegex(g), be = this.rules.other.htmlBeginRegex(g), Re = this.rules.other.blockquoteBeginRegex(g);
|
|
13706
14029
|
for (; e2; ) {
|
|
13707
|
-
let
|
|
13708
|
-
`, 1)[0],
|
|
13709
|
-
if (
|
|
13710
|
-
if (
|
|
13711
|
-
` +
|
|
14030
|
+
let N = e2.split(`
|
|
14031
|
+
`, 1)[0], D;
|
|
14032
|
+
if (d = N, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), D = d) : D = d.replace(this.rules.other.tabCharGlobal, " "), ne.test(d) || re.test(d) || be.test(d) || Re.test(d) || w.test(d) || E.test(d)) break;
|
|
14033
|
+
if (D.search(this.rules.other.nonSpaceChar) >= g || !d.trim()) c += `
|
|
14034
|
+
` + D.slice(g);
|
|
13712
14035
|
else {
|
|
13713
|
-
if (
|
|
14036
|
+
if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || E.test(h2)) break;
|
|
13714
14037
|
c += `
|
|
13715
|
-
` +
|
|
14038
|
+
` + d;
|
|
13716
14039
|
}
|
|
13717
|
-
|
|
13718
|
-
`, e2 = e2.substring(
|
|
14040
|
+
O = !d.trim(), p += N + `
|
|
14041
|
+
`, e2 = e2.substring(N.length + 1), h2 = D.slice(g);
|
|
13719
14042
|
}
|
|
13720
14043
|
}
|
|
13721
14044
|
r2.loose || (o ? r2.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true)), r2.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), r2.raw += p;
|
|
@@ -13724,8 +14047,11 @@ ${c}` : c;
|
|
|
13724
14047
|
if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
|
|
13725
14048
|
else return;
|
|
13726
14049
|
r2.raw = r2.raw.trimEnd();
|
|
14050
|
+
for (let a of r2.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r2.loose) {
|
|
14051
|
+
let p = a.tokens.filter((h2) => h2.type === "space"), c = p.length > 0 && p.some((h2) => this.rules.other.anyLine.test(h2.raw));
|
|
14052
|
+
r2.loose = c;
|
|
14053
|
+
}
|
|
13727
14054
|
for (let a of r2.items) {
|
|
13728
|
-
this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []);
|
|
13729
14055
|
let p = a.tokens[0];
|
|
13730
14056
|
if (a.task && (p?.type === "text" || p?.type === "paragraph")) {
|
|
13731
14057
|
a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p.raw = p.raw.replace(this.rules.other.listReplaceTask, ""), p.text = p.text.replace(this.rules.other.listReplaceTask, "");
|
|
@@ -13739,10 +14065,6 @@ ${c}` : c;
|
|
|
13739
14065
|
a.checked = h2.checked, r2.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = h2.raw + a.tokens[0].raw, a.tokens[0].text = h2.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h2)) : a.tokens.unshift({ type: "paragraph", raw: h2.raw, text: h2.raw, tokens: [h2] }) : a.tokens.unshift(h2);
|
|
13740
14066
|
}
|
|
13741
14067
|
} else a.task && (a.task = false);
|
|
13742
|
-
if (!r2.loose) {
|
|
13743
|
-
let c = a.tokens.filter((k) => k.type === "space"), h2 = c.length > 0 && c.some((k) => this.rules.other.anyLine.test(k.raw));
|
|
13744
|
-
r2.loose = h2;
|
|
13745
|
-
}
|
|
13746
14068
|
}
|
|
13747
14069
|
if (r2.loose) for (let a of r2.items) {
|
|
13748
14070
|
a.loose = true;
|
|
@@ -13754,7 +14076,7 @@ ${c}` : c;
|
|
|
13754
14076
|
html(e2) {
|
|
13755
14077
|
let t2 = this.rules.block.html.exec(e2);
|
|
13756
14078
|
if (t2) {
|
|
13757
|
-
let n =
|
|
14079
|
+
let n = te(t2[0]);
|
|
13758
14080
|
return { type: "html", block: true, raw: n, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n };
|
|
13759
14081
|
}
|
|
13760
14082
|
}
|
|
@@ -13769,13 +14091,13 @@ ${c}` : c;
|
|
|
13769
14091
|
table(e2) {
|
|
13770
14092
|
let t2 = this.rules.block.table.exec(e2);
|
|
13771
14093
|
if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
|
|
13772
|
-
let n =
|
|
14094
|
+
let n = ee(t2[1]), s2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
13773
14095
|
`) : [], i2 = { type: "table", raw: $(t2[0], `
|
|
13774
14096
|
`), header: [], align: [], rows: [] };
|
|
13775
14097
|
if (n.length === s2.length) {
|
|
13776
14098
|
for (let o of s2) this.rules.other.tableAlignRight.test(o) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? i2.align.push("left") : i2.align.push(null);
|
|
13777
14099
|
for (let o = 0; o < n.length; o++) i2.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: i2.align[o] });
|
|
13778
|
-
for (let o of r2) i2.rows.push(
|
|
14100
|
+
for (let o of r2) i2.rows.push(ee(o, i2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: i2.align[a] })));
|
|
13779
14101
|
return i2;
|
|
13780
14102
|
}
|
|
13781
14103
|
}
|
|
@@ -13846,25 +14168,28 @@ ${c}` : c;
|
|
|
13846
14168
|
let s2 = this.rules.inline.emStrongLDelim.exec(e2);
|
|
13847
14169
|
if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
13848
14170
|
if (!(s2[1] || s2[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
13849
|
-
let i2 = [...s2[0]].length - 1, o, u, a = i2, p = 0, c = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
13850
|
-
for (
|
|
14171
|
+
let i2 = [...s2[0]].length - 1, o, u, a = i2, p = 0, c = s2[0][0], h2 = n === c, d = c === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
14172
|
+
for (d.lastIndex = 0, t2 = t2.slice(-1 * e2.length + i2); (s2 = d.exec(t2)) !== null; ) {
|
|
13851
14173
|
if (o = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o) continue;
|
|
13852
14174
|
if (u = [...o].length, s2[3] || s2[4]) {
|
|
13853
14175
|
a += u;
|
|
13854
14176
|
continue;
|
|
13855
|
-
} else if (
|
|
13856
|
-
|
|
13857
|
-
|
|
14177
|
+
} else if (s2[5] || s2[6]) {
|
|
14178
|
+
if (i2 % 3 && !((i2 + u) % 3)) {
|
|
14179
|
+
p += u;
|
|
14180
|
+
continue;
|
|
14181
|
+
}
|
|
14182
|
+
if (h2) break;
|
|
13858
14183
|
}
|
|
13859
14184
|
if (a -= u, a > 0) continue;
|
|
13860
14185
|
u = Math.min(u, u + a + p);
|
|
13861
|
-
let
|
|
14186
|
+
let O = [...s2[0]][0].length, g = e2.slice(0, i2 + s2.index + O + u);
|
|
13862
14187
|
if (Math.min(i2, u) % 2) {
|
|
13863
|
-
let
|
|
13864
|
-
return { type: "em", raw:
|
|
14188
|
+
let E = g.slice(1, -1);
|
|
14189
|
+
return { type: "em", raw: g, text: E, tokens: this.lexer.inlineTokens(E) };
|
|
13865
14190
|
}
|
|
13866
|
-
let
|
|
13867
|
-
return { type: "strong", raw:
|
|
14191
|
+
let w = g.slice(2, -2);
|
|
14192
|
+
return { type: "strong", raw: g, text: w, tokens: this.lexer.inlineTokens(w) };
|
|
13868
14193
|
}
|
|
13869
14194
|
}
|
|
13870
14195
|
}
|
|
@@ -13892,8 +14217,8 @@ ${c}` : c;
|
|
|
13892
14217
|
}
|
|
13893
14218
|
if (a -= u, a > 0) continue;
|
|
13894
14219
|
u = Math.min(u, u + a);
|
|
13895
|
-
let c = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + c + u),
|
|
13896
|
-
return { type: "del", raw: h2, text:
|
|
14220
|
+
let c = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + c + u), d = h2.slice(i2, -i2);
|
|
14221
|
+
return { type: "del", raw: h2, text: d, tokens: this.lexer.inlineTokens(d) };
|
|
13897
14222
|
}
|
|
13898
14223
|
}
|
|
13899
14224
|
}
|
|
@@ -13934,12 +14259,12 @@ ${c}` : c;
|
|
|
13934
14259
|
inlineQueue;
|
|
13935
14260
|
tokenizer;
|
|
13936
14261
|
constructor(e2) {
|
|
13937
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 ||
|
|
13938
|
-
let t2 = { other: m2, block:
|
|
13939
|
-
this.options.pedantic ? (t2.block =
|
|
14262
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || R, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
|
|
14263
|
+
let t2 = { other: m2, block: H.normal, inline: B.normal };
|
|
14264
|
+
this.options.pedantic ? (t2.block = H.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = H.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
|
|
13940
14265
|
}
|
|
13941
14266
|
static get rules() {
|
|
13942
|
-
return { block:
|
|
14267
|
+
return { block: H, inline: B };
|
|
13943
14268
|
}
|
|
13944
14269
|
static lex(e2, t2) {
|
|
13945
14270
|
return new l(t2).lex(e2);
|
|
@@ -14058,14 +14383,32 @@ ${c}` : c;
|
|
|
14058
14383
|
inline(e2, t2 = []) {
|
|
14059
14384
|
return this.inlineQueue.push({ src: e2, tokens: t2 }), t2;
|
|
14060
14385
|
}
|
|
14386
|
+
linkInText(e2) {
|
|
14387
|
+
if (!e2.includes("[")) return false;
|
|
14388
|
+
let t2 = this.tokenizer.rules.inline.link;
|
|
14389
|
+
for (let n of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n[0]) && e2.charAt(n.index - 1) !== "!") return true;
|
|
14390
|
+
for (let n of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
|
|
14391
|
+
let s2 = n[0], r2 = s2.lastIndexOf("[");
|
|
14392
|
+
if (!(s2.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, s2.slice(r2 + 1, -1))) && !(r2 > 1 && this.linkInText(s2.slice(1, r2 - 1)))) return true;
|
|
14393
|
+
}
|
|
14394
|
+
return false;
|
|
14395
|
+
}
|
|
14061
14396
|
inlineTokens(e2, t2 = []) {
|
|
14062
14397
|
this.tokenizer.lexer = this;
|
|
14063
14398
|
let n = e2;
|
|
14064
|
-
if (this.tokens.links) {
|
|
14065
|
-
let o =
|
|
14066
|
-
|
|
14399
|
+
if (this.tokens.links && e2.includes("[")) {
|
|
14400
|
+
let o = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
|
|
14401
|
+
let p = a.lastIndexOf("[");
|
|
14402
|
+
if (!Object.hasOwn(this.tokens.links, a.slice(p + 1, -1))) return a;
|
|
14403
|
+
if (p > 1 && a.charAt(0) !== "!") {
|
|
14404
|
+
let c = a.slice(1, p - 1);
|
|
14405
|
+
if (this.linkInText(c)) return "[" + c.replace(o, u) + "][" + "a".repeat(a.length - p - 2) + "]";
|
|
14406
|
+
}
|
|
14407
|
+
return "[" + "a".repeat(a.length - 2) + "]";
|
|
14408
|
+
};
|
|
14409
|
+
n = n.replace(o, u);
|
|
14067
14410
|
}
|
|
14068
|
-
n = n.replace(this.tokenizer.rules.inline.anyPunctuation, "
|
|
14411
|
+
n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (o) => "+".repeat(o.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o, u, a) => {
|
|
14069
14412
|
let p = a ? a.length : 0;
|
|
14070
14413
|
return o.slice(0, p) + "[" + "a".repeat(o.length - p - 2) + "]";
|
|
14071
14414
|
}), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
@@ -14147,11 +14490,11 @@ ${c}` : c;
|
|
|
14147
14490
|
else throw new Error(t2);
|
|
14148
14491
|
}
|
|
14149
14492
|
};
|
|
14150
|
-
|
|
14493
|
+
P = class {
|
|
14151
14494
|
options;
|
|
14152
14495
|
parser;
|
|
14153
14496
|
constructor(e2) {
|
|
14154
|
-
this.options = e2 ||
|
|
14497
|
+
this.options = e2 || R;
|
|
14155
14498
|
}
|
|
14156
14499
|
space(e2) {
|
|
14157
14500
|
return "";
|
|
@@ -14159,8 +14502,8 @@ ${c}` : c;
|
|
|
14159
14502
|
code({ text: e2, lang: t2, escaped: n }) {
|
|
14160
14503
|
let s2 = (t2 || "").match(m2.notSpaceStart)?.[0], r2 = e2.replace(m2.endingNewline, "") + `
|
|
14161
14504
|
`;
|
|
14162
|
-
return s2 ? '<pre><code class="language-' +
|
|
14163
|
-
` : "<pre><code>" + (n ? r2 :
|
|
14505
|
+
return s2 ? '<pre><code class="language-' + T(s2) + '">' + (n ? r2 : T(r2, true)) + `</code></pre>
|
|
14506
|
+
` : "<pre><code>" + (n ? r2 : T(r2, true)) + `</code></pre>
|
|
14164
14507
|
`;
|
|
14165
14508
|
}
|
|
14166
14509
|
blockquote({ tokens: e2 }) {
|
|
@@ -14238,7 +14581,7 @@ ${e2}</tr>
|
|
|
14238
14581
|
return `<em>${this.parser.parseInline(e2)}</em>`;
|
|
14239
14582
|
}
|
|
14240
14583
|
codespan({ text: e2 }) {
|
|
14241
|
-
return `<code>${
|
|
14584
|
+
return `<code>${T(e2, true)}</code>`;
|
|
14242
14585
|
}
|
|
14243
14586
|
br(e2) {
|
|
14244
14587
|
return "<br>";
|
|
@@ -14247,22 +14590,22 @@ ${e2}</tr>
|
|
|
14247
14590
|
return `<del>${this.parser.parseInline(e2)}</del>`;
|
|
14248
14591
|
}
|
|
14249
14592
|
link({ href: e2, title: t2, tokens: n }) {
|
|
14250
|
-
let s2 = this.parser.parseInline(n), r2 =
|
|
14593
|
+
let s2 = this.parser.parseInline(n), r2 = Y(e2);
|
|
14251
14594
|
if (r2 === null) return s2;
|
|
14252
14595
|
e2 = r2;
|
|
14253
14596
|
let i2 = '<a href="' + e2 + '"';
|
|
14254
|
-
return t2 && (i2 += ' title="' +
|
|
14597
|
+
return t2 && (i2 += ' title="' + T(t2) + '"'), i2 += ">" + s2 + "</a>", i2;
|
|
14255
14598
|
}
|
|
14256
14599
|
image({ href: e2, title: t2, text: n, tokens: s2 }) {
|
|
14257
14600
|
s2 && (n = this.parser.parseInline(s2, this.parser.textRenderer));
|
|
14258
|
-
let r2 =
|
|
14259
|
-
if (r2 === null) return
|
|
14601
|
+
let r2 = Y(e2);
|
|
14602
|
+
if (r2 === null) return T(n);
|
|
14260
14603
|
e2 = r2;
|
|
14261
|
-
let i2 = `<img src="${e2}" alt="${
|
|
14262
|
-
return t2 && (i2 += ` title="${
|
|
14604
|
+
let i2 = `<img src="${e2}" alt="${T(n)}"`;
|
|
14605
|
+
return t2 && (i2 += ` title="${T(t2)}"`), i2 += ">", i2;
|
|
14263
14606
|
}
|
|
14264
14607
|
text(e2) {
|
|
14265
|
-
return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text :
|
|
14608
|
+
return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : T(e2.text);
|
|
14266
14609
|
}
|
|
14267
14610
|
};
|
|
14268
14611
|
L = class {
|
|
@@ -14302,7 +14645,7 @@ ${e2}</tr>
|
|
|
14302
14645
|
renderer;
|
|
14303
14646
|
textRenderer;
|
|
14304
14647
|
constructor(e2) {
|
|
14305
|
-
this.options = e2 ||
|
|
14648
|
+
this.options = e2 || R, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
|
|
14306
14649
|
}
|
|
14307
14650
|
static parse(e2, t2) {
|
|
14308
14651
|
return new l2(t2).parse(e2);
|
|
@@ -14317,7 +14660,7 @@ ${e2}</tr>
|
|
|
14317
14660
|
let s2 = e2[n];
|
|
14318
14661
|
if (this.options.extensions?.renderers?.[s2.type]) {
|
|
14319
14662
|
let i2 = s2, o = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
|
|
14320
|
-
if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
|
|
14663
|
+
if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(i2.type)) {
|
|
14321
14664
|
t2 += o || "";
|
|
14322
14665
|
continue;
|
|
14323
14666
|
}
|
|
@@ -14388,7 +14731,7 @@ ${e2}</tr>
|
|
|
14388
14731
|
let r2 = e2[s2];
|
|
14389
14732
|
if (this.options.extensions?.renderers?.[r2.type]) {
|
|
14390
14733
|
let o = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
|
|
14391
|
-
if (o !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
|
|
14734
|
+
if (o !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
|
|
14392
14735
|
n += o || "";
|
|
14393
14736
|
continue;
|
|
14394
14737
|
}
|
|
@@ -14449,11 +14792,11 @@ ${e2}</tr>
|
|
|
14449
14792
|
return n;
|
|
14450
14793
|
}
|
|
14451
14794
|
};
|
|
14452
|
-
|
|
14795
|
+
S2 = class {
|
|
14453
14796
|
options;
|
|
14454
14797
|
block;
|
|
14455
14798
|
constructor(e2) {
|
|
14456
|
-
this.options = e2 ||
|
|
14799
|
+
this.options = e2 || R;
|
|
14457
14800
|
}
|
|
14458
14801
|
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
14459
14802
|
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
@@ -14476,17 +14819,17 @@ ${e2}</tr>
|
|
|
14476
14819
|
return e2 ? b.parse : b.parseInline;
|
|
14477
14820
|
}
|
|
14478
14821
|
};
|
|
14479
|
-
|
|
14480
|
-
defaults =
|
|
14822
|
+
Z2 = class {
|
|
14823
|
+
defaults = A2();
|
|
14481
14824
|
options = this.setOptions;
|
|
14482
14825
|
parse = this.parseMarkdown(true);
|
|
14483
14826
|
parseInline = this.parseMarkdown(false);
|
|
14484
14827
|
Parser = b;
|
|
14485
|
-
Renderer =
|
|
14828
|
+
Renderer = P;
|
|
14486
14829
|
TextRenderer = L;
|
|
14487
14830
|
Lexer = x2;
|
|
14488
|
-
Tokenizer =
|
|
14489
|
-
Hooks =
|
|
14831
|
+
Tokenizer = y;
|
|
14832
|
+
Hooks = S2;
|
|
14490
14833
|
constructor(...e2) {
|
|
14491
14834
|
this.use(...e2);
|
|
14492
14835
|
}
|
|
@@ -14534,7 +14877,7 @@ ${e2}</tr>
|
|
|
14534
14877
|
}
|
|
14535
14878
|
"childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
|
|
14536
14879
|
}), s2.extensions = t2), n.renderer) {
|
|
14537
|
-
let r2 = this.defaults.renderer || new
|
|
14880
|
+
let r2 = this.defaults.renderer || new P(this.defaults);
|
|
14538
14881
|
for (let i2 in n.renderer) {
|
|
14539
14882
|
if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
|
|
14540
14883
|
if (["options", "parser"].includes(i2)) continue;
|
|
@@ -14547,7 +14890,7 @@ ${e2}</tr>
|
|
|
14547
14890
|
s2.renderer = r2;
|
|
14548
14891
|
}
|
|
14549
14892
|
if (n.tokenizer) {
|
|
14550
|
-
let r2 = this.defaults.tokenizer || new
|
|
14893
|
+
let r2 = this.defaults.tokenizer || new y(this.defaults);
|
|
14551
14894
|
for (let i2 in n.tokenizer) {
|
|
14552
14895
|
if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
|
|
14553
14896
|
if (["options", "rules", "lexer"].includes(i2)) continue;
|
|
@@ -14560,13 +14903,13 @@ ${e2}</tr>
|
|
|
14560
14903
|
s2.tokenizer = r2;
|
|
14561
14904
|
}
|
|
14562
14905
|
if (n.hooks) {
|
|
14563
|
-
let r2 = this.defaults.hooks || new
|
|
14906
|
+
let r2 = this.defaults.hooks || new S2();
|
|
14564
14907
|
for (let i2 in n.hooks) {
|
|
14565
14908
|
if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
|
|
14566
14909
|
if (["options", "block"].includes(i2)) continue;
|
|
14567
14910
|
let o = i2, u = n.hooks[o], a = r2[o];
|
|
14568
|
-
|
|
14569
|
-
if (this.defaults.async &&
|
|
14911
|
+
S2.passThroughHooks.has(i2) ? r2[o] = (p) => {
|
|
14912
|
+
if (this.defaults.async && S2.passThroughHooksRespectAsync.has(i2)) return (async () => {
|
|
14570
14913
|
let h2 = await u.call(r2, p);
|
|
14571
14914
|
return a.call(r2, h2);
|
|
14572
14915
|
})();
|
|
@@ -14611,8 +14954,8 @@ ${e2}</tr>
|
|
|
14611
14954
|
if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
|
|
14612
14955
|
let u = i2.hooks ? await i2.hooks.preprocess(n) : n, p = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, i2), c = i2.hooks ? await i2.hooks.processAllTokens(p) : p;
|
|
14613
14956
|
i2.walkTokens && await Promise.all(this.walkTokens(c, i2.walkTokens));
|
|
14614
|
-
let
|
|
14615
|
-
return i2.hooks ? await i2.hooks.postprocess(
|
|
14957
|
+
let d = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c, i2);
|
|
14958
|
+
return i2.hooks ? await i2.hooks.postprocess(d) : d;
|
|
14616
14959
|
})().catch(o);
|
|
14617
14960
|
try {
|
|
14618
14961
|
i2.hooks && (n = i2.hooks.preprocess(n));
|
|
@@ -14629,7 +14972,7 @@ ${e2}</tr>
|
|
|
14629
14972
|
return (n) => {
|
|
14630
14973
|
if (n.message += `
|
|
14631
14974
|
Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
14632
|
-
let s2 = "<p>An error occurred:</p><pre>" +
|
|
14975
|
+
let s2 = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
|
|
14633
14976
|
return t2 ? Promise.resolve(s2) : s2;
|
|
14634
14977
|
}
|
|
14635
14978
|
if (t2) return Promise.reject(n);
|
|
@@ -14637,35 +14980,32 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
14637
14980
|
};
|
|
14638
14981
|
}
|
|
14639
14982
|
};
|
|
14640
|
-
M = new
|
|
14641
|
-
|
|
14642
|
-
return M.setOptions(l3),
|
|
14643
|
-
};
|
|
14644
|
-
g.getDefaults = z;
|
|
14645
|
-
g.defaults = T;
|
|
14646
|
-
g.use = function(...l3) {
|
|
14647
|
-
return M.use(...l3), g.defaults = M.defaults, N(g.defaults), g;
|
|
14983
|
+
M = new Z2();
|
|
14984
|
+
f3.options = f3.setOptions = function(l3) {
|
|
14985
|
+
return M.setOptions(l3), f3.defaults = M.defaults, j(f3.defaults), f3;
|
|
14648
14986
|
};
|
|
14649
|
-
|
|
14987
|
+
f3.getDefaults = A2;
|
|
14988
|
+
f3.defaults = R;
|
|
14989
|
+
f3.use = dt;
|
|
14990
|
+
f3.walkTokens = function(l3, e2) {
|
|
14650
14991
|
return M.walkTokens(l3, e2);
|
|
14651
14992
|
};
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
tn = x2.lex;
|
|
14993
|
+
f3.parseInline = M.parseInline;
|
|
14994
|
+
f3.Parser = b;
|
|
14995
|
+
f3.parser = b.parse;
|
|
14996
|
+
f3.Renderer = P;
|
|
14997
|
+
f3.TextRenderer = L;
|
|
14998
|
+
f3.Lexer = x2;
|
|
14999
|
+
f3.lexer = x2.lex;
|
|
15000
|
+
f3.Tokenizer = y;
|
|
15001
|
+
f3.Hooks = S2;
|
|
15002
|
+
f3.parse = f3;
|
|
15003
|
+
nn = f3.options;
|
|
15004
|
+
rn = f3.setOptions;
|
|
15005
|
+
sn = f3.walkTokens;
|
|
15006
|
+
on = f3.parseInline;
|
|
15007
|
+
ln = b.parse;
|
|
15008
|
+
un = x2.lex;
|
|
14669
15009
|
}
|
|
14670
15010
|
});
|
|
14671
15011
|
|
|
@@ -14820,7 +15160,7 @@ function tokenToAdfBlock(tok) {
|
|
|
14820
15160
|
}
|
|
14821
15161
|
}
|
|
14822
15162
|
function markdownToAdf(md) {
|
|
14823
|
-
const tokens =
|
|
15163
|
+
const tokens = f3.lexer(stripFrontmatter(md ?? ""));
|
|
14824
15164
|
const content = [];
|
|
14825
15165
|
for (const tok of tokens) {
|
|
14826
15166
|
const block = tokenToAdfBlock(tok);
|
|
@@ -14836,7 +15176,7 @@ function stripLeftoverStarsFromHtml(html) {
|
|
|
14836
15176
|
return html.split(/(<code>[\s\S]*?<\/code>)/g).map((part, i2) => i2 % 2 === 1 ? part : part.replace(/\*\*/g, "")).join("");
|
|
14837
15177
|
}
|
|
14838
15178
|
function inlineToHtml(text) {
|
|
14839
|
-
const html =
|
|
15179
|
+
const html = f3.parseInline(text ?? "");
|
|
14840
15180
|
return stripLeftoverStarsFromHtml(typeof html === "string" ? html : "").replace(/<br\s*\/?>/gi, "<br/>");
|
|
14841
15181
|
}
|
|
14842
15182
|
function listItemToHtml(item) {
|
|
@@ -14883,7 +15223,7 @@ function tokenToStorageHtml(tok, nextPumlId, pumlRegistry) {
|
|
|
14883
15223
|
}
|
|
14884
15224
|
}
|
|
14885
15225
|
function markdownToStorageFormat(md) {
|
|
14886
|
-
const tokens =
|
|
15226
|
+
const tokens = f3.lexer(stripFrontmatter(md ?? ""));
|
|
14887
15227
|
const pumlRegistry = /* @__PURE__ */ new Map();
|
|
14888
15228
|
const parts = [];
|
|
14889
15229
|
let pumlCounter = 0;
|
|
@@ -14914,7 +15254,7 @@ function inferFieldFormat(type, custom3, hasAllowedValues = false) {
|
|
|
14914
15254
|
return type;
|
|
14915
15255
|
}
|
|
14916
15256
|
function inferAdfFields(fields, explicitKeys) {
|
|
14917
|
-
const fromSchema = fields.filter((
|
|
15257
|
+
const fromSchema = fields.filter((f4) => f4.inferredFormat === "adf" || f4.inferredFormat === "adf-suspect").map((f4) => f4.key);
|
|
14918
15258
|
const merged = explicitKeys?.length ? [...fromSchema, ...explicitKeys] : fromSchema;
|
|
14919
15259
|
return Array.from(new Set(merged));
|
|
14920
15260
|
}
|
|
@@ -15032,8 +15372,8 @@ var init_jira_client = __esm({
|
|
|
15032
15372
|
this.request("/field")
|
|
15033
15373
|
]);
|
|
15034
15374
|
const customFieldMap = /* @__PURE__ */ new Map();
|
|
15035
|
-
for (const
|
|
15036
|
-
customFieldMap.set(
|
|
15375
|
+
for (const f4 of fields) {
|
|
15376
|
+
customFieldMap.set(f4.id, { name: f4.name, type: f4.schema?.type || "unknown", custom: f4.schema?.custom });
|
|
15037
15377
|
}
|
|
15038
15378
|
const project = createmeta.projects?.[0];
|
|
15039
15379
|
if (!project) return { issueTypes: [] };
|
|
@@ -15396,7 +15736,7 @@ var require_errors2 = __commonJS({
|
|
|
15396
15736
|
// Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space)
|
|
15397
15737
|
EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error"
|
|
15398
15738
|
};
|
|
15399
|
-
function
|
|
15739
|
+
function E(message) {
|
|
15400
15740
|
return function(...args) {
|
|
15401
15741
|
if (args.length) {
|
|
15402
15742
|
message = message.replace(/\{(\d)\}/g, (_2, n) => args[n] || "");
|
|
@@ -15405,7 +15745,7 @@ var require_errors2 = __commonJS({
|
|
|
15405
15745
|
};
|
|
15406
15746
|
}
|
|
15407
15747
|
for (const msg of Object.keys(errors)) {
|
|
15408
|
-
exports[msg] =
|
|
15748
|
+
exports[msg] = E(errors[msg]);
|
|
15409
15749
|
}
|
|
15410
15750
|
}
|
|
15411
15751
|
});
|
|
@@ -15421,7 +15761,7 @@ var require_utils2 = __commonJS({
|
|
|
15421
15761
|
var isWin = typeof process === "object" && "win32" === process.platform;
|
|
15422
15762
|
var is_Obj = (obj) => typeof obj === "object" && obj !== null;
|
|
15423
15763
|
var crcTable = new Uint32Array(256).map((t2, c) => {
|
|
15424
|
-
for (let
|
|
15764
|
+
for (let k2 = 0; k2 < 8; k2++) {
|
|
15425
15765
|
if ((c & 1) !== 0) {
|
|
15426
15766
|
c = 3988292384 ^ c >>> 1;
|
|
15427
15767
|
} else {
|
|
@@ -16300,8 +16640,8 @@ var require_zipcrypto = __commonJS({
|
|
|
16300
16640
|
return byteValue;
|
|
16301
16641
|
};
|
|
16302
16642
|
Initkeys.prototype.next = function() {
|
|
16303
|
-
const
|
|
16304
|
-
return uMul(
|
|
16643
|
+
const k2 = (this.keys[2] | 2) >>> 0;
|
|
16644
|
+
return uMul(k2, k2 ^ 1) >> 8 & 255;
|
|
16305
16645
|
};
|
|
16306
16646
|
function make_decrypter(pwd) {
|
|
16307
16647
|
const keys = new Initkeys(pwd);
|
|
@@ -16319,8 +16659,8 @@ var require_zipcrypto = __commonJS({
|
|
|
16319
16659
|
return function(data, result, pos = 0) {
|
|
16320
16660
|
if (!result) result = Buffer.alloc(data.length);
|
|
16321
16661
|
for (let c of data) {
|
|
16322
|
-
const
|
|
16323
|
-
result[pos++] = c ^
|
|
16662
|
+
const k2 = keys.next();
|
|
16663
|
+
result[pos++] = c ^ k2;
|
|
16324
16664
|
keys.updateKeys(c);
|
|
16325
16665
|
}
|
|
16326
16666
|
return result;
|
|
@@ -18098,169 +18438,169 @@ var require_md5 = __commonJS({
|
|
|
18098
18438
|
this.hash();
|
|
18099
18439
|
};
|
|
18100
18440
|
Md5.prototype.hash = function() {
|
|
18101
|
-
var a, b2, c,
|
|
18441
|
+
var a, b2, c, d, bc, da, blocks2 = this.blocks;
|
|
18102
18442
|
if (this.first) {
|
|
18103
18443
|
a = blocks2[0] - 680876937;
|
|
18104
18444
|
a = (a << 7 | a >>> 25) - 271733879 << 0;
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
c = (-271733879 ^
|
|
18108
|
-
c = (c << 17 | c >>> 15) +
|
|
18109
|
-
b2 = (a ^ c & (
|
|
18445
|
+
d = (-1732584194 ^ a & 2004318071) + blocks2[1] - 117830708;
|
|
18446
|
+
d = (d << 12 | d >>> 20) + a << 0;
|
|
18447
|
+
c = (-271733879 ^ d & (a ^ -271733879)) + blocks2[2] - 1126478375;
|
|
18448
|
+
c = (c << 17 | c >>> 15) + d << 0;
|
|
18449
|
+
b2 = (a ^ c & (d ^ a)) + blocks2[3] - 1316259209;
|
|
18110
18450
|
b2 = (b2 << 22 | b2 >>> 10) + c << 0;
|
|
18111
18451
|
} else {
|
|
18112
18452
|
a = this.h0;
|
|
18113
18453
|
b2 = this.h1;
|
|
18114
18454
|
c = this.h2;
|
|
18115
|
-
|
|
18116
|
-
a += (
|
|
18455
|
+
d = this.h3;
|
|
18456
|
+
a += (d ^ b2 & (c ^ d)) + blocks2[0] - 680876936;
|
|
18117
18457
|
a = (a << 7 | a >>> 25) + b2 << 0;
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
c += (b2 ^
|
|
18121
|
-
c = (c << 17 | c >>> 15) +
|
|
18122
|
-
b2 += (a ^ c & (
|
|
18458
|
+
d += (c ^ a & (b2 ^ c)) + blocks2[1] - 389564586;
|
|
18459
|
+
d = (d << 12 | d >>> 20) + a << 0;
|
|
18460
|
+
c += (b2 ^ d & (a ^ b2)) + blocks2[2] + 606105819;
|
|
18461
|
+
c = (c << 17 | c >>> 15) + d << 0;
|
|
18462
|
+
b2 += (a ^ c & (d ^ a)) + blocks2[3] - 1044525330;
|
|
18123
18463
|
b2 = (b2 << 22 | b2 >>> 10) + c << 0;
|
|
18124
18464
|
}
|
|
18125
|
-
a += (
|
|
18465
|
+
a += (d ^ b2 & (c ^ d)) + blocks2[4] - 176418897;
|
|
18126
18466
|
a = (a << 7 | a >>> 25) + b2 << 0;
|
|
18127
|
-
|
|
18128
|
-
|
|
18129
|
-
c += (b2 ^
|
|
18130
|
-
c = (c << 17 | c >>> 15) +
|
|
18131
|
-
b2 += (a ^ c & (
|
|
18467
|
+
d += (c ^ a & (b2 ^ c)) + blocks2[5] + 1200080426;
|
|
18468
|
+
d = (d << 12 | d >>> 20) + a << 0;
|
|
18469
|
+
c += (b2 ^ d & (a ^ b2)) + blocks2[6] - 1473231341;
|
|
18470
|
+
c = (c << 17 | c >>> 15) + d << 0;
|
|
18471
|
+
b2 += (a ^ c & (d ^ a)) + blocks2[7] - 45705983;
|
|
18132
18472
|
b2 = (b2 << 22 | b2 >>> 10) + c << 0;
|
|
18133
|
-
a += (
|
|
18473
|
+
a += (d ^ b2 & (c ^ d)) + blocks2[8] + 1770035416;
|
|
18134
18474
|
a = (a << 7 | a >>> 25) + b2 << 0;
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
c += (b2 ^
|
|
18138
|
-
c = (c << 17 | c >>> 15) +
|
|
18139
|
-
b2 += (a ^ c & (
|
|
18475
|
+
d += (c ^ a & (b2 ^ c)) + blocks2[9] - 1958414417;
|
|
18476
|
+
d = (d << 12 | d >>> 20) + a << 0;
|
|
18477
|
+
c += (b2 ^ d & (a ^ b2)) + blocks2[10] - 42063;
|
|
18478
|
+
c = (c << 17 | c >>> 15) + d << 0;
|
|
18479
|
+
b2 += (a ^ c & (d ^ a)) + blocks2[11] - 1990404162;
|
|
18140
18480
|
b2 = (b2 << 22 | b2 >>> 10) + c << 0;
|
|
18141
|
-
a += (
|
|
18481
|
+
a += (d ^ b2 & (c ^ d)) + blocks2[12] + 1804603682;
|
|
18142
18482
|
a = (a << 7 | a >>> 25) + b2 << 0;
|
|
18143
|
-
|
|
18144
|
-
|
|
18145
|
-
c += (b2 ^
|
|
18146
|
-
c = (c << 17 | c >>> 15) +
|
|
18147
|
-
b2 += (a ^ c & (
|
|
18483
|
+
d += (c ^ a & (b2 ^ c)) + blocks2[13] - 40341101;
|
|
18484
|
+
d = (d << 12 | d >>> 20) + a << 0;
|
|
18485
|
+
c += (b2 ^ d & (a ^ b2)) + blocks2[14] - 1502002290;
|
|
18486
|
+
c = (c << 17 | c >>> 15) + d << 0;
|
|
18487
|
+
b2 += (a ^ c & (d ^ a)) + blocks2[15] + 1236535329;
|
|
18148
18488
|
b2 = (b2 << 22 | b2 >>> 10) + c << 0;
|
|
18149
|
-
a += (c ^
|
|
18489
|
+
a += (c ^ d & (b2 ^ c)) + blocks2[1] - 165796510;
|
|
18150
18490
|
a = (a << 5 | a >>> 27) + b2 << 0;
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
c += (a ^ b2 & (
|
|
18154
|
-
c = (c << 14 | c >>> 18) +
|
|
18155
|
-
b2 += (
|
|
18491
|
+
d += (b2 ^ c & (a ^ b2)) + blocks2[6] - 1069501632;
|
|
18492
|
+
d = (d << 9 | d >>> 23) + a << 0;
|
|
18493
|
+
c += (a ^ b2 & (d ^ a)) + blocks2[11] + 643717713;
|
|
18494
|
+
c = (c << 14 | c >>> 18) + d << 0;
|
|
18495
|
+
b2 += (d ^ a & (c ^ d)) + blocks2[0] - 373897302;
|
|
18156
18496
|
b2 = (b2 << 20 | b2 >>> 12) + c << 0;
|
|
18157
|
-
a += (c ^
|
|
18497
|
+
a += (c ^ d & (b2 ^ c)) + blocks2[5] - 701558691;
|
|
18158
18498
|
a = (a << 5 | a >>> 27) + b2 << 0;
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
c += (a ^ b2 & (
|
|
18162
|
-
c = (c << 14 | c >>> 18) +
|
|
18163
|
-
b2 += (
|
|
18499
|
+
d += (b2 ^ c & (a ^ b2)) + blocks2[10] + 38016083;
|
|
18500
|
+
d = (d << 9 | d >>> 23) + a << 0;
|
|
18501
|
+
c += (a ^ b2 & (d ^ a)) + blocks2[15] - 660478335;
|
|
18502
|
+
c = (c << 14 | c >>> 18) + d << 0;
|
|
18503
|
+
b2 += (d ^ a & (c ^ d)) + blocks2[4] - 405537848;
|
|
18164
18504
|
b2 = (b2 << 20 | b2 >>> 12) + c << 0;
|
|
18165
|
-
a += (c ^
|
|
18505
|
+
a += (c ^ d & (b2 ^ c)) + blocks2[9] + 568446438;
|
|
18166
18506
|
a = (a << 5 | a >>> 27) + b2 << 0;
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
c += (a ^ b2 & (
|
|
18170
|
-
c = (c << 14 | c >>> 18) +
|
|
18171
|
-
b2 += (
|
|
18507
|
+
d += (b2 ^ c & (a ^ b2)) + blocks2[14] - 1019803690;
|
|
18508
|
+
d = (d << 9 | d >>> 23) + a << 0;
|
|
18509
|
+
c += (a ^ b2 & (d ^ a)) + blocks2[3] - 187363961;
|
|
18510
|
+
c = (c << 14 | c >>> 18) + d << 0;
|
|
18511
|
+
b2 += (d ^ a & (c ^ d)) + blocks2[8] + 1163531501;
|
|
18172
18512
|
b2 = (b2 << 20 | b2 >>> 12) + c << 0;
|
|
18173
|
-
a += (c ^
|
|
18513
|
+
a += (c ^ d & (b2 ^ c)) + blocks2[13] - 1444681467;
|
|
18174
18514
|
a = (a << 5 | a >>> 27) + b2 << 0;
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
c += (a ^ b2 & (
|
|
18178
|
-
c = (c << 14 | c >>> 18) +
|
|
18179
|
-
b2 += (
|
|
18515
|
+
d += (b2 ^ c & (a ^ b2)) + blocks2[2] - 51403784;
|
|
18516
|
+
d = (d << 9 | d >>> 23) + a << 0;
|
|
18517
|
+
c += (a ^ b2 & (d ^ a)) + blocks2[7] + 1735328473;
|
|
18518
|
+
c = (c << 14 | c >>> 18) + d << 0;
|
|
18519
|
+
b2 += (d ^ a & (c ^ d)) + blocks2[12] - 1926607734;
|
|
18180
18520
|
b2 = (b2 << 20 | b2 >>> 12) + c << 0;
|
|
18181
18521
|
bc = b2 ^ c;
|
|
18182
|
-
a += (bc ^
|
|
18522
|
+
a += (bc ^ d) + blocks2[5] - 378558;
|
|
18183
18523
|
a = (a << 4 | a >>> 28) + b2 << 0;
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
da =
|
|
18524
|
+
d += (bc ^ a) + blocks2[8] - 2022574463;
|
|
18525
|
+
d = (d << 11 | d >>> 21) + a << 0;
|
|
18526
|
+
da = d ^ a;
|
|
18187
18527
|
c += (da ^ b2) + blocks2[11] + 1839030562;
|
|
18188
|
-
c = (c << 16 | c >>> 16) +
|
|
18528
|
+
c = (c << 16 | c >>> 16) + d << 0;
|
|
18189
18529
|
b2 += (da ^ c) + blocks2[14] - 35309556;
|
|
18190
18530
|
b2 = (b2 << 23 | b2 >>> 9) + c << 0;
|
|
18191
18531
|
bc = b2 ^ c;
|
|
18192
|
-
a += (bc ^
|
|
18532
|
+
a += (bc ^ d) + blocks2[1] - 1530992060;
|
|
18193
18533
|
a = (a << 4 | a >>> 28) + b2 << 0;
|
|
18194
|
-
|
|
18195
|
-
|
|
18196
|
-
da =
|
|
18534
|
+
d += (bc ^ a) + blocks2[4] + 1272893353;
|
|
18535
|
+
d = (d << 11 | d >>> 21) + a << 0;
|
|
18536
|
+
da = d ^ a;
|
|
18197
18537
|
c += (da ^ b2) + blocks2[7] - 155497632;
|
|
18198
|
-
c = (c << 16 | c >>> 16) +
|
|
18538
|
+
c = (c << 16 | c >>> 16) + d << 0;
|
|
18199
18539
|
b2 += (da ^ c) + blocks2[10] - 1094730640;
|
|
18200
18540
|
b2 = (b2 << 23 | b2 >>> 9) + c << 0;
|
|
18201
18541
|
bc = b2 ^ c;
|
|
18202
|
-
a += (bc ^
|
|
18542
|
+
a += (bc ^ d) + blocks2[13] + 681279174;
|
|
18203
18543
|
a = (a << 4 | a >>> 28) + b2 << 0;
|
|
18204
|
-
|
|
18205
|
-
|
|
18206
|
-
da =
|
|
18544
|
+
d += (bc ^ a) + blocks2[0] - 358537222;
|
|
18545
|
+
d = (d << 11 | d >>> 21) + a << 0;
|
|
18546
|
+
da = d ^ a;
|
|
18207
18547
|
c += (da ^ b2) + blocks2[3] - 722521979;
|
|
18208
|
-
c = (c << 16 | c >>> 16) +
|
|
18548
|
+
c = (c << 16 | c >>> 16) + d << 0;
|
|
18209
18549
|
b2 += (da ^ c) + blocks2[6] + 76029189;
|
|
18210
18550
|
b2 = (b2 << 23 | b2 >>> 9) + c << 0;
|
|
18211
18551
|
bc = b2 ^ c;
|
|
18212
|
-
a += (bc ^
|
|
18552
|
+
a += (bc ^ d) + blocks2[9] - 640364487;
|
|
18213
18553
|
a = (a << 4 | a >>> 28) + b2 << 0;
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
da =
|
|
18554
|
+
d += (bc ^ a) + blocks2[12] - 421815835;
|
|
18555
|
+
d = (d << 11 | d >>> 21) + a << 0;
|
|
18556
|
+
da = d ^ a;
|
|
18217
18557
|
c += (da ^ b2) + blocks2[15] + 530742520;
|
|
18218
|
-
c = (c << 16 | c >>> 16) +
|
|
18558
|
+
c = (c << 16 | c >>> 16) + d << 0;
|
|
18219
18559
|
b2 += (da ^ c) + blocks2[2] - 995338651;
|
|
18220
18560
|
b2 = (b2 << 23 | b2 >>> 9) + c << 0;
|
|
18221
|
-
a += (c ^ (b2 | ~
|
|
18561
|
+
a += (c ^ (b2 | ~d)) + blocks2[0] - 198630844;
|
|
18222
18562
|
a = (a << 6 | a >>> 26) + b2 << 0;
|
|
18223
|
-
|
|
18224
|
-
|
|
18225
|
-
c += (a ^ (
|
|
18226
|
-
c = (c << 15 | c >>> 17) +
|
|
18227
|
-
b2 += (
|
|
18563
|
+
d += (b2 ^ (a | ~c)) + blocks2[7] + 1126891415;
|
|
18564
|
+
d = (d << 10 | d >>> 22) + a << 0;
|
|
18565
|
+
c += (a ^ (d | ~b2)) + blocks2[14] - 1416354905;
|
|
18566
|
+
c = (c << 15 | c >>> 17) + d << 0;
|
|
18567
|
+
b2 += (d ^ (c | ~a)) + blocks2[5] - 57434055;
|
|
18228
18568
|
b2 = (b2 << 21 | b2 >>> 11) + c << 0;
|
|
18229
|
-
a += (c ^ (b2 | ~
|
|
18569
|
+
a += (c ^ (b2 | ~d)) + blocks2[12] + 1700485571;
|
|
18230
18570
|
a = (a << 6 | a >>> 26) + b2 << 0;
|
|
18231
|
-
|
|
18232
|
-
|
|
18233
|
-
c += (a ^ (
|
|
18234
|
-
c = (c << 15 | c >>> 17) +
|
|
18235
|
-
b2 += (
|
|
18571
|
+
d += (b2 ^ (a | ~c)) + blocks2[3] - 1894986606;
|
|
18572
|
+
d = (d << 10 | d >>> 22) + a << 0;
|
|
18573
|
+
c += (a ^ (d | ~b2)) + blocks2[10] - 1051523;
|
|
18574
|
+
c = (c << 15 | c >>> 17) + d << 0;
|
|
18575
|
+
b2 += (d ^ (c | ~a)) + blocks2[1] - 2054922799;
|
|
18236
18576
|
b2 = (b2 << 21 | b2 >>> 11) + c << 0;
|
|
18237
|
-
a += (c ^ (b2 | ~
|
|
18577
|
+
a += (c ^ (b2 | ~d)) + blocks2[8] + 1873313359;
|
|
18238
18578
|
a = (a << 6 | a >>> 26) + b2 << 0;
|
|
18239
|
-
|
|
18240
|
-
|
|
18241
|
-
c += (a ^ (
|
|
18242
|
-
c = (c << 15 | c >>> 17) +
|
|
18243
|
-
b2 += (
|
|
18579
|
+
d += (b2 ^ (a | ~c)) + blocks2[15] - 30611744;
|
|
18580
|
+
d = (d << 10 | d >>> 22) + a << 0;
|
|
18581
|
+
c += (a ^ (d | ~b2)) + blocks2[6] - 1560198380;
|
|
18582
|
+
c = (c << 15 | c >>> 17) + d << 0;
|
|
18583
|
+
b2 += (d ^ (c | ~a)) + blocks2[13] + 1309151649;
|
|
18244
18584
|
b2 = (b2 << 21 | b2 >>> 11) + c << 0;
|
|
18245
|
-
a += (c ^ (b2 | ~
|
|
18585
|
+
a += (c ^ (b2 | ~d)) + blocks2[4] - 145523070;
|
|
18246
18586
|
a = (a << 6 | a >>> 26) + b2 << 0;
|
|
18247
|
-
|
|
18248
|
-
|
|
18249
|
-
c += (a ^ (
|
|
18250
|
-
c = (c << 15 | c >>> 17) +
|
|
18251
|
-
b2 += (
|
|
18587
|
+
d += (b2 ^ (a | ~c)) + blocks2[11] - 1120210379;
|
|
18588
|
+
d = (d << 10 | d >>> 22) + a << 0;
|
|
18589
|
+
c += (a ^ (d | ~b2)) + blocks2[2] + 718787259;
|
|
18590
|
+
c = (c << 15 | c >>> 17) + d << 0;
|
|
18591
|
+
b2 += (d ^ (c | ~a)) + blocks2[9] - 343485551;
|
|
18252
18592
|
b2 = (b2 << 21 | b2 >>> 11) + c << 0;
|
|
18253
18593
|
if (this.first) {
|
|
18254
18594
|
this.h0 = a + 1732584193 << 0;
|
|
18255
18595
|
this.h1 = b2 - 271733879 << 0;
|
|
18256
18596
|
this.h2 = c - 1732584194 << 0;
|
|
18257
|
-
this.h3 =
|
|
18597
|
+
this.h3 = d + 271733878 << 0;
|
|
18258
18598
|
this.first = false;
|
|
18259
18599
|
} else {
|
|
18260
18600
|
this.h0 = this.h0 + a << 0;
|
|
18261
18601
|
this.h1 = this.h1 + b2 << 0;
|
|
18262
18602
|
this.h2 = this.h2 + c << 0;
|
|
18263
|
-
this.h3 = this.h3 +
|
|
18603
|
+
this.h3 = this.h3 + d << 0;
|
|
18264
18604
|
}
|
|
18265
18605
|
};
|
|
18266
18606
|
Md5.prototype.hex = function() {
|
|
@@ -18544,19 +18884,19 @@ var require_tiny_inflate = __commonJS({
|
|
|
18544
18884
|
sum += 1 << bits[i2];
|
|
18545
18885
|
}
|
|
18546
18886
|
}
|
|
18547
|
-
function tinf_build_fixed_trees(
|
|
18887
|
+
function tinf_build_fixed_trees(lt2, dt2) {
|
|
18548
18888
|
var i2;
|
|
18549
|
-
for (i2 = 0; i2 < 7; ++i2)
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
for (i2 = 0; i2 < 24; ++i2)
|
|
18554
|
-
for (i2 = 0; i2 < 144; ++i2)
|
|
18555
|
-
for (i2 = 0; i2 < 8; ++i2)
|
|
18556
|
-
for (i2 = 0; i2 < 112; ++i2)
|
|
18557
|
-
for (i2 = 0; i2 < 5; ++i2)
|
|
18558
|
-
|
|
18559
|
-
for (i2 = 0; i2 < 32; ++i2)
|
|
18889
|
+
for (i2 = 0; i2 < 7; ++i2) lt2.table[i2] = 0;
|
|
18890
|
+
lt2.table[7] = 24;
|
|
18891
|
+
lt2.table[8] = 152;
|
|
18892
|
+
lt2.table[9] = 112;
|
|
18893
|
+
for (i2 = 0; i2 < 24; ++i2) lt2.trans[i2] = 256 + i2;
|
|
18894
|
+
for (i2 = 0; i2 < 144; ++i2) lt2.trans[24 + i2] = i2;
|
|
18895
|
+
for (i2 = 0; i2 < 8; ++i2) lt2.trans[24 + 144 + i2] = 280 + i2;
|
|
18896
|
+
for (i2 = 0; i2 < 112; ++i2) lt2.trans[24 + 144 + 8 + i2] = 144 + i2;
|
|
18897
|
+
for (i2 = 0; i2 < 5; ++i2) dt2.table[i2] = 0;
|
|
18898
|
+
dt2.table[5] = 32;
|
|
18899
|
+
for (i2 = 0; i2 < 32; ++i2) dt2.trans[i2] = i2;
|
|
18560
18900
|
}
|
|
18561
18901
|
var offs = new Uint16Array(16);
|
|
18562
18902
|
function tinf_build_tree(t2, lengths2, off, num) {
|
|
@@ -18572,34 +18912,34 @@ var require_tiny_inflate = __commonJS({
|
|
|
18572
18912
|
if (lengths2[off + i2]) t2.trans[offs[lengths2[off + i2]]++] = i2;
|
|
18573
18913
|
}
|
|
18574
18914
|
}
|
|
18575
|
-
function tinf_getbit(
|
|
18576
|
-
if (!
|
|
18577
|
-
|
|
18578
|
-
|
|
18915
|
+
function tinf_getbit(d) {
|
|
18916
|
+
if (!d.bitcount--) {
|
|
18917
|
+
d.tag = d.source[d.sourceIndex++];
|
|
18918
|
+
d.bitcount = 7;
|
|
18579
18919
|
}
|
|
18580
|
-
var bit =
|
|
18581
|
-
|
|
18920
|
+
var bit = d.tag & 1;
|
|
18921
|
+
d.tag >>>= 1;
|
|
18582
18922
|
return bit;
|
|
18583
18923
|
}
|
|
18584
|
-
function tinf_read_bits(
|
|
18924
|
+
function tinf_read_bits(d, num, base) {
|
|
18585
18925
|
if (!num)
|
|
18586
18926
|
return base;
|
|
18587
|
-
while (
|
|
18588
|
-
|
|
18589
|
-
|
|
18927
|
+
while (d.bitcount < 24) {
|
|
18928
|
+
d.tag |= d.source[d.sourceIndex++] << d.bitcount;
|
|
18929
|
+
d.bitcount += 8;
|
|
18590
18930
|
}
|
|
18591
|
-
var val =
|
|
18592
|
-
|
|
18593
|
-
|
|
18931
|
+
var val = d.tag & 65535 >>> 16 - num;
|
|
18932
|
+
d.tag >>>= num;
|
|
18933
|
+
d.bitcount -= num;
|
|
18594
18934
|
return val + base;
|
|
18595
18935
|
}
|
|
18596
|
-
function tinf_decode_symbol(
|
|
18597
|
-
while (
|
|
18598
|
-
|
|
18599
|
-
|
|
18936
|
+
function tinf_decode_symbol(d, t2) {
|
|
18937
|
+
while (d.bitcount < 24) {
|
|
18938
|
+
d.tag |= d.source[d.sourceIndex++] << d.bitcount;
|
|
18939
|
+
d.bitcount += 8;
|
|
18600
18940
|
}
|
|
18601
18941
|
var sum = 0, cur = 0, len = 0;
|
|
18602
|
-
var tag =
|
|
18942
|
+
var tag = d.tag;
|
|
18603
18943
|
do {
|
|
18604
18944
|
cur = 2 * cur + (tag & 1);
|
|
18605
18945
|
tag >>>= 1;
|
|
@@ -18607,38 +18947,38 @@ var require_tiny_inflate = __commonJS({
|
|
|
18607
18947
|
sum += t2.table[len];
|
|
18608
18948
|
cur -= t2.table[len];
|
|
18609
18949
|
} while (cur >= 0);
|
|
18610
|
-
|
|
18611
|
-
|
|
18950
|
+
d.tag = tag;
|
|
18951
|
+
d.bitcount -= len;
|
|
18612
18952
|
return t2.trans[sum + cur];
|
|
18613
18953
|
}
|
|
18614
|
-
function tinf_decode_trees(
|
|
18954
|
+
function tinf_decode_trees(d, lt2, dt2) {
|
|
18615
18955
|
var hlit, hdist, hclen;
|
|
18616
18956
|
var i2, num, length;
|
|
18617
|
-
hlit = tinf_read_bits(
|
|
18618
|
-
hdist = tinf_read_bits(
|
|
18619
|
-
hclen = tinf_read_bits(
|
|
18957
|
+
hlit = tinf_read_bits(d, 5, 257);
|
|
18958
|
+
hdist = tinf_read_bits(d, 5, 1);
|
|
18959
|
+
hclen = tinf_read_bits(d, 4, 4);
|
|
18620
18960
|
for (i2 = 0; i2 < 19; ++i2) lengths[i2] = 0;
|
|
18621
18961
|
for (i2 = 0; i2 < hclen; ++i2) {
|
|
18622
|
-
var clen = tinf_read_bits(
|
|
18962
|
+
var clen = tinf_read_bits(d, 3, 0);
|
|
18623
18963
|
lengths[clcidx[i2]] = clen;
|
|
18624
18964
|
}
|
|
18625
18965
|
tinf_build_tree(code_tree, lengths, 0, 19);
|
|
18626
18966
|
for (num = 0; num < hlit + hdist; ) {
|
|
18627
|
-
var sym = tinf_decode_symbol(
|
|
18967
|
+
var sym = tinf_decode_symbol(d, code_tree);
|
|
18628
18968
|
switch (sym) {
|
|
18629
18969
|
case 16:
|
|
18630
18970
|
var prev = lengths[num - 1];
|
|
18631
|
-
for (length = tinf_read_bits(
|
|
18971
|
+
for (length = tinf_read_bits(d, 2, 3); length; --length) {
|
|
18632
18972
|
lengths[num++] = prev;
|
|
18633
18973
|
}
|
|
18634
18974
|
break;
|
|
18635
18975
|
case 17:
|
|
18636
|
-
for (length = tinf_read_bits(
|
|
18976
|
+
for (length = tinf_read_bits(d, 3, 3); length; --length) {
|
|
18637
18977
|
lengths[num++] = 0;
|
|
18638
18978
|
}
|
|
18639
18979
|
break;
|
|
18640
18980
|
case 18:
|
|
18641
|
-
for (length = tinf_read_bits(
|
|
18981
|
+
for (length = tinf_read_bits(d, 7, 11); length; --length) {
|
|
18642
18982
|
lengths[num++] = 0;
|
|
18643
18983
|
}
|
|
18644
18984
|
break;
|
|
@@ -18647,65 +18987,65 @@ var require_tiny_inflate = __commonJS({
|
|
|
18647
18987
|
break;
|
|
18648
18988
|
}
|
|
18649
18989
|
}
|
|
18650
|
-
tinf_build_tree(
|
|
18651
|
-
tinf_build_tree(
|
|
18990
|
+
tinf_build_tree(lt2, lengths, 0, hlit);
|
|
18991
|
+
tinf_build_tree(dt2, lengths, hlit, hdist);
|
|
18652
18992
|
}
|
|
18653
|
-
function tinf_inflate_block_data(
|
|
18993
|
+
function tinf_inflate_block_data(d, lt2, dt2) {
|
|
18654
18994
|
while (1) {
|
|
18655
|
-
var sym = tinf_decode_symbol(
|
|
18995
|
+
var sym = tinf_decode_symbol(d, lt2);
|
|
18656
18996
|
if (sym === 256) {
|
|
18657
18997
|
return TINF_OK;
|
|
18658
18998
|
}
|
|
18659
18999
|
if (sym < 256) {
|
|
18660
|
-
|
|
19000
|
+
d.dest[d.destLen++] = sym;
|
|
18661
19001
|
} else {
|
|
18662
19002
|
var length, dist, offs2;
|
|
18663
19003
|
var i2;
|
|
18664
19004
|
sym -= 257;
|
|
18665
|
-
length = tinf_read_bits(
|
|
18666
|
-
dist = tinf_decode_symbol(
|
|
18667
|
-
offs2 =
|
|
19005
|
+
length = tinf_read_bits(d, length_bits[sym], length_base[sym]);
|
|
19006
|
+
dist = tinf_decode_symbol(d, dt2);
|
|
19007
|
+
offs2 = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);
|
|
18668
19008
|
for (i2 = offs2; i2 < offs2 + length; ++i2) {
|
|
18669
|
-
|
|
19009
|
+
d.dest[d.destLen++] = d.dest[i2];
|
|
18670
19010
|
}
|
|
18671
19011
|
}
|
|
18672
19012
|
}
|
|
18673
19013
|
}
|
|
18674
|
-
function tinf_inflate_uncompressed_block(
|
|
19014
|
+
function tinf_inflate_uncompressed_block(d) {
|
|
18675
19015
|
var length, invlength;
|
|
18676
19016
|
var i2;
|
|
18677
|
-
while (
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
}
|
|
18681
|
-
length =
|
|
18682
|
-
length = 256 * length +
|
|
18683
|
-
invlength =
|
|
18684
|
-
invlength = 256 * invlength +
|
|
19017
|
+
while (d.bitcount > 8) {
|
|
19018
|
+
d.sourceIndex--;
|
|
19019
|
+
d.bitcount -= 8;
|
|
19020
|
+
}
|
|
19021
|
+
length = d.source[d.sourceIndex + 1];
|
|
19022
|
+
length = 256 * length + d.source[d.sourceIndex];
|
|
19023
|
+
invlength = d.source[d.sourceIndex + 3];
|
|
19024
|
+
invlength = 256 * invlength + d.source[d.sourceIndex + 2];
|
|
18685
19025
|
if (length !== (~invlength & 65535))
|
|
18686
19026
|
return TINF_DATA_ERROR;
|
|
18687
|
-
|
|
19027
|
+
d.sourceIndex += 4;
|
|
18688
19028
|
for (i2 = length; i2; --i2)
|
|
18689
|
-
|
|
18690
|
-
|
|
19029
|
+
d.dest[d.destLen++] = d.source[d.sourceIndex++];
|
|
19030
|
+
d.bitcount = 0;
|
|
18691
19031
|
return TINF_OK;
|
|
18692
19032
|
}
|
|
18693
19033
|
function tinf_uncompress(source, dest) {
|
|
18694
|
-
var
|
|
19034
|
+
var d = new Data(source, dest);
|
|
18695
19035
|
var bfinal, btype, res;
|
|
18696
19036
|
do {
|
|
18697
|
-
bfinal = tinf_getbit(
|
|
18698
|
-
btype = tinf_read_bits(
|
|
19037
|
+
bfinal = tinf_getbit(d);
|
|
19038
|
+
btype = tinf_read_bits(d, 2, 0);
|
|
18699
19039
|
switch (btype) {
|
|
18700
19040
|
case 0:
|
|
18701
|
-
res = tinf_inflate_uncompressed_block(
|
|
19041
|
+
res = tinf_inflate_uncompressed_block(d);
|
|
18702
19042
|
break;
|
|
18703
19043
|
case 1:
|
|
18704
|
-
res = tinf_inflate_block_data(
|
|
19044
|
+
res = tinf_inflate_block_data(d, sltree, sdtree);
|
|
18705
19045
|
break;
|
|
18706
19046
|
case 2:
|
|
18707
|
-
tinf_decode_trees(
|
|
18708
|
-
res = tinf_inflate_block_data(
|
|
19047
|
+
tinf_decode_trees(d, d.ltree, d.dtree);
|
|
19048
|
+
res = tinf_inflate_block_data(d, d.ltree, d.dtree);
|
|
18709
19049
|
break;
|
|
18710
19050
|
default:
|
|
18711
19051
|
res = TINF_DATA_ERROR;
|
|
@@ -18713,13 +19053,13 @@ var require_tiny_inflate = __commonJS({
|
|
|
18713
19053
|
if (res !== TINF_OK)
|
|
18714
19054
|
throw new Error("Data error");
|
|
18715
19055
|
} while (!bfinal);
|
|
18716
|
-
if (
|
|
18717
|
-
if (typeof
|
|
18718
|
-
return
|
|
19056
|
+
if (d.destLen < d.dest.length) {
|
|
19057
|
+
if (typeof d.dest.slice === "function")
|
|
19058
|
+
return d.dest.slice(0, d.destLen);
|
|
18719
19059
|
else
|
|
18720
|
-
return
|
|
19060
|
+
return d.dest.subarray(0, d.destLen);
|
|
18721
19061
|
}
|
|
18722
|
-
return
|
|
19062
|
+
return d.dest;
|
|
18723
19063
|
}
|
|
18724
19064
|
tinf_build_fixed_trees(sltree, sdtree);
|
|
18725
19065
|
tinf_build_bits_base(length_bits, length_base, 4, 3);
|
|
@@ -145441,10 +145781,10 @@ var util;
|
|
|
145441
145781
|
return obj;
|
|
145442
145782
|
};
|
|
145443
145783
|
util2.getValidEnumValues = (obj) => {
|
|
145444
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
145784
|
+
const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
|
|
145445
145785
|
const filtered = {};
|
|
145446
|
-
for (const
|
|
145447
|
-
filtered[
|
|
145786
|
+
for (const k2 of validKeys) {
|
|
145787
|
+
filtered[k2] = obj[k2];
|
|
145448
145788
|
}
|
|
145449
145789
|
return util2.objectValues(filtered);
|
|
145450
145790
|
};
|
|
@@ -149365,9 +149705,9 @@ function $constructor(name, initializer3, params) {
|
|
|
149365
149705
|
(_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
|
|
149366
149706
|
inst._zod.traits.add(name);
|
|
149367
149707
|
initializer3(inst, def);
|
|
149368
|
-
for (const
|
|
149369
|
-
if (!(
|
|
149370
|
-
Object.defineProperty(inst,
|
|
149708
|
+
for (const k2 in _2.prototype) {
|
|
149709
|
+
if (!(k2 in inst))
|
|
149710
|
+
Object.defineProperty(inst, k2, { value: _2.prototype[k2].bind(inst) });
|
|
149371
149711
|
}
|
|
149372
149712
|
inst._zod.constr = _2;
|
|
149373
149713
|
inst._zod.def = def;
|
|
@@ -149477,7 +149817,7 @@ function assert(_2) {
|
|
|
149477
149817
|
}
|
|
149478
149818
|
function getEnumValues(entries) {
|
|
149479
149819
|
const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
|
|
149480
|
-
const values = Object.entries(entries).filter(([
|
|
149820
|
+
const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v2]) => v2);
|
|
149481
149821
|
return values;
|
|
149482
149822
|
}
|
|
149483
149823
|
function joinValues(array2, separator = "|") {
|
|
@@ -149724,8 +150064,8 @@ function stringifyPrimitive(value) {
|
|
|
149724
150064
|
return `${value}`;
|
|
149725
150065
|
}
|
|
149726
150066
|
function optionalKeys(shape) {
|
|
149727
|
-
return Object.keys(shape).filter((
|
|
149728
|
-
return shape[
|
|
150067
|
+
return Object.keys(shape).filter((k2) => {
|
|
150068
|
+
return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional";
|
|
149729
150069
|
});
|
|
149730
150070
|
}
|
|
149731
150071
|
var NUMBER_FORMAT_RANGES = {
|
|
@@ -149921,8 +150261,8 @@ function issue(...args) {
|
|
|
149921
150261
|
return { ...iss };
|
|
149922
150262
|
}
|
|
149923
150263
|
function cleanEnum(obj) {
|
|
149924
|
-
return Object.entries(obj).filter(([
|
|
149925
|
-
return Number.isNaN(Number.parseInt(
|
|
150264
|
+
return Object.entries(obj).filter(([k2, _2]) => {
|
|
150265
|
+
return Number.isNaN(Number.parseInt(k2, 10));
|
|
149926
150266
|
}).map((el) => el[1]);
|
|
149927
150267
|
}
|
|
149928
150268
|
var Class = class {
|
|
@@ -151076,9 +151416,9 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
151076
151416
|
$ZodType.init(inst, def);
|
|
151077
151417
|
const _normalized = cached(() => {
|
|
151078
151418
|
const keys = Object.keys(def.shape);
|
|
151079
|
-
for (const
|
|
151080
|
-
if (!(def.shape[
|
|
151081
|
-
throw new Error(`Invalid element at key "${
|
|
151419
|
+
for (const k2 of keys) {
|
|
151420
|
+
if (!(def.shape[k2] instanceof $ZodType)) {
|
|
151421
|
+
throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
|
|
151082
151422
|
}
|
|
151083
151423
|
}
|
|
151084
151424
|
const okeys = optionalKeys(def.shape);
|
|
@@ -151107,8 +151447,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
151107
151447
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
151108
151448
|
const normalized = _normalized.value;
|
|
151109
151449
|
const parseStr = (key) => {
|
|
151110
|
-
const
|
|
151111
|
-
return `shape[${
|
|
151450
|
+
const k2 = esc(key);
|
|
151451
|
+
return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
|
|
151112
151452
|
};
|
|
151113
151453
|
doc.write(`const input = payload.value;`);
|
|
151114
151454
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
@@ -151121,25 +151461,25 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
151121
151461
|
if (normalized.optionalKeys.has(key)) {
|
|
151122
151462
|
const id = ids[key];
|
|
151123
151463
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
151124
|
-
const
|
|
151464
|
+
const k2 = esc(key);
|
|
151125
151465
|
doc.write(`
|
|
151126
151466
|
if (${id}.issues.length) {
|
|
151127
|
-
if (input[${
|
|
151128
|
-
if (${
|
|
151129
|
-
newResult[${
|
|
151467
|
+
if (input[${k2}] === undefined) {
|
|
151468
|
+
if (${k2} in input) {
|
|
151469
|
+
newResult[${k2}] = undefined;
|
|
151130
151470
|
}
|
|
151131
151471
|
} else {
|
|
151132
151472
|
payload.issues = payload.issues.concat(
|
|
151133
151473
|
${id}.issues.map((iss) => ({
|
|
151134
151474
|
...iss,
|
|
151135
|
-
path: iss.path ? [${
|
|
151475
|
+
path: iss.path ? [${k2}, ...iss.path] : [${k2}],
|
|
151136
151476
|
}))
|
|
151137
151477
|
);
|
|
151138
151478
|
}
|
|
151139
151479
|
} else if (${id}.value === undefined) {
|
|
151140
|
-
if (${
|
|
151480
|
+
if (${k2} in input) newResult[${k2}] = undefined;
|
|
151141
151481
|
} else {
|
|
151142
|
-
newResult[${
|
|
151482
|
+
newResult[${k2}] = ${id}.value;
|
|
151143
151483
|
}
|
|
151144
151484
|
`);
|
|
151145
151485
|
} else {
|
|
@@ -151299,11 +151639,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
151299
151639
|
const pv = option._zod.propValues;
|
|
151300
151640
|
if (!pv || Object.keys(pv).length === 0)
|
|
151301
151641
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
151302
|
-
for (const [
|
|
151303
|
-
if (!propValues[
|
|
151304
|
-
propValues[
|
|
151642
|
+
for (const [k2, v2] of Object.entries(pv)) {
|
|
151643
|
+
if (!propValues[k2])
|
|
151644
|
+
propValues[k2] = /* @__PURE__ */ new Set();
|
|
151305
151645
|
for (const val of v2) {
|
|
151306
|
-
propValues[
|
|
151646
|
+
propValues[k2].add(val);
|
|
151307
151647
|
}
|
|
151308
151648
|
}
|
|
151309
151649
|
}
|
|
@@ -151526,7 +151866,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
151526
151866
|
$ZodType.init(inst, def);
|
|
151527
151867
|
const values = getEnumValues(def.entries);
|
|
151528
151868
|
inst._zod.values = new Set(values);
|
|
151529
|
-
inst._zod.pattern = new RegExp(`^(${values.filter((
|
|
151869
|
+
inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
151530
151870
|
inst._zod.parse = (payload, _ctx) => {
|
|
151531
151871
|
const input = payload.value;
|
|
151532
151872
|
if (inst._zod.values.has(input)) {
|
|
@@ -157856,15 +158196,15 @@ function isPlainObject2(value) {
|
|
|
157856
158196
|
function mergeCapabilities(base, additional) {
|
|
157857
158197
|
const result = { ...base };
|
|
157858
158198
|
for (const key in additional) {
|
|
157859
|
-
const
|
|
157860
|
-
const addValue = additional[
|
|
158199
|
+
const k2 = key;
|
|
158200
|
+
const addValue = additional[k2];
|
|
157861
158201
|
if (addValue === void 0)
|
|
157862
158202
|
continue;
|
|
157863
|
-
const baseValue = result[
|
|
158203
|
+
const baseValue = result[k2];
|
|
157864
158204
|
if (isPlainObject2(baseValue) && isPlainObject2(addValue)) {
|
|
157865
|
-
result[
|
|
158205
|
+
result[k2] = { ...baseValue, ...addValue };
|
|
157866
158206
|
} else {
|
|
157867
|
-
result[
|
|
158207
|
+
result[k2] = addValue;
|
|
157868
158208
|
}
|
|
157869
158209
|
}
|
|
157870
158210
|
return result;
|
|
@@ -159923,7 +160263,7 @@ var XrayClient = class {
|
|
|
159923
160263
|
writeFileSync(zipPath, buffer);
|
|
159924
160264
|
const zip = new import_adm_zip.default(zipPath);
|
|
159925
160265
|
zip.extractAllTo(outputDir, true);
|
|
159926
|
-
const files = readdirSync(outputDir).filter((
|
|
160266
|
+
const files = readdirSync(outputDir).filter((f4) => f4.endsWith(".feature"));
|
|
159927
160267
|
return { zip_path: zipPath, feature_dir: outputDir, files, count: files.length };
|
|
159928
160268
|
}
|
|
159929
160269
|
async importResults(results) {
|
|
@@ -159967,7 +160307,7 @@ var registerJiraCrudTools = (ctx2) => {
|
|
|
159967
160307
|
issue_key: external_exports.string().describe("Issue key (e.g. PROJ-123)"),
|
|
159968
160308
|
fields: external_exports.string().optional().describe("Comma-separated list of fields to return")
|
|
159969
160309
|
}, async ({ issue_key, fields }) => {
|
|
159970
|
-
const fieldList = fields ? fields.split(",").map((
|
|
160310
|
+
const fieldList = fields ? fields.split(",").map((f4) => f4.trim()) : void 0;
|
|
159971
160311
|
const data = await jira2.getIssue(issue_key, fieldList);
|
|
159972
160312
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
159973
160313
|
});
|
|
@@ -160113,7 +160453,7 @@ function resolveJar() {
|
|
|
160113
160453
|
`PlantUML jar directory not found at ${JAR_DIR}. Run 'npm run build' to copy the jar.`
|
|
160114
160454
|
);
|
|
160115
160455
|
}
|
|
160116
|
-
const jars = readdirSync2(JAR_DIR).filter((
|
|
160456
|
+
const jars = readdirSync2(JAR_DIR).filter((f4) => f4.endsWith(".jar"));
|
|
160117
160457
|
if (jars.length === 0) {
|
|
160118
160458
|
throw new Error(`No .jar files in ${JAR_DIR}. Run 'npm run build' to copy the jar.`);
|
|
160119
160459
|
}
|
|
@@ -160346,6 +160686,7 @@ var registerConfluenceTools = (ctx2) => {
|
|
|
160346
160686
|
body_bytes: Buffer.byteLength(finalStorage, "utf8"),
|
|
160347
160687
|
diagram_stats: diagramStats,
|
|
160348
160688
|
puml_blocks_detected: pumlRegistry.size,
|
|
160689
|
+
render_diagrams_requested: render_diagrams,
|
|
160349
160690
|
...warning ? { warning } : {}
|
|
160350
160691
|
}, null, 2)
|
|
160351
160692
|
}]
|
|
@@ -160688,7 +161029,7 @@ var registerRiskTools = (ctx2) => {
|
|
|
160688
161029
|
if (out.details.length === 0 && (out.skipped ?? []).length === 0) {
|
|
160689
161030
|
lines.push(`(no risk values specified for ${project_key})`);
|
|
160690
161031
|
}
|
|
160691
|
-
for (const
|
|
161032
|
+
for (const d of out.details) lines.push(formatSetDetail(d));
|
|
160692
161033
|
for (const s2 of out.skipped ?? []) lines.push(`SKIPPED ${s2.classifier} (${s2.reason})`);
|
|
160693
161034
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
160694
161035
|
}
|
|
@@ -160707,9 +161048,9 @@ var registerRiskTools = (ctx2) => {
|
|
|
160707
161048
|
token_present: tokenPresent,
|
|
160708
161049
|
diagnostic_note: "token\uC774 \uC5C6\uAC70\uB098 endpoint\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC73C\uBA74 setRiskValue \uD638\uCD9C\uC774 \uC2E4\uD328\uD569\uB2C8\uB2E4. /plugin configure \uB85C RISK_PLUGIN_ENDPOINT / RISK_PLUGIN_AUTH_TOKEN \uC744 \uC785\uB825.",
|
|
160709
161050
|
models: Object.fromEntries(
|
|
160710
|
-
Object.keys(RISK_MODELS).map((
|
|
160711
|
-
const m3 = RISK_MODELS[
|
|
160712
|
-
return [
|
|
161051
|
+
Object.keys(RISK_MODELS).map((k2) => {
|
|
161052
|
+
const m3 = RISK_MODELS[k2];
|
|
161053
|
+
return [k2, {
|
|
160713
161054
|
label: m3.label,
|
|
160714
161055
|
modelKey: m3.modelKey,
|
|
160715
161056
|
riskSets: m3.riskSets,
|
|
@@ -160761,7 +161102,7 @@ var registerRiskTools = (ctx2) => {
|
|
|
160761
161102
|
{ model: "cia", name: "CIA", res: planSetRisk("cia", "initial", h2.cia ?? {}, issueKey), issueKey }
|
|
160762
161103
|
];
|
|
160763
161104
|
const out = await runSetPlans(risk2, tasks);
|
|
160764
|
-
const riskOk = out.details.every((
|
|
161105
|
+
const riskOk = out.details.every((d) => d.result.ok);
|
|
160765
161106
|
const riskSkipped = out.skipped ?? [];
|
|
160766
161107
|
for (const srcKey of h2.source_keys) {
|
|
160767
161108
|
await jira2.createLink("Risk Source", issueKey, srcKey);
|
|
@@ -160883,9 +161224,9 @@ function parseCvssVector(vector) {
|
|
|
160883
161224
|
for (const part of vector.split("/")) {
|
|
160884
161225
|
const colonIdx = part.indexOf(":");
|
|
160885
161226
|
if (colonIdx > 0) {
|
|
160886
|
-
const
|
|
161227
|
+
const k2 = part.substring(0, colonIdx);
|
|
160887
161228
|
const v2 = part.substring(colonIdx + 1);
|
|
160888
|
-
if (
|
|
161229
|
+
if (k2 !== "CVSS") result[k2] = v2;
|
|
160889
161230
|
}
|
|
160890
161231
|
}
|
|
160891
161232
|
return result;
|
|
@@ -160917,10 +161258,10 @@ function calculateCvssScore(metrics) {
|
|
|
160917
161258
|
}
|
|
160918
161259
|
function validateMetrics(metrics) {
|
|
160919
161260
|
const errors = [];
|
|
160920
|
-
for (const [
|
|
160921
|
-
const valid = METRIC_VALUES[
|
|
160922
|
-
if (!valid) errors.push(`Unknown metric: ${
|
|
160923
|
-
else if (!valid.includes(v2)) errors.push(`Invalid value ${v2} for ${
|
|
161261
|
+
for (const [k2, v2] of Object.entries(metrics)) {
|
|
161262
|
+
const valid = METRIC_VALUES[k2];
|
|
161263
|
+
if (!valid) errors.push(`Unknown metric: ${k2}`);
|
|
161264
|
+
else if (!valid.includes(v2)) errors.push(`Invalid value ${v2} for ${k2}. Valid: ${valid.join(", ")}`);
|
|
160924
161265
|
}
|
|
160925
161266
|
return errors;
|
|
160926
161267
|
}
|
|
@@ -160938,7 +161279,7 @@ ${errors.join("\n")}` }] };
|
|
|
160938
161279
|
}
|
|
160939
161280
|
const vector = buildCvssVector(metrics);
|
|
160940
161281
|
const { score, severity } = calculateCvssScore(metrics);
|
|
160941
|
-
const details = Object.entries(metrics).map(([
|
|
161282
|
+
const details = Object.entries(metrics).map(([k2, v2]) => ` ${k2} = ${v2} (${METRIC_LABELS[k2] || k2})`).join("\n");
|
|
160942
161283
|
return { content: [{ type: "text", text: `CVSS Vector: ${vector}
|
|
160943
161284
|
Score: ${score} (${severity})
|
|
160944
161285
|
|
|
@@ -160976,15 +161317,15 @@ ${errors.join("\n")}` }] };
|
|
|
160976
161317
|
issue_key: external_exports.string().describe("Vulnerability issue key")
|
|
160977
161318
|
}, async ({ issue_key }) => {
|
|
160978
161319
|
const data = await jira2.getIssue(issue_key, ["summary", "customfield_10166", "customfield_10167"]);
|
|
160979
|
-
const
|
|
160980
|
-
const vector =
|
|
160981
|
-
const score =
|
|
161320
|
+
const f4 = data.fields;
|
|
161321
|
+
const vector = f4?.customfield_10166 || "";
|
|
161322
|
+
const score = f4?.customfield_10167 || "";
|
|
160982
161323
|
let details = "";
|
|
160983
161324
|
if (vector) {
|
|
160984
161325
|
const metrics = parseCvssVector(vector);
|
|
160985
|
-
details = "\n\nMetrics:\n" + Object.entries(metrics).map(([
|
|
161326
|
+
details = "\n\nMetrics:\n" + Object.entries(metrics).map(([k2, v2]) => ` ${k2} = ${v2} (${METRIC_LABELS[k2] || k2})`).join("\n");
|
|
160986
161327
|
}
|
|
160987
|
-
return { content: [{ type: "text", text: `${issue_key}: ${
|
|
161328
|
+
return { content: [{ type: "text", text: `${issue_key}: ${f4?.summary}
|
|
160988
161329
|
CVSS Vector: ${vector}
|
|
160989
161330
|
CVSS Score: ${score}${details}` }] };
|
|
160990
161331
|
});
|
|
@@ -161043,14 +161384,14 @@ var registerTraceabilityTools = (ctx2) => {
|
|
|
161043
161384
|
issue_key: external_exports.string().describe("Issue key to check")
|
|
161044
161385
|
}, async ({ issue_key }) => {
|
|
161045
161386
|
const data = await jira2.getIssue(issue_key, ["summary", "issuetype", "status", "issuelinks", "subtasks", "parent"]);
|
|
161046
|
-
const
|
|
161387
|
+
const f4 = data.fields;
|
|
161047
161388
|
const links = extractLinks(data);
|
|
161048
161389
|
const report = [
|
|
161049
|
-
`=== ${issue_key}: ${
|
|
161050
|
-
`Type: ${
|
|
161390
|
+
`=== ${issue_key}: ${f4.summary} ===`,
|
|
161391
|
+
`Type: ${f4.issuetype?.name} | Status: ${f4.status?.name}`,
|
|
161051
161392
|
"",
|
|
161052
|
-
`Parent: ${
|
|
161053
|
-
`Subtasks: ${(
|
|
161393
|
+
`Parent: ${f4.parent?.key || "(none)"}`,
|
|
161394
|
+
`Subtasks: ${(f4.subtasks || []).map((s2) => s2.key).join(", ") || "(none)"}`,
|
|
161054
161395
|
"",
|
|
161055
161396
|
`Links (${links.length}):`,
|
|
161056
161397
|
...links.map((l3) => ` ${l3.direction === "inward" ? "\u2190" : "\u2192"} [${l3.link_type}] ${l3.key}: ${l3.summary}`)
|
|
@@ -161163,9 +161504,9 @@ var registerIecTools = (ctx2) => {
|
|
|
161163
161504
|
issue_key: external_exports.string().describe("Current ticket key")
|
|
161164
161505
|
}, async ({ issue_key }) => {
|
|
161165
161506
|
const data = await jira2.getIssue(issue_key, ["summary", "issuetype", "status"]);
|
|
161166
|
-
const
|
|
161167
|
-
const type =
|
|
161168
|
-
const summary =
|
|
161507
|
+
const f4 = data.fields;
|
|
161508
|
+
const type = f4.issuetype?.name;
|
|
161509
|
+
const summary = f4.summary || "";
|
|
161169
161510
|
const steps = [];
|
|
161170
161511
|
if (type === "Gate") {
|
|
161171
161512
|
steps.push("Gate created. For each Document ticket, call iec_get_next_steps to see what sub-tickets to create.");
|
|
@@ -161508,15 +161849,15 @@ var WORKFLOWS = [
|
|
|
161508
161849
|
related: ["confluence_publish_doc", "markdown_to_pdf", "jira_attach_pdf_from_markdown"]
|
|
161509
161850
|
}
|
|
161510
161851
|
];
|
|
161511
|
-
function workflowToText(
|
|
161852
|
+
function workflowToText(w) {
|
|
161512
161853
|
const lines = [];
|
|
161513
|
-
lines.push(`=== ${
|
|
161854
|
+
lines.push(`=== ${w.title} ===`);
|
|
161514
161855
|
lines.push("");
|
|
161515
|
-
if (
|
|
161516
|
-
lines.push(
|
|
161856
|
+
if (w.description) {
|
|
161857
|
+
lines.push(w.description);
|
|
161517
161858
|
lines.push("");
|
|
161518
161859
|
}
|
|
161519
|
-
for (const step of
|
|
161860
|
+
for (const step of w.steps) {
|
|
161520
161861
|
lines.push(step);
|
|
161521
161862
|
}
|
|
161522
161863
|
return lines.join("\n");
|
|
@@ -161539,12 +161880,12 @@ var registerHelpTools = ({ server: server2 }) => {
|
|
|
161539
161880
|
}
|
|
161540
161881
|
lines.push("");
|
|
161541
161882
|
}
|
|
161542
|
-
const wfIds2 = WORKFLOWS.map((
|
|
161883
|
+
const wfIds2 = WORKFLOWS.map((w) => w.id).join(", ");
|
|
161543
161884
|
lines.push(`\uC6CC\uD06C\uD50C\uB85C\uC6B0 \uAC00\uC774\uB4DC: help(topic="workflows") \uB610\uB294 help(topic="<id>") \u2014 \uC0AC\uC6A9 \uAC00\uB2A5 id: ${wfIds2}`);
|
|
161544
161885
|
lines.push('\uD2B9\uC815 \uD234 \uC0C1\uC138: help(topic="\uD234\uC774\uB984")');
|
|
161545
161886
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
161546
161887
|
}
|
|
161547
|
-
const workflow = WORKFLOWS.find((
|
|
161888
|
+
const workflow = WORKFLOWS.find((w) => w.id === topic);
|
|
161548
161889
|
if (workflow) {
|
|
161549
161890
|
return { content: [{ type: "text", text: workflowToText(workflow) }] };
|
|
161550
161891
|
}
|
|
@@ -161563,7 +161904,7 @@ ${tool.description}
|
|
|
161563
161904
|
|
|
161564
161905
|
\uC790\uC138\uD55C \uD30C\uB77C\uBBF8\uD130\uB294 \uC774 \uD234\uC744 \uC9C1\uC811 \uD638\uCD9C\uD558\uC5EC \uD655\uC778\uD558\uC138\uC694.` }] };
|
|
161565
161906
|
}
|
|
161566
|
-
const wfIds = WORKFLOWS.map((
|
|
161907
|
+
const wfIds = WORKFLOWS.map((w) => w.id).join(", ");
|
|
161567
161908
|
return { content: [{ type: "text", text: `\uC54C \uC218 \uC5C6\uB294 \uD1A0\uD53D: "${topic}"
|
|
161568
161909
|
\uC0AC\uC6A9 \uAC00\uB2A5: tools, workflows, ${wfIds}, \uB610\uB294 \uD234 \uC774\uB984` }] };
|
|
161569
161910
|
});
|
|
@@ -162537,18 +162878,18 @@ var SHA256 = class extends HashMD {
|
|
|
162537
162878
|
this.H = SHA256_IV[7] | 0;
|
|
162538
162879
|
}
|
|
162539
162880
|
get() {
|
|
162540
|
-
const { A: A3, B: B2, C: C2, D
|
|
162541
|
-
return [A3, B2, C2,
|
|
162881
|
+
const { A: A3, B: B2, C: C2, D, E, F: F3, G: G2, H: H2 } = this;
|
|
162882
|
+
return [A3, B2, C2, D, E, F3, G2, H2];
|
|
162542
162883
|
}
|
|
162543
162884
|
// prettier-ignore
|
|
162544
|
-
set(A3, B2, C2,
|
|
162885
|
+
set(A3, B2, C2, D, E, F3, G2, H2) {
|
|
162545
162886
|
this.A = A3 | 0;
|
|
162546
162887
|
this.B = B2 | 0;
|
|
162547
162888
|
this.C = C2 | 0;
|
|
162548
|
-
this.D =
|
|
162549
|
-
this.E =
|
|
162889
|
+
this.D = D | 0;
|
|
162890
|
+
this.E = E | 0;
|
|
162550
162891
|
this.F = F3 | 0;
|
|
162551
|
-
this.G =
|
|
162892
|
+
this.G = G2 | 0;
|
|
162552
162893
|
this.H = H2 | 0;
|
|
162553
162894
|
}
|
|
162554
162895
|
process(view, offset) {
|
|
@@ -162561,17 +162902,17 @@ var SHA256 = class extends HashMD {
|
|
|
162561
162902
|
const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;
|
|
162562
162903
|
SHA256_W[i2] = s1 + SHA256_W[i2 - 7] + s0 + SHA256_W[i2 - 16] | 0;
|
|
162563
162904
|
}
|
|
162564
|
-
let { A: A3, B: B2, C: C2, D
|
|
162905
|
+
let { A: A3, B: B2, C: C2, D, E, F: F3, G: G2, H: H2 } = this;
|
|
162565
162906
|
for (let i2 = 0; i2 < 64; i2++) {
|
|
162566
|
-
const sigma1 = rotr(
|
|
162567
|
-
const T1 = H2 + sigma1 + Chi(
|
|
162907
|
+
const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
|
|
162908
|
+
const T1 = H2 + sigma1 + Chi(E, F3, G2) + SHA256_K[i2] + SHA256_W[i2] | 0;
|
|
162568
162909
|
const sigma0 = rotr(A3, 2) ^ rotr(A3, 13) ^ rotr(A3, 22);
|
|
162569
162910
|
const T2 = sigma0 + Maj(A3, B2, C2) | 0;
|
|
162570
|
-
H2 =
|
|
162571
|
-
|
|
162572
|
-
F3 =
|
|
162573
|
-
|
|
162574
|
-
|
|
162911
|
+
H2 = G2;
|
|
162912
|
+
G2 = F3;
|
|
162913
|
+
F3 = E;
|
|
162914
|
+
E = D + T1 | 0;
|
|
162915
|
+
D = C2;
|
|
162575
162916
|
C2 = B2;
|
|
162576
162917
|
B2 = A3;
|
|
162577
162918
|
A3 = T1 + T2 | 0;
|
|
@@ -162579,12 +162920,12 @@ var SHA256 = class extends HashMD {
|
|
|
162579
162920
|
A3 = A3 + this.A | 0;
|
|
162580
162921
|
B2 = B2 + this.B | 0;
|
|
162581
162922
|
C2 = C2 + this.C | 0;
|
|
162582
|
-
|
|
162583
|
-
|
|
162923
|
+
D = D + this.D | 0;
|
|
162924
|
+
E = E + this.E | 0;
|
|
162584
162925
|
F3 = F3 + this.F | 0;
|
|
162585
|
-
|
|
162926
|
+
G2 = G2 + this.G | 0;
|
|
162586
162927
|
H2 = H2 + this.H | 0;
|
|
162587
|
-
this.set(A3, B2, C2,
|
|
162928
|
+
this.set(A3, B2, C2, D, E, F3, G2, H2);
|
|
162588
162929
|
}
|
|
162589
162930
|
roundClean() {
|
|
162590
162931
|
clean(SHA256_W);
|
|
@@ -162786,8 +163127,8 @@ function expandKeyDecLE(key) {
|
|
|
162786
163127
|
clean2(encKey);
|
|
162787
163128
|
for (let i2 = 4; i2 < Nk - 4; i2++) {
|
|
162788
163129
|
const x3 = xk[i2];
|
|
162789
|
-
const
|
|
162790
|
-
xk[i2] = T0[
|
|
163130
|
+
const w = applySbox(sbox2, x3, x3, x3, x3);
|
|
163131
|
+
xk[i2] = T0[w & 255] ^ T1[w >>> 8 & 255] ^ T2[w >>> 16 & 255] ^ T3[w >>> 24];
|
|
162791
163132
|
}
|
|
162792
163133
|
return xk;
|
|
162793
163134
|
}
|
|
@@ -162799,38 +163140,38 @@ function applySbox(sbox2, s0, s1, s2, s3) {
|
|
|
162799
163140
|
}
|
|
162800
163141
|
function encrypt(xk, s0, s1, s2, s3) {
|
|
162801
163142
|
const { sbox2, T01, T23 } = tableEncoding;
|
|
162802
|
-
let
|
|
162803
|
-
s0 ^= xk[
|
|
163143
|
+
let k2 = 0;
|
|
163144
|
+
s0 ^= xk[k2++], s1 ^= xk[k2++], s2 ^= xk[k2++], s3 ^= xk[k2++];
|
|
162804
163145
|
const rounds = xk.length / 4 - 2;
|
|
162805
163146
|
for (let i2 = 0; i2 < rounds; i2++) {
|
|
162806
|
-
const t02 = xk[
|
|
162807
|
-
const t12 = xk[
|
|
162808
|
-
const t22 = xk[
|
|
162809
|
-
const t32 = xk[
|
|
163147
|
+
const t02 = xk[k2++] ^ apply0123(T01, T23, s0, s1, s2, s3);
|
|
163148
|
+
const t12 = xk[k2++] ^ apply0123(T01, T23, s1, s2, s3, s0);
|
|
163149
|
+
const t22 = xk[k2++] ^ apply0123(T01, T23, s2, s3, s0, s1);
|
|
163150
|
+
const t32 = xk[k2++] ^ apply0123(T01, T23, s3, s0, s1, s2);
|
|
162810
163151
|
s0 = t02, s1 = t12, s2 = t22, s3 = t32;
|
|
162811
163152
|
}
|
|
162812
|
-
const t0 = xk[
|
|
162813
|
-
const t1 = xk[
|
|
162814
|
-
const t2 = xk[
|
|
162815
|
-
const t3 = xk[
|
|
163153
|
+
const t0 = xk[k2++] ^ applySbox(sbox2, s0, s1, s2, s3);
|
|
163154
|
+
const t1 = xk[k2++] ^ applySbox(sbox2, s1, s2, s3, s0);
|
|
163155
|
+
const t2 = xk[k2++] ^ applySbox(sbox2, s2, s3, s0, s1);
|
|
163156
|
+
const t3 = xk[k2++] ^ applySbox(sbox2, s3, s0, s1, s2);
|
|
162816
163157
|
return { s0: t0, s1: t1, s2: t2, s3: t3 };
|
|
162817
163158
|
}
|
|
162818
163159
|
function decrypt(xk, s0, s1, s2, s3) {
|
|
162819
163160
|
const { sbox2, T01, T23 } = tableDecoding;
|
|
162820
|
-
let
|
|
162821
|
-
s0 ^= xk[
|
|
163161
|
+
let k2 = 0;
|
|
163162
|
+
s0 ^= xk[k2++], s1 ^= xk[k2++], s2 ^= xk[k2++], s3 ^= xk[k2++];
|
|
162822
163163
|
const rounds = xk.length / 4 - 2;
|
|
162823
163164
|
for (let i2 = 0; i2 < rounds; i2++) {
|
|
162824
|
-
const t02 = xk[
|
|
162825
|
-
const t12 = xk[
|
|
162826
|
-
const t22 = xk[
|
|
162827
|
-
const t32 = xk[
|
|
163165
|
+
const t02 = xk[k2++] ^ apply0123(T01, T23, s0, s3, s2, s1);
|
|
163166
|
+
const t12 = xk[k2++] ^ apply0123(T01, T23, s1, s0, s3, s2);
|
|
163167
|
+
const t22 = xk[k2++] ^ apply0123(T01, T23, s2, s1, s0, s3);
|
|
163168
|
+
const t32 = xk[k2++] ^ apply0123(T01, T23, s3, s2, s1, s0);
|
|
162828
163169
|
s0 = t02, s1 = t12, s2 = t22, s3 = t32;
|
|
162829
163170
|
}
|
|
162830
|
-
const t0 = xk[
|
|
162831
|
-
const t1 = xk[
|
|
162832
|
-
const t2 = xk[
|
|
162833
|
-
const t3 = xk[
|
|
163171
|
+
const t0 = xk[k2++] ^ applySbox(sbox2, s0, s3, s2, s1);
|
|
163172
|
+
const t1 = xk[k2++] ^ applySbox(sbox2, s1, s0, s3, s2);
|
|
163173
|
+
const t2 = xk[k2++] ^ applySbox(sbox2, s2, s1, s0, s3);
|
|
163174
|
+
const t3 = xk[k2++] ^ applySbox(sbox2, s3, s2, s1, s0);
|
|
162834
163175
|
return { s0: t0, s1: t1, s2: t2, s3: t3 };
|
|
162835
163176
|
}
|
|
162836
163177
|
function validateBlockDecrypt(data) {
|
|
@@ -164027,9 +164368,9 @@ function _define_property(obj, key, value) {
|
|
|
164027
164368
|
|
|
164028
164369
|
// node_modules/tslib/tslib.es6.mjs
|
|
164029
164370
|
function __decorate(decorators, target, key, desc) {
|
|
164030
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
164371
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
164031
164372
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
164032
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (
|
|
164373
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
164033
164374
|
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
164034
164375
|
}
|
|
164035
164376
|
|
|
@@ -165327,8 +165668,8 @@ var $61aa549f16d58b9b$export$2e2bcd8739ae039 = class {
|
|
|
165327
165668
|
startOffset: parent.startOffset || 0
|
|
165328
165669
|
};
|
|
165329
165670
|
let len = 0;
|
|
165330
|
-
for (let
|
|
165331
|
-
let field = this.fields[
|
|
165671
|
+
for (let k2 in this.fields) {
|
|
165672
|
+
let field = this.fields[k2];
|
|
165332
165673
|
let val = dict[field[1]];
|
|
165333
165674
|
if (val == null || (0, import_fast_deep_equal.default)(val, field[3])) continue;
|
|
165334
165675
|
let operands = this.encodeOperands(field[2], null, ctx2, val);
|
|
@@ -169354,14 +169695,14 @@ var $f08dd41ef10b694c$export$2e2bcd8739ae039 = class {
|
|
|
169354
169695
|
let rangeOffset = cmap.idRangeOffset.get(i2);
|
|
169355
169696
|
let delta = cmap.idDelta.get(i2);
|
|
169356
169697
|
for (var c = start; c <= end; c++) {
|
|
169357
|
-
let
|
|
169358
|
-
if (rangeOffset === 0)
|
|
169698
|
+
let g = 0;
|
|
169699
|
+
if (rangeOffset === 0) g = c + delta;
|
|
169359
169700
|
else {
|
|
169360
169701
|
let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i2);
|
|
169361
|
-
|
|
169362
|
-
if (
|
|
169702
|
+
g = cmap.glyphIndexArray.get(index) || 0;
|
|
169703
|
+
if (g !== 0) g += delta;
|
|
169363
169704
|
}
|
|
169364
|
-
if (
|
|
169705
|
+
if (g === gid) res.push(c);
|
|
169365
169706
|
}
|
|
169366
169707
|
}
|
|
169367
169708
|
return res;
|
|
@@ -170442,17 +170783,17 @@ for (let ot2 in $3b6302b64eccc32c$var$OTMapping) {
|
|
|
170442
170783
|
}
|
|
170443
170784
|
function $3b6302b64eccc32c$export$b813f7d2a1677c16(features) {
|
|
170444
170785
|
let res = {};
|
|
170445
|
-
for (let
|
|
170786
|
+
for (let k2 in features) {
|
|
170446
170787
|
let r2;
|
|
170447
|
-
if (r2 = $3b6302b64eccc32c$var$OTMapping[
|
|
170788
|
+
if (r2 = $3b6302b64eccc32c$var$OTMapping[k2]) {
|
|
170448
170789
|
if (res[r2[0]] == null) res[r2[0]] = {};
|
|
170449
|
-
res[r2[0]][r2[1]] = features[
|
|
170790
|
+
res[r2[0]][r2[1]] = features[k2];
|
|
170450
170791
|
}
|
|
170451
170792
|
}
|
|
170452
170793
|
return res;
|
|
170453
170794
|
}
|
|
170454
|
-
function $3b6302b64eccc32c$var$mapFeatureStrings(
|
|
170455
|
-
let [type, setting] =
|
|
170795
|
+
function $3b6302b64eccc32c$var$mapFeatureStrings(f4) {
|
|
170796
|
+
let [type, setting] = f4;
|
|
170456
170797
|
if (isNaN(type)) var typeCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type].code;
|
|
170457
170798
|
else var typeCode = type;
|
|
170458
170799
|
if (isNaN(setting)) var settingCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type][setting];
|
|
@@ -170464,20 +170805,20 @@ function $3b6302b64eccc32c$var$mapFeatureStrings(f3) {
|
|
|
170464
170805
|
}
|
|
170465
170806
|
function $3b6302b64eccc32c$export$bd6df347a4f391c4(features) {
|
|
170466
170807
|
let res = {};
|
|
170467
|
-
if (Array.isArray(features)) for (let
|
|
170808
|
+
if (Array.isArray(features)) for (let k2 = 0; k2 < features.length; k2++) {
|
|
170468
170809
|
let r2;
|
|
170469
|
-
let
|
|
170470
|
-
if (r2 = $3b6302b64eccc32c$var$AATMapping[
|
|
170810
|
+
let f4 = $3b6302b64eccc32c$var$mapFeatureStrings(features[k2]);
|
|
170811
|
+
if (r2 = $3b6302b64eccc32c$var$AATMapping[f4[0]] && $3b6302b64eccc32c$var$AATMapping[f4[0]][f4[1]]) res[r2] = true;
|
|
170471
170812
|
}
|
|
170472
170813
|
else if (typeof features === "object") for (let type in features) {
|
|
170473
170814
|
let feature = features[type];
|
|
170474
170815
|
for (let setting in feature) {
|
|
170475
170816
|
let r2;
|
|
170476
|
-
let
|
|
170817
|
+
let f4 = $3b6302b64eccc32c$var$mapFeatureStrings([
|
|
170477
170818
|
type,
|
|
170478
170819
|
setting
|
|
170479
170820
|
]);
|
|
170480
|
-
if (feature[setting] && (r2 = $3b6302b64eccc32c$var$AATMapping[
|
|
170821
|
+
if (feature[setting] && (r2 = $3b6302b64eccc32c$var$AATMapping[f4[0]] && $3b6302b64eccc32c$var$AATMapping[f4[0]][f4[1]])) res[r2] = true;
|
|
170481
170822
|
}
|
|
170482
170823
|
}
|
|
170483
170824
|
return Object.keys(res);
|
|
@@ -170631,12 +170972,12 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
|
|
|
170631
170972
|
for (let chain of this.morx.chains) {
|
|
170632
170973
|
let flags = chain.defaultFlags;
|
|
170633
170974
|
for (let feature of chain.features) {
|
|
170634
|
-
let
|
|
170635
|
-
if (
|
|
170636
|
-
if (
|
|
170975
|
+
let f4;
|
|
170976
|
+
if (f4 = features[feature.featureType]) {
|
|
170977
|
+
if (f4[feature.featureSetting]) {
|
|
170637
170978
|
flags &= feature.disableFlags;
|
|
170638
170979
|
flags |= feature.enableFlags;
|
|
170639
|
-
} else if (
|
|
170980
|
+
} else if (f4[feature.featureSetting] === false) {
|
|
170640
170981
|
flags |= ~feature.disableFlags;
|
|
170641
170982
|
flags &= ~feature.enableFlags;
|
|
170642
170983
|
}
|
|
@@ -170811,8 +171152,8 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
|
|
|
170811
171152
|
glyphs: glyphs.slice(),
|
|
170812
171153
|
ligatureStack: this.ligatureStack.slice()
|
|
170813
171154
|
});
|
|
170814
|
-
let
|
|
170815
|
-
input.push(
|
|
171155
|
+
let g = this.font.getGlyph(glyph);
|
|
171156
|
+
input.push(g);
|
|
170816
171157
|
glyphs.push(input[input.length - 1]);
|
|
170817
171158
|
process3(glyphs[glyphs.length - 1], entry, glyphs.length - 1);
|
|
170818
171159
|
let count = 0;
|
|
@@ -170822,7 +171163,7 @@ var $55f71433a605c87d$export$2e2bcd8739ae039 = class {
|
|
|
170822
171163
|
found = glyphs[i2].id;
|
|
170823
171164
|
}
|
|
170824
171165
|
if (count === 1) {
|
|
170825
|
-
let result = input.map((
|
|
171166
|
+
let result = input.map((g2) => g2.id);
|
|
170826
171167
|
let cache2 = this.inputCache[found];
|
|
170827
171168
|
if (cache2) cache2.push(result);
|
|
170828
171169
|
else this.inputCache[found] = [
|
|
@@ -172358,11 +172699,11 @@ var $7826f90f6f0cecc9$export$2e2bcd8739ae039 = class extends (0, $649970d87335b3
|
|
|
172358
172699
|
static assignFeatures(plan, glyphs) {
|
|
172359
172700
|
for (let i2 = glyphs.length - 1; i2 >= 0; i2--) {
|
|
172360
172701
|
let codepoint = glyphs[i2].codePoints[0];
|
|
172361
|
-
let
|
|
172362
|
-
if (
|
|
172363
|
-
let decomposed =
|
|
172364
|
-
let
|
|
172365
|
-
return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font,
|
|
172702
|
+
let d = (0, $90a9d3398ee54fe5$export$f647c9cfdd77d95a)[codepoint] || $7826f90f6f0cecc9$var$decompositions[codepoint];
|
|
172703
|
+
if (d) {
|
|
172704
|
+
let decomposed = d.map((c) => {
|
|
172705
|
+
let g = plan.font.glyphForCodePoint(c);
|
|
172706
|
+
return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [
|
|
172366
172707
|
c
|
|
172367
172708
|
], glyphs[i2].features);
|
|
172368
172709
|
});
|
|
@@ -172448,25 +172789,25 @@ function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) {
|
|
|
172448
172789
|
let { category, syllableType } = glyphs[start].shaperInfo;
|
|
172449
172790
|
if (syllableType === "symbol_cluster" || syllableType === "non_indic_cluster") continue;
|
|
172450
172791
|
if (syllableType === "broken_cluster" && dottedCircle) {
|
|
172451
|
-
let
|
|
172792
|
+
let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
|
|
172452
172793
|
9676
|
|
172453
172794
|
]);
|
|
172454
|
-
|
|
172795
|
+
g.shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(g), $7826f90f6f0cecc9$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable);
|
|
172455
172796
|
let i2 = start;
|
|
172456
172797
|
while (i2 < end && glyphs[i2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha) i2++;
|
|
172457
|
-
glyphs.splice(i2++, 0,
|
|
172798
|
+
glyphs.splice(i2++, 0, g);
|
|
172458
172799
|
end++;
|
|
172459
172800
|
}
|
|
172460
172801
|
let base = end;
|
|
172461
172802
|
let limit = start;
|
|
172462
172803
|
let hasReph = false;
|
|
172463
172804
|
if (indicConfig.rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === "Implicit" && !$7826f90f6f0cecc9$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === "Explicit" && glyphs[start + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) {
|
|
172464
|
-
let
|
|
172805
|
+
let g = [
|
|
172465
172806
|
glyphs[start].copy(),
|
|
172466
172807
|
glyphs[start + 1].copy(),
|
|
172467
172808
|
glyphs[start + 2].copy()
|
|
172468
172809
|
];
|
|
172469
|
-
if ($7826f90f6f0cecc9$var$wouldSubstitute(
|
|
172810
|
+
if ($7826f90f6f0cecc9$var$wouldSubstitute(g.slice(0, 2), "rphf") || indicConfig.rephMode === "Explicit" && $7826f90f6f0cecc9$var$wouldSubstitute(g, "rphf")) {
|
|
172470
172811
|
limit += 2;
|
|
172471
172812
|
while (limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit])) limit++;
|
|
172472
172813
|
base = start;
|
|
@@ -172575,11 +172916,11 @@ function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) {
|
|
|
172575
172916
|
let prefLen = 2;
|
|
172576
172917
|
if (features.pref && base + prefLen < end)
|
|
172577
172918
|
for (let i2 = base + 1; i2 + prefLen - 1 < end; i2++) {
|
|
172578
|
-
let
|
|
172919
|
+
let g = [
|
|
172579
172920
|
glyphs[i2].copy(),
|
|
172580
172921
|
glyphs[i2 + 1].copy()
|
|
172581
172922
|
];
|
|
172582
|
-
if ($7826f90f6f0cecc9$var$wouldSubstitute(
|
|
172923
|
+
if ($7826f90f6f0cecc9$var$wouldSubstitute(g, "pref")) {
|
|
172583
172924
|
for (let j2 = 0; j2 < prefLen; j2++) glyphs[i2++].features.pref = true;
|
|
172584
172925
|
if (features.cfar) for (; i2 < end; i2++) glyphs[i2].features.cfar = true;
|
|
172585
172926
|
break;
|
|
@@ -172771,8 +173112,8 @@ var $7ab494fe977143c6$export$2e2bcd8739ae039 = class extends (0, $649970d87335b3
|
|
|
172771
173112
|
let codepoint = glyphs[i2].codePoints[0];
|
|
172772
173113
|
if ($7ab494fe977143c6$var$decompositions[codepoint]) {
|
|
172773
173114
|
let decomposed = $7ab494fe977143c6$var$decompositions[codepoint].map((c) => {
|
|
172774
|
-
let
|
|
172775
|
-
return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font,
|
|
173115
|
+
let g = plan.font.glyphForCodePoint(c);
|
|
173116
|
+
return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [
|
|
172776
173117
|
c
|
|
172777
173118
|
], glyphs[i2].features);
|
|
172778
173119
|
});
|
|
@@ -172820,12 +173161,12 @@ function $7ab494fe977143c6$var$reorder(font, glyphs) {
|
|
|
172820
173161
|
let type = info.syllableType;
|
|
172821
173162
|
if (type !== "virama_terminated_cluster" && type !== "standard_cluster" && type !== "broken_cluster") continue;
|
|
172822
173163
|
if (type === "broken_cluster" && dottedCircle) {
|
|
172823
|
-
let
|
|
173164
|
+
let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [
|
|
172824
173165
|
9676
|
|
172825
173166
|
]);
|
|
172826
|
-
|
|
173167
|
+
g.shaperInfo = info;
|
|
172827
173168
|
for (i2 = start; i2 < end && glyphs[i2].shaperInfo.category === "R"; i2++) ;
|
|
172828
|
-
glyphs.splice(++i2, 0,
|
|
173169
|
+
glyphs.splice(++i2, 0, g);
|
|
172829
173170
|
end++;
|
|
172830
173171
|
}
|
|
172831
173172
|
if (info.category === "R" && end - start > 1)
|
|
@@ -173119,18 +173460,18 @@ var $c96c93587d49c14d$export$2e2bcd8739ae039 = class extends (0, $a83b9c36aaa94f
|
|
|
173119
173460
|
let exit = this.getAnchor(curRecord.exitAnchor);
|
|
173120
173461
|
let cur = this.positions[this.glyphIterator.index];
|
|
173121
173462
|
let next = this.positions[nextIndex];
|
|
173122
|
-
let
|
|
173463
|
+
let d;
|
|
173123
173464
|
switch (this.direction) {
|
|
173124
173465
|
case "ltr":
|
|
173125
173466
|
cur.xAdvance = exit.x + cur.xOffset;
|
|
173126
|
-
|
|
173127
|
-
next.xAdvance -=
|
|
173128
|
-
next.xOffset -=
|
|
173467
|
+
d = entry.x + next.xOffset;
|
|
173468
|
+
next.xAdvance -= d;
|
|
173469
|
+
next.xOffset -= d;
|
|
173129
173470
|
break;
|
|
173130
173471
|
case "rtl":
|
|
173131
|
-
|
|
173132
|
-
cur.xAdvance -=
|
|
173133
|
-
cur.xOffset -=
|
|
173472
|
+
d = exit.x + cur.xOffset;
|
|
173473
|
+
cur.xAdvance -= d;
|
|
173474
|
+
cur.xOffset -= d;
|
|
173134
173475
|
next.xAdvance = entry.x + next.xOffset;
|
|
173135
173476
|
break;
|
|
173136
173477
|
}
|
|
@@ -173247,13 +173588,13 @@ var $c96c93587d49c14d$export$2e2bcd8739ae039 = class extends (0, $a83b9c36aaa94f
|
|
|
173247
173588
|
let j2 = glyph.markAttachment;
|
|
173248
173589
|
this.positions[i2].xOffset += this.positions[j2].xOffset;
|
|
173249
173590
|
this.positions[i2].yOffset += this.positions[j2].yOffset;
|
|
173250
|
-
if (this.direction === "ltr") for (let
|
|
173251
|
-
this.positions[i2].xOffset -= this.positions[
|
|
173252
|
-
this.positions[i2].yOffset -= this.positions[
|
|
173591
|
+
if (this.direction === "ltr") for (let k2 = j2; k2 < i2; k2++) {
|
|
173592
|
+
this.positions[i2].xOffset -= this.positions[k2].xAdvance;
|
|
173593
|
+
this.positions[i2].yOffset -= this.positions[k2].yAdvance;
|
|
173253
173594
|
}
|
|
173254
|
-
else for (let
|
|
173255
|
-
this.positions[i2].xOffset += this.positions[
|
|
173256
|
-
this.positions[i2].yOffset += this.positions[
|
|
173595
|
+
else for (let k2 = j2 + 1; k2 < i2 + 1; k2++) {
|
|
173596
|
+
this.positions[i2].xOffset += this.positions[k2].xAdvance;
|
|
173597
|
+
this.positions[i2].yOffset += this.positions[k2].yAdvance;
|
|
173257
173598
|
}
|
|
173258
173599
|
}
|
|
173259
173600
|
}
|
|
@@ -173487,7 +173828,7 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
|
|
|
173487
173828
|
if (this._bbox) return this._bbox;
|
|
173488
173829
|
let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)();
|
|
173489
173830
|
let cx2 = 0, cy2 = 0;
|
|
173490
|
-
let
|
|
173831
|
+
let f4 = (t2) => Math.pow(1 - t2, 3) * p0[i2] + 3 * Math.pow(1 - t2, 2) * t2 * p1[i2] + 3 * (1 - t2) * Math.pow(t2, 2) * p2[i2] + Math.pow(t2, 3) * p3[i2];
|
|
173491
173832
|
for (let c of this.commands) switch (c.command) {
|
|
173492
173833
|
case "moveTo":
|
|
173493
173834
|
case "lineTo":
|
|
@@ -173530,8 +173871,8 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
|
|
|
173530
173871
|
if (b2 === 0) continue;
|
|
173531
173872
|
let t3 = -c / b2;
|
|
173532
173873
|
if (0 < t3 && t3 < 1) {
|
|
173533
|
-
if (i2 === 0) bbox.addPoint(
|
|
173534
|
-
else if (i2 === 1) bbox.addPoint(bbox.maxX,
|
|
173874
|
+
if (i2 === 0) bbox.addPoint(f4(t3), bbox.maxY);
|
|
173875
|
+
else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t3));
|
|
173535
173876
|
}
|
|
173536
173877
|
continue;
|
|
173537
173878
|
}
|
|
@@ -173539,13 +173880,13 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
|
|
|
173539
173880
|
if (b2ac < 0) continue;
|
|
173540
173881
|
let t1 = (-b2 + Math.sqrt(b2ac)) / (2 * a);
|
|
173541
173882
|
if (0 < t1 && t1 < 1) {
|
|
173542
|
-
if (i2 === 0) bbox.addPoint(
|
|
173543
|
-
else if (i2 === 1) bbox.addPoint(bbox.maxX,
|
|
173883
|
+
if (i2 === 0) bbox.addPoint(f4(t1), bbox.maxY);
|
|
173884
|
+
else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t1));
|
|
173544
173885
|
}
|
|
173545
173886
|
let t2 = (-b2 - Math.sqrt(b2ac)) / (2 * a);
|
|
173546
173887
|
if (0 < t2 && t2 < 1) {
|
|
173547
|
-
if (i2 === 0) bbox.addPoint(
|
|
173548
|
-
else if (i2 === 1) bbox.addPoint(bbox.maxX,
|
|
173888
|
+
if (i2 === 0) bbox.addPoint(f4(t2), bbox.maxY);
|
|
173889
|
+
else if (i2 === 1) bbox.addPoint(bbox.maxX, f4(t2));
|
|
173549
173890
|
}
|
|
173550
173891
|
}
|
|
173551
173892
|
cx2 = p3x;
|
|
@@ -174241,8 +174582,8 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
|
|
|
174241
174582
|
}
|
|
174242
174583
|
let contours = [];
|
|
174243
174584
|
let cur = [];
|
|
174244
|
-
for (let
|
|
174245
|
-
var point = points[
|
|
174585
|
+
for (let k2 = 0; k2 < points.length; k2++) {
|
|
174586
|
+
var point = points[k2];
|
|
174246
174587
|
cur.push(point);
|
|
174247
174588
|
if (point.endContour) {
|
|
174248
174589
|
contours.push(cur);
|
|
@@ -174280,17 +174621,17 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
|
|
|
174280
174621
|
}
|
|
174281
174622
|
path3.moveTo(firstPt.x, firstPt.y);
|
|
174282
174623
|
for (let j2 = start; j2 < contour.length; j2++) {
|
|
174283
|
-
let
|
|
174624
|
+
let pt2 = contour[j2];
|
|
174284
174625
|
let prevPt = j2 === 0 ? firstPt : contour[j2 - 1];
|
|
174285
|
-
if (prevPt.onCurve &&
|
|
174286
|
-
else if (prevPt.onCurve && !
|
|
174287
|
-
else if (!prevPt.onCurve && !
|
|
174288
|
-
let midX = (prevPt.x +
|
|
174289
|
-
let midY = (prevPt.y +
|
|
174626
|
+
if (prevPt.onCurve && pt2.onCurve) path3.lineTo(pt2.x, pt2.y);
|
|
174627
|
+
else if (prevPt.onCurve && !pt2.onCurve) var curvePt = pt2;
|
|
174628
|
+
else if (!prevPt.onCurve && !pt2.onCurve) {
|
|
174629
|
+
let midX = (prevPt.x + pt2.x) / 2;
|
|
174630
|
+
let midY = (prevPt.y + pt2.y) / 2;
|
|
174290
174631
|
path3.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);
|
|
174291
|
-
var curvePt =
|
|
174292
|
-
} else if (!prevPt.onCurve &&
|
|
174293
|
-
path3.quadraticCurveTo(curvePt.x, curvePt.y,
|
|
174632
|
+
var curvePt = pt2;
|
|
174633
|
+
} else if (!prevPt.onCurve && pt2.onCurve) {
|
|
174634
|
+
path3.quadraticCurveTo(curvePt.x, curvePt.y, pt2.x, pt2.y);
|
|
174294
174635
|
var curvePt = null;
|
|
174295
174636
|
} else throw new Error("Unknown TTF path state");
|
|
174296
174637
|
}
|
|
@@ -174837,7 +175178,7 @@ var $0d411f0165859681$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
|
|
|
174837
175178
|
}
|
|
174838
175179
|
}
|
|
174839
175180
|
if (baseLayer == null) {
|
|
174840
|
-
var
|
|
175181
|
+
var g = this._font._getBaseGlyph(this.id);
|
|
174841
175182
|
var color = {
|
|
174842
175183
|
red: 0,
|
|
174843
175184
|
green: 0,
|
|
@@ -174845,15 +175186,15 @@ var $0d411f0165859681$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
|
|
|
174845
175186
|
alpha: 255
|
|
174846
175187
|
};
|
|
174847
175188
|
return [
|
|
174848
|
-
new $0d411f0165859681$var$COLRLayer(
|
|
175189
|
+
new $0d411f0165859681$var$COLRLayer(g, color)
|
|
174849
175190
|
];
|
|
174850
175191
|
}
|
|
174851
175192
|
let layers = [];
|
|
174852
175193
|
for (let i2 = baseLayer.firstLayerIndex; i2 < baseLayer.firstLayerIndex + baseLayer.numLayers; i2++) {
|
|
174853
175194
|
var rec = colr.layerRecords[i2];
|
|
174854
175195
|
var color = cpal.colorRecords[rec.paletteIndex];
|
|
174855
|
-
var
|
|
174856
|
-
layers.push(new $0d411f0165859681$var$COLRLayer(
|
|
175196
|
+
var g = this._font._getBaseGlyph(rec.gid);
|
|
175197
|
+
layers.push(new $0d411f0165859681$var$COLRLayer(g, color));
|
|
174857
175198
|
}
|
|
174858
175199
|
return layers;
|
|
174859
175200
|
}
|
|
@@ -174923,7 +175264,7 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
|
|
|
174923
175264
|
offsetToData = stream2.pos;
|
|
174924
175265
|
stream2.pos = here;
|
|
174925
175266
|
}
|
|
174926
|
-
let origPoints = glyphPoints.map((
|
|
175267
|
+
let origPoints = glyphPoints.map((pt2) => pt2.copy());
|
|
174927
175268
|
tupleCount &= $0bb840cac04e911b$var$TUPLE_COUNT_MASK;
|
|
174928
175269
|
for (let i2 = 0; i2 < tupleCount; i2++) {
|
|
174929
175270
|
let tupleDataSize = stream2.readUInt16BE();
|
|
@@ -174959,7 +175300,7 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
|
|
|
174959
175300
|
point.y += Math.round(yDeltas[i3] * factor);
|
|
174960
175301
|
}
|
|
174961
175302
|
else {
|
|
174962
|
-
let outPoints = origPoints.map((
|
|
175303
|
+
let outPoints = origPoints.map((pt2) => pt2.copy());
|
|
174963
175304
|
let hasDelta = glyphPoints.map(() => false);
|
|
174964
175305
|
for (let i3 = 0; i3 < points.length; i3++) {
|
|
174965
175306
|
let idx = points[i3];
|
|
@@ -175042,8 +175383,8 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
|
|
|
175042
175383
|
while (point < points.length) {
|
|
175043
175384
|
let firstPoint = point;
|
|
175044
175385
|
let endPoint = point;
|
|
175045
|
-
let
|
|
175046
|
-
while (!
|
|
175386
|
+
let pt2 = points[endPoint];
|
|
175387
|
+
while (!pt2.endContour) pt2 = points[++endPoint];
|
|
175047
175388
|
while (point <= endPoint && !hasDelta[point]) point++;
|
|
175048
175389
|
if (point > endPoint) continue;
|
|
175049
175390
|
let firstDelta = point;
|
|
@@ -175071,24 +175412,24 @@ var $0bb840cac04e911b$export$2e2bcd8739ae039 = class {
|
|
|
175071
175412
|
"y"
|
|
175072
175413
|
];
|
|
175073
175414
|
for (let i2 = 0; i2 < iterable.length; i2++) {
|
|
175074
|
-
let
|
|
175075
|
-
if (inPoints[ref1][
|
|
175415
|
+
let k2 = iterable[i2];
|
|
175416
|
+
if (inPoints[ref1][k2] > inPoints[ref2][k2]) {
|
|
175076
175417
|
var p = ref1;
|
|
175077
175418
|
ref1 = ref2;
|
|
175078
175419
|
ref2 = p;
|
|
175079
175420
|
}
|
|
175080
|
-
let in1 = inPoints[ref1][
|
|
175081
|
-
let in2 = inPoints[ref2][
|
|
175082
|
-
let out1 = outPoints[ref1][
|
|
175083
|
-
let out2 = outPoints[ref2][
|
|
175421
|
+
let in1 = inPoints[ref1][k2];
|
|
175422
|
+
let in2 = inPoints[ref2][k2];
|
|
175423
|
+
let out1 = outPoints[ref1][k2];
|
|
175424
|
+
let out2 = outPoints[ref2][k2];
|
|
175084
175425
|
if (in1 !== in2 || out1 === out2) {
|
|
175085
175426
|
let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);
|
|
175086
175427
|
for (let p3 = p1; p3 <= p2; p3++) {
|
|
175087
|
-
let out = inPoints[p3][
|
|
175428
|
+
let out = inPoints[p3][k2];
|
|
175088
175429
|
if (out <= in1) out += out1 - in1;
|
|
175089
175430
|
else if (out >= in2) out += out2 - in2;
|
|
175090
175431
|
else out = out1 + (out - in1) * scale;
|
|
175091
|
-
outPoints[p3][
|
|
175432
|
+
outPoints[p3][k2] = out;
|
|
175092
175433
|
}
|
|
175093
175434
|
}
|
|
175094
175435
|
}
|
|
@@ -177858,9 +178199,9 @@ var PNG = class _PNG {
|
|
|
177858
178199
|
const { length } = data;
|
|
177859
178200
|
let pos = 0;
|
|
177860
178201
|
function pass(x0, y0, dx, dy, singlePass = false) {
|
|
177861
|
-
const
|
|
178202
|
+
const w = Math.ceil((width - x0) / dx);
|
|
177862
178203
|
const h2 = Math.ceil((height - y0) / dy);
|
|
177863
|
-
const scanlineLength = pixelBytes *
|
|
178204
|
+
const scanlineLength = pixelBytes * w;
|
|
177864
178205
|
const buffer = singlePass ? pixels : Buffer.alloc(scanlineLength * h2);
|
|
177865
178206
|
let row = 0;
|
|
177866
178207
|
let c = 0;
|
|
@@ -177928,7 +178269,7 @@ var PNG = class _PNG {
|
|
|
177928
178269
|
if (!singlePass) {
|
|
177929
178270
|
let pixelsPos = ((y0 + row * dy) * width + x0) * pixelBytes;
|
|
177930
178271
|
let bufferPos = row * scanlineLength;
|
|
177931
|
-
for (i2 = 0; i2 <
|
|
178272
|
+
for (i2 = 0; i2 < w; i2++) {
|
|
177932
178273
|
for (let j2 = 0; j2 < pixelBytes; j2++)
|
|
177933
178274
|
pixels[pixelsPos++] = buffer[bufferPos++];
|
|
177934
178275
|
pixelsPos += (dx - 1) * pixelBytes;
|
|
@@ -177968,7 +178309,7 @@ var PNG = class _PNG {
|
|
|
177968
178309
|
return ret;
|
|
177969
178310
|
}
|
|
177970
178311
|
copyToImageData(imageData, pixels) {
|
|
177971
|
-
let j2,
|
|
178312
|
+
let j2, k2;
|
|
177972
178313
|
let { colors } = this;
|
|
177973
178314
|
let palette = null;
|
|
177974
178315
|
let alpha = this.hasAlphaChannel;
|
|
@@ -177983,22 +178324,22 @@ var PNG = class _PNG {
|
|
|
177983
178324
|
let i2 = j2 = 0;
|
|
177984
178325
|
if (colors === 1) {
|
|
177985
178326
|
while (i2 < length) {
|
|
177986
|
-
|
|
177987
|
-
const v2 = input[
|
|
178327
|
+
k2 = palette ? pixels[i2 / 4] * 4 : j2;
|
|
178328
|
+
const v2 = input[k2++];
|
|
177988
178329
|
data[i2++] = v2;
|
|
177989
178330
|
data[i2++] = v2;
|
|
177990
178331
|
data[i2++] = v2;
|
|
177991
|
-
data[i2++] = alpha ? input[
|
|
177992
|
-
j2 =
|
|
178332
|
+
data[i2++] = alpha ? input[k2++] : 255;
|
|
178333
|
+
j2 = k2;
|
|
177993
178334
|
}
|
|
177994
178335
|
} else {
|
|
177995
178336
|
while (i2 < length) {
|
|
177996
|
-
|
|
177997
|
-
data[i2++] = input[
|
|
177998
|
-
data[i2++] = input[
|
|
177999
|
-
data[i2++] = input[
|
|
178000
|
-
data[i2++] = alpha ? input[
|
|
178001
|
-
j2 =
|
|
178337
|
+
k2 = palette ? pixels[i2 / 4] * 4 : j2;
|
|
178338
|
+
data[i2++] = input[k2++];
|
|
178339
|
+
data[i2++] = input[k2++];
|
|
178340
|
+
data[i2++] = input[k2++];
|
|
178341
|
+
data[i2++] = alpha ? input[k2++] : 255;
|
|
178342
|
+
j2 = k2;
|
|
178002
178343
|
}
|
|
178003
178344
|
}
|
|
178004
178345
|
}
|
|
@@ -178454,8 +178795,8 @@ var PDFNameTree = class extends PDFTree {
|
|
|
178454
178795
|
_keysName() {
|
|
178455
178796
|
return "Names";
|
|
178456
178797
|
}
|
|
178457
|
-
_dataForKey(
|
|
178458
|
-
return new String(
|
|
178798
|
+
_dataForKey(k2) {
|
|
178799
|
+
return new String(k2);
|
|
178459
178800
|
}
|
|
178460
178801
|
};
|
|
178461
178802
|
function md5Hash(data) {
|
|
@@ -178488,11 +178829,11 @@ function rc4(data, key) {
|
|
|
178488
178829
|
[s2[i2], s2[j2]] = [s2[j2], s2[i2]];
|
|
178489
178830
|
}
|
|
178490
178831
|
const output = new Uint8Array(data.length);
|
|
178491
|
-
for (let i2 = 0, j3 = 0,
|
|
178832
|
+
for (let i2 = 0, j3 = 0, k2 = 0; k2 < data.length; k2++) {
|
|
178492
178833
|
i2 = i2 + 1 & 255;
|
|
178493
178834
|
j3 = j3 + s2[i2] & 255;
|
|
178494
178835
|
[s2[i2], s2[j3]] = [s2[j3], s2[i2]];
|
|
178495
|
-
output[
|
|
178836
|
+
output[k2] = data[k2] ^ s2[s2[i2] + s2[j3] & 255];
|
|
178496
178837
|
}
|
|
178497
178838
|
return output;
|
|
178498
178839
|
}
|
|
@@ -179877,8 +180218,8 @@ var arcToSegments = function(x3, y2, rx, ry, large, sweep, rotateX, ox, oy) {
|
|
|
179877
180218
|
const y0 = a10 * ox + a11 * oy;
|
|
179878
180219
|
const x1 = a00 * x3 + a01 * y2;
|
|
179879
180220
|
const y1 = a10 * x3 + a11 * y2;
|
|
179880
|
-
const
|
|
179881
|
-
let sfactor_sq = 1 /
|
|
180221
|
+
const d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
|
|
180222
|
+
let sfactor_sq = 1 / d - 0.25;
|
|
179882
180223
|
if (sfactor_sq < 0) {
|
|
179883
180224
|
sfactor_sq = 0;
|
|
179884
180225
|
}
|
|
@@ -179946,8 +180287,8 @@ var VectorMixin = {
|
|
|
179946
180287
|
closePath() {
|
|
179947
180288
|
return this.addContent("h");
|
|
179948
180289
|
},
|
|
179949
|
-
lineWidth(
|
|
179950
|
-
return this.addContent(`${number$1(
|
|
180290
|
+
lineWidth(w) {
|
|
180291
|
+
return this.addContent(`${number$1(w)} w`);
|
|
179951
180292
|
},
|
|
179952
180293
|
_CAP_STYLES: {
|
|
179953
180294
|
BUTT: 0,
|
|
@@ -180001,10 +180342,10 @@ var VectorMixin = {
|
|
|
180001
180342
|
quadraticCurveTo(cpx, cpy, x3, y2) {
|
|
180002
180343
|
return this.addContent(`${number$1(cpx)} ${number$1(cpy)} ${number$1(x3)} ${number$1(y2)} v`);
|
|
180003
180344
|
},
|
|
180004
|
-
rect(x3, y2,
|
|
180005
|
-
return this.addContent(`${number$1(x3)} ${number$1(y2)} ${number$1(
|
|
180345
|
+
rect(x3, y2, w, h2) {
|
|
180346
|
+
return this.addContent(`${number$1(x3)} ${number$1(y2)} ${number$1(w)} ${number$1(h2)} re`);
|
|
180006
180347
|
},
|
|
180007
|
-
roundedRect(x3, y2,
|
|
180348
|
+
roundedRect(x3, y2, w, h2, borderRadius) {
|
|
180008
180349
|
if (borderRadius == null) {
|
|
180009
180350
|
borderRadius = 0;
|
|
180010
180351
|
}
|
|
@@ -180014,7 +180355,7 @@ var VectorMixin = {
|
|
|
180014
180355
|
} else {
|
|
180015
180356
|
radii = [borderRadius, borderRadius, borderRadius, borderRadius];
|
|
180016
180357
|
}
|
|
180017
|
-
const limit = Math.min(0.5 *
|
|
180358
|
+
const limit = Math.min(0.5 * w, 0.5 * h2);
|
|
180018
180359
|
const rTL = Math.max(0, Math.min(radii[0] || 0, limit));
|
|
180019
180360
|
const rTR = Math.max(0, Math.min(radii[1] || 0, limit));
|
|
180020
180361
|
const rBR = Math.max(0, Math.min(radii[2] || 0, limit));
|
|
@@ -180024,13 +180365,13 @@ var VectorMixin = {
|
|
|
180024
180365
|
const cpBL = rBL * (1 - KAPPA);
|
|
180025
180366
|
const cpTL = rTL * (1 - KAPPA);
|
|
180026
180367
|
this.moveTo(x3 + rTL, y2);
|
|
180027
|
-
this.lineTo(x3 +
|
|
180368
|
+
this.lineTo(x3 + w - rTR, y2);
|
|
180028
180369
|
if (rTR > 0) {
|
|
180029
|
-
this.bezierCurveTo(x3 +
|
|
180370
|
+
this.bezierCurveTo(x3 + w - cpTR, y2, x3 + w, y2 + cpTR, x3 + w, y2 + rTR);
|
|
180030
180371
|
}
|
|
180031
|
-
this.lineTo(x3 +
|
|
180372
|
+
this.lineTo(x3 + w, y2 + h2 - rBR);
|
|
180032
180373
|
if (rBR > 0) {
|
|
180033
|
-
this.bezierCurveTo(x3 +
|
|
180374
|
+
this.bezierCurveTo(x3 + w, y2 + h2 - cpBR, x3 + w - cpBR, y2 + h2, x3 + w - rBR, y2 + h2);
|
|
180034
180375
|
}
|
|
180035
180376
|
this.lineTo(x3 + rBL, y2 + h2);
|
|
180036
180377
|
if (rBL > 0) {
|
|
@@ -180996,11 +181337,11 @@ var LineWrapper = class {
|
|
|
180996
181337
|
wordWidth(word) {
|
|
180997
181338
|
return PDFNumber(this.document.widthOfString(word, this) + this.characterSpacing + this.wordSpacing);
|
|
180998
181339
|
}
|
|
180999
|
-
canFit(word,
|
|
181340
|
+
canFit(word, w) {
|
|
181000
181341
|
if (word[word.length - 1] != SOFT_HYPHEN) {
|
|
181001
|
-
return
|
|
181342
|
+
return w <= this.spaceLeft;
|
|
181002
181343
|
}
|
|
181003
|
-
return
|
|
181344
|
+
return w + this.wordWidth(HYPHEN2) <= this.spaceLeft;
|
|
181004
181345
|
}
|
|
181005
181346
|
eachWord(text, fn) {
|
|
181006
181347
|
let bk;
|
|
@@ -181010,46 +181351,46 @@ var LineWrapper = class {
|
|
|
181010
181351
|
while (bk = breaker.nextBreak()) {
|
|
181011
181352
|
var shouldContinue;
|
|
181012
181353
|
let word = text.slice((last2 != null ? last2.position : void 0) || 0, bk.position);
|
|
181013
|
-
let
|
|
181014
|
-
if (
|
|
181354
|
+
let w = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word);
|
|
181355
|
+
if (w > this.lineWidth + this.continuedX) {
|
|
181015
181356
|
let lbk = last2;
|
|
181016
181357
|
const fbk = {};
|
|
181017
181358
|
while (word.length) {
|
|
181018
181359
|
var l3, mightGrow;
|
|
181019
|
-
if (
|
|
181020
|
-
l3 = Math.ceil(this.spaceLeft / (
|
|
181021
|
-
|
|
181022
|
-
mightGrow =
|
|
181360
|
+
if (w > this.spaceLeft) {
|
|
181361
|
+
l3 = Math.ceil(this.spaceLeft / (w / word.length));
|
|
181362
|
+
w = this.wordWidth(word.slice(0, l3));
|
|
181363
|
+
mightGrow = w <= this.spaceLeft && l3 < word.length;
|
|
181023
181364
|
} else {
|
|
181024
181365
|
l3 = word.length;
|
|
181025
181366
|
}
|
|
181026
|
-
let mustShrink =
|
|
181367
|
+
let mustShrink = w > this.spaceLeft && l3 > 0;
|
|
181027
181368
|
while (mustShrink || mightGrow) {
|
|
181028
181369
|
if (mustShrink) {
|
|
181029
|
-
|
|
181030
|
-
mustShrink =
|
|
181370
|
+
w = this.wordWidth(word.slice(0, --l3));
|
|
181371
|
+
mustShrink = w > this.spaceLeft && l3 > 0;
|
|
181031
181372
|
} else {
|
|
181032
|
-
|
|
181033
|
-
mustShrink =
|
|
181034
|
-
mightGrow =
|
|
181373
|
+
w = this.wordWidth(word.slice(0, ++l3));
|
|
181374
|
+
mustShrink = w > this.spaceLeft && l3 > 0;
|
|
181375
|
+
mightGrow = w <= this.spaceLeft && l3 < word.length;
|
|
181035
181376
|
}
|
|
181036
181377
|
}
|
|
181037
181378
|
if (l3 === 0 && this.spaceLeft === this.lineWidth) {
|
|
181038
181379
|
l3 = 1;
|
|
181039
181380
|
}
|
|
181040
181381
|
fbk.required = bk.required || l3 < word.length;
|
|
181041
|
-
shouldContinue = fn(word.slice(0, l3),
|
|
181382
|
+
shouldContinue = fn(word.slice(0, l3), w, fbk, lbk);
|
|
181042
181383
|
lbk = {
|
|
181043
181384
|
required: false
|
|
181044
181385
|
};
|
|
181045
181386
|
word = word.slice(l3);
|
|
181046
|
-
|
|
181387
|
+
w = this.wordWidth(word);
|
|
181047
181388
|
if (shouldContinue === false) {
|
|
181048
181389
|
break;
|
|
181049
181390
|
}
|
|
181050
181391
|
}
|
|
181051
181392
|
} else {
|
|
181052
|
-
shouldContinue = fn(word,
|
|
181393
|
+
shouldContinue = fn(word, w, bk, last2);
|
|
181053
181394
|
}
|
|
181054
181395
|
if (shouldContinue === false) {
|
|
181055
181396
|
break;
|
|
@@ -181092,17 +181433,17 @@ var LineWrapper = class {
|
|
|
181092
181433
|
return lc++;
|
|
181093
181434
|
};
|
|
181094
181435
|
this.emit("sectionStart", options, this);
|
|
181095
|
-
this.eachWord(text, (word,
|
|
181436
|
+
this.eachWord(text, (word, w, bk, last2) => {
|
|
181096
181437
|
if (last2 == null || last2.required) {
|
|
181097
181438
|
this.emit("firstLine", options, this);
|
|
181098
181439
|
this.spaceLeft = this.lineWidth;
|
|
181099
181440
|
}
|
|
181100
|
-
if (this.canFit(word,
|
|
181441
|
+
if (this.canFit(word, w)) {
|
|
181101
181442
|
buffer += word;
|
|
181102
|
-
textWidth +=
|
|
181443
|
+
textWidth += w;
|
|
181103
181444
|
wc++;
|
|
181104
181445
|
}
|
|
181105
|
-
if (bk.required || !this.canFit(word,
|
|
181446
|
+
if (bk.required || !this.canFit(word, w)) {
|
|
181106
181447
|
const lh = document.currentLineHeight(true);
|
|
181107
181448
|
if (this.height != null && this.ellipsis && PDFNumber(document.y + lh * 2) > this.maxY && this.column >= this.columns) {
|
|
181108
181449
|
if (this.ellipsis === true) {
|
|
@@ -181120,10 +181461,10 @@ var LineWrapper = class {
|
|
|
181120
181461
|
textWidth = this.wordWidth(buffer);
|
|
181121
181462
|
}
|
|
181122
181463
|
if (bk.required) {
|
|
181123
|
-
if (
|
|
181464
|
+
if (w > this.spaceLeft) {
|
|
181124
181465
|
emitLine();
|
|
181125
181466
|
buffer = word;
|
|
181126
|
-
textWidth =
|
|
181467
|
+
textWidth = w;
|
|
181127
181468
|
wc = 1;
|
|
181128
181469
|
}
|
|
181129
181470
|
this.emit("lastLine", options, this);
|
|
@@ -181149,13 +181490,13 @@ var LineWrapper = class {
|
|
|
181149
181490
|
textWidth = 0;
|
|
181150
181491
|
return wc = 0;
|
|
181151
181492
|
} else {
|
|
181152
|
-
this.spaceLeft = this.lineWidth -
|
|
181493
|
+
this.spaceLeft = this.lineWidth - w;
|
|
181153
181494
|
buffer = word;
|
|
181154
|
-
textWidth =
|
|
181495
|
+
textWidth = w;
|
|
181155
181496
|
return wc = 1;
|
|
181156
181497
|
}
|
|
181157
181498
|
} else {
|
|
181158
|
-
return this.spaceLeft -=
|
|
181499
|
+
return this.spaceLeft -= w;
|
|
181159
181500
|
}
|
|
181160
181501
|
});
|
|
181161
181502
|
if (wc > 0) {
|
|
@@ -182034,29 +182375,29 @@ var ImagesMixin = {
|
|
|
182034
182375
|
if (!ignoreOrientation && image.orientation > 4) {
|
|
182035
182376
|
[width, height] = [height, width];
|
|
182036
182377
|
}
|
|
182037
|
-
let
|
|
182378
|
+
let w = options.width || width;
|
|
182038
182379
|
let h2 = options.height || height;
|
|
182039
182380
|
if (options.width && !options.height) {
|
|
182040
|
-
const wp =
|
|
182041
|
-
|
|
182381
|
+
const wp = w / width;
|
|
182382
|
+
w = width * wp;
|
|
182042
182383
|
h2 = height * wp;
|
|
182043
182384
|
} else if (options.height && !options.width) {
|
|
182044
182385
|
const hp = h2 / height;
|
|
182045
|
-
|
|
182386
|
+
w = width * hp;
|
|
182046
182387
|
h2 = height * hp;
|
|
182047
182388
|
} else if (options.scale) {
|
|
182048
|
-
|
|
182389
|
+
w = width * options.scale;
|
|
182049
182390
|
h2 = height * options.scale;
|
|
182050
182391
|
} else if (options.fit) {
|
|
182051
182392
|
[bw, bh] = options.fit;
|
|
182052
182393
|
bp = bw / bh;
|
|
182053
182394
|
ip = width / height;
|
|
182054
182395
|
if (ip > bp) {
|
|
182055
|
-
|
|
182396
|
+
w = bw;
|
|
182056
182397
|
h2 = bw / ip;
|
|
182057
182398
|
} else {
|
|
182058
182399
|
h2 = bh;
|
|
182059
|
-
|
|
182400
|
+
w = bh * ip;
|
|
182060
182401
|
}
|
|
182061
182402
|
} else if (options.cover) {
|
|
182062
182403
|
[bw, bh] = options.cover;
|
|
@@ -182064,17 +182405,17 @@ var ImagesMixin = {
|
|
|
182064
182405
|
ip = width / height;
|
|
182065
182406
|
if (ip > bp) {
|
|
182066
182407
|
h2 = bh;
|
|
182067
|
-
|
|
182408
|
+
w = bh * ip;
|
|
182068
182409
|
} else {
|
|
182069
|
-
|
|
182410
|
+
w = bw;
|
|
182070
182411
|
h2 = bw / ip;
|
|
182071
182412
|
}
|
|
182072
182413
|
}
|
|
182073
182414
|
if (options.fit || options.cover) {
|
|
182074
182415
|
if (options.align === "center") {
|
|
182075
|
-
x3 = x3 + bw / 2 -
|
|
182416
|
+
x3 = x3 + bw / 2 - w / 2;
|
|
182076
182417
|
} else if (options.align === "right") {
|
|
182077
|
-
x3 = x3 + bw -
|
|
182418
|
+
x3 = x3 + bw - w;
|
|
182078
182419
|
}
|
|
182079
182420
|
if (options.valign === "center") {
|
|
182080
182421
|
y2 = y2 + bh / 2 - h2 / 2;
|
|
@@ -182086,7 +182427,7 @@ var ImagesMixin = {
|
|
|
182086
182427
|
let xTransform = x3;
|
|
182087
182428
|
let yTransform = y2;
|
|
182088
182429
|
let hTransform = h2;
|
|
182089
|
-
let wTransform =
|
|
182430
|
+
let wTransform = w;
|
|
182090
182431
|
if (!ignoreOrientation) {
|
|
182091
182432
|
switch (image.orientation) {
|
|
182092
182433
|
default:
|
|
@@ -182095,16 +182436,16 @@ var ImagesMixin = {
|
|
|
182095
182436
|
yTransform += h2;
|
|
182096
182437
|
break;
|
|
182097
182438
|
case 2:
|
|
182098
|
-
wTransform = -
|
|
182439
|
+
wTransform = -w;
|
|
182099
182440
|
hTransform = -h2;
|
|
182100
|
-
xTransform +=
|
|
182441
|
+
xTransform += w;
|
|
182101
182442
|
yTransform += h2;
|
|
182102
182443
|
break;
|
|
182103
182444
|
case 3:
|
|
182104
182445
|
originX = x3;
|
|
182105
182446
|
originY = y2;
|
|
182106
182447
|
hTransform = -h2;
|
|
182107
|
-
xTransform -=
|
|
182448
|
+
xTransform -= w;
|
|
182108
182449
|
rotateAngle = 180;
|
|
182109
182450
|
break;
|
|
182110
182451
|
case 4:
|
|
@@ -182113,7 +182454,7 @@ var ImagesMixin = {
|
|
|
182113
182454
|
originX = x3;
|
|
182114
182455
|
originY = y2;
|
|
182115
182456
|
wTransform = h2;
|
|
182116
|
-
hTransform =
|
|
182457
|
+
hTransform = w;
|
|
182117
182458
|
yTransform -= hTransform;
|
|
182118
182459
|
rotateAngle = 90;
|
|
182119
182460
|
break;
|
|
@@ -182121,13 +182462,13 @@ var ImagesMixin = {
|
|
|
182121
182462
|
originX = x3;
|
|
182122
182463
|
originY = y2;
|
|
182123
182464
|
wTransform = h2;
|
|
182124
|
-
hTransform = -
|
|
182465
|
+
hTransform = -w;
|
|
182125
182466
|
rotateAngle = 90;
|
|
182126
182467
|
break;
|
|
182127
182468
|
case 7:
|
|
182128
182469
|
originX = x3;
|
|
182129
182470
|
originY = y2;
|
|
182130
|
-
hTransform = -
|
|
182471
|
+
hTransform = -w;
|
|
182131
182472
|
wTransform = -h2;
|
|
182132
182473
|
xTransform += h2;
|
|
182133
182474
|
rotateAngle = 90;
|
|
@@ -182136,9 +182477,9 @@ var ImagesMixin = {
|
|
|
182136
182477
|
originX = x3;
|
|
182137
182478
|
originY = y2;
|
|
182138
182479
|
wTransform = h2;
|
|
182139
|
-
hTransform = -
|
|
182480
|
+
hTransform = -w;
|
|
182140
182481
|
xTransform -= h2;
|
|
182141
|
-
yTransform +=
|
|
182482
|
+
yTransform += w;
|
|
182142
182483
|
rotateAngle = -90;
|
|
182143
182484
|
break;
|
|
182144
182485
|
}
|
|
@@ -182147,10 +182488,10 @@ var ImagesMixin = {
|
|
|
182147
182488
|
yTransform += h2;
|
|
182148
182489
|
}
|
|
182149
182490
|
if (options.link != null) {
|
|
182150
|
-
this.link(x3, y2,
|
|
182491
|
+
this.link(x3, y2, w, h2, options.link);
|
|
182151
182492
|
}
|
|
182152
182493
|
if (options.goTo != null) {
|
|
182153
|
-
this.goTo(x3, y2,
|
|
182494
|
+
this.goTo(x3, y2, w, h2, options.goTo);
|
|
182154
182495
|
}
|
|
182155
182496
|
if (options.destination != null) {
|
|
182156
182497
|
this.addNamedDestination(options.destination, "XYZ", x3, y2, null);
|
|
@@ -182192,9 +182533,9 @@ var PDFAnnotationReference = class {
|
|
|
182192
182533
|
}
|
|
182193
182534
|
};
|
|
182194
182535
|
var AnnotationsMixin = {
|
|
182195
|
-
annotate(x3, y2,
|
|
182536
|
+
annotate(x3, y2, w, h2, options) {
|
|
182196
182537
|
options.Type = "Annot";
|
|
182197
|
-
options.Rect = this._convertRect(x3, y2,
|
|
182538
|
+
options.Rect = this._convertRect(x3, y2, w, h2);
|
|
182198
182539
|
options.Border = [0, 0, 0];
|
|
182199
182540
|
if (options.Subtype === "Link" && typeof options.F === "undefined") {
|
|
182200
182541
|
options.F = 1 << 2;
|
|
@@ -182223,7 +182564,7 @@ var AnnotationsMixin = {
|
|
|
182223
182564
|
ref.end();
|
|
182224
182565
|
return this;
|
|
182225
182566
|
},
|
|
182226
|
-
note(x3, y2,
|
|
182567
|
+
note(x3, y2, w, h2, contents, options = {}) {
|
|
182227
182568
|
options.Subtype = "Text";
|
|
182228
182569
|
options.Contents = new String(contents);
|
|
182229
182570
|
if (options.Name == null) {
|
|
@@ -182232,18 +182573,18 @@ var AnnotationsMixin = {
|
|
|
182232
182573
|
if (options.color == null) {
|
|
182233
182574
|
options.color = [243, 223, 92];
|
|
182234
182575
|
}
|
|
182235
|
-
return this.annotate(x3, y2,
|
|
182576
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182236
182577
|
},
|
|
182237
|
-
goTo(x3, y2,
|
|
182578
|
+
goTo(x3, y2, w, h2, name, options = {}) {
|
|
182238
182579
|
options.Subtype = "Link";
|
|
182239
182580
|
options.A = this.ref({
|
|
182240
182581
|
S: "GoTo",
|
|
182241
182582
|
D: new String(name)
|
|
182242
182583
|
});
|
|
182243
182584
|
options.A.end();
|
|
182244
|
-
return this.annotate(x3, y2,
|
|
182585
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182245
182586
|
},
|
|
182246
|
-
link(x3, y2,
|
|
182587
|
+
link(x3, y2, w, h2, url, options = {}) {
|
|
182247
182588
|
options.Subtype = "Link";
|
|
182248
182589
|
if (typeof url === "number") {
|
|
182249
182590
|
const pages = this._root.data.Pages.data;
|
|
@@ -182266,28 +182607,28 @@ var AnnotationsMixin = {
|
|
|
182266
182607
|
if (options.structParent && !options.Contents) {
|
|
182267
182608
|
options.Contents = new String("");
|
|
182268
182609
|
}
|
|
182269
|
-
return this.annotate(x3, y2,
|
|
182610
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182270
182611
|
},
|
|
182271
|
-
_markup(x3, y2,
|
|
182272
|
-
const [x1, y1, x22, y22] = this._convertRect(x3, y2,
|
|
182612
|
+
_markup(x3, y2, w, h2, options = {}) {
|
|
182613
|
+
const [x1, y1, x22, y22] = this._convertRect(x3, y2, w, h2);
|
|
182273
182614
|
options.QuadPoints = [x1, y22, x22, y22, x1, y1, x22, y1];
|
|
182274
182615
|
options.Contents = new String();
|
|
182275
|
-
return this.annotate(x3, y2,
|
|
182616
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182276
182617
|
},
|
|
182277
|
-
highlight(x3, y2,
|
|
182618
|
+
highlight(x3, y2, w, h2, options = {}) {
|
|
182278
182619
|
options.Subtype = "Highlight";
|
|
182279
182620
|
if (options.color == null) {
|
|
182280
182621
|
options.color = [241, 238, 148];
|
|
182281
182622
|
}
|
|
182282
|
-
return this._markup(x3, y2,
|
|
182623
|
+
return this._markup(x3, y2, w, h2, options);
|
|
182283
182624
|
},
|
|
182284
|
-
underline(x3, y2,
|
|
182625
|
+
underline(x3, y2, w, h2, options = {}) {
|
|
182285
182626
|
options.Subtype = "Underline";
|
|
182286
|
-
return this._markup(x3, y2,
|
|
182627
|
+
return this._markup(x3, y2, w, h2, options);
|
|
182287
182628
|
},
|
|
182288
|
-
strike(x3, y2,
|
|
182629
|
+
strike(x3, y2, w, h2, options = {}) {
|
|
182289
182630
|
options.Subtype = "StrikeOut";
|
|
182290
|
-
return this._markup(x3, y2,
|
|
182631
|
+
return this._markup(x3, y2, w, h2, options);
|
|
182291
182632
|
},
|
|
182292
182633
|
lineAnnotation(x1, y1, x22, y2, options = {}) {
|
|
182293
182634
|
options.Subtype = "Line";
|
|
@@ -182295,23 +182636,23 @@ var AnnotationsMixin = {
|
|
|
182295
182636
|
options.L = [x1, this.page.height - y1, x22, this.page.height - y2];
|
|
182296
182637
|
return this.annotate(x1, y1, x22, y2, options);
|
|
182297
182638
|
},
|
|
182298
|
-
rectAnnotation(x3, y2,
|
|
182639
|
+
rectAnnotation(x3, y2, w, h2, options = {}) {
|
|
182299
182640
|
options.Subtype = "Square";
|
|
182300
182641
|
options.Contents = new String();
|
|
182301
|
-
return this.annotate(x3, y2,
|
|
182642
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182302
182643
|
},
|
|
182303
|
-
ellipseAnnotation(x3, y2,
|
|
182644
|
+
ellipseAnnotation(x3, y2, w, h2, options = {}) {
|
|
182304
182645
|
options.Subtype = "Circle";
|
|
182305
182646
|
options.Contents = new String();
|
|
182306
|
-
return this.annotate(x3, y2,
|
|
182647
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182307
182648
|
},
|
|
182308
|
-
textAnnotation(x3, y2,
|
|
182649
|
+
textAnnotation(x3, y2, w, h2, text, options = {}) {
|
|
182309
182650
|
options.Subtype = "FreeText";
|
|
182310
182651
|
options.Contents = new String(text);
|
|
182311
182652
|
options.DA = new String();
|
|
182312
|
-
return this.annotate(x3, y2,
|
|
182653
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182313
182654
|
},
|
|
182314
|
-
fileAnnotation(x3, y2,
|
|
182655
|
+
fileAnnotation(x3, y2, w, h2, file = {}, options = {}) {
|
|
182315
182656
|
const filespec = this.file(file.src, Object.assign({
|
|
182316
182657
|
hidden: true
|
|
182317
182658
|
}, file));
|
|
@@ -182322,12 +182663,12 @@ var AnnotationsMixin = {
|
|
|
182322
182663
|
} else if (filespec.data.Desc) {
|
|
182323
182664
|
options.Contents = filespec.data.Desc;
|
|
182324
182665
|
}
|
|
182325
|
-
return this.annotate(x3, y2,
|
|
182666
|
+
return this.annotate(x3, y2, w, h2, options);
|
|
182326
182667
|
},
|
|
182327
|
-
_convertRect(x1, y1,
|
|
182668
|
+
_convertRect(x1, y1, w, h2) {
|
|
182328
182669
|
let y2 = y1;
|
|
182329
182670
|
y1 += h2;
|
|
182330
|
-
let x22 = x1 +
|
|
182671
|
+
let x22 = x1 + w;
|
|
182331
182672
|
const [m0, m1, m22, m3, m4, m5] = this._ctm;
|
|
182332
182673
|
x1 = m0 * x1 + m22 * y1 + m4;
|
|
182333
182674
|
y1 = m1 * x1 + m3 * y1 + m5;
|
|
@@ -182628,8 +182969,8 @@ var PDFNumberTree = class extends PDFTree {
|
|
|
182628
182969
|
_keysName() {
|
|
182629
182970
|
return "Nums";
|
|
182630
182971
|
}
|
|
182631
|
-
_dataForKey(
|
|
182632
|
-
return parseInt(
|
|
182972
|
+
_dataForKey(k2) {
|
|
182973
|
+
return parseInt(k2);
|
|
182633
182974
|
}
|
|
182634
182975
|
};
|
|
182635
182976
|
var MarkingsMixin = {
|
|
@@ -182889,33 +183230,33 @@ var AcroFormMixin = {
|
|
|
182889
183230
|
this._addToParent(fieldRef);
|
|
182890
183231
|
return fieldRef;
|
|
182891
183232
|
},
|
|
182892
|
-
formAnnotation(name, type, x3, y2,
|
|
183233
|
+
formAnnotation(name, type, x3, y2, w, h2, options = {}) {
|
|
182893
183234
|
let fieldDict = this._fieldDict(name, type, options);
|
|
182894
183235
|
fieldDict.Subtype = "Widget";
|
|
182895
183236
|
if (fieldDict.F === void 0) {
|
|
182896
183237
|
fieldDict.F = 4;
|
|
182897
183238
|
}
|
|
182898
|
-
this.annotate(x3, y2,
|
|
183239
|
+
this.annotate(x3, y2, w, h2, fieldDict);
|
|
182899
183240
|
let annotRef = this.page.annotations[this.page.annotations.length - 1];
|
|
182900
183241
|
return this._addToParent(annotRef);
|
|
182901
183242
|
},
|
|
182902
|
-
formText(name, x3, y2,
|
|
182903
|
-
return this.formAnnotation(name, "text", x3, y2,
|
|
183243
|
+
formText(name, x3, y2, w, h2, options = {}) {
|
|
183244
|
+
return this.formAnnotation(name, "text", x3, y2, w, h2, options);
|
|
182904
183245
|
},
|
|
182905
|
-
formPushButton(name, x3, y2,
|
|
182906
|
-
return this.formAnnotation(name, "pushButton", x3, y2,
|
|
183246
|
+
formPushButton(name, x3, y2, w, h2, options = {}) {
|
|
183247
|
+
return this.formAnnotation(name, "pushButton", x3, y2, w, h2, options);
|
|
182907
183248
|
},
|
|
182908
|
-
formCombo(name, x3, y2,
|
|
182909
|
-
return this.formAnnotation(name, "combo", x3, y2,
|
|
183249
|
+
formCombo(name, x3, y2, w, h2, options = {}) {
|
|
183250
|
+
return this.formAnnotation(name, "combo", x3, y2, w, h2, options);
|
|
182910
183251
|
},
|
|
182911
|
-
formList(name, x3, y2,
|
|
182912
|
-
return this.formAnnotation(name, "list", x3, y2,
|
|
183252
|
+
formList(name, x3, y2, w, h2, options = {}) {
|
|
183253
|
+
return this.formAnnotation(name, "list", x3, y2, w, h2, options);
|
|
182913
183254
|
},
|
|
182914
|
-
formRadioButton(name, x3, y2,
|
|
182915
|
-
return this.formAnnotation(name, "radioButton", x3, y2,
|
|
183255
|
+
formRadioButton(name, x3, y2, w, h2, options = {}) {
|
|
183256
|
+
return this.formAnnotation(name, "radioButton", x3, y2, w, h2, options);
|
|
182916
183257
|
},
|
|
182917
|
-
formCheckbox(name, x3, y2,
|
|
182918
|
-
return this.formAnnotation(name, "checkbox", x3, y2,
|
|
183258
|
+
formCheckbox(name, x3, y2, w, h2, options = {}) {
|
|
183259
|
+
return this.formAnnotation(name, "checkbox", x3, y2, w, h2, options);
|
|
182919
183260
|
},
|
|
182920
183261
|
_addToParent(fieldRef) {
|
|
182921
183262
|
let parent = fieldRef.data.Parent;
|
|
@@ -182972,29 +183313,29 @@ var AcroFormMixin = {
|
|
|
182972
183313
|
return opts;
|
|
182973
183314
|
},
|
|
182974
183315
|
_resolveFormat(opts) {
|
|
182975
|
-
const
|
|
182976
|
-
if (
|
|
183316
|
+
const f4 = opts.format;
|
|
183317
|
+
if (f4 && f4.type) {
|
|
182977
183318
|
let fnKeystroke;
|
|
182978
183319
|
let fnFormat;
|
|
182979
183320
|
let params = "";
|
|
182980
|
-
if (FORMAT_SPECIAL[
|
|
183321
|
+
if (FORMAT_SPECIAL[f4.type] !== void 0) {
|
|
182981
183322
|
fnKeystroke = `AFSpecial_Keystroke`;
|
|
182982
183323
|
fnFormat = `AFSpecial_Format`;
|
|
182983
|
-
params = FORMAT_SPECIAL[
|
|
183324
|
+
params = FORMAT_SPECIAL[f4.type];
|
|
182984
183325
|
} else {
|
|
182985
|
-
let format =
|
|
183326
|
+
let format = f4.type.charAt(0).toUpperCase() + f4.type.slice(1);
|
|
182986
183327
|
fnKeystroke = `AF${format}_Keystroke`;
|
|
182987
183328
|
fnFormat = `AF${format}_Format`;
|
|
182988
|
-
if (
|
|
183329
|
+
if (f4.type === "date") {
|
|
182989
183330
|
fnKeystroke += "Ex";
|
|
182990
|
-
params = String(
|
|
182991
|
-
} else if (
|
|
182992
|
-
params = String(
|
|
182993
|
-
} else if (
|
|
182994
|
-
let p = Object.assign({}, FORMAT_DEFAULT.number,
|
|
183331
|
+
params = String(f4.param);
|
|
183332
|
+
} else if (f4.type === "time") {
|
|
183333
|
+
params = String(f4.param);
|
|
183334
|
+
} else if (f4.type === "number") {
|
|
183335
|
+
let p = Object.assign({}, FORMAT_DEFAULT.number, f4);
|
|
182995
183336
|
params = String([String(p.nDec), p.sepComma ? "0" : "1", '"' + p.negStyle + '"', "null", '"' + p.currency + '"', String(p.currencyPrepend)].join(","));
|
|
182996
|
-
} else if (
|
|
182997
|
-
let p = Object.assign({}, FORMAT_DEFAULT.percent,
|
|
183337
|
+
} else if (f4.type === "percent") {
|
|
183338
|
+
let p = Object.assign({}, FORMAT_DEFAULT.percent, f4);
|
|
182998
183339
|
params = String([String(p.nDec), p.sepComma ? "0" : "1"].join(","));
|
|
182999
183340
|
}
|
|
183000
183341
|
}
|
|
@@ -183338,8 +183679,8 @@ function normalizedDefaultStyle(defaultStyleInternal) {
|
|
|
183338
183679
|
if (typeof defaultStyle !== "object") defaultStyle = {
|
|
183339
183680
|
text: defaultStyle
|
|
183340
183681
|
};
|
|
183341
|
-
const defaultRowStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([
|
|
183342
|
-
const defaultColStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([
|
|
183682
|
+
const defaultRowStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k2]) => ROW_FIELDS.includes(k2)));
|
|
183683
|
+
const defaultColStyle = Object.fromEntries(Object.entries(defaultStyle).filter(([k2]) => COLUMN_FIELDS.includes(k2)));
|
|
183343
183684
|
defaultStyle.padding = normalizeSides(defaultStyle.padding);
|
|
183344
183685
|
defaultStyle.border = normalizeSides(defaultStyle.border);
|
|
183345
183686
|
defaultStyle.borderColor = normalizeSides(defaultStyle.borderColor);
|
|
@@ -183855,7 +184196,7 @@ function renderCellText(cell) {
|
|
|
183855
184196
|
if (cell.font) doc.font(rollbackFont, rollbackFontFamily, rollbackFontSize);
|
|
183856
184197
|
}
|
|
183857
184198
|
function renderBorder(border, borderColor, x3, y2, width, height, mask) {
|
|
183858
|
-
border = Object.fromEntries(Object.entries(border).map(([
|
|
184199
|
+
border = Object.fromEntries(Object.entries(border).map(([k2, v2]) => [k2, mask && !mask[k2] ? 0 : v2]));
|
|
183859
184200
|
const doc = this.document;
|
|
183860
184201
|
if ([border.right, border.bottom, border.left].every((val) => val === border.top)) {
|
|
183861
184202
|
if (border.top > 0) {
|
|
@@ -184317,7 +184658,7 @@ function bundledFontPaths() {
|
|
|
184317
184658
|
const rootFromSrc = join4(here, "..", "..");
|
|
184318
184659
|
const candidates = [join4(here, "fonts"), join4(rootFromSrc, "dist", "fonts")];
|
|
184319
184660
|
const fontsDir = candidates.find(
|
|
184320
|
-
(
|
|
184661
|
+
(d) => existsSync3(join4(d, "Pretendard-Regular.ttf")) && existsSync3(join4(d, "Pretendard-Bold.ttf"))
|
|
184321
184662
|
);
|
|
184322
184663
|
const dir = fontsDir || candidates[0];
|
|
184323
184664
|
return {
|
|
@@ -184358,7 +184699,7 @@ function stripFrontmatter2(md) {
|
|
|
184358
184699
|
return md.replace(FRONTMATTER_RE2, "");
|
|
184359
184700
|
}
|
|
184360
184701
|
function lexAndExtractPlantUml(body) {
|
|
184361
|
-
const tokens =
|
|
184702
|
+
const tokens = f3.lexer(stripFrontmatter2(body ?? ""));
|
|
184362
184703
|
const pumlRegistry = /* @__PURE__ */ new Map();
|
|
184363
184704
|
let counter = 0;
|
|
184364
184705
|
for (const tok of tokens) {
|
|
@@ -185533,7 +185874,7 @@ var xrayClientSecret = process.env.XRAY_CLIENT_SECRET || "";
|
|
|
185533
185874
|
var xray = xrayClientId && xrayClientSecret ? new XrayClient(xrayClientId, xrayClientSecret, jiraUrl, jiraEmail, jiraToken) : null;
|
|
185534
185875
|
var server = new McpServer({
|
|
185535
185876
|
name: "jira-confluence",
|
|
185536
|
-
version: "0.1.
|
|
185877
|
+
version: "0.1.31"
|
|
185537
185878
|
});
|
|
185538
185879
|
var ctx = { server, jira, confluence, risk, xray };
|
|
185539
185880
|
registerJiraCrudTools(ctx);
|