PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/blocks/index.js +1203 -1065 23.6.2 → 24.1.0 View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 "use strict";
2 3 var wp;
3 4 (wp ||= {}).blocks = (() => {
4 5 var __create = Object.create;
@@ -573,56 +574,56 @@
573 574 // node_modules/fast-deep-equal/es6/index.js
574 575 var require_es6 = __commonJS({
575 576 "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
576 577 "use strict";
577 - module.exports = function equal(a2, b3) {
578 - if (a2 === b3) return true;
579 - if (a2 && b3 && typeof a2 == "object" && typeof b3 == "object") {
580 - if (a2.constructor !== b3.constructor) return false;
581 - var length, i2, keys;
582 - if (Array.isArray(a2)) {
583 - length = a2.length;
584 - if (length != b3.length) return false;
585 - for (i2 = length; i2-- !== 0; )
586 - if (!equal(a2[i2], b3[i2])) return false;
578 + module.exports = function equal(a, b2) {
579 + if (a === b2) return true;
580 + if (a && b2 && typeof a == "object" && typeof b2 == "object") {
581 + if (a.constructor !== b2.constructor) return false;
582 + var length, i, keys;
583 + if (Array.isArray(a)) {
584 + length = a.length;
585 + if (length != b2.length) return false;
586 + for (i = length; i-- !== 0; )
587 + if (!equal(a[i], b2[i])) return false;
587 588 return true;
588 589 }
589 - if (a2 instanceof Map && b3 instanceof Map) {
590 - if (a2.size !== b3.size) return false;
591 - for (i2 of a2.entries())
592 - if (!b3.has(i2[0])) return false;
593 - for (i2 of a2.entries())
594 - if (!equal(i2[1], b3.get(i2[0]))) return false;
590 + if (a instanceof Map && b2 instanceof Map) {
591 + if (a.size !== b2.size) return false;
592 + for (i of a.entries())
593 + if (!b2.has(i[0])) return false;
594 + for (i of a.entries())
595 + if (!equal(i[1], b2.get(i[0]))) return false;
595 596 return true;
596 597 }
597 - if (a2 instanceof Set && b3 instanceof Set) {
598 - if (a2.size !== b3.size) return false;
599 - for (i2 of a2.entries())
600 - if (!b3.has(i2[0])) return false;
598 + if (a instanceof Set && b2 instanceof Set) {
599 + if (a.size !== b2.size) return false;
600 + for (i of a.entries())
601 + if (!b2.has(i[0])) return false;
601 602 return true;
602 603 }
603 - if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b3)) {
604 - length = a2.length;
605 - if (length != b3.length) return false;
606 - for (i2 = length; i2-- !== 0; )
607 - if (a2[i2] !== b3[i2]) return false;
604 + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b2)) {
605 + length = a.length;
606 + if (length != b2.length) return false;
607 + for (i = length; i-- !== 0; )
608 + if (a[i] !== b2[i]) return false;
608 609 return true;
609 610 }
610 - if (a2.constructor === RegExp) return a2.source === b3.source && a2.flags === b3.flags;
611 - if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b3.valueOf();
612 - if (a2.toString !== Object.prototype.toString) return a2.toString() === b3.toString();
613 - keys = Object.keys(a2);
611 + if (a.constructor === RegExp) return a.source === b2.source && a.flags === b2.flags;
612 + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b2.valueOf();
613 + if (a.toString !== Object.prototype.toString) return a.toString() === b2.toString();
614 + keys = Object.keys(a);
614 615 length = keys.length;
615 - if (length !== Object.keys(b3).length) return false;
616 - for (i2 = length; i2-- !== 0; )
617 - if (!Object.prototype.hasOwnProperty.call(b3, keys[i2])) return false;
618 - for (i2 = length; i2-- !== 0; ) {
619 - var key = keys[i2];
620 - if (!equal(a2[key], b3[key])) return false;
616 + if (length !== Object.keys(b2).length) return false;
617 + for (i = length; i-- !== 0; )
618 + if (!Object.prototype.hasOwnProperty.call(b2, keys[i])) return false;
619 + for (i = length; i-- !== 0; ) {
620 + var key = keys[i];
621 + if (!equal(a[key], b2[key])) return false;
621 622 }
622 623 return true;
623 624 }
624 - return a2 !== a2 && b3 !== b3;
625 + return a !== a && b2 !== b2;
625 626 };
626 627 }
627 628 });
628 629
@@ -966,14 +967,14 @@
966 967 var import_data5 = __toESM(require_data(), 1);
967 968
968 969 // node_modules/tslib/tslib.es6.mjs
969 970 var __assign = function() {
970 - __assign = Object.assign || function __assign2(t3) {
971 - for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
972 - s2 = arguments[i2];
973 - for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t3[p2] = s2[p2];
971 + __assign = Object.assign || function __assign2(t2) {
972 + for (var s, i = 1, n = arguments.length; i < n; i++) {
973 + s = arguments[i];
974 + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
974 975 }
975 - return t3;
976 + return t2;
976 977 };
977 978 return __assign.apply(this, arguments);
978 979 };
979 980
@@ -998,13 +999,13 @@
998 999 while (result.charAt(end - 1) === "\0")
999 1000 end--;
1000 1001 return result.slice(start, end).split("\0").map(transform).join(delimiter);
1001 1002 }
1002 - function replace(input, re2, value) {
1003 - if (re2 instanceof RegExp)
1004 - return input.replace(re2, value);
1005 - return re2.reduce(function(input2, re3) {
1006 - return input2.replace(re3, value);
1003 + function replace(input, re, value) {
1004 + if (re instanceof RegExp)
1005 + return input.replace(re, value);
1006 + return re.reduce(function(input2, re2) {
1007 + return input2.replace(re2, value);
1007 1008 }, input);
1008 1009 }
1009 1010
1010 1011 // node_modules/pascal-case/dist.es2015/index.js
@@ -1040,217 +1041,230 @@
1040 1041 var import_data2 = __toESM(require_data(), 1);
1041 1042 var import_i18n3 = __toESM(require_i18n(), 1);
1042 1043
1043 1044 // node_modules/colord/index.mjs
1044 - var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
1045 - var t = function(r2) {
1046 - return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
1045 + for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t2 = function(r3) {
1046 + return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
1047 + }, n = function(r3, t3, n2) {
1048 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0;
1049 + }, u = function(r3, t3, n2) {
1050 + return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3;
1051 + }, e2 = function(r3) {
1052 + return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
1053 + }, o2 = function(r3, t3) {
1054 + return void 0 === t3 && (t3 = 0), n(r3, t3) % 360;
1055 + }, a = function(r3) {
1056 + return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
1057 + }, i = function(r3) {
1058 + return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
1059 + }, s = /^#([0-9a-f]{3,8})$/i, d2 = function(r3, t3) {
1060 + var n2 = r3.charCodeAt(t3);
1061 + return (15 & n2) + 9 * (n2 >> 6);
1062 + }, h = function(r3, t3) {
1063 + return d2(r3, t3) << 4 | d2(r3, t3 + 1);
1064 + }, b2 = [], f2 = 0; f2 < 256; f2++) b2.push((f2 < 16 ? "0" : "") + f2.toString(16));
1065 + var r2;
1066 + var t2;
1067 + var n;
1068 + var u;
1069 + var e2;
1070 + var o2;
1071 + var a;
1072 + var i;
1073 + var s;
1074 + var d2;
1075 + var h;
1076 + var b2;
1077 + var f2;
1078 + var g = function(r2) {
1079 + return b2[u(r2, 0, 255)];
1047 1080 };
1048 - var n = function(r2, t3, n2) {
1049 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r2) / n2 + 0;
1081 + var c = function(r2) {
1082 + var t2 = r2.r, n = r2.g, u = r2.b, e2 = r2.a, o2 = Math.max(t2, n, u), a = o2 - Math.min(t2, n, u), i = a ? o2 === t2 ? (n - u) / a : o2 === n ? 2 + (u - t2) / a : 4 + (t2 - n) / a : 0;
1083 + return { h: 60 * (i < 0 ? i + 6 : i), s: o2 ? a / o2 * 100 : 0, v: o2 / 255 * 100, a: e2 };
1050 1084 };
1051 - var e = function(r2, t3, n2) {
1052 - return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t3 ? r2 : t3;
1085 + var v = function(r2) {
1086 + var t2 = r2.h, n = r2.s, u = r2.v, e2 = r2.a;
1087 + t2 = t2 / 360 * 6, n /= 100, u /= 100;
1088 + var o2 = Math.floor(t2), a = u * (1 - n), i = u * (1 - (t2 - o2) * n), s = u * (1 - (1 - t2 + o2) * n), d2 = o2 % 6;
1089 + return { r: 255 * [u, i, a, a, s, u][d2], g: 255 * [s, u, u, i, a, a][d2], b: 255 * [a, a, s, u, u, i][d2], a: e2 };
1053 1090 };
1054 - var u = function(r2) {
1055 - return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
1091 + var l = function(r2) {
1092 + return { h: e2(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
1056 1093 };
1057 - var a = function(r2) {
1058 - return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
1094 + var p = function(r2) {
1095 + return { h: o2(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1059 1096 };
1060 - var o = function(r2) {
1061 - return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
1097 + var m = function(r2) {
1098 + return v((n = (t2 = r2).s, { h: t2.h, s: (n *= ((u = t2.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t2.a }));
1099 + var t2, n, u;
1062 1100 };
1063 - var i = /^#([0-9a-f]{3,8})$/i;
1064 - var s = function(r2) {
1065 - var t3 = r2.toString(16);
1066 - return t3.length < 2 ? "0" + t3 : t3;
1101 + var y = function(r2) {
1102 + return { h: (t2 = c(r2)).h, s: (e2 = (200 - (n = t2.s)) * (u = t2.v) / 100) > 0 && e2 < 200 ? n * u / 100 / (e2 <= 100 ? e2 : 200 - e2) * 100 : 0, l: e2 / 2, a: t2.a };
1103 + var t2, n, u, e2;
1067 1104 };
1068 - var h = function(r2) {
1069 - var t3 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
1070 - return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
1071 - };
1072 - var b = function(r2) {
1073 - var t3 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
1074 - t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
1075 - var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
1076 - return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
1077 - };
1078 - var g = function(r2) {
1079 - return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
1080 - };
1081 - var d = function(r2) {
1082 - return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
1083 - };
1084 - var f = function(r2) {
1085 - return b((n2 = (t3 = r2).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
1086 - var t3, n2, e2;
1087 - };
1088 - var c = function(r2) {
1089 - return { h: (t3 = h(r2)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
1090 - var t3, n2, e2, u2;
1091 - };
1092 - var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1093 - var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1094 - var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1095 - var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
1096 - var y = { string: [[function(r2) {
1097 - var t3 = i.exec(r2);
1098 - return t3 ? (r2 = t3[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
1105 + var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1106 + var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1107 + var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1108 + var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
1109 + var $ = { string: [[function(r2) {
1110 + if (!s.test(r2)) return null;
1111 + var t2 = r2.length;
1112 + return t2 <= 5 ? { r: 17 * d2(r2, 1), g: 17 * d2(r2, 2), b: 17 * d2(r2, 3), a: 5 === t2 ? n(17 * d2(r2, 4) / 255, 2) : 1 } : 7 === t2 || 9 === t2 ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t2 ? n(h(r2, 7) / 255, 2) : 1 } : null;
1099 1113 }, "hex"], [function(r2) {
1100 - var t3 = v.exec(r2) || m.exec(r2);
1101 - return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
1102 - }, "rgb"], [function(t3) {
1103 - var n2 = l.exec(t3) || p.exec(t3);
1104 - if (!n2) return null;
1105 - var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
1106 - return f(a2);
1114 + var t2 = M.exec(r2) || H.exec(r2);
1115 + return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
1116 + }, "rgb"], [function(t2) {
1117 + var n = N.exec(t2) || x.exec(t2);
1118 + if (!n) return null;
1119 + var u, e2, o2 = l({ h: (u = n[1], e2 = n[2], void 0 === e2 && (e2 = "deg"), Number(u) * (r2[e2] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
1120 + return m(o2);
1107 1121 }, "hsl"]], object: [[function(r2) {
1108 - var n2 = r2.r, e2 = r2.g, u2 = r2.b, o3 = r2.a, i2 = void 0 === o3 ? 1 : o3;
1109 - return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
1122 + var n = r2.r, u = r2.g, e2 = r2.b, o2 = r2.a, i = void 0 === o2 ? 1 : o2;
1123 + return t2(n) && t2(u) && t2(e2) ? a({ r: Number(n), g: Number(u), b: Number(e2), a: Number(i) }) : null;
1110 1124 }, "rgb"], [function(r2) {
1111 - var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o3 = void 0 === a2 ? 1 : a2;
1112 - if (!t(n2) || !t(e2) || !t(u2)) return null;
1113 - var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
1114 - return f(i2);
1125 + var n = r2.h, u = r2.s, e2 = r2.l, o2 = r2.a, a = void 0 === o2 ? 1 : o2;
1126 + if (!t2(n) || !t2(u) || !t2(e2)) return null;
1127 + var i = l({ h: Number(n), s: Number(u), l: Number(e2), a: Number(a) });
1128 + return m(i);
1115 1129 }, "hsl"], [function(r2) {
1116 - var n2 = r2.h, a2 = r2.s, o3 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
1117 - if (!t(n2) || !t(a2) || !t(o3)) return null;
1118 - var h2 = (function(r3) {
1119 - return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
1120 - })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
1121 - return b(h2);
1130 + var n = r2.h, o2 = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
1131 + if (!t2(n) || !t2(o2) || !t2(a)) return null;
1132 + var d2 = (function(r3) {
1133 + return { h: e2(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
1134 + })({ h: Number(n), s: Number(o2), v: Number(a), a: Number(s) });
1135 + return v(d2);
1122 1136 }, "hsv"]] };
1123 - var N = function(r2, t3) {
1124 - for (var n2 = 0; n2 < t3.length; n2++) {
1125 - var e2 = t3[n2][0](r2);
1126 - if (e2) return [e2, t3[n2][1]];
1137 + var j = function(r2, t2) {
1138 + for (var n = 0; n < t2.length; n++) {
1139 + var u = t2[n][0](r2);
1140 + if (u) return [u, t2[n][1]];
1127 1141 }
1128 1142 return [null, void 0];
1129 1143 };
1130 - var x = function(r2) {
1131 - return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
1144 + var w = function(r2) {
1145 + return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
1132 1146 };
1133 - var M = function(r2, t3) {
1134 - var n2 = c(r2);
1135 - return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
1147 + var k = function(r2, t2) {
1148 + var n = y(r2);
1149 + return { h: n.h, s: u(n.s + 100 * t2, 0, 100), l: n.l, a: n.a };
1136 1150 };
1137 - var H = function(r2) {
1151 + var E = function(r2) {
1138 1152 return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
1139 1153 };
1140 - var $ = function(r2, t3) {
1141 - var n2 = c(r2);
1142 - return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
1154 + var R = function(r2, t2) {
1155 + var n = y(r2);
1156 + return { h: n.h, s: n.s, l: u(n.l + 100 * t2, 0, 100), a: n.a };
1143 1157 };
1144 - var j = (function() {
1158 + var q = (function() {
1145 1159 function r2(r3) {
1146 - this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1160 + this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
1147 1161 }
1148 1162 return r2.prototype.isValid = function() {
1149 1163 return null !== this.parsed;
1150 1164 }, r2.prototype.brightness = function() {
1151 - return n(H(this.rgba), 2);
1165 + return n(E(this.rgba), 2);
1152 1166 }, r2.prototype.isDark = function() {
1153 - return H(this.rgba) < 0.5;
1167 + return E(this.rgba) < 0.5;
1154 1168 }, r2.prototype.isLight = function() {
1155 - return H(this.rgba) >= 0.5;
1169 + return E(this.rgba) >= 0.5;
1156 1170 }, r2.prototype.toHex = function() {
1157 - return r3 = o(this.rgba), t3 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
1158 - var r3, t3, e2, u2, a2, i2;
1171 + return r3 = i(this.rgba), t2 = r3.r, u = r3.g, e2 = r3.b, a = (o2 = r3.a) < 1 ? g(n(255 * o2)) : "", "#" + g(t2) + g(u) + g(e2) + a;
1172 + var r3, t2, u, e2, o2, a;
1159 1173 }, r2.prototype.toRgb = function() {
1160 - return o(this.rgba);
1174 + return i(this.rgba);
1161 1175 }, r2.prototype.toRgbString = function() {
1162 - return r3 = o(this.rgba), t3 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
1163 - var r3, t3, n2, e2, u2;
1176 + return r3 = i(this.rgba), t2 = r3.r, n = r3.g, u = r3.b, (e2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n + ", " + u + ", " + e2 + ")" : "rgb(" + t2 + ", " + n + ", " + u + ")";
1177 + var r3, t2, n, u, e2;
1164 1178 }, r2.prototype.toHsl = function() {
1165 - return d(c(this.rgba));
1179 + return p(y(this.rgba));
1166 1180 }, r2.prototype.toHslString = function() {
1167 - return r3 = d(c(this.rgba)), t3 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
1168 - var r3, t3, n2, e2, u2;
1181 + return r3 = p(y(this.rgba)), t2 = r3.h, n = r3.s, u = r3.l, (e2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n + "%, " + u + "%, " + e2 + ")" : "hsl(" + t2 + ", " + n + "%, " + u + "%)";
1182 + var r3, t2, n, u, e2;
1169 1183 }, r2.prototype.toHsv = function() {
1170 - return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1184 + return r3 = c(this.rgba), { h: o2(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
1171 1185 var r3;
1172 1186 }, r2.prototype.invert = function() {
1173 - return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1187 + return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
1174 1188 var r3;
1175 1189 }, r2.prototype.saturate = function(r3) {
1176 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
1190 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
1177 1191 }, r2.prototype.desaturate = function(r3) {
1178 - return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
1192 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
1179 1193 }, r2.prototype.grayscale = function() {
1180 - return w(M(this.rgba, -1));
1194 + return A(k(this.rgba, -1));
1181 1195 }, r2.prototype.lighten = function(r3) {
1182 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
1196 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
1183 1197 }, r2.prototype.darken = function(r3) {
1184 - return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
1198 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
1185 1199 }, r2.prototype.rotate = function(r3) {
1186 - return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
1200 + return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
1187 1201 }, r2.prototype.alpha = function(r3) {
1188 - return "number" == typeof r3 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r3 }) : n(this.rgba.a, 3);
1189 - var t3;
1202 + return "number" == typeof r3 ? A({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
1203 + var t2;
1190 1204 }, r2.prototype.hue = function(r3) {
1191 - var t3 = c(this.rgba);
1192 - return "number" == typeof r3 ? w({ h: r3, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
1205 + var t2 = y(this.rgba);
1206 + return "number" == typeof r3 ? A({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : o2(t2.h);
1193 1207 }, r2.prototype.isEqual = function(r3) {
1194 - return this.toHex() === w(r3).toHex();
1208 + return this.toHex() === A(r3).toHex();
1195 1209 }, r2;
1196 1210 })();
1197 - var w = function(r2) {
1198 - return r2 instanceof j ? r2 : new j(r2);
1211 + var A = function(r2) {
1212 + return r2 instanceof q ? r2 : new q(r2);
1199 1213 };
1200 - var S = [];
1201 - var k = function(r2) {
1214 + var C = [];
1215 + var D = function(r2) {
1202 1216 r2.forEach(function(r3) {
1203 - S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
1217 + C.indexOf(r3) < 0 && (r3(q, $), C.push(r3));
1204 1218 });
1205 1219 };
1206 1220
1207 1221 // node_modules/colord/plugins/names.mjs
1208 - function names_default(e2, f2) {
1209 - var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1210 - for (var d3 in a2) r2[a2[d3]] = d3;
1222 + var e = function(e2, f2) {
1223 + var a = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
1224 + for (var d2 in a) r2[a[d2]] = d2;
1211 1225 var l4 = {};
1212 1226 e2.prototype.toName = function(f3) {
1213 1227 if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
1214 - var d4, i2, n2 = r2[this.toHex()];
1215 - if (n2) return n2;
1228 + var d3, i, n = r2[this.toHex()];
1229 + if (n) return n;
1216 1230 if (null == f3 ? void 0 : f3.closest) {
1217 - var o3 = this.toRgb(), t3 = 1 / 0, b3 = "black";
1218 - if (!l4.length) for (var c2 in a2) l4[c2] = new e2(a2[c2]).toRgb();
1219 - for (var g3 in a2) {
1220 - var u2 = (d4 = o3, i2 = l4[g3], Math.pow(d4.r - i2.r, 2) + Math.pow(d4.g - i2.g, 2) + Math.pow(d4.b - i2.b, 2));
1221 - u2 < t3 && (t3 = u2, b3 = g3);
1231 + var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
1232 + if (!l4.length) for (var c2 in a) l4[c2] = new e2(a[c2]).toRgb();
1233 + for (var g2 in a) {
1234 + var u = (d3 = o2, i = l4[g2], Math.pow(d3.r - i.r, 2) + Math.pow(d3.g - i.g, 2) + Math.pow(d3.b - i.b, 2));
1235 + u < t2 && (t2 = u, b2 = g2);
1222 1236 }
1223 - return b3;
1237 + return b2;
1224 1238 }
1225 1239 };
1226 1240 f2.string.push([function(f3) {
1227 - var r3 = f3.toLowerCase(), d4 = "transparent" === r3 ? "#0000" : a2[r3];
1228 - return d4 ? new e2(d4).toRgb() : null;
1241 + var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a[r3];
1242 + return d3 ? new e2(d3).toRgb() : null;
1229 1243 }, "name"]);
1230 - }
1244 + };
1231 1245
1232 1246 // node_modules/colord/plugins/a11y.mjs
1233 - var o2 = function(o3) {
1234 - var t3 = o3 / 255;
1235 - return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
1247 + var o = function(o2) {
1248 + var t2 = o2 / 255;
1249 + return t2 < 0.04045 ? t2 / 12.92 : Math.pow((t2 + 0.055) / 1.055, 2.4);
1236 1250 };
1237 - var t2 = function(t3) {
1238 - return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
1251 + var t = function(t2) {
1252 + return 0.2126 * o(t2.r) + 0.7152 * o(t2.g) + 0.0722 * o(t2.b);
1239 1253 };
1240 - function a11y_default(o3) {
1241 - o3.prototype.luminance = function() {
1242 - return o4 = t2(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o4) / n2 + 0;
1243 - var o4, r2, n2;
1244 - }, o3.prototype.contrast = function(r2) {
1254 + var r = function(o2) {
1255 + o2.prototype.luminance = function() {
1256 + return o3 = t(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n && (n = Math.pow(10, r2)), Math.round(n * o3) / n + 0;
1257 + var o3, r2, n;
1258 + }, o2.prototype.contrast = function(r2) {
1245 1259 void 0 === r2 && (r2 = "#FFF");
1246 - var n2, a2, i2, e2, v3, u2, d3, c2 = r2 instanceof o3 ? r2 : new o3(r2);
1247 - return e2 = this.rgba, v3 = c2.toRgb(), u2 = t2(e2), d3 = t2(v3), n2 = u2 > d3 ? (u2 + 0.05) / (d3 + 0.05) : (d3 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
1248 - }, o3.prototype.isReadable = function(o4, t3) {
1249 - return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r2 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
1250 - var r2, n2, a2, i2, e2;
1260 + var n, a, i, e2, v3, u, d2, c2 = r2 instanceof o2 ? r2 : new o2(r2);
1261 + return e2 = this.rgba, v3 = c2.toRgb(), u = t(e2), d2 = t(v3), n = u > d2 ? (u + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u + 0.05), void 0 === (a = 2) && (a = 0), void 0 === i && (i = Math.pow(10, a)), Math.floor(i * n) / i + 0;
1262 + }, o2.prototype.isReadable = function(o3, t2) {
1263 + return void 0 === o3 && (o3 = "#FFF"), void 0 === t2 && (t2 = {}), this.contrast(o3) >= (e2 = void 0 === (i = (r2 = t2).size) ? "normal" : i, "AAA" === (a = void 0 === (n = r2.level) ? "AA" : n) && "normal" === e2 ? 7 : "AA" === a && "large" === e2 ? 3 : 4.5);
1264 + var r2, n, a, i, e2;
1251 1265 };
1252 - }
1266 + };
1253 1267
1254 1268 // packages/blocks/build-module/api/utils.mjs
1255 1269 var import_element = __toESM(require_element(), 1);
1256 1270 var import_i18n2 = __toESM(require_i18n(), 1);
@@ -1531,8 +1545,13 @@
1531 1545 value: ["typography", "textIndent"],
1532 1546 support: ["typography", "textIndent"],
1533 1547 useEngine: true
1534 1548 },
1549 + textShadow: {
1550 + value: ["typography", "textShadow"],
1551 + support: ["typography", "textShadow"],
1552 + useEngine: true
1553 + },
1535 1554 writingMode: {
1536 1555 value: ["typography", "writingMode"],
1537 1556 support: ["typography", "__experimentalWritingMode"],
1538 1557 useEngine: true
@@ -1560,8 +1579,9 @@
1560 1579 h6: "h6",
1561 1580 button: ".wp-element-button, .wp-block-button__link",
1562 1581 caption: ".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",
1563 1582 cite: "cite",
1583 + label: "label",
1564 1584 select: "select",
1565 1585 textInput: "textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=url])"
1566 1586 };
1567 1587 var __EXPERIMENTAL_PATHS_WITH_OVERRIDE = {
@@ -1906,9 +1926,9 @@
1906 1926 return unlock((0, import_data.select)(store)).getAllBlockBindingsSources();
1907 1927 }
1908 1928
1909 1929 // packages/blocks/build-module/api/utils.mjs
1910 - k([names_default, a11y_default]);
1930 + D([e, r]);
1911 1931 var ICON_COLORS = ["#191e23", "#f8f9f9"];
1912 1932 function isUnmodifiedBlock(block, role) {
1913 1933 const blockAttributes = getBlockType(block.name)?.attributes ?? {};
1914 1934 const attributesByRole = role ? Object.entries(blockAttributes).filter(([key, definition]) => {
@@ -1943,9 +1963,9 @@
1943 1963 return { src: resolvedIcon };
1944 1964 }
1945 1965 const iconDescriptor = resolvedIcon;
1946 1966 if ("background" in iconDescriptor) {
1947 - const colordBgColor = w(iconDescriptor.background);
1967 + const colordBgColor = A(iconDescriptor.background);
1948 1968 const getColorContrast = (iconColor) => colordBgColor.contrast(iconColor);
1949 1969 const maxContrast = Math.max(...ICON_COLORS.map(getColorContrast));
1950 1970 return {
1951 1971 ...iconDescriptor,
@@ -2470,8 +2490,9 @@
2470 2490 __export(private_selectors_exports, {
2471 2491 getAllBlockBindingsSources: () => getAllBlockBindingsSources,
2472 2492 getBlockBindingsSource: () => getBlockBindingsSource2,
2473 2493 getBlockBindingsSourceFieldsList: () => getBlockBindingsSourceFieldsList,
2494 + getBlockKeyboardShortcuts: () => getBlockKeyboardShortcuts,
2474 2495 getBootstrappedBlockType: () => getBootstrappedBlockType,
2475 2496 getSupportedStyles: () => getSupportedStyles,
2476 2497 getUnprocessedBlockTypes: () => getUnprocessedBlockTypes,
2477 2498 hasContentRoleAttribute: () => hasContentRoleAttribute
@@ -2498,8 +2519,9 @@
2498 2519 "textAlign",
2499 2520 "textDecoration",
2500 2521 "textIndent",
2501 2522 "textTransform",
2523 + "textShadow",
2502 2524 "letterSpacing"
2503 2525 ];
2504 2526 function filterElementBlockSupports(blockSupports, name, element) {
2505 2527 return blockSupports.filter((support) => {
@@ -2605,8 +2627,59 @@
2605 2627 },
2606 2628 (state, source, blockContext) => [source.getFieldsList, source.usesContext, blockContext]
2607 2629 )
2608 2630 );
2631 + var getBlockKeyboardShortcuts = (0, import_data3.createSelector)(
2632 + (state) => {
2633 + const shortcuts = [];
2634 + for (const blockName of Object.keys(state.blockTypes)) {
2635 + for (const variation of state.blockVariations[blockName] ?? []) {
2636 + if (!variation.shortcut) {
2637 + continue;
2638 + }
2639 + shortcuts.push({
2640 + ...variation.shortcut,
2641 + targetBlockName: blockName,
2642 + blockNames: [blockName],
2643 + variationName: variation.name
2644 + });
2645 + }
2646 + const transforms = state.blockTypes[blockName]?.transforms;
2647 + for (const transform of transforms?.to ?? []) {
2648 + if (transform.type !== "block") {
2649 + continue;
2650 + }
2651 + const targetBlockName = transform.blocks?.[0];
2652 + if (!targetBlockName) {
2653 + continue;
2654 + }
2655 + for (const shortcut of transform.shortcuts ?? []) {
2656 + shortcuts.push({
2657 + ...shortcut,
2658 + targetBlockName,
2659 + blockNames: [blockName],
2660 + variationName: shortcut.variationName ?? transform.variationName
2661 + });
2662 + }
2663 + }
2664 + for (const transform of transforms?.from ?? []) {
2665 + if (transform.type !== "block" || !transform.blocks?.length) {
2666 + continue;
2667 + }
2668 + for (const shortcut of transform.shortcuts ?? []) {
2669 + shortcuts.push({
2670 + ...shortcut,
2671 + targetBlockName: blockName,
2672 + blockNames: transform.blocks,
2673 + variationName: shortcut.variationName ?? transform.variationName
2674 + });
2675 + }
2676 + }
2677 + }
2678 + return shortcuts;
2679 + },
2680 + (state) => [state.blockTypes, state.blockVariations]
2681 + );
2609 2682 var hasContentRoleAttribute = (state, blockTypeName) => {
2610 2683 const blockType = getBlockType2(state, blockTypeName);
2611 2684 if (!blockType) {
2612 2685 return false;
@@ -2821,15 +2894,15 @@
2821 2894 });
2822 2895 var import_deprecated5 = __toESM(require_deprecated(), 1);
2823 2896
2824 2897 // node_modules/is-plain-object/dist/is-plain-object.mjs
2825 - function isObject3(o3) {
2826 - return Object.prototype.toString.call(o3) === "[object Object]";
2898 + function isObject3(o2) {
2899 + return Object.prototype.toString.call(o2) === "[object Object]";
2827 2900 }
2828 - function isPlainObject(o3) {
2901 + function isPlainObject(o2) {
2829 2902 var ctor, prot;
2830 - if (isObject3(o3) === false) return false;
2831 - ctor = o3.constructor;
2903 + if (isObject3(o2) === false) return false;
2904 + ctor = o2.constructor;
2832 2905 if (ctor === void 0) return true;
2833 2906 prot = ctor.prototype;
2834 2907 if (isObject3(prot) === false) return false;
2835 2908 if (prot.hasOwnProperty("isPrototypeOf") === false) {
@@ -2947,9 +3020,9 @@
2947 3020 if ("edit" in settings && !(0, import_react_is.isValidElementType)(settings.edit)) {
2948 3021 (0, import_warning2.default)('The "edit" property must be a valid component.');
2949 3022 return;
2950 3023 }
2951 - if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
3024 + if (typeof settings.category === "string" && LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
2952 3025 settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
2953 3026 }
2954 3027 if ("category" in settings && !select3.getCategories().some(
2955 3028 ({ slug }) => slug === settings.category
@@ -2966,10 +3039,11 @@
2966 3039 if (typeof settings.title !== "string") {
2967 3040 (0, import_warning2.default)("Block titles must be strings.");
2968 3041 return;
2969 3042 }
2970 - settings.icon = normalizeIconObject(settings.icon);
2971 - if (!isValidIcon(settings.icon.src)) {
3043 + const icon = normalizeIconObject(settings.icon);
3044 + settings.icon = icon;
3045 + if (!isValidIcon(icon.src)) {
2972 3046 (0, import_warning2.default)(
2973 3047 "The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional"
2974 3048 );
2975 3049 return;
@@ -3175,10 +3249,10 @@
3175 3249 unlock(store).registerPrivateActions(private_actions_exports);
3176 3250
3177 3251 // node_modules/uuid/dist/stringify.js
3178 3252 var byteToHex = [];
3179 - for (let i2 = 0; i2 < 256; ++i2) {
3180 - byteToHex.push((i2 + 256).toString(16).slice(1));
3253 + for (let i = 0; i < 256; ++i) {
3254 + byteToHex.push((i + 256).toString(16).slice(1));
3181 3255 }
3182 3256 function unsafeStringify(arr, offset = 0) {
3183 3257 return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3184 3258 }
@@ -3208,10 +3282,10 @@
3208 3282 offset = offset || 0;
3209 3283 if (offset < 0 || offset + 16 > buf.length) {
3210 3284 throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
3211 3285 }
3212 - for (let i2 = 0; i2 < 16; ++i2) {
3213 - buf[offset + i2] = rnds[i2];
3286 + for (let i = 0; i < 16; ++i) {
3287 + buf[offset + i] = rnds[i];
3214 3288 }
3215 3289 return buf;
3216 3290 }
3217 3291 return unsafeStringify(rnds);
@@ -3221,8 +3295,9 @@
3221 3295 // packages/blocks/build-module/api/factory.mjs
3222 3296 var import_hooks2 = __toESM(require_hooks(), 1);
3223 3297 var import_deprecated6 = __toESM(require_deprecated(), 1);
3224 3298 var import_warning3 = __toESM(require_warning(), 1);
3299 + var isBlockTypeTransform = (transform) => transform?.type === "block";
3225 3300 var getBlockTypeWithTransformMetadata = (blockType, transform) => transform.variationName ? { ...blockType, variationName: transform.variationName } : blockType;
3226 3301 function createBlock(name, attributes = {}, innerBlocks = [], innerContent) {
3227 3302 if (!isBlockRegistered(name)) {
3228 3303 return createBlock("core/missing", {
@@ -3324,12 +3399,8 @@
3324 3399 }
3325 3400 if (!isWildcardBlockTransform(transform) && !blocks.every((block) => block.name === firstBlockName)) {
3326 3401 return false;
3327 3402 }
3328 - const isBlockType = transform.type === "block";
3329 - if (!isBlockType) {
3330 - return false;
3331 - }
3332 3403 const sourceBlock = blocks[0];
3333 3404 const hasMatchingName = direction !== "from" || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
3334 3405 if (!hasMatchingName) {
3335 3406 return false;
@@ -3349,9 +3420,9 @@
3349 3420 const allBlockTypes = getBlockTypes();
3350 3421 const blockTypesWithPossibleFromTransforms = allBlockTypes.flatMap(
3351 3422 (blockType) => {
3352 3423 const fromTransforms = getBlockTransforms("from", blockType.name);
3353 - return fromTransforms.filter(
3424 + return fromTransforms.filter(isBlockTypeTransform).filter(
3354 3425 (transform) => isPossibleTransformForSource(transform, "from", blocks)
3355 3426 ).map(
3356 3427 (transform) => getBlockTypeWithTransformMetadata(blockType, transform)
3357 3428 );
@@ -3365,13 +3436,13 @@
3365 3436 }
3366 3437 const sourceBlock = blocks[0];
3367 3438 const blockType = getBlockType(sourceBlock.name);
3368 3439 const transformsTo = blockType ? getBlockTransforms("to", blockType.name) : [];
3369 - const possibleTransforms = transformsTo.filter((transform) => {
3370 - return transform && isPossibleTransformForSource(transform, "to", blocks);
3371 - });
3440 + const possibleTransforms = transformsTo.filter(isBlockTypeTransform).filter(
3441 + (transform) => isPossibleTransformForSource(transform, "to", blocks)
3442 + );
3372 3443 return possibleTransforms.flatMap((transformation) => {
3373 - return (transformation.blocks || []).map((name) => {
3444 + return (transformation.blocks ?? []).map((name) => {
3374 3445 const transformedBlockType = getBlockType(name);
3375 3446 return transformedBlockType ? getBlockTypeWithTransformMetadata(
3376 3447 transformedBlockType,
3377 3448 transformation
@@ -3376,11 +3447,11 @@
3376 3447 transformedBlockType,
3377 3448 transformation
3378 3449 ) : void 0;
3379 3450 });
3380 - }).filter((bt) => !!bt);
3451 + }).filter((bt2) => !!bt2);
3381 3452 };
3382 - var isWildcardBlockTransform = (t3) => !!t3 && t3.type === "block" && Array.isArray(t3.blocks) && t3.blocks.includes("*");
3453 + var isWildcardBlockTransform = (t2) => isBlockTypeTransform(t2) && Array.isArray(t2.blocks) && t2.blocks.includes("*");
3383 3454 var isContainerGroupBlock = (name) => name === getGroupingBlockName();
3384 3455 function getPossibleBlockTransformations(blocks) {
3385 3456 if (!blocks.length) {
3386 3457 return [];
@@ -3400,14 +3471,14 @@
3400 3471 return [...blockTypesByNameAndVariation.values()];
3401 3472 }
3402 3473 function findTransform(transforms, predicate) {
3403 3474 const hooks = (0, import_hooks2.createHooks)();
3404 - for (let i2 = 0; i2 < transforms.length; i2++) {
3405 - const candidate = transforms[i2];
3475 + for (let i = 0; i < transforms.length; i++) {
3476 + const candidate = transforms[i];
3406 3477 if (predicate(candidate)) {
3407 3478 hooks.addFilter(
3408 3479 "transform",
3409 - "transform/" + i2.toString(),
3480 + "transform/" + i.toString(),
3410 3481 (result) => result ? result : candidate,
3411 3482 candidate.priority
3412 3483 );
3413 3484 }
@@ -3418,37 +3489,15 @@
3418 3489 if (blockTypeOrName === void 0) {
3419 3490 return getBlockTypes().map(({ name }) => getBlockTransforms(direction, name)).flat();
3420 3491 }
3421 3492 const blockType = normalizeBlockType(blockTypeOrName);
3422 - const { name: blockName, transforms } = blockType || {};
3423 - const directionTransforms = transforms?.[direction];
3424 - if (!transforms || !Array.isArray(directionTransforms)) {
3493 + const directionTransforms = blockType?.transforms?.[direction];
3494 + if (!blockType || !Array.isArray(directionTransforms)) {
3425 3495 return [];
3426 3496 }
3427 - const usingMobileTransformations = transforms.supportedMobileTransforms && Array.isArray(transforms.supportedMobileTransforms);
3428 - const filteredTransforms = usingMobileTransformations ? directionTransforms.filter((t3) => {
3429 - if (t3.type === "raw") {
3430 - return true;
3431 - }
3432 - if (t3.type === "prefix") {
3433 - return true;
3434 - }
3435 - if (!t3.blocks || !t3.blocks.length) {
3436 - return false;
3437 - }
3438 - if (isWildcardBlockTransform(t3)) {
3439 - return true;
3440 - }
3441 - return t3.blocks.every(
3442 - (transformBlockName) => transforms.supportedMobileTransforms.includes(
3443 - transformBlockName
3444 - )
3445 - );
3446 - }) : directionTransforms;
3447 - return filteredTransforms.map((transform) => ({
3497 + return directionTransforms.map((transform) => ({
3448 3498 ...transform,
3449 - blockName,
3450 - usingMobileTransformations
3499 + blockName: blockType.name
3451 3500 }));
3452 3501 }
3453 3502 function maybeCheckTransformIsMatch(transform, blocks) {
3454 3503 if (typeof transform.isMatch !== "function") {
@@ -3463,17 +3512,21 @@
3463 3512 const blocksArray = Array.isArray(blocks) ? blocks : [blocks];
3464 3513 const isMultiBlock = blocksArray.length > 1;
3465 3514 const firstBlock = blocksArray[0];
3466 3515 const sourceName = firstBlock.name;
3467 - const transformationsFrom = getBlockTransforms("from", name);
3468 - const transformationsTo = getBlockTransforms("to", sourceName);
3469 - const isMatchingVariation = (t3) => variationName ? t3.variationName === variationName : !t3.variationName;
3516 + const transformationsFrom = getBlockTransforms("from", name).filter(
3517 + isBlockTypeTransform
3518 + );
3519 + const transformationsTo = getBlockTransforms("to", sourceName).filter(
3520 + isBlockTypeTransform
3521 + );
3522 + const isMatchingVariation = (t2) => variationName ? t2.variationName === variationName : !t2.variationName;
3470 3523 const transformation = findTransform(
3471 3524 transformationsTo,
3472 - (t3) => t3.type === "block" && isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3525 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(name) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3473 3526 ) || findTransform(
3474 3527 transformationsFrom,
3475 - (t3) => t3.type === "block" && isMatchingVariation(t3) && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
3528 + (t2) => isMatchingVariation(t2) && (isWildcardBlockTransform(t2) || t2.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || !!t2.isMultiBlock) && maybeCheckTransformIsMatch(t2, blocksArray)
3476 3529 );
3477 3530 if (!transformation) {
3478 3531 return null;
3479 3532 }
@@ -4397,10 +4450,10 @@
4397 4450 }
4398 4451 if (arguments.length === 0) {
4399 4452 return token;
4400 4453 }
4401 - for (var i2 = 0; i2 < arguments.length; i2++) {
4402 - if (token.type === arguments[i2]) {
4454 + for (var i = 0; i < arguments.length; i++) {
4455 + if (token.type === arguments[i]) {
4403 4456 return token;
4404 4457 }
4405 4458 }
4406 4459 throw new Error("token type was unexpectedly " + token.type);
@@ -4654,10 +4707,10 @@
4654 4707 }
4655 4708 function isEquivalentTextTokens(actual, expected, logger = createLogger()) {
4656 4709 let actualChars = actual.chars;
4657 4710 let expectedChars = expected.chars;
4658 - for (let i2 = 0; i2 < TEXT_NORMALIZATIONS.length; i2++) {
4659 - const normalize = TEXT_NORMALIZATIONS[i2];
4711 + for (let i = 0; i < TEXT_NORMALIZATIONS.length; i++) {
4712 + const normalize = TEXT_NORMALIZATIONS[i];
4660 4713 actualChars = normalize(actualChars);
4661 4714 expectedChars = normalize(expectedChars);
4662 4715 if (actualChars === expectedChars) {
4663 4716 return true;
@@ -4726,13 +4779,13 @@
4726 4779 );
4727 4780 return false;
4728 4781 }
4729 4782 const expectedAttributes = {};
4730 - for (let i2 = 0; i2 < expected.length; i2++) {
4731 - expectedAttributes[expected[i2][0].toLowerCase()] = expected[i2][1];
4783 + for (let i = 0; i < expected.length; i++) {
4784 + expectedAttributes[expected[i][0].toLowerCase()] = expected[i][1];
4732 4785 }
4733 - for (let i2 = 0; i2 < actual.length; i2++) {
4734 - const [name, actualValue] = actual[i2];
4786 + for (let i = 0; i < actual.length; i++) {
4787 + const [name, actualValue] = actual[i];
4735 4788 const nameLower = name.toLowerCase();
4736 4789 if (!expectedAttributes.hasOwnProperty(nameLower)) {
4737 4790 logger.warning("Encountered unexpected attribute `%s`.", name);
4738 4791 return false;
@@ -5055,9 +5108,9 @@
5055 5108 var doc = getDocument();
5056 5109 doc.body.innerHTML = source;
5057 5110 source = doc.body;
5058 5111 }
5059 - if ("function" === typeof matchers) {
5112 + if (typeof matchers === "function") {
5060 5113 return matchers(source);
5061 5114 }
5062 5115 if (Object !== matchers.constructor) {
5063 5116 return;
@@ -5062,16 +5115,22 @@
5062 5115 if (Object !== matchers.constructor) {
5063 5116 return;
5064 5117 }
5065 5118 return Object.keys(matchers).reduce(function(memo, key) {
5066 - memo[key] = parse(source, matchers[key]);
5119 + var inner = matchers[key];
5120 + memo[key] = parse(source, inner);
5067 5121 return memo;
5068 5122 }, {});
5069 5123 }
5070 - function prop(selector, name) {
5124 + function prop(arg1, arg2) {
5125 + var name;
5126 + var selector;
5071 5127 if (1 === arguments.length) {
5072 - name = selector;
5128 + name = arg1;
5073 5129 selector = void 0;
5130 + } else {
5131 + name = arg2;
5132 + selector = arg1;
5074 5133 }
5075 5134 return function(node) {
5076 5135 var match = node;
5077 5136 if (selector) {
@@ -5081,16 +5140,21 @@
5081 5140 return getPath(match, name);
5082 5141 }
5083 5142 };
5084 5143 }
5085 - function attr(selector, name) {
5144 + function attr(arg1, arg2) {
5145 + var name;
5146 + var selector;
5086 5147 if (1 === arguments.length) {
5087 - name = selector;
5148 + name = arg1;
5088 5149 selector = void 0;
5150 + } else {
5151 + name = arg2;
5152 + selector = arg1;
5089 5153 }
5090 5154 return function(node) {
5091 5155 var attributes = prop(selector, "attributes")(node);
5092 - if (attributes && attributes.hasOwnProperty(name)) {
5156 + if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) {
5093 5157 return attributes[name].value;
5094 5158 }
5095 5159 };
5096 5160 }
@@ -5112,16 +5176,16 @@
5112 5176 var head;
5113 5177 var tail;
5114 5178 options = options || {};
5115 5179 function memoized() {
5116 - var node = head, len = arguments.length, args, i2;
5180 + var node = head, len = arguments.length, args, i;
5117 5181 searchCache: while (node) {
5118 5182 if (node.args.length !== arguments.length) {
5119 5183 node = node.next;
5120 5184 continue;
5121 5185 }
5122 - for (i2 = 0; i2 < len; i2++) {
5123 - if (node.args[i2] !== arguments[i2]) {
5186 + for (i = 0; i < len; i++) {
5187 + if (node.args[i] !== arguments[i]) {
5124 5188 node = node.next;
5125 5189 continue searchCache;
5126 5190 }
5127 5191 }
@@ -5140,10 +5204,10 @@
5140 5204 }
5141 5205 return node.val;
5142 5206 }
5143 5207 args = new Array(len);
5144 - for (i2 = 0; i2 < len; i2++) {
5145 - args[i2] = arguments[i2];
5208 + for (i = 0; i < len; i++) {
5209 + args[i] = arguments[i];
5146 5210 }
5147 5211 node = {
5148 5212 args,
5149 5213 // Generate the result from original function
@@ -5205,12 +5269,12 @@
5205 5269 alternative: "wp.richText.concat",
5206 5270 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5207 5271 });
5208 5272 const result = [];
5209 - for (let i2 = 0; i2 < blockNodes.length; i2++) {
5210 - const blockNode = Array.isArray(blockNodes[i2]) ? blockNodes[i2] : [blockNodes[i2]];
5211 - for (let j3 = 0; j3 < blockNode.length; j3++) {
5212 - const child = blockNode[j3];
5273 + for (let i = 0; i < blockNodes.length; i++) {
5274 + const blockNode = Array.isArray(blockNodes[i]) ? blockNodes[i] : [blockNodes[i]];
5275 + for (let j2 = 0; j2 < blockNode.length; j2++) {
5276 + const child = blockNode[j2];
5213 5277 const canConcatToPreviousString = typeof child === "string" && typeof result[result.length - 1] === "string";
5214 5278 if (canConcatToPreviousString) {
5215 5279 result[result.length - 1] += child;
5216 5280 } else {
@@ -5227,11 +5291,11 @@
5227 5291 alternative: "wp.richText.create",
5228 5292 link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
5229 5293 });
5230 5294 const result = [];
5231 - for (let i2 = 0; i2 < domNodes.length; i2++) {
5295 + for (let i = 0; i < domNodes.length; i++) {
5232 5296 try {
5233 - result.push(fromDOM2(domNodes[i2]));
5297 + result.push(fromDOM2(domNodes[i]));
5234 5298 } catch {
5235 5299 }
5236 5300 }
5237 5301 return result;
@@ -5282,10 +5346,10 @@
5282 5346 return typeof node !== "string" && node?.type === type;
5283 5347 }
5284 5348 function getNamedNodeMapAsObject(nodeMap) {
5285 5349 const result = {};
5286 - for (let i2 = 0; i2 < nodeMap.length; i2++) {
5287 - const { name, value } = nodeMap[i2];
5350 + for (let i = 0; i < nodeMap.length; i++) {
5351 + const { name, value } = nodeMap[i];
5288 5352 result[name] = value;
5289 5353 }
5290 5354 return result;
5291 5355 }
@@ -5379,9 +5443,9 @@
5379 5443 }) : import_rich_text3.RichTextData.empty();
5380 5444 };
5381 5445
5382 5446 // packages/blocks/build-module/api/parser/get-block-attributes.mjs
5383 - var toBooleanAttributeMatcher = (matcher3) => (value) => matcher3(value) !== void 0;
5447 + var toBooleanAttributeMatcher = (matcher3) => (domNode) => matcher3(domNode) !== void 0;
5384 5448 function isOfType(value, type) {
5385 5449 switch (type) {
5386 5450 case "rich-text":
5387 5451 return value instanceof import_rich_text4.RichTextData;
@@ -5445,14 +5509,14 @@
5445 5509 var matcherFromSource = memize(
5446 5510 (sourceConfig) => {
5447 5511 switch (sourceConfig.source) {
5448 5512 case "attribute": {
5449 - let matcher3 = attr(
5513 + const matcher3 = attr(
5450 5514 sourceConfig.selector,
5451 5515 sourceConfig.attribute
5452 5516 );
5453 5517 if (sourceConfig.type === "boolean") {
5454 - matcher3 = toBooleanAttributeMatcher(matcher3);
5518 + return toBooleanAttributeMatcher(matcher3);
5455 5519 }
5456 5520 return matcher3;
5457 5521 }
5458 5522 case "html":
@@ -5490,9 +5554,12 @@
5490 5554 }
5491 5555 }
5492 5556 );
5493 5557 function parseHtml(innerHTML) {
5494 - return parse(innerHTML, (h2) => h2);
5558 + return parse(
5559 + innerHTML ?? "",
5560 + (h) => h
5561 + );
5495 5562 }
5496 5563 function parseWithAttributeSchema(innerHTML, attributeSchema) {
5497 5564 return matcherFromSource(attributeSchema)(
5498 5565 parseHtml(innerHTML)
@@ -5628,10 +5695,10 @@
5628 5695 const { deprecated: deprecatedDefinitions } = blockType;
5629 5696 if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
5630 5697 return block;
5631 5698 }
5632 - for (let i2 = 0; i2 < deprecatedDefinitions.length; i2++) {
5633 - const { isEligible = stubFalse } = deprecatedDefinitions[i2];
5699 + for (let i = 0; i < deprecatedDefinitions.length; i++) {
5700 + const { isEligible = stubFalse } = deprecatedDefinitions[i];
5634 5701 if (block.isValid && !isEligible(parsedAttributes, block.innerBlocks, {
5635 5702 blockNode: rawBlock,
5636 5703 block
5637 5704 })) {
@@ -5641,9 +5708,9 @@
5641 5708 omit(
5642 5709 blockType,
5643 5710 DEPRECATED_ENTRY_KEYS
5644 5711 ),
5645 - deprecatedDefinitions[i2]
5712 + deprecatedDefinitions[i]
5646 5713 );
5647 5714 let migratedBlock = {
5648 5715 ...block,
5649 5716 attributes: getBlockAttributes(
@@ -5828,14 +5895,14 @@
5828 5895 var import_dom13 = __toESM(require_dom(), 1);
5829 5896
5830 5897 // packages/blocks/build-module/api/raw-handling/get-raw-transforms.mjs
5831 5898 function getRawTransforms() {
5832 - return getBlockTransforms("from").filter(({ type }) => type === "raw").map((transform) => {
5833 - return transform.isMatch ? transform : {
5834 - ...transform,
5835 - isMatch: (node) => transform.selector && node.matches(transform.selector)
5836 - };
5837 - });
5899 + return getBlockTransforms("from").filter(
5900 + (transform) => transform.type === "raw"
5901 + ).map((transform) => ({
5902 + ...transform,
5903 + isMatch: transform.isMatch ?? ((node) => !!transform.selector && node.matches(transform.selector))
5904 + }));
5838 5905 }
5839 5906
5840 5907 // packages/blocks/build-module/api/raw-handling/html-to-blocks.mjs
5841 5908 function htmlToBlocks(html2, handler) {
@@ -5844,12 +5911,9 @@
5844 5911 return Array.from(doc.body.children).flatMap((node) => {
5845 5912 const transforms = getRawTransforms();
5846 5913 const rawTransform = findTransform(
5847 5914 transforms,
5848 - ((t3) => {
5849 - const transform2 = t3;
5850 - return transform2.isMatch(node);
5851 - })
5915 + (transform2) => transform2.isMatch(node)
5852 5916 );
5853 5917 if (!rawTransform) {
5854 5918 return createBlock(
5855 5919 // Should not be hardcoded.
@@ -6087,19 +6151,16 @@
6087 6151 var castArray = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
6088 6152 var beforeLineRegexp = /(\n|<p>|<br\s*\/?>)\s*$/;
6089 6153 var afterLineRegexp = /^\s*(\n|<\/p>|<br\s*\/?>)/;
6090 6154 function segmentHTMLToShortcodeBlock(HTML, lastIndex = 0, excludedBlockNames = []) {
6091 - const transformsFrom = getBlockTransforms(
6092 - "from"
6155 + const transformsFrom = getBlockTransforms("from").filter(
6156 + (transform) => transform.type === "shortcode"
6093 6157 );
6094 6158 const transformation = findTransform(
6095 6159 transformsFrom,
6096 - ((transform) => {
6097 - const t3 = transform;
6098 - return excludedBlockNames.indexOf(t3.blockName) === -1 && t3.type === "shortcode" && castArray(t3.tag).some(
6099 - (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6100 - );
6101 - })
6160 + (transform) => excludedBlockNames.indexOf(transform.blockName) === -1 && castArray(transform.tag).some(
6161 + (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6162 + )
6102 6163 );
6103 6164 if (!transformation) {
6104 6165 return [HTML];
6105 6166 }
@@ -6106,76 +6167,74 @@
6106 6167 const transformTags = castArray(transformation.tag);
6107 6168 const transformTag = transformTags.find(
6108 6169 (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
6109 6170 );
6110 - let match;
6111 6171 const previousIndex = lastIndex;
6112 - if (match = (0, import_shortcode.next)(transformTag, HTML, lastIndex)) {
6113 - lastIndex = match.index + match.content.length;
6114 - const beforeHTML = HTML.substr(0, match.index);
6115 - const afterHTML = HTML.substr(lastIndex);
6116 - if (!match.shortcode.content?.includes("<") && !(beforeLineRegexp.test(beforeHTML) && afterLineRegexp.test(afterHTML))) {
6117 - return segmentHTMLToShortcodeBlock(HTML, lastIndex);
6118 - }
6119 - if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
6120 - return segmentHTMLToShortcodeBlock(HTML, previousIndex, [
6121 - ...excludedBlockNames,
6122 - transformation.blockName
6123 - ]);
6124 - }
6125 - let blocks = [];
6126 - if (typeof transformation.transform === "function") {
6127 - blocks = [].concat(
6128 - transformation.transform(match.shortcode.attrs, match)
6129 - );
6130 - blocks = blocks.map((block) => {
6131 - block.originalContent = match.shortcode.content;
6132 - return applyBuiltInValidationFixes(
6133 - block,
6134 - getBlockType(block.name)
6135 - );
6136 - });
6137 - } else {
6138 - const attributes = Object.fromEntries(
6139 - Object.entries(transformation.attributes).filter(([, schema]) => schema.shortcode).map(([key, schema]) => [
6140 - key,
6141 - schema.shortcode(match.shortcode.attrs, match)
6142 - ])
6143 - );
6144 - const blockType = getBlockType(transformation.blockName);
6145 - if (!blockType) {
6146 - return [HTML];
6147 - }
6148 - const transformationBlockType = {
6149 - ...blockType,
6150 - attributes: transformation.attributes
6151 - };
6152 - let block = createBlock(
6153 - transformation.blockName,
6154 - getBlockAttributes(
6155 - transformationBlockType,
6156 - match.shortcode.content,
6157 - attributes
6158 - )
6159 - );
6172 + const match = (0, import_shortcode.next)(transformTag, HTML, lastIndex);
6173 + if (!match) {
6174 + return [HTML];
6175 + }
6176 + lastIndex = match.index + match.content.length;
6177 + const beforeHTML = HTML.substr(0, match.index);
6178 + const afterHTML = HTML.substr(lastIndex);
6179 + if (!match.shortcode.content?.includes("<") && !(beforeLineRegexp.test(beforeHTML) && afterLineRegexp.test(afterHTML))) {
6180 + return segmentHTMLToShortcodeBlock(HTML, lastIndex);
6181 + }
6182 + if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
6183 + return segmentHTMLToShortcodeBlock(HTML, previousIndex, [
6184 + ...excludedBlockNames,
6185 + transformation.blockName
6186 + ]);
6187 + }
6188 + let blocks = [];
6189 + if (typeof transformation.transform === "function") {
6190 + blocks = [].concat(
6191 + transformation.transform(match.shortcode.attrs, match)
6192 + );
6193 + blocks = blocks.map((block) => {
6160 6194 block.originalContent = match.shortcode.content;
6161 - block = applyBuiltInValidationFixes(
6195 + return applyBuiltInValidationFixes(
6162 6196 block,
6163 - transformationBlockType
6197 + getBlockType(block.name)
6164 6198 );
6165 - blocks = [block];
6199 + });
6200 + } else {
6201 + const blockType = getBlockType(transformation.blockName);
6202 + if (!blockType) {
6203 + return [HTML];
6166 6204 }
6167 - return [
6168 - ...segmentHTMLToShortcodeBlock(
6169 - beforeHTML.replace(beforeLineRegexp, "")
6170 - ),
6171 - ...blocks,
6172 - ...segmentHTMLToShortcodeBlock(
6173 - afterHTML.replace(afterLineRegexp, "")
6205 + const transformAttributes = transformation.attributes ?? blockType.attributes;
6206 + const attributes = Object.fromEntries(
6207 + Object.entries(transformAttributes).filter(([, schema]) => schema.shortcode).map(([key, schema]) => [
6208 + key,
6209 + schema.shortcode(match.shortcode.attrs, match)
6210 + ])
6211 + );
6212 + const transformationBlockType = {
6213 + ...blockType,
6214 + attributes: transformAttributes
6215 + };
6216 + let block = createBlock(
6217 + transformation.blockName,
6218 + getBlockAttributes(
6219 + transformationBlockType,
6220 + match.shortcode.content,
6221 + attributes
6174 6222 )
6175 - ];
6223 + );
6224 + block.originalContent = match.shortcode.content;
6225 + block = applyBuiltInValidationFixes(block, transformationBlockType);
6226 + blocks = [block];
6176 6227 }
6177 - return [HTML];
6228 + return [
6229 + ...segmentHTMLToShortcodeBlock(
6230 + beforeHTML.replace(beforeLineRegexp, "")
6231 + ),
6232 + ...blocks,
6233 + ...segmentHTMLToShortcodeBlock(
6234 + afterHTML.replace(afterLineRegexp, "")
6235 + )
6236 + ];
6178 6237 }
6179 6238 var shortcode_converter_default = segmentHTMLToShortcodeBlock;
6180 6239
6181 6240 // packages/blocks/build-module/api/raw-handling/utils.mjs
@@ -6241,41 +6300,41 @@
6241 6300 return [...objValue || [], ...srcValue || []];
6242 6301 }
6243 6302 }
6244 6303 }
6245 - function mergeTagNameSchemas(a2, b3) {
6246 - if (a2 === b3) {
6247 - return a2;
6304 + function mergeTagNameSchemas(a, b2) {
6305 + if (a === b2) {
6306 + return a;
6248 6307 }
6249 - for (const key in b3) {
6250 - if (a2[key]) {
6251 - a2[key] = mergeTagNameSchemaProperties(
6252 - a2[key],
6253 - b3[key],
6308 + for (const key in b2) {
6309 + if (a[key]) {
6310 + a[key] = mergeTagNameSchemaProperties(
6311 + a[key],
6312 + b2[key],
6254 6313 key
6255 6314 );
6256 - } else if (Array.isArray(b3[key])) {
6257 - a2[key] = b3[key].slice();
6315 + } else if (Array.isArray(b2[key])) {
6316 + a[key] = b2[key].slice();
6258 6317 } else {
6259 - a2[key] = { ...b3[key] };
6318 + a[key] = { ...b2[key] };
6260 6319 }
6261 6320 }
6262 - return a2;
6321 + return a;
6263 6322 }
6264 - function mergeSchemas(a2, b3) {
6265 - if (a2 === b3) {
6266 - return a2;
6323 + function mergeSchemas(a, b2) {
6324 + if (a === b2) {
6325 + return a;
6267 6326 }
6268 - for (const key in b3) {
6269 - if (a2[key]) {
6270 - a2[key] = mergeTagNameSchemas(a2[key], b3[key]);
6271 - } else if (Array.isArray(b3[key])) {
6272 - a2[key] = b3[key].slice();
6327 + for (const key in b2) {
6328 + if (a[key]) {
6329 + a[key] = mergeTagNameSchemas(a[key], b2[key]);
6330 + } else if (Array.isArray(b2[key])) {
6331 + a[key] = b2[key].slice();
6273 6332 } else {
6274 - a2[key] = { ...b3[key] };
6333 + a[key] = { ...b2[key] };
6275 6334 }
6276 6335 }
6277 - return a2;
6336 + return a;
6278 6337 }
6279 6338 return schemas.reduce(mergeSchemas, {});
6280 6339 }
6281 6340 function getBlockContentSchema(context) {
@@ -6291,10 +6350,10 @@
6291 6350 return false;
6292 6351 }
6293 6352 const wrapper = doc.body.children.item(0);
6294 6353 const descendants = wrapper.getElementsByTagName("*");
6295 - for (let i2 = 0; i2 < descendants.length; i2++) {
6296 - if (descendants.item(i2).tagName !== "BR") {
6354 + for (let i = 0; i < descendants.length; i++) {
6355 + if (descendants.item(i).tagName !== "BR") {
6297 6356 return false;
6298 6357 }
6299 6358 }
6300 6359 if (wrapper.tagName !== "SPAN") {
@@ -6356,9 +6415,9 @@
6356 6415 ["ul", "li", "ol"],
6357 6416 ["h1", "h2", "h3", "h4", "h5", "h6"]
6358 6417 ];
6359 6418 return inlineAllowedTagGroups.some(
6360 - (tagGroup) => [tag, contextTag].filter((t3) => !tagGroup.includes(t3)).length === 0
6419 + (tagGroup) => [tag, contextTag].filter((t2) => !tagGroup.includes(t2)).length === 0
6361 6420 );
6362 6421 }
6363 6422 function deepCheck(nodes, contextTag) {
6364 6423 return nodes.every(
@@ -6524,10 +6583,10 @@
6524 6583 node.src = "";
6525 6584 return;
6526 6585 }
6527 6586 const uint8Array = new Uint8Array(decoded.length);
6528 - for (let i2 = 0; i2 < uint8Array.length; i2++) {
6529 - uint8Array[i2] = decoded.charCodeAt(i2);
6587 + for (let i = 0; i < uint8Array.length; i++) {
6588 + uint8Array[i] = decoded.charCodeAt(i);
6530 6589 }
6531 6590 const name = type.replace("/", ".");
6532 6591 const file = new window.File([uint8Array], name, { type });
6533 6592 node.src = (0, import_blob.createBlobURL)(file);
@@ -6546,24 +6605,31 @@
6546 6605 node.innerHTML = normaliseBlocks(node.innerHTML);
6547 6606 }
6548 6607
6549 6608 // node_modules/marked/lib/marked.esm.js
6550 - function z() {
6609 + function A2() {
6551 6610 return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
6552 6611 }
6553 - var T = z();
6554 - function G(l4) {
6612 + var T = A2();
6613 + function U(l4) {
6555 6614 T = l4;
6556 6615 }
6557 - var _ = { exec: () => null };
6558 - function d2(l4, e2 = "") {
6559 - let t3 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (s2, r2) => {
6560 - let i2 = typeof r2 == "string" ? r2 : r2.source;
6561 - return i2 = i2.replace(m2.caret, "$1"), t3 = t3.replace(s2, i2), n2;
6562 - }, getRegex: () => new RegExp(t3, e2) };
6563 - return n2;
6616 + var E2 = { exec: () => null };
6617 + function I(l4) {
6618 + let e2 = [];
6619 + return (t2) => {
6620 + let n = Math.max(0, Math.min(3, t2 - 1)), i = e2[n];
6621 + return i || (i = l4(n), e2[n] = i), i;
6622 + };
6564 6623 }
6565 - var Re = ((l4 = "") => {
6624 + function d(l4, e2 = "") {
6625 + let t2 = typeof l4 == "string" ? l4 : l4.source, n = { replace: (i, r2) => {
6626 + let o2 = typeof r2 == "string" ? r2 : r2.source;
6627 + return o2 = o2.replace(m2.caret, "$1"), t2 = t2.replace(i, o2), n;
6628 + }, getRegex: () => new RegExp(t2, e2) };
6629 + return n;
6630 + }
6631 + var we = ((l4 = "") => {
6566 6632 try {
6567 6633 return !!new RegExp("(?<=1)(?<!1)" + l4);
6568 6634 } catch {
6569 6635 return false;
@@ -6568,80 +6634,92 @@
6568 6634 } catch {
6569 6635 return false;
6570 6636 }
6571 6637 })();
6572 - var 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: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}#`), htmlBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (l4) => new RegExp(`^ {0,${Math.min(3, l4 - 1)}}>`) };
6573 - var Te = /^(?:[ \t]*(?:\n|$))+/;
6574 - var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6575 - var we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6576 - var I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6577 - var ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6578 - var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6579 - var ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6580 - var oe = d2(ie).replace(/bull/g, Q).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}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
6581 - var Pe = d2(ie).replace(/bull/g, Q).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}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
6582 - var j2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
6583 - var Se = /^[^\n]+/;
6584 - var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6585 - var $e = d2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6586 - var Le = d2(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
6587 - var v2 = "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";
6588 - var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6589 - var _e = d2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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", U).replace("tag", v2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6590 - var ae = d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6591 - var Me = d2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex();
6592 - var K = { blockquote: Me, code: Oe, def: $e, fences: we, heading: ye, hr: I, html: _e, lheading: oe, list: Le, newline: Te, paragraph: ae, table: _, text: Se };
6593 - var re = d2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex();
6594 - var ze = { ...K, lheading: Pe, table: re, paragraph: d2(j2).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v2).getRegex() };
6595 - var Ee = { ...K, html: d2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).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: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d2(j2).replace("hr", I).replace("heading", ` *#{1,6} *[^
6596 -]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6597 - var Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6598 - var Ce = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6599 - var le = /^( {2,}|\\)\n(?!\s*$)/;
6600 - var Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6601 - var E = /[\p{P}\p{S}]/u;
6602 - var H2 = /[\s\p{P}\p{S}]/u;
6603 - var W = /[^\s\p{P}\p{S}]/u;
6604 - var Be = d2(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H2).getRegex();
6605 - var ue = /(?!~)[\p{P}\p{S}]/u;
6606 - var De = /(?!~)[\s\p{P}\p{S}]/u;
6607 - var qe = /(?:[^\s\p{P}\p{S}]|~)/u;
6608 - var ve = d2(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Re ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6609 - var pe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6610 - var He = d2(pe, "u").replace(/punct/g, E).getRegex();
6611 - var Ze = d2(pe, "u").replace(/punct/g, ue).getRegex();
6612 - var ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6613 - var Ge = d2(ce, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6614 - var Ne = d2(ce, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, De).replace(/punct/g, ue).getRegex();
6615 - var Qe = d2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6616 - var je = d2(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex();
6617 - var Fe = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6618 - var Ue = d2(Fe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H2).replace(/punct/g, E).getRegex();
6619 - var Ke = d2(/\\(punct)/, "gu").replace(/punct/g, E).getRegex();
6620 - var We = d2(/^<(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();
6621 - var Xe = d2(U).replace("(?:-->|$)", "-->").getRegex();
6622 - var Je = d2("^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", Xe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6623 - var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
6624 - var Ve = d2(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6625 - var he = d2(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
6626 - var ke = d2(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
6627 - var Ye = d2("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", ke).getRegex();
6628 - var se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6629 - var X = { _backpedal: _, anyPunctuation: Ke, autolink: We, blockSkip: ve, br: le, code: Ce, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: He, emStrongRDelimAst: Ge, emStrongRDelimUnd: Qe, escape: Ae, link: Ve, nolink: ke, punctuation: Be, reflink: he, reflinkSearch: Ye, tag: Je, text: Ie, url: _ };
6630 - var et = { ...X, link: d2(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
6631 - var N2 = { ...X, emStrongRDelimAst: Ne, emStrongLDelim: Ze, delLDelim: je, delRDelim: Ue, url: d2(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).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: d2(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() };
6632 - var tt = { ...N2, br: d2(le).replace("{2,}", "*").getRegex(), text: d2(N2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6633 - var B = { normal: K, gfm: ze, pedantic: Ee };
6634 - var A = { normal: X, gfm: N2, breaks: tt, pedantic: et };
6635 - var nt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6636 - var de = (l4) => nt[l4];
6637 - function O(l4, e2) {
6638 + var m2 = { codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, 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: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:</?(?:${H2})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) };
6639 + var ye = /^(?:[ \t]*(?:\n|$))+/;
6640 + var Pe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
6641 + var Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
6642 + var v2 = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
6643 + var _e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
6644 + var K = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
6645 + var le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
6646 + var ue = d(le).replace(/bull/g, K).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();
6647 + var $e = d(le).replace(/bull/g, K).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();
6648 + var W = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
6649 + var Le = /^[^\n]+/;
6650 + var X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
6651 + var ze = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
6652 + var Ee = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, K).getRegex();
6653 + var H2 = "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";
6654 + var J = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
6655 + var Me = d("^ {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][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", J).replace("tag", H2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
6656 + var pe = (l4) => d(W).replace("hr", v2).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", l4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H2).getRegex();
6657 + var Ae = pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
6658 + var Ie = pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
6659 + var Ce = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ie).getRegex();
6660 + var V = { blockquote: Ce, code: Pe, def: ze, fences: Se, heading: _e, hr: v2, html: Me, lheading: ue, list: Ee, newline: ye, paragraph: Ae, table: E2, text: Le };
6661 + var ie = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v2).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", H2).getRegex();
6662 + var Be = { ...V, lheading: $e, table: ie, paragraph: d(W).replace("hr", v2).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ie).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", H2).getRegex() };
6663 + var De = { ...V, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", J).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: E2, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(W).replace("hr", v2).replace("heading", ` *#{1,6} *[^
6664 +]`).replace("lheading", ue).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
6665 + var qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
6666 + var ve = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
6667 + var ce = /^( {2,}|\\)\n(?!\s*$)[ \t]*/;
6668 + var He = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
6669 + var _ = /[\p{P}\p{S}]/u;
6670 + var C2 = /[\s\p{P}\p{S}]/u;
6671 + var Z = /[^\s\p{P}\p{S}]/u;
6672 + var Ze = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C2).getRegex();
6673 + var Ge = /[\p{Pi}\p{Ps}"']/u;
6674 + var he = /(?!~)[\p{P}\p{S}]/u;
6675 + var Qe = /(?!~)[\s\p{P}\p{S}]/u;
6676 + var Ne = /(?:[^\s\p{P}\p{S}]|~)/u;
6677 + var je = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", we ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
6678 + var de = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
6679 + var Ue = d(de, "u").replace(/punct/g, _).getRegex();
6680 + var Fe = d(de, "u").replace(/punct/g, he).getRegex();
6681 + var Ke = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
6682 + var We = d(Ke, "u").replace(/openQuote/g, Ge).replace(/punct/g, _).getRegex();
6683 + var ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
6684 + var Xe = d(ke, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6685 + var Je = d(ke, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Qe).replace(/punct/g, he).getRegex();
6686 + var Ve = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
6687 + var Ye = d(Ve, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6688 + var et = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6689 + var tt = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
6690 + var nt = d(tt, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6691 + var rt = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
6692 + var st = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
6693 + var it = d(st, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C2).replace(/punct/g, _).getRegex();
6694 + var ot = d(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
6695 + var at = d(/^<(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();
6696 + var lt = d(J).replace("(?:-->|$)", "-->").getRegex();
6697 + var ut = d("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", lt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
6698 + var ge = /\[(?:\\[\s\S]|[^\[\]\\])*\]/;
6699 + var N2 = d(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ge).getRegex();
6700 + var pt = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N2).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
6701 + var ct = d(/^!?\[(label)\]\[(ref)\]/).replace("label", N2).replace("ref", X).getRegex();
6702 + var ht = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex();
6703 + var oe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/;
6704 + var dt = d(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ge).getRegex();
6705 + var kt = d("reflink|nolink(?!\\()", "g").replace("reflink", d(/^!?\[(label)\]\[(ref)\]/).replace("label", dt).replace("ref", oe).getRegex()).replace("nolink", d(/^!?\[(ref)\](?:\[\])?/).replace("ref", oe).getRegex()).getRegex();
6706 + var ae = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
6707 + var Y = { _backpedal: E2, anyPunctuation: ot, autolink: at, blockSkip: je, br: ce, code: ve, del: E2, delLDelim: E2, delRDelim: E2, emStrongLDelim: Ue, emStrongRDelimAst: Xe, emStrongRDelimUnd: et, escape: qe, link: pt, nolink: ht, punctuation: Ze, reflink: ct, reflinkSearch: kt, tag: ut, text: He, url: E2 };
6708 + var gt = { ...Y, emStrongLDelim: We, emStrongRDelimAst: Ye, emStrongRDelimUnd: nt, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", N2).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", N2).getRegex() };
6709 + var F = { ...Y, emStrongRDelimAst: Je, emStrongLDelim: Fe, delLDelim: rt, delRDelim: it, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ae).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ae).getRegex() };
6710 + var ft = { ...F, br: d(ce).replace("{2,}", "*").getRegex(), text: d(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
6711 + var G = { normal: V, gfm: Be, pedantic: De };
6712 + var B = { normal: Y, gfm: F, breaks: ft, pedantic: gt };
6713 + var mt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
6714 + var fe = (l4) => mt[l4];
6715 + function R2(l4, e2) {
6638 6716 if (e2) {
6639 - if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, de);
6640 - } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, de);
6717 + if (m2.escapeTest.test(l4)) return l4.replace(m2.escapeReplace, fe);
6718 + } else if (m2.escapeTestNoEncode.test(l4)) return l4.replace(m2.escapeReplaceNoEncode, fe);
6641 6719 return l4;
6642 6720 }
6643 - function J(l4) {
6721 + function ee(l4) {
6644 6722 try {
6645 6723 l4 = encodeURI(l4).replace(m2.percentDecode, "%");
6646 6724 } catch {
6647 6725 return null;
@@ -6647,74 +6725,109 @@
6647 6725 return null;
6648 6726 }
6649 6727 return l4;
6650 6728 }
6651 - function V(l4, e2) {
6652 - let t3 = l4.replace(m2.findPipe, (r2, i2, o3) => {
6653 - let u2 = false, a2 = i2;
6654 - for (; --a2 >= 0 && o3[a2] === "\\"; ) u2 = !u2;
6655 - return u2 ? "|" : " |";
6656 - }), n2 = t3.split(m2.splitPipe), s2 = 0;
6657 - if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e2) if (n2.length > e2) n2.splice(e2);
6658 - else for (; n2.length < e2; ) n2.push("");
6659 - for (; s2 < n2.length; s2++) n2[s2] = n2[s2].trim().replace(m2.slashPipe, "|");
6660 - return n2;
6729 + function te(l4, e2) {
6730 + let t2 = l4.replace(m2.findPipe, (r2, o2, s) => {
6731 + let u = false, a = o2;
6732 + for (; --a >= 0 && s[a] === "\\"; ) u = !u;
6733 + return u ? "|" : " |";
6734 + }), n = t2.split(m2.splitPipe), i = 0;
6735 + if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e2) if (n.length > e2) n.splice(e2);
6736 + else for (; n.length < e2; ) n.push("");
6737 + for (; i < n.length; i++) n[i] = n[i].trim().replace(m2.slashPipe, "|");
6738 + return n;
6661 6739 }
6662 - function $2(l4, e2, t3) {
6663 - let n2 = l4.length;
6664 - if (n2 === 0) return "";
6665 - let s2 = 0;
6666 - for (; s2 < n2; ) {
6667 - let r2 = l4.charAt(n2 - s2 - 1);
6668 - if (r2 === e2 && !t3) s2++;
6669 - else if (r2 !== e2 && t3) s2++;
6740 + function $2(l4, e2, t2) {
6741 + let n = l4.length;
6742 + if (n === 0) return "";
6743 + let i = 0;
6744 + for (; i < n; ) {
6745 + let r2 = l4.charAt(n - i - 1);
6746 + if (r2 === e2 && !t2) i++;
6747 + else if (r2 !== e2 && t2) i++;
6670 6748 else break;
6671 6749 }
6672 - return l4.slice(0, n2 - s2);
6750 + return l4.slice(0, n - i);
6673 6751 }
6674 - function Y(l4) {
6752 + function ne(l4) {
6675 6753 let e2 = l4.split(`
6676 -`), t3 = e2.length - 1;
6677 - for (; t3 >= 0 && m2.blankLine.test(e2[t3]); ) t3--;
6678 - return e2.length - t3 <= 2 ? l4 : e2.slice(0, t3 + 1).join(`
6754 +`), t2 = e2.length - 1;
6755 + for (; t2 >= 0 && m2.blankLine.test(e2[t2]); ) t2--;
6756 + return e2.length - t2 <= 2 ? l4 : e2.slice(0, t2 + 1).join(`
6679 6757 `);
6680 6758 }
6681 - function ge(l4, e2) {
6759 + function D2(l4) {
6760 + return l4.toLowerCase().toUpperCase().toLowerCase();
6761 + }
6762 + function me(l4, e2) {
6682 6763 if (l4.indexOf(e2[1]) === -1) return -1;
6683 - let t3 = 0;
6684 - for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
6685 - else if (l4[n2] === e2[0]) t3++;
6686 - else if (l4[n2] === e2[1] && (t3--, t3 < 0)) return n2;
6687 - return t3 > 0 ? -2 : -1;
6764 + let t2 = 0;
6765 + for (let n = 0; n < l4.length; n++) if (l4[n] === "\\") n++;
6766 + else if (l4[n] === e2[0]) t2++;
6767 + else if (l4[n] === e2[1] && (t2--, t2 < 0)) return n;
6768 + return t2 > 0 ? -2 : -1;
6688 6769 }
6689 - function fe(l4, e2 = 0) {
6690 - let t3 = e2, n2 = "";
6691 - for (let s2 of l4) if (s2 === " ") {
6692 - let r2 = 4 - t3 % 4;
6693 - n2 += " ".repeat(r2), t3 += r2;
6694 - } else n2 += s2, t3++;
6695 - return n2;
6770 + function xe(l4, e2 = 0) {
6771 + let t2 = e2, n = "";
6772 + for (let i of l4) if (i === " ") {
6773 + let r2 = 4 - t2 % 4;
6774 + n += " ".repeat(r2), t2 += r2;
6775 + } else n += i, t2++;
6776 + return n;
6696 6777 }
6697 - function me(l4, e2, t3, n2, s2) {
6698 - let r2 = e2.href, i2 = e2.title || null, o3 = l4[1].replace(s2.other.outputLinkReplace, "$1");
6699 - n2.state.inLink = true;
6700 - let u2 = { type: l4[0].charAt(0) === "!" ? "image" : "link", raw: t3, href: r2, title: i2, text: o3, tokens: n2.inlineTokens(o3) };
6701 - return n2.state.inLink = false, u2;
6778 + function be(l4, e2, t2, n, i) {
6779 + let r2 = e2.href, o2 = e2.title || null, s = l4[1].replace(i.other.outputLinkReplace, "$1"), u = l4[0].charAt(0) === "!";
6780 + n.state.inLink = true;
6781 + let a = n.state.linkEmitted, p2 = n.state.inRawBlock;
6782 + n.state.linkEmitted = false;
6783 + let c2 = n.inlineTokens(s), h = n.state.linkEmitted;
6784 + if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
6785 + if (h) {
6786 + n.state.inRawBlock = p2;
6787 + return;
6788 + }
6789 + n.state.linkEmitted = true;
6790 + }
6791 + return { type: u ? "image" : "link", raw: t2, href: r2, title: o2, text: s, tokens: c2 };
6702 6792 }
6703 - function rt(l4, e2, t3) {
6704 - let n2 = l4.match(t3.other.indentCodeCompensation);
6705 - if (n2 === null) return e2;
6706 - let s2 = n2[1];
6793 + function xt(l4, e2, t2) {
6794 + let n = l4.match(t2.other.indentCodeCompensation);
6795 + if (n === null) return e2;
6796 + let i = n[1];
6707 6797 return e2.split(`
6708 6798 `).map((r2) => {
6709 - let i2 = r2.match(t3.other.beginningSpace);
6710 - if (i2 === null) return r2;
6711 - let [o3] = i2;
6712 - return o3.length >= s2.length ? r2.slice(s2.length) : r2;
6799 + let o2 = r2.match(t2.other.beginningSpace);
6800 + if (o2 === null) return r2;
6801 + let [s] = o2;
6802 + return r2.slice(Math.min(s.length, i.length));
6713 6803 }).join(`
6714 6804 `);
6715 6805 }
6716 - var w2 = class {
6806 + function Re(l4, e2, t2, n) {
6807 + if (!e2.includes("<")) return false;
6808 + for (let i = 0; i < e2.length; i++) {
6809 + if (e2[i] === "\\") {
6810 + i++;
6811 + continue;
6812 + }
6813 + if (e2[i] === "`") {
6814 + let s = n.inline.code.exec(e2.slice(i));
6815 + if (s) {
6816 + i += s[0].length - 1;
6817 + continue;
6818 + }
6819 + }
6820 + if (e2[i] !== "<") continue;
6821 + let r2 = l4.slice(t2 + i), o2 = n.inline.tag.exec(r2) || n.inline.autolink.exec(r2);
6822 + if (o2) {
6823 + if (o2[0].length > e2.length - i) return true;
6824 + i += o2[0].length - 1;
6825 + }
6826 + }
6827 + return false;
6828 + }
6829 + var y2 = class {
6717 6830 options;
6718 6831 rules;
6719 6832 lexer;
6720 6833 constructor(e2) {
@@ -6720,319 +6833,326 @@
6720 6833 constructor(e2) {
6721 6834 this.options = e2 || T;
6722 6835 }
6723 6836 space(e2) {
6724 - let t3 = this.rules.block.newline.exec(e2);
6725 - if (t3 && t3[0].length > 0) return { type: "space", raw: t3[0] };
6837 + let t2 = this.rules.block.newline.exec(e2);
6838 + if (t2 && t2[0].length > 0) return { type: "space", raw: t2[0] };
6726 6839 }
6727 6840 code(e2) {
6728 - let t3 = this.rules.block.code.exec(e2);
6729 - if (t3) {
6730 - let n2 = this.options.pedantic ? t3[0] : Y(t3[0]), s2 = n2.replace(this.rules.other.codeRemoveIndent, "");
6731 - return { type: "code", raw: n2, codeBlockStyle: "indented", text: s2 };
6841 + let t2 = this.rules.block.code.exec(e2);
6842 + if (t2) {
6843 + let n = this.options.pedantic ? t2[0] : ne(t2[0]), i = n.replace(this.rules.other.codeRemoveIndent, "");
6844 + return { type: "code", raw: n, codeBlockStyle: "indented", text: i };
6732 6845 }
6733 6846 }
6734 6847 fences(e2) {
6735 - let t3 = this.rules.block.fences.exec(e2);
6736 - if (t3) {
6737 - let n2 = t3[0], s2 = rt(n2, t3[3] || "", this.rules);
6738 - return { type: "code", raw: n2, lang: t3[2] ? t3[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t3[2], text: s2 };
6848 + let t2 = this.rules.block.fences.exec(e2);
6849 + if (t2) {
6850 + let n = t2[0], i = xt(n, t2[3] || "", this.rules);
6851 + return { type: "code", raw: n, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i };
6739 6852 }
6740 6853 }
6741 6854 heading(e2) {
6742 - let t3 = this.rules.block.heading.exec(e2);
6743 - if (t3) {
6744 - let n2 = t3[2].trim();
6745 - if (this.rules.other.endingHash.test(n2)) {
6746 - let s2 = $2(n2, "#");
6747 - (this.options.pedantic || !s2 || this.rules.other.endingSpaceChar.test(s2)) && (n2 = s2.trim());
6855 + let t2 = this.rules.block.heading.exec(e2);
6856 + if (t2) {
6857 + let n = t2[2].trim();
6858 + if (this.rules.other.endingHash.test(n)) {
6859 + let i = $2(n, "#");
6860 + (this.options.pedantic || !i || this.rules.other.endingSpaceTabChar.test(i)) && (n = i.trim());
6748 6861 }
6749 - return { type: "heading", raw: $2(t3[0], `
6750 -`), depth: t3[1].length, text: n2, tokens: this.lexer.inline(n2) };
6862 + return { type: "heading", raw: $2(t2[0], `
6863 +`), depth: t2[1].length, text: n, tokens: this.lexer.inline(n) };
6751 6864 }
6752 6865 }
6753 6866 hr(e2) {
6754 - let t3 = this.rules.block.hr.exec(e2);
6755 - if (t3) return { type: "hr", raw: $2(t3[0], `
6867 + let t2 = this.rules.block.hr.exec(e2);
6868 + if (t2) return { type: "hr", raw: $2(t2[0], `
6756 6869 `) };
6757 6870 }
6758 6871 blockquote(e2) {
6759 - let t3 = this.rules.block.blockquote.exec(e2);
6760 - if (t3) {
6761 - let n2 = $2(t3[0], `
6872 + let t2 = this.rules.block.blockquote.exec(e2);
6873 + if (t2) {
6874 + let n = $2(t2[0], `
6762 6875 `).split(`
6763 -`), s2 = "", r2 = "", i2 = [];
6764 - for (; n2.length > 0; ) {
6765 - let o3 = false, u2 = [], a2;
6766 - for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), o3 = true;
6767 - else if (!o3) u2.push(n2[a2]);
6876 +`), i = "", r2 = "", o2 = [];
6877 + for (; n.length > 0; ) {
6878 + let s = false, u = [], a;
6879 + for (a = 0; a < n.length; a++) if (this.rules.other.blockquoteStart.test(n[a])) u.push(n[a]), s = true;
6880 + else if (!s) u.push(n[a]);
6768 6881 else break;
6769 - n2 = n2.slice(a2);
6770 - let c2 = u2.join(`
6771 -`), p2 = c2.replace(this.rules.other.blockquoteSetextReplace, `
6882 + n = n.slice(a);
6883 + let p2 = u.join(`
6884 +`), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
6772 6885 $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
6773 - s2 = s2 ? `${s2}
6774 -${c2}` : c2, r2 = r2 ? `${r2}
6775 -${p2}` : p2;
6776 - let k2 = this.lexer.state.top;
6777 - if (this.lexer.state.top = true, this.lexer.blockTokens(p2, i2, true), this.lexer.state.top = k2, n2.length === 0) break;
6778 - let h2 = i2.at(-1);
6779 - if (h2?.type === "code") break;
6780 - if (h2?.type === "blockquote") {
6781 - let R = h2, f2 = R.raw + `
6782 -` + n2.join(`
6783 -`), S2 = this.blockquote(f2);
6784 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - R.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.text.length) + S2.text;
6886 + i = i ? `${i}
6887 +${p2}` : p2, r2 = r2 ? `${r2}
6888 +${c2}` : c2;
6889 + let h = this.lexer.state.top;
6890 + if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h, n.length === 0) break;
6891 + let k2 = o2.at(-1);
6892 + if (k2?.type === "code") break;
6893 + if (k2?.type === "blockquote") {
6894 + let O = k2, g2 = n.join(`
6895 +`), w2 = O.raw + `
6896 +` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
6897 + o2[o2.length - 1] = z, i = `${i}
6898 +${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
6785 6899 break;
6786 - } else if (h2?.type === "list") {
6787 - let R = h2, f2 = R.raw + `
6788 -` + n2.join(`
6789 -`), S2 = this.list(f2);
6790 - i2[i2.length - 1] = S2, s2 = s2.substring(0, s2.length - h2.raw.length) + S2.raw, r2 = r2.substring(0, r2.length - R.raw.length) + S2.raw, n2 = f2.substring(i2.at(-1).raw.length).split(`
6900 + } else if (k2?.type === "list") {
6901 + let O = k2, g2 = O.raw + `
6902 +` + n.join(`
6903 +`), w2 = this.list(g2);
6904 + o2[o2.length - 1] = w2, i = i.substring(0, i.length - k2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n = g2.substring(o2.at(-1).raw.length).split(`
6791 6905 `);
6792 6906 continue;
6793 6907 }
6794 6908 }
6795 - return { type: "blockquote", raw: s2, tokens: i2, text: r2 };
6909 + return { type: "blockquote", raw: i, tokens: o2, text: r2 };
6796 6910 }
6797 6911 }
6798 6912 list(e2) {
6799 - let t3 = this.rules.block.list.exec(e2);
6800 - if (t3) {
6801 - let n2 = t3[1].trim(), s2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: s2, start: s2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
6802 - n2 = s2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = s2 ? n2 : "[*+-]");
6803 - let i2 = this.rules.other.listItemRegex(n2), o3 = false;
6913 + let t2 = this.rules.block.list.exec(e2);
6914 + if (t2) {
6915 + let n = t2[1].trim(), i = n.length > 1, r2 = { type: "list", raw: "", ordered: i, start: i ? +n.slice(0, -1) : "", loose: false, items: [] };
6916 + n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
6917 + let o2 = this.rules.other.listItemRegex(n), s = false;
6804 6918 for (; e2; ) {
6805 - let a2 = false, c2 = "", p2 = "";
6806 - if (!(t3 = i2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6807 - c2 = t3[0], e2 = e2.substring(c2.length);
6808 - let k2 = fe(t3[2].split(`
6809 -`, 1)[0], t3[1].length), h2 = e2.split(`
6810 -`, 1)[0], R = !k2.trim(), f2 = 0;
6811 - if (this.options.pedantic ? (f2 = 2, p2 = k2.trimStart()) : R ? f2 = t3[1].length + 1 : (f2 = k2.search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p2 = k2.slice(f2), f2 += t3[1].length), R && this.rules.other.blankLine.test(h2) && (c2 += h2 + `
6812 -`, e2 = e2.substring(h2.length + 1), a2 = true), !a2) {
6813 - let S2 = this.rules.other.nextBulletRegex(f2), ee = this.rules.other.hrRegex(f2), te = this.rules.other.fencesBeginRegex(f2), ne = this.rules.other.headingBeginRegex(f2), xe = this.rules.other.htmlBeginRegex(f2), be = this.rules.other.blockquoteBeginRegex(f2);
6919 + let a = false, p2 = "", c2 = "";
6920 + if (!(t2 = o2.exec(e2)) || this.rules.block.hr.test(e2)) break;
6921 + p2 = t2[0], e2 = e2.substring(p2.length);
6922 + let h = xe(t2[2].split(`
6923 +`, 1)[0], t2[1].length), k2 = e2.split(`
6924 +`, 1)[0], O = !h.trim(), g2 = 0;
6925 + if (this.options.pedantic ? (g2 = 2, c2 = h.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(k2) && (p2 += k2 + `
6926 +`, e2 = e2.substring(k2.length + 1), a = true), !a) {
6927 + let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), re = this.rules.other.fencesBeginRegex(g2), se = this.rules.other.headingBeginRegex(g2), Te = this.rules.other.htmlBeginRegex(g2), Oe = this.rules.other.blockquoteBeginRegex(g2);
6814 6928 for (; e2; ) {
6815 - let Z = e2.split(`
6816 -`, 1)[0], C;
6817 - if (h2 = Z, this.options.pedantic ? (h2 = h2.replace(this.rules.other.listReplaceNesting, " "), C = h2) : C = h2.replace(this.rules.other.tabCharGlobal, " "), te.test(h2) || ne.test(h2) || xe.test(h2) || be.test(h2) || S2.test(h2) || ee.test(h2)) break;
6818 - if (C.search(this.rules.other.nonSpaceChar) >= f2 || !h2.trim()) p2 += `
6819 -` + C.slice(f2);
6929 + let j2 = e2.split(`
6930 +`, 1)[0], q2;
6931 + if (k2 = j2, this.options.pedantic ? (k2 = k2.replace(this.rules.other.listReplaceNesting, " "), q2 = k2) : q2 = k2.replace(this.rules.other.tabCharGlobal, " "), re.test(k2) || se.test(k2) || Te.test(k2) || Oe.test(k2) || w2.test(k2) || z.test(k2)) break;
6932 + if (q2.search(this.rules.other.nonSpaceChar) >= g2 || !k2.trim()) c2 += `
6933 +` + q2.slice(g2);
6820 6934 else {
6821 - if (R || k2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(k2) || ne.test(k2) || ee.test(k2)) break;
6822 - p2 += `
6823 -` + h2;
6935 + if (O || h.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h) || se.test(h) || z.test(h)) break;
6936 + c2 += `
6937 +` + k2;
6824 6938 }
6825 - R = !h2.trim(), c2 += Z + `
6826 -`, e2 = e2.substring(Z.length + 1), k2 = C.slice(f2);
6939 + O = !k2.trim(), p2 += j2 + `
6940 +`, e2 = e2.substring(j2.length + 1), h = q2.slice(g2);
6827 6941 }
6828 6942 }
6829 - r2.loose || (o3 ? r2.loose = true : this.rules.other.doubleBlankLine.test(c2) && (o3 = true)), r2.items.push({ type: "list_item", raw: c2, task: !!this.options.gfm && this.rules.other.listIsTask.test(p2), loose: false, text: p2, tokens: [] }), r2.raw += c2;
6943 + r2.loose || (s ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (s = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
6830 6944 }
6831 - let u2 = r2.items.at(-1);
6832 - if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
6945 + let u = r2.items.at(-1);
6946 + if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
6833 6947 else return;
6834 6948 r2.raw = r2.raw.trimEnd();
6835 - for (let a2 of r2.items) {
6836 - this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []);
6837 - let c2 = a2.tokens[0];
6838 - if (a2.task && (c2?.type === "text" || c2?.type === "paragraph")) {
6839 - a2.text = a2.text.replace(this.rules.other.listReplaceTask, ""), c2.raw = c2.raw.replace(this.rules.other.listReplaceTask, ""), c2.text = c2.text.replace(this.rules.other.listReplaceTask, "");
6840 - for (let k2 = this.lexer.inlineQueue.length - 1; k2 >= 0; k2--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k2].src)) {
6841 - this.lexer.inlineQueue[k2].src = this.lexer.inlineQueue[k2].src.replace(this.rules.other.listReplaceTask, "");
6949 + for (let a of r2.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r2.loose) {
6950 + let p2 = a.tokens.filter((h) => h.type === "space"), c2 = p2.length > 0 && p2.some((h) => this.rules.other.anyLine.test(h.raw));
6951 + r2.loose = c2;
6952 + }
6953 + for (let a of r2.items) {
6954 + let p2 = a.tokens[0];
6955 + if (a.task && (p2?.type === "text" || p2?.type === "paragraph")) {
6956 + a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p2.raw = p2.raw.replace(this.rules.other.listReplaceTask, ""), p2.text = p2.text.replace(this.rules.other.listReplaceTask, "");
6957 + for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
6958 + this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
6842 6959 break;
6843 6960 }
6844 - let p2 = this.rules.other.listTaskCheckbox.exec(a2.raw);
6845 - if (p2) {
6846 - let k2 = { type: "checkbox", raw: p2[0] + " ", checked: p2[0] !== "[ ]" };
6847 - a2.checked = k2.checked, r2.loose ? a2.tokens[0] && ["paragraph", "text"].includes(a2.tokens[0].type) && "tokens" in a2.tokens[0] && a2.tokens[0].tokens ? (a2.tokens[0].raw = k2.raw + a2.tokens[0].raw, a2.tokens[0].text = k2.raw + a2.tokens[0].text, a2.tokens[0].tokens.unshift(k2)) : a2.tokens.unshift({ type: "paragraph", raw: k2.raw, text: k2.raw, tokens: [k2] }) : a2.tokens.unshift(k2);
6961 + let c2 = this.rules.other.listTaskCheckbox.exec(a.raw);
6962 + if (c2) {
6963 + let h = { type: "checkbox", raw: c2[0] + " ", checked: c2[0] !== "[ ]" };
6964 + a.checked = h.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 = h.raw + a.tokens[0].raw, a.tokens[0].text = h.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(h)) : a.tokens.unshift({ type: "paragraph", raw: h.raw, text: h.raw, tokens: [h] }) : a.tokens.unshift(h);
6848 6965 }
6849 - } else a2.task && (a2.task = false);
6850 - if (!r2.loose) {
6851 - let p2 = a2.tokens.filter((h2) => h2.type === "space"), k2 = p2.length > 0 && p2.some((h2) => this.rules.other.anyLine.test(h2.raw));
6852 - r2.loose = k2;
6853 - }
6966 + } else a.task && (a.task = false);
6854 6967 }
6855 - if (r2.loose) for (let a2 of r2.items) {
6856 - a2.loose = true;
6857 - for (let c2 of a2.tokens) c2.type === "text" && (c2.type = "paragraph");
6968 + if (r2.loose) for (let a of r2.items) {
6969 + a.loose = true;
6970 + for (let p2 of a.tokens) p2.type === "text" && (p2.type = "paragraph");
6858 6971 }
6859 6972 return r2;
6860 6973 }
6861 6974 }
6862 6975 html(e2) {
6863 - let t3 = this.rules.block.html.exec(e2);
6864 - if (t3) {
6865 - let n2 = Y(t3[0]);
6866 - return { type: "html", block: true, raw: n2, pre: t3[1] === "pre" || t3[1] === "script" || t3[1] === "style", text: n2 };
6976 + let t2 = this.rules.block.html.exec(e2);
6977 + if (t2) {
6978 + let n = ne(t2[0]);
6979 + return { type: "html", block: true, raw: n, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n };
6867 6980 }
6868 6981 }
6869 6982 def(e2) {
6870 - let t3 = this.rules.block.def.exec(e2);
6871 - if (t3) {
6872 - let n2 = t3[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s2 = t3[2] ? t3[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t3[3] ? t3[3].substring(1, t3[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t3[3];
6873 - return { type: "def", tag: n2, raw: $2(t3[0], `
6874 -`), href: s2, title: r2 };
6983 + let t2 = this.rules.block.def.exec(e2);
6984 + if (t2) {
6985 + let n = D2(t2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
6986 + return { type: "def", tag: n, raw: $2(t2[0], `
6987 +`), href: i, title: r2 };
6875 6988 }
6876 6989 }
6877 6990 table(e2) {
6878 - let t3 = this.rules.block.table.exec(e2);
6879 - if (!t3 || !this.rules.other.tableDelimiter.test(t3[2])) return;
6880 - let n2 = V(t3[1]), s2 = t3[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t3[3]?.trim() ? t3[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6881 -`) : [], i2 = { type: "table", raw: $2(t3[0], `
6991 + let t2 = this.rules.block.table.exec(e2);
6992 + if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
6993 + let n = te(t2[1]), i = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
6994 +`) : [], o2 = { type: "table", raw: $2(t2[0], `
6882 6995 `), header: [], align: [], rows: [] };
6883 - if (n2.length === s2.length) {
6884 - for (let o3 of s2) this.rules.other.tableAlignRight.test(o3) ? i2.align.push("right") : this.rules.other.tableAlignCenter.test(o3) ? i2.align.push("center") : this.rules.other.tableAlignLeft.test(o3) ? i2.align.push("left") : i2.align.push(null);
6885 - for (let o3 = 0; o3 < n2.length; o3++) i2.header.push({ text: n2[o3], tokens: this.lexer.inline(n2[o3]), header: true, align: i2.align[o3] });
6886 - for (let o3 of r2) i2.rows.push(V(o3, i2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: i2.align[a2] })));
6887 - return i2;
6996 + if (n.length === i.length) {
6997 + for (let s of i) this.rules.other.tableAlignRight.test(s) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o2.align.push("left") : o2.align.push(null);
6998 + for (let s = 0; s < n.length; s++) o2.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: true, align: o2.align[s] });
6999 + for (let s of r2) o2.rows.push(te(s, o2.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: o2.align[a] })));
7000 + return o2;
6888 7001 }
6889 7002 }
6890 7003 lheading(e2) {
6891 - let t3 = this.rules.block.lheading.exec(e2);
6892 - if (t3) {
6893 - let n2 = t3[1].trim();
6894 - return { type: "heading", raw: $2(t3[0], `
6895 -`), depth: t3[2].charAt(0) === "=" ? 1 : 2, text: n2, tokens: this.lexer.inline(n2) };
7004 + let t2 = this.rules.block.lheading.exec(e2);
7005 + if (t2) {
7006 + let n = t2[1].trim();
7007 + return { type: "heading", raw: $2(t2[0], `
7008 +`), depth: t2[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
6896 7009 }
6897 7010 }
6898 7011 paragraph(e2) {
6899 - let t3 = this.rules.block.paragraph.exec(e2);
6900 - if (t3) {
6901 - let n2 = t3[1].charAt(t3[1].length - 1) === `
6902 -` ? t3[1].slice(0, -1) : t3[1];
6903 - return { type: "paragraph", raw: t3[0], text: n2, tokens: this.lexer.inline(n2) };
7012 + let t2 = this.rules.block.paragraph.exec(e2);
7013 + if (t2) {
7014 + let n = t2[1].charAt(t2[1].length - 1) === `
7015 +` ? t2[1].slice(0, -1) : t2[1];
7016 + return { type: "paragraph", raw: t2[0], text: n, tokens: this.lexer.inline(n) };
6904 7017 }
6905 7018 }
6906 7019 text(e2) {
6907 - let t3 = this.rules.block.text.exec(e2);
6908 - if (t3) return { type: "text", raw: t3[0], text: t3[0], tokens: this.lexer.inline(t3[0]) };
7020 + let t2 = this.rules.block.text.exec(e2);
7021 + if (t2) return { type: "text", raw: t2[0], text: t2[0], tokens: this.lexer.inline(t2[0]) };
6909 7022 }
6910 7023 escape(e2) {
6911 - let t3 = this.rules.inline.escape.exec(e2);
6912 - if (t3) return { type: "escape", raw: t3[0], text: t3[1] };
7024 + let t2 = this.rules.inline.escape.exec(e2);
7025 + if (t2) return { type: "escape", raw: t2[0], text: t2[1] };
6913 7026 }
6914 7027 tag(e2) {
6915 - let t3 = this.rules.inline.tag.exec(e2);
6916 - if (t3) return !this.lexer.state.inLink && this.rules.other.startATag.test(t3[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t3[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t3[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t3[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t3[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t3[0] };
7028 + let t2 = this.rules.inline.tag.exec(e2);
7029 + if (t2) return !this.lexer.state.inLink && this.rules.other.startATag.test(t2[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t2[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t2[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t2[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t2[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t2[0] };
6917 7030 }
6918 7031 link(e2) {
6919 - let t3 = this.rules.inline.link.exec(e2);
6920 - if (t3) {
6921 - let n2 = t3[2].trim();
6922 - if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n2)) {
6923 - if (!this.rules.other.endAngleBracket.test(n2)) return;
6924 - let i2 = $2(n2.slice(0, -1), "\\");
6925 - if ((n2.length - i2.length) % 2 === 0) return;
7032 + let t2 = this.rules.inline.link.exec(e2);
7033 + if (t2) {
7034 + let n = t2[0].charAt(0) === "!" ? 2 : 1;
7035 + if (!this.options.pedantic && Re(e2, t2[1], n, this.rules)) return;
7036 + let i = t2[2].trim();
7037 + if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i)) {
7038 + if (!this.rules.other.endAngleBracket.test(i)) return;
7039 + let s = $2(i.slice(0, -1), "\\");
7040 + if ((i.length - s.length) % 2 === 0) return;
6926 7041 } else {
6927 - let i2 = ge(t3[2], "()");
6928 - if (i2 === -2) return;
6929 - if (i2 > -1) {
6930 - let u2 = (t3[0].indexOf("!") === 0 ? 5 : 4) + t3[1].length + i2;
6931 - t3[2] = t3[2].substring(0, i2), t3[0] = t3[0].substring(0, u2).trim(), t3[3] = "";
7042 + let s = me(t2[2], "()");
7043 + if (s === -2) return;
7044 + if (s > -1) {
7045 + let a = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s;
7046 + t2[2] = t2[2].substring(0, s), t2[0] = t2[0].substring(0, a).trim(), t2[3] = "";
6932 7047 }
6933 7048 }
6934 - let s2 = t3[2], r2 = "";
7049 + let r2 = t2[2], o2 = "";
6935 7050 if (this.options.pedantic) {
6936 - let i2 = this.rules.other.pedanticHrefTitle.exec(s2);
6937 - i2 && (s2 = i2[1], r2 = i2[3]);
6938 - } else r2 = t3[3] ? t3[3].slice(1, -1) : "";
6939 - return s2 = s2.trim(), this.rules.other.startAngleBracket.test(s2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n2) ? s2 = s2.slice(1) : s2 = s2.slice(1, -1)), me(t3, { href: s2 && s2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t3[0], this.lexer, this.rules);
7051 + let s = this.rules.other.pedanticHrefTitle.exec(r2);
7052 + s && (r2 = s[1], o2 = s[3]);
7053 + } else o2 = t2[3] ? t2[3].slice(1, -1) : "";
7054 + return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(i) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), be(t2, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: o2 && o2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
6940 7055 }
6941 7056 }
6942 - reflink(e2, t3) {
6943 - let n2;
6944 - if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) {
6945 - let s2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), r2 = t3[s2.toLowerCase()];
6946 - if (!r2) {
6947 - let i2 = n2[0].charAt(0);
6948 - return { type: "text", raw: i2, text: i2 };
7057 + reflink(e2, t2) {
7058 + let n;
7059 + if ((n = this.rules.inline.reflink.exec(e2)) || (n = this.rules.inline.nolink.exec(e2))) {
7060 + let i = n[0].charAt(0) === "!" ? 2 : 1;
7061 + if (!this.options.pedantic && Re(e2, n[1], i, this.rules)) return;
7062 + let r2 = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D2(r2)];
7063 + if (!o2) {
7064 + let s = n[0].charAt(0);
7065 + return { type: "text", raw: s, text: s };
6949 7066 }
6950 - return me(n2, r2, n2[0], this.lexer, this.rules);
7067 + return be(n, o2, n[0], this.lexer, this.rules);
6951 7068 }
6952 7069 }
6953 - emStrong(e2, t3, n2 = "") {
6954 - let s2 = this.rules.inline.emStrongLDelim.exec(e2);
6955 - if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
6956 - if (!(s2[1] || s2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
6957 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = 0, p2 = s2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
6958 - for (p2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = p2.exec(t3)) !== null; ) {
6959 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3) continue;
6960 - if (u2 = [...o3].length, s2[3] || s2[4]) {
6961 - a2 += u2;
7070 + emStrong(e2, t2, n = "") {
7071 + let i = this.rules.inline.emStrongLDelim.exec(e2);
7072 + if (!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
7073 + if (!(i[1] || i[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7074 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = 0, c2 = i[0][0], h = n === c2, k2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
7075 + for (k2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = k2.exec(t2)) !== null; ) {
7076 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s) continue;
7077 + if (u = [...s].length, i[3] || i[4]) {
7078 + a += u;
6962 7079 continue;
6963 - } else if ((s2[5] || s2[6]) && i2 % 3 && !((i2 + u2) % 3)) {
6964 - c2 += u2;
6965 - continue;
7080 + } else if (i[5] || i[6]) {
7081 + if (o2 % 3 && !((o2 + u) % 3)) {
7082 + p2 += u;
7083 + continue;
7084 + }
7085 + if (h) break;
6966 7086 }
6967 - if (a2 -= u2, a2 > 0) continue;
6968 - u2 = Math.min(u2, u2 + a2 + c2);
6969 - let k2 = [...s2[0]][0].length, h2 = e2.slice(0, i2 + s2.index + k2 + u2);
6970 - if (Math.min(i2, u2) % 2) {
6971 - let f2 = h2.slice(1, -1);
6972 - return { type: "em", raw: h2, text: f2, tokens: this.lexer.inlineTokens(f2) };
7087 + if (a -= u, a > 0) continue;
7088 + u = Math.min(u, u + a + p2);
7089 + let O = [...i[0]][0].length, g2 = e2.slice(0, o2 + i.index + O + u);
7090 + if (Math.min(o2, u) % 2) {
7091 + let z = g2.slice(1, -1);
7092 + return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
6973 7093 }
6974 - let R = h2.slice(2, -2);
6975 - return { type: "strong", raw: h2, text: R, tokens: this.lexer.inlineTokens(R) };
7094 + let w2 = g2.slice(2, -2);
7095 + return { type: "strong", raw: g2, text: w2, tokens: this.lexer.inlineTokens(w2) };
6976 7096 }
6977 7097 }
6978 7098 }
6979 7099 codespan(e2) {
6980 - let t3 = this.rules.inline.code.exec(e2);
6981 - if (t3) {
6982 - let n2 = t3[2].replace(this.rules.other.newLineCharGlobal, " "), s2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
6983 - return s2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t3[0], text: n2 };
7100 + let t2 = this.rules.inline.code.exec(e2);
7101 + if (t2) {
7102 + let n = t2[2].replace(this.rules.other.newLineCharGlobal, " "), i = this.rules.other.nonSpaceChar.test(n), r2 = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
7103 + return i && r2 && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t2[0], text: n };
6984 7104 }
6985 7105 }
6986 7106 br(e2) {
6987 - let t3 = this.rules.inline.br.exec(e2);
6988 - if (t3) return { type: "br", raw: t3[0] };
7107 + let t2 = this.rules.inline.br.exec(e2);
7108 + if (t2) return { type: "br", raw: t2[0] };
6989 7109 }
6990 - del(e2, t3, n2 = "") {
6991 - let s2 = this.rules.inline.delLDelim.exec(e2);
6992 - if (!s2) return;
6993 - if (!(s2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
6994 - let i2 = [...s2[0]].length - 1, o3, u2, a2 = i2, c2 = this.rules.inline.delRDelim;
6995 - for (c2.lastIndex = 0, t3 = t3.slice(-1 * e2.length + i2); (s2 = c2.exec(t3)) !== null; ) {
6996 - if (o3 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !o3 || (u2 = [...o3].length, u2 !== i2)) continue;
6997 - if (s2[3] || s2[4]) {
6998 - a2 += u2;
7110 + del(e2, t2, n = "") {
7111 + let i = this.rules.inline.delLDelim.exec(e2);
7112 + if (!i) return;
7113 + if (!(i[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
7114 + let o2 = [...i[0]].length - 1, s, u, a = o2, p2 = this.rules.inline.delRDelim;
7115 + for (p2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i = p2.exec(t2)) !== null; ) {
7116 + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s || (u = [...s].length, u !== o2)) continue;
7117 + if (i[3] || i[4]) {
7118 + a += u;
6999 7119 continue;
7000 7120 }
7001 - if (a2 -= u2, a2 > 0) continue;
7002 - u2 = Math.min(u2, u2 + a2);
7003 - let p2 = [...s2[0]][0].length, k2 = e2.slice(0, i2 + s2.index + p2 + u2), h2 = k2.slice(i2, -i2);
7004 - return { type: "del", raw: k2, text: h2, tokens: this.lexer.inlineTokens(h2) };
7121 + if (a -= u, a > 0) continue;
7122 + u = Math.min(u, u + a);
7123 + let c2 = [...i[0]][0].length, h = e2.slice(0, o2 + i.index + c2 + u), k2 = h.slice(o2, -o2);
7124 + return { type: "del", raw: h, text: k2, tokens: this.lexer.inlineTokens(k2) };
7005 7125 }
7006 7126 }
7007 7127 }
7008 7128 autolink(e2) {
7009 - let t3 = this.rules.inline.autolink.exec(e2);
7010 - if (t3) {
7011 - let n2, s2;
7012 - return t3[2] === "@" ? (n2 = t3[1], s2 = "mailto:" + n2) : (n2 = t3[1], s2 = n2), { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7129 + let t2 = this.rules.inline.autolink.exec(e2);
7130 + if (t2) {
7131 + let n, i;
7132 + return t2[2] === "@" ? (n = t2[1], i = "mailto:" + n) : (n = t2[1], i = n), { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
7013 7133 }
7014 7134 }
7015 7135 url(e2) {
7016 - let t3;
7017 - if (t3 = this.rules.inline.url.exec(e2)) {
7018 - let n2, s2;
7019 - if (t3[2] === "@") n2 = t3[0], s2 = "mailto:" + n2;
7136 + let t2;
7137 + if (t2 = this.rules.inline.url.exec(e2)) {
7138 + let n, i;
7139 + if (t2[2] === "@") n = t2[0], i = "mailto:" + n;
7020 7140 else {
7021 7141 let r2;
7022 7142 do
7023 - r2 = t3[0], t3[0] = this.rules.inline._backpedal.exec(t3[0])?.[0] ?? "";
7024 - while (r2 !== t3[0]);
7025 - n2 = t3[0], t3[1] === "www." ? s2 = "http://" + t3[0] : s2 = t3[0];
7143 + r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
7144 + while (r2 !== t2[0]);
7145 + n = t2[0], t2[1] === "www." ? i = "http://" + t2[0] : i = t2[0];
7026 7146 }
7027 - return { type: "link", raw: t3[0], text: n2, href: s2, tokens: [{ type: "text", raw: n2, text: n2 }] };
7147 + return { type: "link", raw: t2[0], text: n, href: i, autolink: true, tokens: [{ type: "text", raw: n, text: n }] };
7028 7148 }
7029 7149 }
7030 7150 inlineText(e2) {
7031 - let t3 = this.rules.inline.text.exec(e2);
7032 - if (t3) {
7033 - let n2 = this.lexer.state.inRawBlock;
7034 - return { type: "text", raw: t3[0], text: t3[0], escaped: n2 };
7151 + let t2 = this.rules.inline.text.exec(e2);
7152 + if (t2) {
7153 + let n = this.lexer.state.inRawBlock;
7154 + return { type: "text", raw: t2[0], text: t2[0], escaped: n };
7035 7155 }
7036 7156 }
7037 7157 };
7038 7158 var x2 = class l2 {
@@ -7041,120 +7161,120 @@
7041 7161 state;
7042 7162 inlineQueue;
7043 7163 tokenizer;
7044 7164 constructor(e2) {
7045 - this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new w2(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
7046 - let t3 = { other: m2, block: B.normal, inline: A.normal };
7047 - this.options.pedantic ? (t3.block = B.pedantic, t3.inline = A.pedantic) : this.options.gfm && (t3.block = B.gfm, this.options.breaks ? t3.inline = A.breaks : t3.inline = A.gfm), this.tokenizer.rules = t3;
7165 + this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new y2(), 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 };
7166 + let t2 = { other: m2, block: G.normal, inline: B.normal };
7167 + this.options.pedantic ? (t2.block = G.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = G.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
7048 7168 }
7049 7169 static get rules() {
7050 - return { block: B, inline: A };
7170 + return { block: G, inline: B };
7051 7171 }
7052 - static lex(e2, t3) {
7053 - return new l2(t3).lex(e2);
7172 + static lex(e2, t2) {
7173 + return new l2(t2).lex(e2);
7054 7174 }
7055 - static lexInline(e2, t3) {
7056 - return new l2(t3).inlineTokens(e2);
7175 + static lexInline(e2, t2) {
7176 + return new l2(t2).inlineTokens(e2);
7057 7177 }
7058 7178 lex(e2) {
7059 7179 e2 = e2.replace(m2.carriageReturn, `
7060 7180 `), this.blockTokens(e2, this.tokens);
7061 - for (let t3 = 0; t3 < this.inlineQueue.length; t3++) {
7062 - let n2 = this.inlineQueue[t3];
7063 - this.inlineTokens(n2.src, n2.tokens);
7181 + for (let t2 = 0; t2 < this.inlineQueue.length; t2++) {
7182 + let n = this.inlineQueue[t2];
7183 + this.inlineTokens(n.src, n.tokens);
7064 7184 }
7065 7185 return this.inlineQueue = [], this.tokens;
7066 7186 }
7067 - blockTokens(e2, t3 = [], n2 = false) {
7187 + blockTokens(e2, t2 = [], n = false) {
7068 7188 this.tokenizer.lexer = this, this.options.pedantic && (e2 = e2.replace(m2.tabCharGlobal, " ").replace(m2.spaceLine, ""));
7069 - let s2 = 1 / 0;
7189 + let i = 1 / 0;
7070 7190 for (; e2; ) {
7071 - if (e2.length < s2) s2 = e2.length;
7191 + if (e2.length < i) i = e2.length;
7072 7192 else {
7073 7193 this.infiniteLoopError(e2.charCodeAt(0));
7074 7194 break;
7075 7195 }
7076 7196 let r2;
7077 - if (this.options.extensions?.block?.some((o3) => (r2 = o3.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(r2.raw.length), t3.push(r2), true) : false)) continue;
7197 + if (this.options.extensions?.block?.some((s) => (r2 = s.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
7078 7198 if (r2 = this.tokenizer.space(e2)) {
7079 7199 e2 = e2.substring(r2.raw.length);
7080 - let o3 = t3.at(-1);
7081 - r2.raw.length === 1 && o3 !== void 0 ? o3.raw += `
7082 -` : t3.push(r2);
7200 + let s = t2.at(-1);
7201 + r2.raw.length === 1 && s !== void 0 ? s.raw += `
7202 +` : t2.push(r2);
7083 7203 continue;
7084 7204 }
7085 7205 if (r2 = this.tokenizer.code(e2)) {
7086 7206 e2 = e2.substring(r2.raw.length);
7087 - let o3 = t3.at(-1);
7088 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7207 + let s = t2.at(-1);
7208 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7089 7209 `) ? "" : `
7090 -`) + r2.raw, o3.text += `
7091 -` + r2.text, this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7210 +`) + r2.raw, s.text += `
7211 +` + r2.text, this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7092 7212 continue;
7093 7213 }
7094 7214 if (r2 = this.tokenizer.fences(e2)) {
7095 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7215 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7096 7216 continue;
7097 7217 }
7098 7218 if (r2 = this.tokenizer.heading(e2)) {
7099 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7219 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7100 7220 continue;
7101 7221 }
7102 7222 if (r2 = this.tokenizer.hr(e2)) {
7103 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7223 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7104 7224 continue;
7105 7225 }
7106 7226 if (r2 = this.tokenizer.blockquote(e2)) {
7107 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7227 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7108 7228 continue;
7109 7229 }
7110 7230 if (r2 = this.tokenizer.list(e2)) {
7111 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7231 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7112 7232 continue;
7113 7233 }
7114 7234 if (r2 = this.tokenizer.html(e2)) {
7115 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7235 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7116 7236 continue;
7117 7237 }
7118 7238 if (r2 = this.tokenizer.def(e2)) {
7119 7239 e2 = e2.substring(r2.raw.length);
7120 - let o3 = t3.at(-1);
7121 - o3?.type === "paragraph" || o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7240 + let s = t2.at(-1);
7241 + s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7122 7242 `) ? "" : `
7123 -`) + r2.raw, o3.text += `
7124 -` + r2.raw, this.inlineQueue.at(-1).src = o3.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t3.push(r2));
7243 +`) + r2.raw, s.text += `
7244 +` + r2.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
7125 7245 continue;
7126 7246 }
7127 7247 if (r2 = this.tokenizer.table(e2)) {
7128 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7248 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7129 7249 continue;
7130 7250 }
7131 7251 if (r2 = this.tokenizer.lheading(e2)) {
7132 - e2 = e2.substring(r2.raw.length), t3.push(r2);
7252 + e2 = e2.substring(r2.raw.length), t2.push(r2);
7133 7253 continue;
7134 7254 }
7135 - let i2 = e2;
7255 + let o2 = e2;
7136 7256 if (this.options.extensions?.startBlock) {
7137 - let o3 = 1 / 0, u2 = e2.slice(1), a2;
7138 - this.options.extensions.startBlock.forEach((c2) => {
7139 - a2 = c2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (o3 = Math.min(o3, a2));
7140 - }), o3 < 1 / 0 && o3 >= 0 && (i2 = e2.substring(0, o3 + 1));
7257 + let s = 1 / 0, u = e2.slice(1), a;
7258 + this.options.extensions.startBlock.forEach((p2) => {
7259 + a = p2.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
7260 + }), s < 1 / 0 && s >= 0 && (o2 = e2.substring(0, s + 1));
7141 7261 }
7142 - if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
7143 - let o3 = t3.at(-1);
7144 - n2 && o3?.type === "paragraph" ? (o3.raw += (o3.raw.endsWith(`
7262 + if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
7263 + let s = t2.at(-1);
7264 + n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
7145 7265 `) ? "" : `
7146 -`) + r2.raw, o3.text += `
7147 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2), n2 = i2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7266 +`) + r2.raw, s.text += `
7267 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2), n = o2.length !== e2.length, e2 = e2.substring(r2.raw.length);
7148 7268 continue;
7149 7269 }
7150 7270 if (r2 = this.tokenizer.text(e2)) {
7151 7271 e2 = e2.substring(r2.raw.length);
7152 - let o3 = t3.at(-1);
7153 - o3?.type === "text" ? (o3.raw += (o3.raw.endsWith(`
7272 + let s = t2.at(-1);
7273 + s?.type === "text" ? (s.raw += (s.raw.endsWith(`
7154 7274 `) ? "" : `
7155 -`) + r2.raw, o3.text += `
7156 -` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = o3.text) : t3.push(r2);
7275 +`) + r2.raw, s.text += `
7276 +` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t2.push(r2);
7157 7277 continue;
7158 7278 }
7159 7279 if (e2) {
7160 7280 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7160,87 +7280,105 @@
7160 7280 this.infiniteLoopError(e2.charCodeAt(0));
7161 7281 break;
7162 7282 }
7163 7283 }
7164 - return this.state.top = true, t3;
7284 + return this.state.top = true, t2;
7165 7285 }
7166 - inline(e2, t3 = []) {
7167 - return this.inlineQueue.push({ src: e2, tokens: t3 }), t3;
7286 + inline(e2, t2 = []) {
7287 + return this.inlineQueue.push({ src: e2, tokens: t2 }), t2;
7168 7288 }
7169 - inlineTokens(e2, t3 = []) {
7289 + linkInText(e2) {
7290 + if (!e2.includes("[")) return false;
7291 + let t2 = this.tokenizer.rules.inline.link;
7292 + for (let n of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n[0]) && e2.charAt(n.index - 1) !== "!") return true;
7293 + for (let n of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
7294 + let i = n[0], r2 = i.lastIndexOf("[");
7295 + if (!(i.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, D2(i.slice(r2 + 1, -1)))) && !(r2 > 1 && this.linkInText(i.slice(1, r2 - 1)))) return true;
7296 + }
7297 + return false;
7298 + }
7299 + inlineTokens(e2, t2 = []) {
7170 7300 this.tokenizer.lexer = this;
7171 - let n2 = e2, s2 = null;
7172 - if (this.tokens.links) {
7173 - let a2 = Object.keys(this.tokens.links);
7174 - if (a2.length > 0) for (; (s2 = this.tokenizer.rules.inline.reflinkSearch.exec(n2)) !== null; ) a2.includes(s2[0].slice(s2[0].lastIndexOf("[") + 1, -1)) && (n2 = n2.slice(0, s2.index) + "[" + "a".repeat(s2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
7301 + let n = e2;
7302 + if (this.tokens.links && e2.includes("[")) {
7303 + let s = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
7304 + let p2 = a.lastIndexOf("[");
7305 + if (!Object.hasOwn(this.tokens.links, D2(a.slice(p2 + 1, -1)))) return a;
7306 + if (p2 > 1 && a.charAt(0) !== "!") {
7307 + let c2 = a.slice(1, p2 - 1);
7308 + if (this.linkInText(c2)) return "[" + c2.replace(s, u) + "][" + "a".repeat(a.length - p2 - 2) + "]";
7309 + }
7310 + return "[" + "a".repeat(a.length - 2) + "]";
7311 + };
7312 + n = n.replace(s, u);
7175 7313 }
7176 - for (; (s2 = this.tokenizer.rules.inline.anyPunctuation.exec(n2)) !== null; ) n2 = n2.slice(0, s2.index) + "++" + n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
7177 - let r2;
7178 - for (; (s2 = this.tokenizer.rules.inline.blockSkip.exec(n2)) !== null; ) r2 = s2[2] ? s2[2].length : 0, n2 = n2.slice(0, s2.index + r2) + "[" + "a".repeat(s2[0].length - r2 - 2) + "]" + n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
7179 - n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
7180 - let i2 = false, o3 = "", u2 = 1 / 0;
7314 + n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (s) => "+".repeat(s.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (s, u, a) => {
7315 + let p2 = a ? a.length : 0;
7316 + return s.slice(0, p2) + "[" + "a".repeat(s.length - p2 - 2) + "]";
7317 + }), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
7318 + let i = false, r2 = "", o2 = 1 / 0;
7181 7319 for (; e2; ) {
7182 - if (e2.length < u2) u2 = e2.length;
7320 + if (e2.length < o2) o2 = e2.length;
7183 7321 else {
7184 7322 this.infiniteLoopError(e2.charCodeAt(0));
7185 7323 break;
7186 7324 }
7187 - i2 || (o3 = ""), i2 = false;
7188 - let a2;
7189 - if (this.options.extensions?.inline?.some((p2) => (a2 = p2.call({ lexer: this }, e2, t3)) ? (e2 = e2.substring(a2.raw.length), t3.push(a2), true) : false)) continue;
7190 - if (a2 = this.tokenizer.escape(e2)) {
7191 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7325 + i || (r2 = ""), i = false;
7326 + let s;
7327 + if (this.options.extensions?.inline?.some((a) => (s = a.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(s.raw.length), t2.push(s), true) : false)) continue;
7328 + if (s = this.tokenizer.escape(e2)) {
7329 + e2 = e2.substring(s.raw.length), t2.push(s);
7192 7330 continue;
7193 7331 }
7194 - if (a2 = this.tokenizer.tag(e2)) {
7195 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7332 + if (s = this.tokenizer.tag(e2)) {
7333 + e2 = e2.substring(s.raw.length), t2.push(s);
7196 7334 continue;
7197 7335 }
7198 - if (a2 = this.tokenizer.link(e2)) {
7199 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7336 + if (s = this.tokenizer.link(e2)) {
7337 + e2 = e2.substring(s.raw.length), t2.push(s);
7200 7338 continue;
7201 7339 }
7202 - if (a2 = this.tokenizer.reflink(e2, this.tokens.links)) {
7203 - e2 = e2.substring(a2.raw.length);
7204 - let p2 = t3.at(-1);
7205 - a2.type === "text" && p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7340 + if (s = this.tokenizer.reflink(e2, this.tokens.links)) {
7341 + e2 = e2.substring(s.raw.length);
7342 + let a = t2.at(-1);
7343 + s.type === "text" && a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7206 7344 continue;
7207 7345 }
7208 - if (a2 = this.tokenizer.emStrong(e2, n2, o3)) {
7209 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7346 + if (s = this.tokenizer.emStrong(e2, n, r2)) {
7347 + e2 = e2.substring(s.raw.length), t2.push(s);
7210 7348 continue;
7211 7349 }
7212 - if (a2 = this.tokenizer.codespan(e2)) {
7213 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7350 + if (s = this.tokenizer.codespan(e2)) {
7351 + e2 = e2.substring(s.raw.length), t2.push(s);
7214 7352 continue;
7215 7353 }
7216 - if (a2 = this.tokenizer.br(e2)) {
7217 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7354 + if (s = this.tokenizer.br(e2)) {
7355 + e2 = e2.substring(s.raw.length), t2.push(s);
7218 7356 continue;
7219 7357 }
7220 - if (a2 = this.tokenizer.del(e2, n2, o3)) {
7221 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7358 + if (s = this.tokenizer.del(e2, n, r2)) {
7359 + e2 = e2.substring(s.raw.length), t2.push(s);
7222 7360 continue;
7223 7361 }
7224 - if (a2 = this.tokenizer.autolink(e2)) {
7225 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7362 + if (s = this.tokenizer.autolink(e2)) {
7363 + e2 = e2.substring(s.raw.length), t2.push(s);
7226 7364 continue;
7227 7365 }
7228 - if (!this.state.inLink && (a2 = this.tokenizer.url(e2))) {
7229 - e2 = e2.substring(a2.raw.length), t3.push(a2);
7366 + if (!this.state.inLink && (s = this.tokenizer.url(e2))) {
7367 + e2 = e2.substring(s.raw.length), t2.push(s);
7230 7368 continue;
7231 7369 }
7232 - let c2 = e2;
7370 + let u = e2;
7233 7371 if (this.options.extensions?.startInline) {
7234 - let p2 = 1 / 0, k2 = e2.slice(1), h2;
7235 - this.options.extensions.startInline.forEach((R) => {
7236 - h2 = R.call({ lexer: this }, k2), typeof h2 == "number" && h2 >= 0 && (p2 = Math.min(p2, h2));
7237 - }), p2 < 1 / 0 && p2 >= 0 && (c2 = e2.substring(0, p2 + 1));
7372 + let a = 1 / 0, p2 = e2.slice(1), c2;
7373 + this.options.extensions.startInline.forEach((h) => {
7374 + c2 = h.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a = Math.min(a, c2));
7375 + }), a < 1 / 0 && a >= 0 && (u = e2.substring(0, a + 1));
7238 7376 }
7239 - if (a2 = this.tokenizer.inlineText(c2)) {
7240 - e2 = e2.substring(a2.raw.length), a2.raw.slice(-1) !== "_" && (o3 = a2.raw.slice(-1)), i2 = true;
7241 - let p2 = t3.at(-1);
7242 - p2?.type === "text" ? (p2.raw += a2.raw, p2.text += a2.text) : t3.push(a2);
7377 + if (s = this.tokenizer.inlineText(u)) {
7378 + e2 = e2.substring(s.raw.length), s.raw.slice(-1) !== "_" && (r2 = s.raw.slice(-1)), i = true;
7379 + let a = t2.at(-1);
7380 + a?.type === "text" ? (a.raw += s.raw, a.text += s.text) : t2.push(s);
7243 7381 continue;
7244 7382 }
7245 7383 if (e2) {
7246 7384 this.infiniteLoopError(e2.charCodeAt(0));
@@ -7246,17 +7384,17 @@
7246 7384 this.infiniteLoopError(e2.charCodeAt(0));
7247 7385 break;
7248 7386 }
7249 7387 }
7250 - return t3;
7388 + return t2;
7251 7389 }
7252 7390 infiniteLoopError(e2) {
7253 - let t3 = "Infinite loop on byte: " + e2;
7254 - if (this.options.silent) console.error(t3);
7255 - else throw new Error(t3);
7391 + let t2 = "Infinite loop on byte: " + e2;
7392 + if (this.options.silent) console.error(t2);
7393 + else throw new Error(t2);
7256 7394 }
7257 7395 };
7258 - var y2 = class {
7396 + var P = class {
7259 7397 options;
7260 7398 parser;
7261 7399 constructor(e2) {
7262 7400 this.options = e2 || T;
@@ -7263,14 +7401,14 @@
7263 7401 }
7264 7402 space(e2) {
7265 7403 return "";
7266 7404 }
7267 - code({ text: e2, lang: t3, escaped: n2 }) {
7268 - let s2 = (t3 || "").match(m2.notSpaceStart)?.[0], r2 = e2.replace(m2.endingNewline, "") + `
7405 + code({ text: e2, lang: t2, escaped: n }) {
7406 + let i = (t2 || "").match(m2.notSpaceStart)?.[0], r2 = e2 ? e2.replace(m2.endingNewline, "") + `
7407 +` : "";
7408 + return i ? '<pre><code class="language-' + R2(i) + '">' + (n ? r2 : R2(r2, true)) + `</code></pre>
7409 +` : "<pre><code>" + (n ? r2 : R2(r2, true)) + `</code></pre>
7269 7410 `;
7270 - return s2 ? '<pre><code class="language-' + O(s2) + '">' + (n2 ? r2 : O(r2, true)) + `</code></pre>
7271 -` : "<pre><code>" + (n2 ? r2 : O(r2, true)) + `</code></pre>
7272 -`;
7273 7411 }
7274 7412 blockquote({ tokens: e2 }) {
7275 7413 return `<blockquote>
7276 7414 ${this.parser.parse(e2)}</blockquote>
@@ -7281,10 +7419,10 @@
7281 7419 }
7282 7420 def(e2) {
7283 7421 return "";
7284 7422 }
7285 - heading({ tokens: e2, depth: t3 }) {
7286 - return `<h${t3}>${this.parser.parseInline(e2)}</h${t3}>
7423 + heading({ tokens: e2, depth: t2 }) {
7424 + return `<h${t2}>${this.parser.parseInline(e2)}</h${t2}>
7287 7425 `;
7288 7426 }
7289 7427 hr(e2) {
7290 7428 return `<hr>
@@ -7290,16 +7428,16 @@
7290 7428 return `<hr>
7291 7429 `;
7292 7430 }
7293 7431 list(e2) {
7294 - let t3 = e2.ordered, n2 = e2.start, s2 = "";
7295 - for (let o3 = 0; o3 < e2.items.length; o3++) {
7296 - let u2 = e2.items[o3];
7297 - s2 += this.listitem(u2);
7432 + let t2 = e2.ordered, n = e2.start, i = "";
7433 + for (let s = 0; s < e2.items.length; s++) {
7434 + let u = e2.items[s];
7435 + i += this.listitem(u);
7298 7436 }
7299 - let r2 = t3 ? "ol" : "ul", i2 = t3 && n2 !== 1 ? ' start="' + n2 + '"' : "";
7300 - return "<" + r2 + i2 + `>
7301 -` + s2 + "</" + r2 + `>
7437 + let r2 = t2 ? "ol" : "ul", o2 = t2 && n !== 1 ? ' start="' + n + '"' : "";
7438 + return "<" + r2 + o2 + `>
7439 +` + i + "</" + r2 + `>
7302 7440 `;
7303 7441 }
7304 7442 listitem(e2) {
7305 7443 return `<li>${this.parser.parse(e2.tokens)}</li>
@@ -7312,22 +7450,22 @@
7312 7450 return `<p>${this.parser.parseInline(e2)}</p>
7313 7451 `;
7314 7452 }
7315 7453 table(e2) {
7316 - let t3 = "", n2 = "";
7317 - for (let r2 = 0; r2 < e2.header.length; r2++) n2 += this.tablecell(e2.header[r2]);
7318 - t3 += this.tablerow({ text: n2 });
7319 - let s2 = "";
7454 + let t2 = "", n = "";
7455 + for (let r2 = 0; r2 < e2.header.length; r2++) n += this.tablecell(e2.header[r2]);
7456 + t2 += this.tablerow({ text: n });
7457 + let i = "";
7320 7458 for (let r2 = 0; r2 < e2.rows.length; r2++) {
7321 - let i2 = e2.rows[r2];
7322 - n2 = "";
7323 - for (let o3 = 0; o3 < i2.length; o3++) n2 += this.tablecell(i2[o3]);
7324 - s2 += this.tablerow({ text: n2 });
7459 + let o2 = e2.rows[r2];
7460 + n = "";
7461 + for (let s = 0; s < o2.length; s++) n += this.tablecell(o2[s]);
7462 + i += this.tablerow({ text: n });
7325 7463 }
7326 - return s2 && (s2 = `<tbody>${s2}</tbody>`), `<table>
7464 + return i && (i = `<tbody>${i}</tbody>`), `<table>
7327 7465 <thead>
7328 -` + t3 + `</thead>
7329 -` + s2 + `</table>
7466 +` + t2 + `</thead>
7467 +` + i + `</table>
7330 7468 `;
7331 7469 }
7332 7470 tablerow({ text: e2 }) {
7333 7471 return `<tr>
@@ -7334,10 +7472,10 @@
7334 7472 ${e2}</tr>
7335 7473 `;
7336 7474 }
7337 7475 tablecell(e2) {
7338 - let t3 = this.parser.parseInline(e2.tokens), n2 = e2.header ? "th" : "td";
7339 - return (e2.align ? `<${n2} align="${e2.align}">` : `<${n2}>`) + t3 + `</${n2}>
7476 + let t2 = this.parser.parseInline(e2.tokens), n = e2.header ? "th" : "td";
7477 + return (e2.align ? `<${n} align="${e2.align}">` : `<${n}>`) + t2 + `</${n}>
7340 7478 `;
7341 7479 }
7342 7480 strong({ tokens: e2 }) {
7343 7481 return `<strong>${this.parser.parseInline(e2)}</strong>`;
@@ -7345,9 +7483,9 @@
7345 7483 em({ tokens: e2 }) {
7346 7484 return `<em>${this.parser.parseInline(e2)}</em>`;
7347 7485 }
7348 7486 codespan({ text: e2 }) {
7349 - return `<code>${O(e2, true)}</code>`;
7487 + return `<code>${R2(e2, true)}</code>`;
7350 7488 }
7351 7489 br(e2) {
7352 7490 return "<br>";
7353 7491 }
@@ -7353,25 +7491,25 @@
7353 7491 }
7354 7492 del({ tokens: e2 }) {
7355 7493 return `<del>${this.parser.parseInline(e2)}</del>`;
7356 7494 }
7357 - link({ href: e2, title: t3, tokens: n2 }) {
7358 - let s2 = this.parser.parseInline(n2), r2 = J(e2);
7359 - if (r2 === null) return s2;
7360 - e2 = r2;
7361 - let i2 = '<a href="' + e2 + '"';
7362 - return t3 && (i2 += ' title="' + O(t3) + '"'), i2 += ">" + s2 + "</a>", i2;
7495 + link({ href: e2, title: t2, text: n, tokens: i, autolink: r2 }) {
7496 + let o2 = r2 ? R2(n, true) : this.parser.parseInline(i), s = ee(e2);
7497 + if (s === null) return o2;
7498 + e2 = R2(s, r2);
7499 + let u = '<a href="' + e2 + '"';
7500 + return t2 && (u += ' title="' + R2(t2) + '"'), u += ">" + o2 + "</a>", u;
7363 7501 }
7364 - image({ href: e2, title: t3, text: n2, tokens: s2 }) {
7365 - s2 && (n2 = this.parser.parseInline(s2, this.parser.textRenderer));
7366 - let r2 = J(e2);
7367 - if (r2 === null) return O(n2);
7502 + image({ href: e2, title: t2, text: n, tokens: i }) {
7503 + i && (n = this.parser.parseInline(i, this.parser.textRenderer));
7504 + let r2 = ee(e2);
7505 + if (r2 === null) return R2(n);
7368 7506 e2 = r2;
7369 - let i2 = `<img src="${e2}" alt="${O(n2)}"`;
7370 - return t3 && (i2 += ` title="${O(t3)}"`), i2 += ">", i2;
7507 + let o2 = `<img src="${R2(e2)}" alt="${R2(n)}"`;
7508 + return t2 && (o2 += ` title="${R2(t2)}"`), o2 += ">", o2;
7371 7509 }
7372 7510 text(e2) {
7373 - return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : O(e2.text);
7511 + return "tokens" in e2 && e2.tokens ? this.parser.parseInline(e2.tokens) : "escaped" in e2 && e2.escaped ? e2.text : R2(e2.text);
7374 7512 }
7375 7513 };
7376 7514 var L = class {
7377 7515 strong({ text: e2 }) {
@@ -7404,161 +7542,161 @@
7404 7542 checkbox({ raw: e2 }) {
7405 7543 return e2;
7406 7544 }
7407 7545 };
7408 - var b2 = class l3 {
7546 + var b = class l3 {
7409 7547 options;
7410 7548 renderer;
7411 7549 textRenderer;
7412 7550 constructor(e2) {
7413 - this.options = e2 || T, this.options.renderer = this.options.renderer || new y2(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
7551 + this.options = e2 || T, 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();
7414 7552 }
7415 - static parse(e2, t3) {
7416 - return new l3(t3).parse(e2);
7553 + static parse(e2, t2) {
7554 + return new l3(t2).parse(e2);
7417 7555 }
7418 - static parseInline(e2, t3) {
7419 - return new l3(t3).parseInline(e2);
7556 + static parseInline(e2, t2) {
7557 + return new l3(t2).parseInline(e2);
7420 7558 }
7421 7559 parse(e2) {
7422 7560 this.renderer.parser = this;
7423 - let t3 = "";
7424 - for (let n2 = 0; n2 < e2.length; n2++) {
7425 - let s2 = e2[n2];
7426 - if (this.options.extensions?.renderers?.[s2.type]) {
7427 - let i2 = s2, o3 = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
7428 - if (o3 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
7429 - t3 += o3 || "";
7561 + let t2 = "";
7562 + for (let n = 0; n < e2.length; n++) {
7563 + let i = e2[n];
7564 + if (this.options.extensions?.renderers?.[i.type]) {
7565 + let o2 = i, s = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
7566 + if (s !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
7567 + t2 += s || "";
7430 7568 continue;
7431 7569 }
7432 7570 }
7433 - let r2 = s2;
7571 + let r2 = i;
7434 7572 switch (r2.type) {
7435 7573 case "space": {
7436 - t3 += this.renderer.space(r2);
7574 + t2 += this.renderer.space(r2);
7437 7575 break;
7438 7576 }
7439 7577 case "hr": {
7440 - t3 += this.renderer.hr(r2);
7578 + t2 += this.renderer.hr(r2);
7441 7579 break;
7442 7580 }
7443 7581 case "heading": {
7444 - t3 += this.renderer.heading(r2);
7582 + t2 += this.renderer.heading(r2);
7445 7583 break;
7446 7584 }
7447 7585 case "code": {
7448 - t3 += this.renderer.code(r2);
7586 + t2 += this.renderer.code(r2);
7449 7587 break;
7450 7588 }
7451 7589 case "table": {
7452 - t3 += this.renderer.table(r2);
7590 + t2 += this.renderer.table(r2);
7453 7591 break;
7454 7592 }
7455 7593 case "blockquote": {
7456 - t3 += this.renderer.blockquote(r2);
7594 + t2 += this.renderer.blockquote(r2);
7457 7595 break;
7458 7596 }
7459 7597 case "list": {
7460 - t3 += this.renderer.list(r2);
7598 + t2 += this.renderer.list(r2);
7461 7599 break;
7462 7600 }
7463 7601 case "checkbox": {
7464 - t3 += this.renderer.checkbox(r2);
7602 + t2 += this.renderer.checkbox(r2);
7465 7603 break;
7466 7604 }
7467 7605 case "html": {
7468 - t3 += this.renderer.html(r2);
7606 + t2 += this.renderer.html(r2);
7469 7607 break;
7470 7608 }
7471 7609 case "def": {
7472 - t3 += this.renderer.def(r2);
7610 + t2 += this.renderer.def(r2);
7473 7611 break;
7474 7612 }
7475 7613 case "paragraph": {
7476 - t3 += this.renderer.paragraph(r2);
7614 + t2 += this.renderer.paragraph(r2);
7477 7615 break;
7478 7616 }
7479 7617 case "text": {
7480 - t3 += this.renderer.text(r2);
7618 + t2 += this.renderer.text(r2);
7481 7619 break;
7482 7620 }
7483 7621 default: {
7484 - let i2 = 'Token with "' + r2.type + '" type was not found.';
7485 - if (this.options.silent) return console.error(i2), "";
7486 - throw new Error(i2);
7622 + let o2 = 'Token with "' + r2.type + '" type was not found.';
7623 + if (this.options.silent) return console.error(o2), "";
7624 + throw new Error(o2);
7487 7625 }
7488 7626 }
7489 7627 }
7490 - return t3;
7628 + return t2;
7491 7629 }
7492 - parseInline(e2, t3 = this.renderer) {
7630 + parseInline(e2, t2 = this.renderer) {
7493 7631 this.renderer.parser = this;
7494 - let n2 = "";
7495 - for (let s2 = 0; s2 < e2.length; s2++) {
7496 - let r2 = e2[s2];
7632 + let n = "";
7633 + for (let i = 0; i < e2.length; i++) {
7634 + let r2 = e2[i];
7497 7635 if (this.options.extensions?.renderers?.[r2.type]) {
7498 - let o3 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7499 - if (o3 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7500 - n2 += o3 || "";
7636 + let s = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
7637 + if (s !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
7638 + n += s || "";
7501 7639 continue;
7502 7640 }
7503 7641 }
7504 - let i2 = r2;
7505 - switch (i2.type) {
7642 + let o2 = r2;
7643 + switch (o2.type) {
7506 7644 case "escape": {
7507 - n2 += t3.text(i2);
7645 + n += t2.text(o2);
7508 7646 break;
7509 7647 }
7510 7648 case "html": {
7511 - n2 += t3.html(i2);
7649 + n += t2.html(o2);
7512 7650 break;
7513 7651 }
7514 7652 case "link": {
7515 - n2 += t3.link(i2);
7653 + n += t2.link(o2);
7516 7654 break;
7517 7655 }
7518 7656 case "image": {
7519 - n2 += t3.image(i2);
7657 + n += t2.image(o2);
7520 7658 break;
7521 7659 }
7522 7660 case "checkbox": {
7523 - n2 += t3.checkbox(i2);
7661 + n += t2.checkbox(o2);
7524 7662 break;
7525 7663 }
7526 7664 case "strong": {
7527 - n2 += t3.strong(i2);
7665 + n += t2.strong(o2);
7528 7666 break;
7529 7667 }
7530 7668 case "em": {
7531 - n2 += t3.em(i2);
7669 + n += t2.em(o2);
7532 7670 break;
7533 7671 }
7534 7672 case "codespan": {
7535 - n2 += t3.codespan(i2);
7673 + n += t2.codespan(o2);
7536 7674 break;
7537 7675 }
7538 7676 case "br": {
7539 - n2 += t3.br(i2);
7677 + n += t2.br(o2);
7540 7678 break;
7541 7679 }
7542 7680 case "del": {
7543 - n2 += t3.del(i2);
7681 + n += t2.del(o2);
7544 7682 break;
7545 7683 }
7546 7684 case "text": {
7547 - n2 += t3.text(i2);
7685 + n += t2.text(o2);
7548 7686 break;
7549 7687 }
7550 7688 default: {
7551 - let o3 = 'Token with "' + i2.type + '" type was not found.';
7552 - if (this.options.silent) return console.error(o3), "";
7553 - throw new Error(o3);
7689 + let s = 'Token with "' + o2.type + '" type was not found.';
7690 + if (this.options.silent) return console.error(s), "";
7691 + throw new Error(s);
7554 7692 }
7555 7693 }
7556 7694 }
7557 - return n2;
7695 + return n;
7558 7696 }
7559 7697 };
7560 - var P = class {
7698 + var S = class {
7561 7699 options;
7562 7700 block;
7563 7701 constructor(e2) {
7564 7702 this.options = e2 || T;
@@ -7580,210 +7718,210 @@
7580 7718 provideLexer(e2 = this.block) {
7581 7719 return e2 ? x2.lex : x2.lexInline;
7582 7720 }
7583 7721 provideParser(e2 = this.block) {
7584 - return e2 ? b2.parse : b2.parseInline;
7722 + return e2 ? b.parse : b.parseInline;
7585 7723 }
7586 7724 };
7587 - var D = class {
7588 - defaults = z();
7725 + var Q = class {
7726 + defaults = A2();
7589 7727 options = this.setOptions;
7590 7728 parse = this.parseMarkdown(true);
7591 7729 parseInline = this.parseMarkdown(false);
7592 - Parser = b2;
7593 - Renderer = y2;
7730 + Parser = b;
7731 + Renderer = P;
7594 7732 TextRenderer = L;
7595 7733 Lexer = x2;
7596 - Tokenizer = w2;
7597 - Hooks = P;
7734 + Tokenizer = y2;
7735 + Hooks = S;
7598 7736 constructor(...e2) {
7599 7737 this.use(...e2);
7600 7738 }
7601 - walkTokens(e2, t3) {
7602 - let n2 = [];
7603 - for (let s2 of e2) switch (n2 = n2.concat(t3.call(this, s2)), s2.type) {
7739 + walkTokens(e2, t2) {
7740 + let n = [];
7741 + for (let i of e2) switch (n = n.concat(t2.call(this, i)), i.type) {
7604 7742 case "table": {
7605 - let r2 = s2;
7606 - for (let i2 of r2.header) n2 = n2.concat(this.walkTokens(i2.tokens, t3));
7607 - for (let i2 of r2.rows) for (let o3 of i2) n2 = n2.concat(this.walkTokens(o3.tokens, t3));
7743 + let r2 = i;
7744 + for (let o2 of r2.header) n = n.concat(this.walkTokens(o2.tokens, t2));
7745 + for (let o2 of r2.rows) for (let s of o2) n = n.concat(this.walkTokens(s.tokens, t2));
7608 7746 break;
7609 7747 }
7610 7748 case "list": {
7611 - let r2 = s2;
7612 - n2 = n2.concat(this.walkTokens(r2.items, t3));
7749 + let r2 = i;
7750 + n = n.concat(this.walkTokens(r2.items, t2));
7613 7751 break;
7614 7752 }
7615 7753 default: {
7616 - let r2 = s2;
7617 - this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((i2) => {
7618 - let o3 = r2[i2].flat(1 / 0);
7619 - n2 = n2.concat(this.walkTokens(o3, t3));
7620 - }) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t3)));
7754 + let r2 = i;
7755 + this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
7756 + let s = r2[o2].flat(1 / 0);
7757 + n = n.concat(this.walkTokens(s, t2));
7758 + }) : r2.tokens && (n = n.concat(this.walkTokens(r2.tokens, t2)));
7621 7759 }
7622 7760 }
7623 - return n2;
7761 + return n;
7624 7762 }
7625 7763 use(...e2) {
7626 - let t3 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7627 - return e2.forEach((n2) => {
7628 - let s2 = { ...n2 };
7629 - if (s2.async = this.defaults.async || s2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
7764 + let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
7765 + return e2.forEach((n) => {
7766 + let i = { ...n };
7767 + if (i.async = this.defaults.async || i.async || false, n.extensions && (n.extensions.forEach((r2) => {
7630 7768 if (!r2.name) throw new Error("extension name required");
7631 7769 if ("renderer" in r2) {
7632 - let i2 = t3.renderers[r2.name];
7633 - i2 ? t3.renderers[r2.name] = function(...o3) {
7634 - let u2 = r2.renderer.apply(this, o3);
7635 - return u2 === false && (u2 = i2.apply(this, o3)), u2;
7636 - } : t3.renderers[r2.name] = r2.renderer;
7770 + let o2 = t2.renderers[r2.name];
7771 + o2 ? t2.renderers[r2.name] = function(...s) {
7772 + let u = r2.renderer.apply(this, s);
7773 + return u === false && (u = o2.apply(this, s)), u;
7774 + } : t2.renderers[r2.name] = r2.renderer;
7637 7775 }
7638 7776 if ("tokenizer" in r2) {
7639 7777 if (!r2.level || r2.level !== "block" && r2.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
7640 - let i2 = t3[r2.level];
7641 - i2 ? i2.unshift(r2.tokenizer) : t3[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t3.startBlock ? t3.startBlock.push(r2.start) : t3.startBlock = [r2.start] : r2.level === "inline" && (t3.startInline ? t3.startInline.push(r2.start) : t3.startInline = [r2.start]));
7778 + let o2 = t2[r2.level];
7779 + o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
7642 7780 }
7643 - "childTokens" in r2 && r2.childTokens && (t3.childTokens[r2.name] = r2.childTokens);
7644 - }), s2.extensions = t3), n2.renderer) {
7645 - let r2 = this.defaults.renderer || new y2(this.defaults);
7646 - for (let i2 in n2.renderer) {
7647 - if (!(i2 in r2)) throw new Error(`renderer '${i2}' does not exist`);
7648 - if (["options", "parser"].includes(i2)) continue;
7649 - let o3 = i2, u2 = n2.renderer[o3], a2 = r2[o3];
7650 - r2[o3] = (...c2) => {
7651 - let p2 = u2.apply(r2, c2);
7652 - return p2 === false && (p2 = a2.apply(r2, c2)), p2 || "";
7781 + "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
7782 + }), i.extensions = t2), n.renderer) {
7783 + let r2 = this.defaults.renderer || new P(this.defaults);
7784 + for (let o2 in n.renderer) {
7785 + if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
7786 + if (["options", "parser"].includes(o2)) continue;
7787 + let s = o2, u = n.renderer[s], a = r2[s];
7788 + r2[s] = (...p2) => {
7789 + let c2 = u.apply(r2, p2);
7790 + return c2 === false && (c2 = a.apply(r2, p2)), c2 || "";
7653 7791 };
7654 7792 }
7655 - s2.renderer = r2;
7793 + i.renderer = r2;
7656 7794 }
7657 - if (n2.tokenizer) {
7658 - let r2 = this.defaults.tokenizer || new w2(this.defaults);
7659 - for (let i2 in n2.tokenizer) {
7660 - if (!(i2 in r2)) throw new Error(`tokenizer '${i2}' does not exist`);
7661 - if (["options", "rules", "lexer"].includes(i2)) continue;
7662 - let o3 = i2, u2 = n2.tokenizer[o3], a2 = r2[o3];
7663 - r2[o3] = (...c2) => {
7664 - let p2 = u2.apply(r2, c2);
7665 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7795 + if (n.tokenizer) {
7796 + let r2 = this.defaults.tokenizer || new y2(this.defaults);
7797 + for (let o2 in n.tokenizer) {
7798 + if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
7799 + if (["options", "rules", "lexer"].includes(o2)) continue;
7800 + let s = o2, u = n.tokenizer[s], a = r2[s];
7801 + r2[s] = (...p2) => {
7802 + let c2 = u.apply(r2, p2);
7803 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7666 7804 };
7667 7805 }
7668 - s2.tokenizer = r2;
7806 + i.tokenizer = r2;
7669 7807 }
7670 - if (n2.hooks) {
7671 - let r2 = this.defaults.hooks || new P();
7672 - for (let i2 in n2.hooks) {
7673 - if (!(i2 in r2)) throw new Error(`hook '${i2}' does not exist`);
7674 - if (["options", "block"].includes(i2)) continue;
7675 - let o3 = i2, u2 = n2.hooks[o3], a2 = r2[o3];
7676 - P.passThroughHooks.has(i2) ? r2[o3] = (c2) => {
7677 - if (this.defaults.async && P.passThroughHooksRespectAsync.has(i2)) return (async () => {
7678 - let k2 = await u2.call(r2, c2);
7679 - return a2.call(r2, k2);
7808 + if (n.hooks) {
7809 + let r2 = this.defaults.hooks || new S();
7810 + for (let o2 in n.hooks) {
7811 + if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
7812 + if (["options", "block"].includes(o2)) continue;
7813 + let s = o2, u = n.hooks[s], a = r2[s];
7814 + S.passThroughHooks.has(o2) ? r2[s] = (p2) => {
7815 + if (this.defaults.async && S.passThroughHooksRespectAsync.has(o2)) return (async () => {
7816 + let h = await u.call(r2, p2);
7817 + return a.call(r2, h);
7680 7818 })();
7681 - let p2 = u2.call(r2, c2);
7682 - return a2.call(r2, p2);
7683 - } : r2[o3] = (...c2) => {
7819 + let c2 = u.call(r2, p2);
7820 + return a.call(r2, c2);
7821 + } : r2[s] = (...p2) => {
7684 7822 if (this.defaults.async) return (async () => {
7685 - let k2 = await u2.apply(r2, c2);
7686 - return k2 === false && (k2 = await a2.apply(r2, c2)), k2;
7823 + let h = await u.apply(r2, p2);
7824 + return h === false && (h = await a.apply(r2, p2)), h;
7687 7825 })();
7688 - let p2 = u2.apply(r2, c2);
7689 - return p2 === false && (p2 = a2.apply(r2, c2)), p2;
7826 + let c2 = u.apply(r2, p2);
7827 + return c2 === false && (c2 = a.apply(r2, p2)), c2;
7690 7828 };
7691 7829 }
7692 - s2.hooks = r2;
7830 + i.hooks = r2;
7693 7831 }
7694 - if (n2.walkTokens) {
7695 - let r2 = this.defaults.walkTokens, i2 = n2.walkTokens;
7696 - s2.walkTokens = function(o3) {
7697 - let u2 = [];
7698 - return u2.push(i2.call(this, o3)), r2 && (u2 = u2.concat(r2.call(this, o3))), u2;
7832 + if (n.walkTokens) {
7833 + let r2 = this.defaults.walkTokens, o2 = n.walkTokens;
7834 + i.walkTokens = function(s) {
7835 + let u = [];
7836 + return u.push(o2.call(this, s)), r2 && (u = u.concat(r2.call(this, s))), u;
7699 7837 };
7700 7838 }
7701 - this.defaults = { ...this.defaults, ...s2 };
7839 + this.defaults = { ...this.defaults, ...i };
7702 7840 }), this;
7703 7841 }
7704 7842 setOptions(e2) {
7705 7843 return this.defaults = { ...this.defaults, ...e2 }, this;
7706 7844 }
7707 - lexer(e2, t3) {
7708 - return x2.lex(e2, t3 ?? this.defaults);
7845 + lexer(e2, t2) {
7846 + return x2.lex(e2, t2 ?? this.defaults);
7709 7847 }
7710 - parser(e2, t3) {
7711 - return b2.parse(e2, t3 ?? this.defaults);
7848 + parser(e2, t2) {
7849 + return b.parse(e2, t2 ?? this.defaults);
7712 7850 }
7713 7851 parseMarkdown(e2) {
7714 - return (n2, s2) => {
7715 - let r2 = { ...s2 }, i2 = { ...this.defaults, ...r2 }, o3 = this.onError(!!i2.silent, !!i2.async);
7716 - if (this.defaults.async === true && r2.async === false) return o3(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7717 - if (typeof n2 > "u" || n2 === null) return o3(new Error("marked(): input parameter is undefined or null"));
7718 - if (typeof n2 != "string") return o3(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
7719 - if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e2), i2.async) return (async () => {
7720 - let u2 = i2.hooks ? await i2.hooks.preprocess(n2) : n2, c2 = await (i2.hooks ? await i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u2, i2), p2 = i2.hooks ? await i2.hooks.processAllTokens(c2) : c2;
7721 - i2.walkTokens && await Promise.all(this.walkTokens(p2, i2.walkTokens));
7722 - let h2 = await (i2.hooks ? await i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(p2, i2);
7723 - return i2.hooks ? await i2.hooks.postprocess(h2) : h2;
7724 - })().catch(o3);
7852 + return (n, i) => {
7853 + let r2 = { ...i }, o2 = { ...this.defaults, ...r2 }, s = this.onError(!!o2.silent, !!o2.async);
7854 + if (this.defaults.async === true && r2.async === false) return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
7855 + if (typeof n > "u" || n === null) return s(new Error("marked(): input parameter is undefined or null"));
7856 + if (typeof n != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
7857 + if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e2), o2.async) return (async () => {
7858 + let u = o2.hooks ? await o2.hooks.preprocess(n) : n, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(u, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
7859 + o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
7860 + let k2 = await (o2.hooks ? await o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(c2, o2);
7861 + return o2.hooks ? await o2.hooks.postprocess(k2) : k2;
7862 + })().catch(s);
7725 7863 try {
7726 - i2.hooks && (n2 = i2.hooks.preprocess(n2));
7727 - let a2 = (i2.hooks ? i2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n2, i2);
7728 - i2.hooks && (a2 = i2.hooks.processAllTokens(a2)), i2.walkTokens && this.walkTokens(a2, i2.walkTokens);
7729 - let p2 = (i2.hooks ? i2.hooks.provideParser(e2) : e2 ? b2.parse : b2.parseInline)(a2, i2);
7730 - return i2.hooks && (p2 = i2.hooks.postprocess(p2)), p2;
7731 - } catch (u2) {
7732 - return o3(u2);
7864 + o2.hooks && (n = o2.hooks.preprocess(n));
7865 + let a = (o2.hooks ? o2.hooks.provideLexer(e2) : e2 ? x2.lex : x2.lexInline)(n, o2);
7866 + o2.hooks && (a = o2.hooks.processAllTokens(a)), o2.walkTokens && this.walkTokens(a, o2.walkTokens);
7867 + let c2 = (o2.hooks ? o2.hooks.provideParser(e2) : e2 ? b.parse : b.parseInline)(a, o2);
7868 + return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
7869 + } catch (u) {
7870 + return s(u);
7733 7871 }
7734 7872 };
7735 7873 }
7736 - onError(e2, t3) {
7737 - return (n2) => {
7738 - if (n2.message += `
7874 + onError(e2, t2) {
7875 + return (n) => {
7876 + if (n.message += `
7739 7877 Please report this to https://github.com/markedjs/marked.`, e2) {
7740 - let s2 = "<p>An error occurred:</p><pre>" + O(n2.message + "", true) + "</pre>";
7741 - return t3 ? Promise.resolve(s2) : s2;
7878 + let i = "<p>An error occurred:</p><pre>" + R2(n.message + "", true) + "</pre>";
7879 + return t2 ? Promise.resolve(i) : i;
7742 7880 }
7743 - if (t3) return Promise.reject(n2);
7744 - throw n2;
7881 + if (t2) return Promise.reject(n);
7882 + throw n;
7745 7883 };
7746 7884 }
7747 7885 };
7748 - var M2 = new D();
7749 - function g2(l4, e2) {
7886 + var M2 = new Q();
7887 + function f(l4, e2) {
7750 7888 return M2.parse(l4, e2);
7751 7889 }
7752 - g2.options = g2.setOptions = function(l4) {
7753 - return M2.setOptions(l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7890 + f.options = f.setOptions = function(l4) {
7891 + return M2.setOptions(l4), f.defaults = M2.defaults, U(f.defaults), f;
7754 7892 };
7755 - g2.getDefaults = z;
7756 - g2.defaults = T;
7757 - g2.use = function(...l4) {
7758 - return M2.use(...l4), g2.defaults = M2.defaults, G(g2.defaults), g2;
7759 - };
7760 - g2.walkTokens = function(l4, e2) {
7893 + f.getDefaults = A2;
7894 + f.defaults = T;
7895 + function bt(...l4) {
7896 + return M2.use(...l4), f.defaults = M2.defaults, U(f.defaults), f;
7897 + }
7898 + f.use = bt;
7899 + f.walkTokens = function(l4, e2) {
7761 7900 return M2.walkTokens(l4, e2);
7762 7901 };
7763 - g2.parseInline = M2.parseInline;
7764 - g2.Parser = b2;
7765 - g2.parser = b2.parse;
7766 - g2.Renderer = y2;
7767 - g2.TextRenderer = L;
7768 - g2.Lexer = x2;
7769 - g2.lexer = x2.lex;
7770 - g2.Tokenizer = w2;
7771 - g2.Hooks = P;
7772 - g2.parse = g2;
7773 - var jt = g2.options;
7774 - var Ft = g2.setOptions;
7775 - var Ut = g2.use;
7776 - var Kt = g2.walkTokens;
7777 - var Wt = g2.parseInline;
7778 - var Jt = b2.parse;
7779 - var Vt = x2.lex;
7902 + f.parseInline = M2.parseInline;
7903 + f.Parser = b;
7904 + f.parser = b.parse;
7905 + f.Renderer = P;
7906 + f.TextRenderer = L;
7907 + f.Lexer = x2;
7908 + f.lexer = x2.lex;
7909 + f.Tokenizer = y2;
7910 + f.Hooks = S;
7911 + f.parse = f;
7912 + var un = f.options;
7913 + var pn = f.setOptions;
7914 + var cn = f.walkTokens;
7915 + var hn = f.parseInline;
7916 + var kn = b.parse;
7917 + var gn = x2.lex;
7780 7918
7781 7919 // packages/blocks/build-module/api/raw-handling/markdown-converter.mjs
7782 7920 function escapeBodyText(value) {
7783 7921 return value.replace(/&(?!#?\w+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
7784 7922 }
7785 - var converter = new D({
7923 + var converter = new Q({
7786 7924 gfm: true,
7787 7925 breaks: true,
7788 7926 renderer: {
7789 7927 // Match showdown's `omitExtraWLInCodeBlocks`: marked appends `\n`
@@ -7979,13 +8117,13 @@
7979 8117 if (/\\[a-zA-Z]+\s*\{/g.test(text2)) {
7980 8118 return true;
7981 8119 }
7982 8120 const softClues = [
7983 - (t3) => t3.includes("^") && !t3.startsWith("^"),
7984 - (t3) => ["=", "+", "-", "/", "*"].some(
7985 - (operator) => t3.includes(operator)
8121 + (t2) => t2.includes("^") && !t2.startsWith("^"),
8122 + (t2) => ["=", "+", "-", "/", "*"].some(
8123 + (operator) => t2.includes(operator)
7986 8124 ),
7987 - (t3) => /\\[a-zA-Z]+/g.test(t3)
8125 + (t2) => /\\[a-zA-Z]+/g.test(t2)
7988 8126 ];
7989 8127 if (softClues.filter((clue) => clue(text2)).length >= 2) {
7990 8128 return true;
7991 8129 }
@@ -8264,15 +8402,13 @@
8264 8402 );
8265 8403 }
8266 8404
8267 8405 // packages/blocks/build-module/api/index.mjs
8268 - var fieldsKey = /* @__PURE__ */ Symbol("fields");
8269 - var formKey = /* @__PURE__ */ Symbol("form");
8406 + var editableRootKey = /* @__PURE__ */ Symbol("editableRoot");
8270 8407 var privateApis = {};
8271 8408 lock(privateApis, {
8272 8409 isContentBlock,
8273 - fieldsKey,
8274 - formKey,
8410 + editableRootKey,
8275 8411 parseRawBlock
8276 8412 });
8277 8413
8278 8414 // packages/blocks/build-module/deprecated.mjs
@@ -8305,5 +8441,7 @@
8305 8441 * Copyright (c) 2014-2017, Jon Schlinkert.
8306 8442 * Released under the MIT License.
8307 8443 *)
8308 8444 */
8445 +(window.wp ||= {}).blocks = wp.blocks;
8446 +})();
8309 8447 //# sourceMappingURL=index.js.map