@jsonresume/jsonresume-theme-professional 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +2945 -0
- package/dist/index.mjs +1266 -180
- package/package.json +9 -6
- package/vite.config.js +6 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
3
3
|
import o, { useState, useMemo, useEffect, useContext, useDebugValue, createElement, useRef } from "react";
|
|
4
|
-
import { marked } from "marked";
|
|
5
4
|
import { FaMapPin, FaEnvelope, FaPhoneAlt, FaLink, FaLinkedin, FaGithub, FaTwitter } from "react-icons/fa";
|
|
6
5
|
var __assign = function() {
|
|
7
6
|
__assign = Object.assign || function __assign2(t) {
|
|
@@ -575,8 +574,8 @@ function prefix(value, length2, children) {
|
|
|
575
574
|
// grid-(column|row)
|
|
576
575
|
case 5152:
|
|
577
576
|
case 5920:
|
|
578
|
-
return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a,
|
|
579
|
-
return MS + a + ":" +
|
|
577
|
+
return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b2, c, d, e, f2) {
|
|
578
|
+
return MS + a + ":" + b2 + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b2) + f2 : "") + value;
|
|
580
579
|
});
|
|
581
580
|
// position: sticky
|
|
582
581
|
case 4949:
|
|
@@ -726,67 +725,67 @@ var unitlessKeys = {
|
|
|
726
725
|
strokeOpacity: 1,
|
|
727
726
|
strokeWidth: 1
|
|
728
727
|
};
|
|
729
|
-
var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.19", g = "/*!sc*/\n", S = "undefined" != typeof window && "undefined" != typeof document, w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV), E = /invalid hook call/i, N = /* @__PURE__ */ new Set(), P = function(t, n) {
|
|
728
|
+
var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", m$1 = "active", y$1 = "data-styled-version", v$1 = "6.1.19", g = "/*!sc*/\n", S$1 = "undefined" != typeof window && "undefined" != typeof document, w$1 = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV), E$1 = /invalid hook call/i, N$1 = /* @__PURE__ */ new Set(), P$1 = function(t, n) {
|
|
730
729
|
if ("production" !== process.env.NODE_ENV) {
|
|
731
730
|
var o2 = n ? ' with the id of "'.concat(n, '"') : "", s = "The component ".concat(t).concat(o2, " has been created dynamically.\n") + "You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n", i = console.error;
|
|
732
731
|
try {
|
|
733
732
|
var a = true;
|
|
734
733
|
console.error = function(t2) {
|
|
735
734
|
for (var n2 = [], o3 = 1; o3 < arguments.length; o3++) n2[o3 - 1] = arguments[o3];
|
|
736
|
-
E.test(t2) ? (a = false, N.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, false));
|
|
737
|
-
}, useRef(), a && !N.has(s) && (console.warn(s), N.add(s));
|
|
735
|
+
E$1.test(t2) ? (a = false, N$1.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, false));
|
|
736
|
+
}, useRef(), a && !N$1.has(s) && (console.warn(s), N$1.add(s));
|
|
738
737
|
} catch (e) {
|
|
739
|
-
E.test(e.message) && N.delete(s);
|
|
738
|
+
E$1.test(e.message) && N$1.delete(s);
|
|
740
739
|
} finally {
|
|
741
740
|
console.error = i;
|
|
742
741
|
}
|
|
743
742
|
}
|
|
744
|
-
}, _ = Object.freeze([]), C = Object.freeze({});
|
|
745
|
-
function I(e, t, n) {
|
|
746
|
-
return void 0 === n && (n = C), e.theme !== n.theme && e.theme || t || n.theme;
|
|
743
|
+
}, _$1 = Object.freeze([]), C$1 = Object.freeze({});
|
|
744
|
+
function I$1(e, t, n) {
|
|
745
|
+
return void 0 === n && (n = C$1), e.theme !== n.theme && e.theme || t || n.theme;
|
|
747
746
|
}
|
|
748
|
-
var A = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, D = /(^-|-$)/g;
|
|
747
|
+
var A = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, D$1 = /(^-|-$)/g;
|
|
749
748
|
function R(e) {
|
|
750
|
-
return e.replace(O, "-").replace(D, "");
|
|
749
|
+
return e.replace(O, "-").replace(D$1, "");
|
|
751
750
|
}
|
|
752
|
-
var T = /(a)(d)/gi, k = 52, j = function(e) {
|
|
751
|
+
var T$1 = /(a)(d)/gi, k$1 = 52, j$1 = function(e) {
|
|
753
752
|
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
754
753
|
};
|
|
755
|
-
function x(e) {
|
|
754
|
+
function x$1(e) {
|
|
756
755
|
var t, n = "";
|
|
757
|
-
for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n;
|
|
758
|
-
return (j(t % k) + n).replace(T, "$1-$2");
|
|
756
|
+
for (t = Math.abs(e); t > k$1; t = t / k$1 | 0) n = j$1(t % k$1) + n;
|
|
757
|
+
return (j$1(t % k$1) + n).replace(T$1, "$1-$2");
|
|
759
758
|
}
|
|
760
|
-
var V, F = 5381, z = function(e, t) {
|
|
759
|
+
var V$1, F$1 = 5381, z$1 = function(e, t) {
|
|
761
760
|
for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
|
|
762
761
|
return e;
|
|
763
|
-
}, M = function(e) {
|
|
764
|
-
return z(F, e);
|
|
762
|
+
}, M$1 = function(e) {
|
|
763
|
+
return z$1(F$1, e);
|
|
765
764
|
};
|
|
766
|
-
function
|
|
767
|
-
return x(M(e) >>> 0);
|
|
765
|
+
function $$1(e) {
|
|
766
|
+
return x$1(M$1(e) >>> 0);
|
|
768
767
|
}
|
|
769
|
-
function B(e) {
|
|
768
|
+
function B$1(e) {
|
|
770
769
|
return "production" !== process.env.NODE_ENV && "string" == typeof e && e || e.displayName || e.name || "Component";
|
|
771
770
|
}
|
|
772
|
-
function G(e) {
|
|
771
|
+
function G$1(e) {
|
|
773
772
|
return "string" == typeof e && ("production" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
774
773
|
}
|
|
775
|
-
var L = "function" == typeof Symbol && Symbol.for, Y = L ? Symbol.for("react.memo") : 60115, q = L ? Symbol.for("react.forward_ref") : 60112, W = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }, H = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }, U = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }, J = ((V = {})[q] = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }, V[Y] = U, V);
|
|
776
|
-
function X(e) {
|
|
777
|
-
return ("type" in (t = e) && t.type.$$typeof) === Y ? U : "$$typeof" in e ? J[e.$$typeof] : W;
|
|
774
|
+
var L$1 = "function" == typeof Symbol && Symbol.for, Y = L$1 ? Symbol.for("react.memo") : 60115, q$1 = L$1 ? Symbol.for("react.forward_ref") : 60112, W$1 = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }, H = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }, U$1 = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }, J$1 = ((V$1 = {})[q$1] = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }, V$1[Y] = U$1, V$1);
|
|
775
|
+
function X$1(e) {
|
|
776
|
+
return ("type" in (t = e) && t.type.$$typeof) === Y ? U$1 : "$$typeof" in e ? J$1[e.$$typeof] : W$1;
|
|
778
777
|
var t;
|
|
779
778
|
}
|
|
780
|
-
var Z = Object.defineProperty, K = Object.getOwnPropertyNames, Q = Object.getOwnPropertySymbols, ee = Object.getOwnPropertyDescriptor, te = Object.getPrototypeOf, ne = Object.prototype;
|
|
781
|
-
function oe(e, t, n) {
|
|
779
|
+
var Z = Object.defineProperty, K$1 = Object.getOwnPropertyNames, Q$1 = Object.getOwnPropertySymbols, ee = Object.getOwnPropertyDescriptor, te = Object.getPrototypeOf, ne = Object.prototype;
|
|
780
|
+
function oe$1(e, t, n) {
|
|
782
781
|
if ("string" != typeof t) {
|
|
783
782
|
if (ne) {
|
|
784
783
|
var o2 = te(t);
|
|
785
|
-
o2 && o2 !== ne && oe(e, o2, n);
|
|
784
|
+
o2 && o2 !== ne && oe$1(e, o2, n);
|
|
786
785
|
}
|
|
787
|
-
var r = K(t);
|
|
788
|
-
Q && (r = r.concat(Q(t)));
|
|
789
|
-
for (var s = X(e), i = X(t), a = 0; a < r.length; ++a) {
|
|
786
|
+
var r = K$1(t);
|
|
787
|
+
Q$1 && (r = r.concat(Q$1(t)));
|
|
788
|
+
for (var s = X$1(e), i = X$1(t), a = 0; a < r.length; ++a) {
|
|
790
789
|
var c = r[a];
|
|
791
790
|
if (!(c in H || n && n[c] || i && c in i || s && c in s)) {
|
|
792
791
|
var l = ee(t, c);
|
|
@@ -799,45 +798,45 @@ function oe(e, t, n) {
|
|
|
799
798
|
}
|
|
800
799
|
return e;
|
|
801
800
|
}
|
|
802
|
-
function re(e) {
|
|
801
|
+
function re$1(e) {
|
|
803
802
|
return "function" == typeof e;
|
|
804
803
|
}
|
|
805
|
-
function se(e) {
|
|
804
|
+
function se$1(e) {
|
|
806
805
|
return "object" == typeof e && "styledComponentId" in e;
|
|
807
806
|
}
|
|
808
|
-
function ie(e, t) {
|
|
807
|
+
function ie$1(e, t) {
|
|
809
808
|
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
810
809
|
}
|
|
811
|
-
function ae(e, t) {
|
|
810
|
+
function ae$1(e, t) {
|
|
812
811
|
if (0 === e.length) return "";
|
|
813
812
|
for (var n = e[0], o2 = 1; o2 < e.length; o2++) n += t ? t + e[o2] : e[o2];
|
|
814
813
|
return n;
|
|
815
814
|
}
|
|
816
|
-
function ce(e) {
|
|
815
|
+
function ce$1(e) {
|
|
817
816
|
return null !== e && "object" == typeof e && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
818
817
|
}
|
|
819
|
-
function le(e, t, n) {
|
|
820
|
-
if (void 0 === n && (n = false), !n && !ce(e) && !Array.isArray(e)) return t;
|
|
821
|
-
if (Array.isArray(t)) for (var o2 = 0; o2 < t.length; o2++) e[o2] = le(e[o2], t[o2]);
|
|
822
|
-
else if (ce(t)) for (var o2 in t) e[o2] = le(e[o2], t[o2]);
|
|
818
|
+
function le$1(e, t, n) {
|
|
819
|
+
if (void 0 === n && (n = false), !n && !ce$1(e) && !Array.isArray(e)) return t;
|
|
820
|
+
if (Array.isArray(t)) for (var o2 = 0; o2 < t.length; o2++) e[o2] = le$1(e[o2], t[o2]);
|
|
821
|
+
else if (ce$1(t)) for (var o2 in t) e[o2] = le$1(e[o2], t[o2]);
|
|
823
822
|
return e;
|
|
824
823
|
}
|
|
825
|
-
function ue(e, t) {
|
|
824
|
+
function ue$1(e, t) {
|
|
826
825
|
Object.defineProperty(e, "toString", { value: t });
|
|
827
826
|
}
|
|
828
|
-
var pe = "production" !== process.env.NODE_ENV ? { 1: "Cannot create styled-component for component: %s.\n\n", 2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", 3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", 4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", 5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", 6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: 'ThemeProvider: Please make your "theme" prop an object.\n\n', 9: "Missing document `<head>`\n\n", 10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", 11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", 14: 'ThemeProvider: "theme" prop is required.\n\n', 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", 17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n", 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
829
|
-
function de() {
|
|
827
|
+
var pe$1 = "production" !== process.env.NODE_ENV ? { 1: "Cannot create styled-component for component: %s.\n\n", 2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", 3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", 4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", 5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", 6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: 'ThemeProvider: Please make your "theme" prop an object.\n\n', 9: "Missing document `<head>`\n\n", 10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", 11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", 14: 'ThemeProvider: "theme" prop is required.\n\n', 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", 17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n", 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
828
|
+
function de$1() {
|
|
830
829
|
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
831
830
|
for (var n = e[0], o2 = [], r = 1, s = e.length; r < s; r += 1) o2.push(e[r]);
|
|
832
831
|
return o2.forEach(function(e2) {
|
|
833
832
|
n = n.replace(/%[a-z]/, e2);
|
|
834
833
|
}), n;
|
|
835
834
|
}
|
|
836
|
-
function he(t) {
|
|
835
|
+
function he$1(t) {
|
|
837
836
|
for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
|
|
838
|
-
return "production" === process.env.NODE_ENV ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(de.apply(void 0, __spreadArray([pe[t]], n, false)).trim());
|
|
837
|
+
return "production" === process.env.NODE_ENV ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(de$1.apply(void 0, __spreadArray([pe$1[t]], n, false)).trim());
|
|
839
838
|
}
|
|
840
|
-
var fe = (function() {
|
|
839
|
+
var fe$1 = (function() {
|
|
841
840
|
function e(e2) {
|
|
842
841
|
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e2;
|
|
843
842
|
}
|
|
@@ -846,7 +845,7 @@ var fe = (function() {
|
|
|
846
845
|
return t;
|
|
847
846
|
}, e.prototype.insertRules = function(e2, t) {
|
|
848
847
|
if (e2 >= this.groupSizes.length) {
|
|
849
|
-
for (var n = this.groupSizes, o2 = n.length, r = o2; e2 >= r; ) if ((r <<= 1) < 0) throw he(16, "".concat(e2));
|
|
848
|
+
for (var n = this.groupSizes, o2 = n.length, r = o2; e2 >= r; ) if ((r <<= 1) < 0) throw he$1(16, "".concat(e2));
|
|
850
849
|
this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r;
|
|
851
850
|
for (var s = o2; s < r; s++) this.groupSizes[s] = 0;
|
|
852
851
|
}
|
|
@@ -863,53 +862,53 @@ var fe = (function() {
|
|
|
863
862
|
for (var n = this.groupSizes[e2], o2 = this.indexOfGroup(e2), r = o2 + n, s = o2; s < r; s++) t += "".concat(this.tag.getRule(s)).concat(g);
|
|
864
863
|
return t;
|
|
865
864
|
}, e;
|
|
866
|
-
})(), me = 1 << 30, ye = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ge = 1, Se = function(e) {
|
|
867
|
-
if (ye.has(e)) return ye.get(e);
|
|
868
|
-
for (; ve.has(ge); ) ge++;
|
|
869
|
-
var t = ge++;
|
|
870
|
-
if ("production" !== process.env.NODE_ENV && ((0 | t) < 0 || t > me)) throw he(16, "".concat(t));
|
|
871
|
-
return ye.set(e, t), ve.set(t, e), t;
|
|
872
|
-
}, we = function(e, t) {
|
|
873
|
-
ge = t + 1, ye.set(e, t), ve.set(t, e);
|
|
874
|
-
}, be = "style[".concat(f, "][").concat(y, '="').concat(v, '"]'), Ee = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ne = function(e, t, n) {
|
|
865
|
+
})(), me$1 = 1 << 30, ye$1 = /* @__PURE__ */ new Map(), ve$1 = /* @__PURE__ */ new Map(), ge$1 = 1, Se$1 = function(e) {
|
|
866
|
+
if (ye$1.has(e)) return ye$1.get(e);
|
|
867
|
+
for (; ve$1.has(ge$1); ) ge$1++;
|
|
868
|
+
var t = ge$1++;
|
|
869
|
+
if ("production" !== process.env.NODE_ENV && ((0 | t) < 0 || t > me$1)) throw he$1(16, "".concat(t));
|
|
870
|
+
return ye$1.set(e, t), ve$1.set(t, e), t;
|
|
871
|
+
}, we$1 = function(e, t) {
|
|
872
|
+
ge$1 = t + 1, ye$1.set(e, t), ve$1.set(t, e);
|
|
873
|
+
}, be$1 = "style[".concat(f, "][").concat(y$1, '="').concat(v$1, '"]'), Ee$1 = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ne$1 = function(e, t, n) {
|
|
875
874
|
for (var o2, r = n.split(","), s = 0, i = r.length; s < i; s++) (o2 = r[s]) && e.registerName(t, o2);
|
|
876
|
-
}, Pe = function(e, t) {
|
|
875
|
+
}, Pe$1 = function(e, t) {
|
|
877
876
|
for (var n, o2 = (null !== (n = t.textContent) && void 0 !== n ? n : "").split(g), r = [], s = 0, i = o2.length; s < i; s++) {
|
|
878
877
|
var a = o2[s].trim();
|
|
879
878
|
if (a) {
|
|
880
|
-
var c = a.match(Ee);
|
|
879
|
+
var c = a.match(Ee$1);
|
|
881
880
|
if (c) {
|
|
882
|
-
var l = 0 | parseInt(c[1], 10),
|
|
883
|
-
0 !== l && (we(
|
|
881
|
+
var l = 0 | parseInt(c[1], 10), u3 = c[2];
|
|
882
|
+
0 !== l && (we$1(u3, l), Ne$1(e, u3, c[3]), e.getTag().insertRules(l, r)), r.length = 0;
|
|
884
883
|
} else r.push(a);
|
|
885
884
|
}
|
|
886
885
|
}
|
|
887
|
-
}, _e = function(e) {
|
|
888
|
-
for (var t = document.querySelectorAll(be), n = 0, o2 = t.length; n < o2; n++) {
|
|
886
|
+
}, _e$1 = function(e) {
|
|
887
|
+
for (var t = document.querySelectorAll(be$1), n = 0, o2 = t.length; n < o2; n++) {
|
|
889
888
|
var r = t[n];
|
|
890
|
-
r && r.getAttribute(f) !== m && (Pe(e, r), r.parentNode && r.parentNode.removeChild(r));
|
|
889
|
+
r && r.getAttribute(f) !== m$1 && (Pe$1(e, r), r.parentNode && r.parentNode.removeChild(r));
|
|
891
890
|
}
|
|
892
891
|
};
|
|
893
|
-
function Ce() {
|
|
892
|
+
function Ce$1() {
|
|
894
893
|
return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
|
|
895
894
|
}
|
|
896
|
-
var Ie = function(e) {
|
|
895
|
+
var Ie$1 = function(e) {
|
|
897
896
|
var t = document.head, n = e || t, o2 = document.createElement("style"), r = (function(e2) {
|
|
898
897
|
var t2 = Array.from(e2.querySelectorAll("style[".concat(f, "]")));
|
|
899
898
|
return t2[t2.length - 1];
|
|
900
899
|
})(n), s = void 0 !== r ? r.nextSibling : null;
|
|
901
|
-
o2.setAttribute(f, m), o2.setAttribute(y, v);
|
|
902
|
-
var i = Ce();
|
|
900
|
+
o2.setAttribute(f, m$1), o2.setAttribute(y$1, v$1);
|
|
901
|
+
var i = Ce$1();
|
|
903
902
|
return i && o2.setAttribute("nonce", i), n.insertBefore(o2, s), o2;
|
|
904
|
-
}, Ae = (function() {
|
|
903
|
+
}, Ae$1 = (function() {
|
|
905
904
|
function e(e2) {
|
|
906
|
-
this.element = Ie(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
|
|
905
|
+
this.element = Ie$1(e2), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e3) {
|
|
907
906
|
if (e3.sheet) return e3.sheet;
|
|
908
907
|
for (var t = document.styleSheets, n = 0, o2 = t.length; n < o2; n++) {
|
|
909
908
|
var r = t[n];
|
|
910
909
|
if (r.ownerNode === e3) return r;
|
|
911
910
|
}
|
|
912
|
-
throw he(17);
|
|
911
|
+
throw he$1(17);
|
|
913
912
|
})(this.element), this.length = 0;
|
|
914
913
|
}
|
|
915
914
|
return e.prototype.insertRule = function(e2, t) {
|
|
@@ -924,9 +923,9 @@ var Ie = function(e) {
|
|
|
924
923
|
var t = this.sheet.cssRules[e2];
|
|
925
924
|
return t && t.cssText ? t.cssText : "";
|
|
926
925
|
}, e;
|
|
927
|
-
})(), Oe = (function() {
|
|
926
|
+
})(), Oe$1 = (function() {
|
|
928
927
|
function e(e2) {
|
|
929
|
-
this.element = Ie(e2), this.nodes = this.element.childNodes, this.length = 0;
|
|
928
|
+
this.element = Ie$1(e2), this.nodes = this.element.childNodes, this.length = 0;
|
|
930
929
|
}
|
|
931
930
|
return e.prototype.insertRule = function(e2, t) {
|
|
932
931
|
if (e2 <= this.length && e2 >= 0) {
|
|
@@ -939,7 +938,7 @@ var Ie = function(e) {
|
|
|
939
938
|
}, e.prototype.getRule = function(e2) {
|
|
940
939
|
return e2 < this.length ? this.nodes[e2].textContent : "";
|
|
941
940
|
}, e;
|
|
942
|
-
})(), De = (function() {
|
|
941
|
+
})(), De$1 = (function() {
|
|
943
942
|
function e(e2) {
|
|
944
943
|
this.rules = [], this.length = 0;
|
|
945
944
|
}
|
|
@@ -950,15 +949,15 @@ var Ie = function(e) {
|
|
|
950
949
|
}, e.prototype.getRule = function(e2) {
|
|
951
950
|
return e2 < this.length ? this.rules[e2] : "";
|
|
952
951
|
}, e;
|
|
953
|
-
})(), Re = S, Te = { isServer: !S, useCSSOMInjection: !w }, ke = (function() {
|
|
952
|
+
})(), Re$1 = S$1, Te$1 = { isServer: !S$1, useCSSOMInjection: !w$1 }, ke$1 = (function() {
|
|
954
953
|
function e(e2, n, o2) {
|
|
955
|
-
void 0 === e2 && (e2 = C), void 0 === n && (n = {});
|
|
954
|
+
void 0 === e2 && (e2 = C$1), void 0 === n && (n = {});
|
|
956
955
|
var r = this;
|
|
957
|
-
this.options = __assign(__assign({}, Te), e2), this.gs = n, this.names = new Map(o2), this.server = !!e2.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
|
|
956
|
+
this.options = __assign(__assign({}, Te$1), e2), this.gs = n, this.names = new Map(o2), this.server = !!e2.isServer, !this.server && S$1 && Re$1 && (Re$1 = false, _e$1(this)), ue$1(this, function() {
|
|
958
957
|
return (function(e3) {
|
|
959
958
|
for (var t = e3.getTag(), n2 = t.length, o3 = "", r2 = function(n3) {
|
|
960
959
|
var r3 = (function(e4) {
|
|
961
|
-
return ve.get(e4);
|
|
960
|
+
return ve$1.get(e4);
|
|
962
961
|
})(n3);
|
|
963
962
|
if (void 0 === r3) return "continue";
|
|
964
963
|
var s2 = e3.names.get(r3), i = t.getGroup(n3);
|
|
@@ -973,9 +972,9 @@ var Ie = function(e) {
|
|
|
973
972
|
});
|
|
974
973
|
}
|
|
975
974
|
return e.registerId = function(e2) {
|
|
976
|
-
return Se(e2);
|
|
975
|
+
return Se$1(e2);
|
|
977
976
|
}, e.prototype.rehydrate = function() {
|
|
978
|
-
!this.server && S && _e(this);
|
|
977
|
+
!this.server && S$1 && _e$1(this);
|
|
979
978
|
}, e.prototype.reconstructWithOptions = function(n, o2) {
|
|
980
979
|
return void 0 === o2 && (o2 = true), new e(__assign(__assign({}, this.options), n), this.gs, o2 && this.names || void 0);
|
|
981
980
|
}, e.prototype.allocateGSInstance = function(e2) {
|
|
@@ -983,157 +982,157 @@ var Ie = function(e) {
|
|
|
983
982
|
}, e.prototype.getTag = function() {
|
|
984
983
|
return this.tag || (this.tag = (e2 = (function(e3) {
|
|
985
984
|
var t = e3.useCSSOMInjection, n = e3.target;
|
|
986
|
-
return e3.isServer ? new De(n) : t ? new Ae(n) : new Oe(n);
|
|
987
|
-
})(this.options), new fe(e2)));
|
|
985
|
+
return e3.isServer ? new De$1(n) : t ? new Ae$1(n) : new Oe$1(n);
|
|
986
|
+
})(this.options), new fe$1(e2)));
|
|
988
987
|
var e2;
|
|
989
988
|
}, e.prototype.hasNameForId = function(e2, t) {
|
|
990
989
|
return this.names.has(e2) && this.names.get(e2).has(t);
|
|
991
990
|
}, e.prototype.registerName = function(e2, t) {
|
|
992
|
-
if (Se(e2), this.names.has(e2)) this.names.get(e2).add(t);
|
|
991
|
+
if (Se$1(e2), this.names.has(e2)) this.names.get(e2).add(t);
|
|
993
992
|
else {
|
|
994
993
|
var n = /* @__PURE__ */ new Set();
|
|
995
994
|
n.add(t), this.names.set(e2, n);
|
|
996
995
|
}
|
|
997
996
|
}, e.prototype.insertRules = function(e2, t, n) {
|
|
998
|
-
this.registerName(e2, t), this.getTag().insertRules(Se(e2), n);
|
|
997
|
+
this.registerName(e2, t), this.getTag().insertRules(Se$1(e2), n);
|
|
999
998
|
}, e.prototype.clearNames = function(e2) {
|
|
1000
999
|
this.names.has(e2) && this.names.get(e2).clear();
|
|
1001
1000
|
}, e.prototype.clearRules = function(e2) {
|
|
1002
|
-
this.getTag().clearGroup(Se(e2)), this.clearNames(e2);
|
|
1001
|
+
this.getTag().clearGroup(Se$1(e2)), this.clearNames(e2);
|
|
1003
1002
|
}, e.prototype.clearTag = function() {
|
|
1004
1003
|
this.tag = void 0;
|
|
1005
1004
|
}, e;
|
|
1006
|
-
})(), je = /&/g, xe = /^\s*\/\/.*$/gm;
|
|
1007
|
-
function Ve(e, t) {
|
|
1005
|
+
})(), je$1 = /&/g, xe = /^\s*\/\/.*$/gm;
|
|
1006
|
+
function Ve$1(e, t) {
|
|
1008
1007
|
return e.map(function(e2) {
|
|
1009
1008
|
return "rule" === e2.type && (e2.value = "".concat(t, " ").concat(e2.value), e2.value = e2.value.replaceAll(",", ",".concat(t, " ")), e2.props = e2.props.map(function(e3) {
|
|
1010
1009
|
return "".concat(t, " ").concat(e3);
|
|
1011
|
-
})), Array.isArray(e2.children) && "@keyframes" !== e2.type && (e2.children = Ve(e2.children, t)), e2;
|
|
1010
|
+
})), Array.isArray(e2.children) && "@keyframes" !== e2.type && (e2.children = Ve$1(e2.children, t)), e2;
|
|
1012
1011
|
});
|
|
1013
1012
|
}
|
|
1014
|
-
function Fe(e) {
|
|
1015
|
-
var t, n, o2, r = void 0 === e ? C : e, s = r.options, i = void 0 === s ? C : s, a = r.plugins, c = void 0 === a ? _ : a, l = function(e2, o3, r2) {
|
|
1013
|
+
function Fe$1(e) {
|
|
1014
|
+
var t, n, o2, r = void 0 === e ? C$1 : e, s = r.options, i = void 0 === s ? C$1 : s, a = r.plugins, c = void 0 === a ? _$1 : a, l = function(e2, o3, r2) {
|
|
1016
1015
|
return r2.startsWith(n) && r2.endsWith(n) && r2.replaceAll(n, "").length > 0 ? ".".concat(t) : e2;
|
|
1017
|
-
},
|
|
1018
|
-
|
|
1019
|
-
e2.type === RULESET && e2.value.includes("&") && (e2.props[0] = e2.props[0].replace(je, n).replace(o2, l));
|
|
1020
|
-
}), i.prefix &&
|
|
1016
|
+
}, u3 = c.slice();
|
|
1017
|
+
u3.push(function(e2) {
|
|
1018
|
+
e2.type === RULESET && e2.value.includes("&") && (e2.props[0] = e2.props[0].replace(je$1, n).replace(o2, l));
|
|
1019
|
+
}), i.prefix && u3.push(prefixer), u3.push(stringify);
|
|
1021
1020
|
var p2 = function(e2, r2, s2, a2) {
|
|
1022
1021
|
void 0 === r2 && (r2 = ""), void 0 === s2 && (s2 = ""), void 0 === a2 && (a2 = "&"), t = a2, n = r2, o2 = new RegExp("\\".concat(n, "\\b"), "g");
|
|
1023
1022
|
var c2 = e2.replace(xe, ""), l2 = compile(s2 || r2 ? "".concat(s2, " ").concat(r2, " { ").concat(c2, " }") : c2);
|
|
1024
|
-
i.namespace && (l2 = Ve(l2, i.namespace));
|
|
1023
|
+
i.namespace && (l2 = Ve$1(l2, i.namespace));
|
|
1025
1024
|
var p3 = [];
|
|
1026
|
-
return serialize(l2, middleware(
|
|
1025
|
+
return serialize(l2, middleware(u3.concat(rulesheet(function(e3) {
|
|
1027
1026
|
return p3.push(e3);
|
|
1028
1027
|
})))), p3;
|
|
1029
1028
|
};
|
|
1030
1029
|
return p2.hash = c.length ? c.reduce(function(e2, t2) {
|
|
1031
|
-
return t2.name || he(15), z(e2, t2.name);
|
|
1032
|
-
}, F).toString() : "", p2;
|
|
1030
|
+
return t2.name || he$1(15), z$1(e2, t2.name);
|
|
1031
|
+
}, F$1).toString() : "", p2;
|
|
1033
1032
|
}
|
|
1034
|
-
var ze = new ke(), Me = Fe(), $e = o.createContext({ shouldForwardProp: void 0, styleSheet: ze, stylis: Me });
|
|
1035
|
-
$e.Consumer;
|
|
1036
|
-
var Ge = o.createContext(void 0);
|
|
1037
|
-
function Le() {
|
|
1038
|
-
return useContext($e);
|
|
1033
|
+
var ze$1 = new ke$1(), Me$1 = Fe$1(), $e$1 = o.createContext({ shouldForwardProp: void 0, styleSheet: ze$1, stylis: Me$1 });
|
|
1034
|
+
$e$1.Consumer;
|
|
1035
|
+
var Ge$1 = o.createContext(void 0);
|
|
1036
|
+
function Le$1() {
|
|
1037
|
+
return useContext($e$1);
|
|
1039
1038
|
}
|
|
1040
1039
|
function Ye(e) {
|
|
1041
|
-
var t = useState(e.stylisPlugins), n = t[0], r = t[1], c = Le().styleSheet, l = useMemo(function() {
|
|
1040
|
+
var t = useState(e.stylisPlugins), n = t[0], r = t[1], c = Le$1().styleSheet, l = useMemo(function() {
|
|
1042
1041
|
var t2 = c;
|
|
1043
1042
|
return e.sheet ? t2 = e.sheet : e.target && (t2 = t2.reconstructWithOptions({ target: e.target }, false)), e.disableCSSOMInjection && (t2 = t2.reconstructWithOptions({ useCSSOMInjection: false })), t2;
|
|
1044
|
-
}, [e.disableCSSOMInjection, e.sheet, e.target, c]),
|
|
1045
|
-
return Fe({ options: { namespace: e.namespace, prefix: e.enableVendorPrefixes }, plugins: n });
|
|
1043
|
+
}, [e.disableCSSOMInjection, e.sheet, e.target, c]), u3 = useMemo(function() {
|
|
1044
|
+
return Fe$1({ options: { namespace: e.namespace, prefix: e.enableVendorPrefixes }, plugins: n });
|
|
1046
1045
|
}, [e.enableVendorPrefixes, e.namespace, n]);
|
|
1047
1046
|
useEffect(function() {
|
|
1048
1047
|
p(n, e.stylisPlugins) || r(e.stylisPlugins);
|
|
1049
1048
|
}, [e.stylisPlugins]);
|
|
1050
1049
|
var d = useMemo(function() {
|
|
1051
|
-
return { shouldForwardProp: e.shouldForwardProp, styleSheet: l, stylis:
|
|
1052
|
-
}, [e.shouldForwardProp, l,
|
|
1053
|
-
return o.createElement($e.Provider, { value: d }, o.createElement(Ge.Provider, { value:
|
|
1050
|
+
return { shouldForwardProp: e.shouldForwardProp, styleSheet: l, stylis: u3 };
|
|
1051
|
+
}, [e.shouldForwardProp, l, u3]);
|
|
1052
|
+
return o.createElement($e$1.Provider, { value: d }, o.createElement(Ge$1.Provider, { value: u3 }, e.children));
|
|
1054
1053
|
}
|
|
1055
|
-
var qe = (function() {
|
|
1054
|
+
var qe$1 = (function() {
|
|
1056
1055
|
function e(e2, t) {
|
|
1057
1056
|
var n = this;
|
|
1058
1057
|
this.inject = function(e3, t2) {
|
|
1059
|
-
void 0 === t2 && (t2 = Me);
|
|
1058
|
+
void 0 === t2 && (t2 = Me$1);
|
|
1060
1059
|
var o2 = n.name + t2.hash;
|
|
1061
1060
|
e3.hasNameForId(n.id, o2) || e3.insertRules(n.id, o2, t2(n.rules, o2, "@keyframes"));
|
|
1062
|
-
}, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, ue(this, function() {
|
|
1063
|
-
throw he(12, String(n.name));
|
|
1061
|
+
}, this.name = e2, this.id = "sc-keyframes-".concat(e2), this.rules = t, ue$1(this, function() {
|
|
1062
|
+
throw he$1(12, String(n.name));
|
|
1064
1063
|
});
|
|
1065
1064
|
}
|
|
1066
1065
|
return e.prototype.getName = function(e2) {
|
|
1067
|
-
return void 0 === e2 && (e2 = Me), this.name + e2.hash;
|
|
1066
|
+
return void 0 === e2 && (e2 = Me$1), this.name + e2.hash;
|
|
1068
1067
|
}, e;
|
|
1069
|
-
})(), We = function(e) {
|
|
1068
|
+
})(), We$1 = function(e) {
|
|
1070
1069
|
return e >= "A" && e <= "Z";
|
|
1071
1070
|
};
|
|
1072
|
-
function He(e) {
|
|
1071
|
+
function He$1(e) {
|
|
1073
1072
|
for (var t = "", n = 0; n < e.length; n++) {
|
|
1074
1073
|
var o2 = e[n];
|
|
1075
1074
|
if (1 === n && "-" === o2 && "-" === e[0]) return e;
|
|
1076
|
-
We(o2) ? t += "-" + o2.toLowerCase() : t += o2;
|
|
1075
|
+
We$1(o2) ? t += "-" + o2.toLowerCase() : t += o2;
|
|
1077
1076
|
}
|
|
1078
1077
|
return t.startsWith("ms-") ? "-" + t : t;
|
|
1079
1078
|
}
|
|
1080
|
-
var Ue = function(e) {
|
|
1079
|
+
var Ue$1 = function(e) {
|
|
1081
1080
|
return null == e || false === e || "" === e;
|
|
1082
|
-
}, Je = function(t) {
|
|
1081
|
+
}, Je$1 = function(t) {
|
|
1083
1082
|
var n, o2, r = [];
|
|
1084
1083
|
for (var s in t) {
|
|
1085
1084
|
var i = t[s];
|
|
1086
|
-
t.hasOwnProperty(s) && !Ue(i) && (Array.isArray(i) && i.isCss || re(i) ? r.push("".concat(He(s), ":"), i, ";") : ce(i) ? r.push.apply(r, __spreadArray(__spreadArray(["".concat(s, " {")], Je(i), false), ["}"], false)) : r.push("".concat(He(s), ": ").concat((n = s, null == (o2 = i) || "boolean" == typeof o2 || "" === o2 ? "" : "number" != typeof o2 || 0 === o2 || n in unitlessKeys || n.startsWith("--") ? String(o2).trim() : "".concat(o2, "px")), ";")));
|
|
1085
|
+
t.hasOwnProperty(s) && !Ue$1(i) && (Array.isArray(i) && i.isCss || re$1(i) ? r.push("".concat(He$1(s), ":"), i, ";") : ce$1(i) ? r.push.apply(r, __spreadArray(__spreadArray(["".concat(s, " {")], Je$1(i), false), ["}"], false)) : r.push("".concat(He$1(s), ": ").concat((n = s, null == (o2 = i) || "boolean" == typeof o2 || "" === o2 ? "" : "number" != typeof o2 || 0 === o2 || n in unitlessKeys || n.startsWith("--") ? String(o2).trim() : "".concat(o2, "px")), ";")));
|
|
1087
1086
|
}
|
|
1088
1087
|
return r;
|
|
1089
1088
|
};
|
|
1090
|
-
function Xe(e, t, n, o2) {
|
|
1091
|
-
if (Ue(e)) return [];
|
|
1092
|
-
if (se(e)) return [".".concat(e.styledComponentId)];
|
|
1093
|
-
if (re(e)) {
|
|
1094
|
-
if (!re(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
|
|
1089
|
+
function Xe$1(e, t, n, o2) {
|
|
1090
|
+
if (Ue$1(e)) return [];
|
|
1091
|
+
if (se$1(e)) return [".".concat(e.styledComponentId)];
|
|
1092
|
+
if (re$1(e)) {
|
|
1093
|
+
if (!re$1(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
|
|
1095
1094
|
var r = e(t);
|
|
1096
|
-
return "production" === process.env.NODE_ENV || "object" != typeof r || Array.isArray(r) || r instanceof qe || ce(r) || null === r || console.error("".concat(B(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Xe(r, t, n, o2);
|
|
1095
|
+
return "production" === process.env.NODE_ENV || "object" != typeof r || Array.isArray(r) || r instanceof qe$1 || ce$1(r) || null === r || console.error("".concat(B$1(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Xe$1(r, t, n, o2);
|
|
1097
1096
|
}
|
|
1098
1097
|
var s;
|
|
1099
|
-
return e instanceof qe ? n ? (e.inject(n, o2), [e.getName(o2)]) : [e] : ce(e) ? Je(e) : Array.isArray(e) ? Array.prototype.concat.apply(_, e.map(function(e2) {
|
|
1100
|
-
return Xe(e2, t, n, o2);
|
|
1098
|
+
return e instanceof qe$1 ? n ? (e.inject(n, o2), [e.getName(o2)]) : [e] : ce$1(e) ? Je$1(e) : Array.isArray(e) ? Array.prototype.concat.apply(_$1, e.map(function(e2) {
|
|
1099
|
+
return Xe$1(e2, t, n, o2);
|
|
1101
1100
|
})) : [e.toString()];
|
|
1102
1101
|
}
|
|
1103
|
-
function Ze(e) {
|
|
1102
|
+
function Ze$1(e) {
|
|
1104
1103
|
for (var t = 0; t < e.length; t += 1) {
|
|
1105
1104
|
var n = e[t];
|
|
1106
|
-
if (re(n) && !se(n)) return false;
|
|
1105
|
+
if (re$1(n) && !se$1(n)) return false;
|
|
1107
1106
|
}
|
|
1108
1107
|
return true;
|
|
1109
1108
|
}
|
|
1110
|
-
var Ke = M(v), Qe = (function() {
|
|
1109
|
+
var Ke$1 = M$1(v$1), Qe$1 = (function() {
|
|
1111
1110
|
function e(e2, t, n) {
|
|
1112
|
-
this.rules = e2, this.staticRulesId = "", this.isStatic = "production" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && Ze(e2), this.componentId = t, this.baseHash = z(Ke, t), this.baseStyle = n, ke.registerId(t);
|
|
1111
|
+
this.rules = e2, this.staticRulesId = "", this.isStatic = "production" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && Ze$1(e2), this.componentId = t, this.baseHash = z$1(Ke$1, t), this.baseStyle = n, ke$1.registerId(t);
|
|
1113
1112
|
}
|
|
1114
1113
|
return e.prototype.generateAndInjectStyles = function(e2, t, n) {
|
|
1115
1114
|
var o2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e2, t, n) : "";
|
|
1116
|
-
if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie(o2, this.staticRulesId);
|
|
1115
|
+
if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie$1(o2, this.staticRulesId);
|
|
1117
1116
|
else {
|
|
1118
|
-
var r = ae(Xe(this.rules, e2, t, n)), s = x(z(this.baseHash, r) >>> 0);
|
|
1117
|
+
var r = ae$1(Xe$1(this.rules, e2, t, n)), s = x$1(z$1(this.baseHash, r) >>> 0);
|
|
1119
1118
|
if (!t.hasNameForId(this.componentId, s)) {
|
|
1120
1119
|
var i = n(r, ".".concat(s), void 0, this.componentId);
|
|
1121
1120
|
t.insertRules(this.componentId, s, i);
|
|
1122
1121
|
}
|
|
1123
|
-
o2 = ie(o2, s), this.staticRulesId = s;
|
|
1122
|
+
o2 = ie$1(o2, s), this.staticRulesId = s;
|
|
1124
1123
|
}
|
|
1125
1124
|
else {
|
|
1126
|
-
for (var a = z(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) {
|
|
1127
|
-
var
|
|
1128
|
-
if ("string" == typeof
|
|
1129
|
-
else if (
|
|
1130
|
-
var p2 = ae(Xe(
|
|
1131
|
-
a = z(a, p2 + l), c += p2;
|
|
1125
|
+
for (var a = z$1(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) {
|
|
1126
|
+
var u3 = this.rules[l];
|
|
1127
|
+
if ("string" == typeof u3) c += u3, "production" !== process.env.NODE_ENV && (a = z$1(a, u3));
|
|
1128
|
+
else if (u3) {
|
|
1129
|
+
var p2 = ae$1(Xe$1(u3, e2, t, n));
|
|
1130
|
+
a = z$1(a, p2 + l), c += p2;
|
|
1132
1131
|
}
|
|
1133
1132
|
}
|
|
1134
1133
|
if (c) {
|
|
1135
|
-
var d = x(a >>> 0);
|
|
1136
|
-
t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o2 = ie(o2, d);
|
|
1134
|
+
var d = x$1(a >>> 0);
|
|
1135
|
+
t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o2 = ie$1(o2, d);
|
|
1137
1136
|
}
|
|
1138
1137
|
}
|
|
1139
1138
|
return o2;
|
|
@@ -1142,56 +1141,56 @@ var Ke = M(v), Qe = (function() {
|
|
|
1142
1141
|
et.Consumer;
|
|
1143
1142
|
var rt = {}, st = /* @__PURE__ */ new Set();
|
|
1144
1143
|
function it(e, r, s) {
|
|
1145
|
-
var i = se(e), a = e, c = !G(e), p2 = r.attrs, d = void 0 === p2 ? _ : p2,
|
|
1144
|
+
var i = se$1(e), a = e, c = !G$1(e), p2 = r.attrs, d = void 0 === p2 ? _$1 : p2, h2 = r.componentId, f2 = void 0 === h2 ? (function(e2, t) {
|
|
1146
1145
|
var n = "string" != typeof e2 ? "sc" : R(e2);
|
|
1147
1146
|
rt[n] = (rt[n] || 0) + 1;
|
|
1148
|
-
var o2 = "".concat(n, "-").concat(
|
|
1147
|
+
var o2 = "".concat(n, "-").concat($$1(v$1 + n + rt[n]));
|
|
1149
1148
|
return t ? "".concat(t, "-").concat(o2) : o2;
|
|
1150
|
-
})(r.displayName, r.parentComponentId) :
|
|
1151
|
-
return G(e2) ? "styled.".concat(e2) : "Styled(".concat(B(e2), ")");
|
|
1149
|
+
})(r.displayName, r.parentComponentId) : h2, m2 = r.displayName, y2 = void 0 === m2 ? (function(e2) {
|
|
1150
|
+
return G$1(e2) ? "styled.".concat(e2) : "Styled(".concat(B$1(e2), ")");
|
|
1152
1151
|
})(e) : m2, g2 = r.displayName && r.componentId ? "".concat(R(r.displayName), "-").concat(r.componentId) : r.componentId || f2, S2 = i && a.attrs ? a.attrs.concat(d).filter(Boolean) : d, w2 = r.shouldForwardProp;
|
|
1153
1152
|
if (i && a.shouldForwardProp) {
|
|
1154
|
-
var
|
|
1153
|
+
var b2 = a.shouldForwardProp;
|
|
1155
1154
|
if (r.shouldForwardProp) {
|
|
1156
1155
|
var E2 = r.shouldForwardProp;
|
|
1157
1156
|
w2 = function(e2, t) {
|
|
1158
|
-
return
|
|
1157
|
+
return b2(e2, t) && E2(e2, t);
|
|
1159
1158
|
};
|
|
1160
|
-
} else w2 =
|
|
1159
|
+
} else w2 = b2;
|
|
1161
1160
|
}
|
|
1162
|
-
var N2 = new Qe(s, g2, i ? a.componentStyle : void 0);
|
|
1161
|
+
var N2 = new Qe$1(s, g2, i ? a.componentStyle : void 0);
|
|
1163
1162
|
function O2(e2, r2) {
|
|
1164
1163
|
return (function(e3, r3, s2) {
|
|
1165
|
-
var i2 = e3.attrs, a2 = e3.componentStyle, c2 = e3.defaultProps, p3 = e3.foldedComponentIds, d2 = e3.styledComponentId,
|
|
1164
|
+
var i2 = e3.attrs, a2 = e3.componentStyle, c2 = e3.defaultProps, p3 = e3.foldedComponentIds, d2 = e3.styledComponentId, h3 = e3.target, f3 = o.useContext(et), m3 = Le$1(), y3 = e3.shouldForwardProp || m3.shouldForwardProp;
|
|
1166
1165
|
"production" !== process.env.NODE_ENV && useDebugValue(d2);
|
|
1167
|
-
var v2 = I(r3, f3, c2) || C, g3 = (function(e4, n, o2) {
|
|
1166
|
+
var v2 = I$1(r3, f3, c2) || C$1, g3 = (function(e4, n, o2) {
|
|
1168
1167
|
for (var r4, s3 = __assign(__assign({}, n), { className: void 0, theme: o2 }), i3 = 0; i3 < e4.length; i3 += 1) {
|
|
1169
|
-
var a3 = re(r4 = e4[i3]) ? r4(s3) : r4;
|
|
1170
|
-
for (var c3 in a3) s3[c3] = "className" === c3 ? ie(s3[c3], a3[c3]) : "style" === c3 ? __assign(__assign({}, s3[c3]), a3[c3]) : a3[c3];
|
|
1168
|
+
var a3 = re$1(r4 = e4[i3]) ? r4(s3) : r4;
|
|
1169
|
+
for (var c3 in a3) s3[c3] = "className" === c3 ? ie$1(s3[c3], a3[c3]) : "style" === c3 ? __assign(__assign({}, s3[c3]), a3[c3]) : a3[c3];
|
|
1171
1170
|
}
|
|
1172
|
-
return n.className && (s3.className = ie(s3.className, n.className)), s3;
|
|
1173
|
-
})(i2, r3, v2), S3 = g3.as ||
|
|
1174
|
-
for (var
|
|
1171
|
+
return n.className && (s3.className = ie$1(s3.className, n.className)), s3;
|
|
1172
|
+
})(i2, r3, v2), S3 = g3.as || h3, w3 = {};
|
|
1173
|
+
for (var b3 in g3) void 0 === g3[b3] || "$" === b3[0] || "as" === b3 || "theme" === b3 && g3.theme === v2 || ("forwardedAs" === b3 ? w3.as = g3.forwardedAs : y3 && !y3(b3, S3) || (w3[b3] = g3[b3], y3 || "development" !== process.env.NODE_ENV || isPropValid(b3) || st.has(b3) || !A.has(S3) || (st.add(b3), console.warn('styled-components: it looks like an unknown prop "'.concat(b3, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1175
1174
|
var E3 = (function(e4, t) {
|
|
1176
|
-
var n = Le(), o2 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
1175
|
+
var n = Le$1(), o2 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
1177
1176
|
return "production" !== process.env.NODE_ENV && useDebugValue(o2), o2;
|
|
1178
1177
|
})(a2, g3);
|
|
1179
1178
|
"production" !== process.env.NODE_ENV && e3.warnTooManyClasses && e3.warnTooManyClasses(E3);
|
|
1180
|
-
var N3 = ie(p3, d2);
|
|
1181
|
-
return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[G(S3) && !A.has(S3) ? "class" : "className"] = N3, s2 && (w3.ref = s2), createElement(S3, w3);
|
|
1179
|
+
var N3 = ie$1(p3, d2);
|
|
1180
|
+
return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[G$1(S3) && !A.has(S3) ? "class" : "className"] = N3, s2 && (w3.ref = s2), createElement(S3, w3);
|
|
1182
1181
|
})(D2, e2, r2);
|
|
1183
1182
|
}
|
|
1184
1183
|
O2.displayName = y2;
|
|
1185
1184
|
var D2 = o.forwardRef(O2);
|
|
1186
|
-
return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i ? ie(a.foldedComponentIds, a.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i ? a.target : e, Object.defineProperty(D2, "defaultProps", { get: function() {
|
|
1185
|
+
return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i ? ie$1(a.foldedComponentIds, a.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i ? a.target : e, Object.defineProperty(D2, "defaultProps", { get: function() {
|
|
1187
1186
|
return this._foldedDefaultProps;
|
|
1188
1187
|
}, set: function(e2) {
|
|
1189
1188
|
this._foldedDefaultProps = i ? (function(e3) {
|
|
1190
1189
|
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
1191
|
-
for (var o2 = 0, r2 = t; o2 < r2.length; o2++) le(e3, r2[o2], true);
|
|
1190
|
+
for (var o2 = 0, r2 = t; o2 < r2.length; o2++) le$1(e3, r2[o2], true);
|
|
1192
1191
|
return e3;
|
|
1193
1192
|
})({}, a.defaultProps, e2) : e2;
|
|
1194
|
-
} }), "production" !== process.env.NODE_ENV && (P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ (function(e2, t) {
|
|
1193
|
+
} }), "production" !== process.env.NODE_ENV && (P$1(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ (function(e2, t) {
|
|
1195
1194
|
var n = {}, o2 = false;
|
|
1196
1195
|
return function(r2) {
|
|
1197
1196
|
if (!o2 && (n[r2] = true, Object.keys(n).length >= 200)) {
|
|
@@ -1199,9 +1198,9 @@ function it(e, r, s) {
|
|
|
1199
1198
|
console.warn("Over ".concat(200, " classes were generated for component ").concat(e2).concat(s2, ".\n") + "Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), o2 = true, n = {};
|
|
1200
1199
|
}
|
|
1201
1200
|
};
|
|
1202
|
-
})(y2, g2)), ue(D2, function() {
|
|
1201
|
+
})(y2, g2)), ue$1(D2, function() {
|
|
1203
1202
|
return ".".concat(D2.styledComponentId);
|
|
1204
|
-
}), c && oe(D2, e, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), D2;
|
|
1203
|
+
}), c && oe$1(D2, e, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), D2;
|
|
1205
1204
|
}
|
|
1206
1205
|
function at(e, t) {
|
|
1207
1206
|
for (var n = [e[0]], o2 = 0, r = t.length; o2 < r; o2 += 1) n.push(t[o2], e[o2 + 1]);
|
|
@@ -1212,12 +1211,12 @@ var ct = function(e) {
|
|
|
1212
1211
|
};
|
|
1213
1212
|
function lt(t) {
|
|
1214
1213
|
for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
|
|
1215
|
-
if (re(t) || ce(t)) return ct(Xe(at(_, __spreadArray([t], n, true))));
|
|
1214
|
+
if (re$1(t) || ce$1(t)) return ct(Xe$1(at(_$1, __spreadArray([t], n, true))));
|
|
1216
1215
|
var r = t;
|
|
1217
|
-
return 0 === n.length && 1 === r.length && "string" == typeof r[0] ? Xe(r) : ct(Xe(at(r, n)));
|
|
1216
|
+
return 0 === n.length && 1 === r.length && "string" == typeof r[0] ? Xe$1(r) : ct(Xe$1(at(r, n)));
|
|
1218
1217
|
}
|
|
1219
1218
|
function ut(n, o2, r) {
|
|
1220
|
-
if (void 0 === r && (r = C), !o2) throw he(1, o2);
|
|
1219
|
+
if (void 0 === r && (r = C$1), !o2) throw he$1(1, o2);
|
|
1221
1220
|
var s = function(t) {
|
|
1222
1221
|
for (var s2 = [], i = 1; i < arguments.length; i++) s2[i - 1] = arguments[i];
|
|
1223
1222
|
return n(o2, r, lt.apply(void 0, __spreadArray([t], s2, false)));
|
|
@@ -1240,28 +1239,28 @@ var vt = /^\s*<\/[a-z]/i, gt = (function() {
|
|
|
1240
1239
|
this._emitSheetCSS = function() {
|
|
1241
1240
|
var t = e2.instance.toString();
|
|
1242
1241
|
if (!t) return "";
|
|
1243
|
-
var n = Ce(), o2 = ae([n && 'nonce="'.concat(n, '"'), "".concat(f, '="true"'), "".concat(y, '="').concat(v, '"')].filter(Boolean), " ");
|
|
1242
|
+
var n = Ce$1(), o2 = ae$1([n && 'nonce="'.concat(n, '"'), "".concat(f, '="true"'), "".concat(y$1, '="').concat(v$1, '"')].filter(Boolean), " ");
|
|
1244
1243
|
return "<style ".concat(o2, ">").concat(t, "</style>");
|
|
1245
1244
|
}, this.getStyleTags = function() {
|
|
1246
|
-
if (e2.sealed) throw he(2);
|
|
1245
|
+
if (e2.sealed) throw he$1(2);
|
|
1247
1246
|
return e2._emitSheetCSS();
|
|
1248
1247
|
}, this.getStyleElement = function() {
|
|
1249
1248
|
var n;
|
|
1250
|
-
if (e2.sealed) throw he(2);
|
|
1249
|
+
if (e2.sealed) throw he$1(2);
|
|
1251
1250
|
var r = e2.instance.toString();
|
|
1252
1251
|
if (!r) return [];
|
|
1253
|
-
var s = ((n = {})[f] = "", n[y] = v, n.dangerouslySetInnerHTML = { __html: r }, n), i = Ce();
|
|
1252
|
+
var s = ((n = {})[f] = "", n[y$1] = v$1, n.dangerouslySetInnerHTML = { __html: r }, n), i = Ce$1();
|
|
1254
1253
|
return i && (s.nonce = i), [o.createElement("style", __assign({}, s, { key: "sc-0-0" }))];
|
|
1255
1254
|
}, this.seal = function() {
|
|
1256
1255
|
e2.sealed = true;
|
|
1257
|
-
}, this.instance = new ke({ isServer: true }), this.sealed = false;
|
|
1256
|
+
}, this.instance = new ke$1({ isServer: true }), this.sealed = false;
|
|
1258
1257
|
}
|
|
1259
1258
|
return e.prototype.collectStyles = function(e2) {
|
|
1260
|
-
if (this.sealed) throw he(2);
|
|
1259
|
+
if (this.sealed) throw he$1(2);
|
|
1261
1260
|
return o.createElement(Ye, { sheet: this.instance }, e2);
|
|
1262
1261
|
}, e.prototype.interleaveWithNodeStream = function(e2) {
|
|
1263
|
-
if (S) throw he(3);
|
|
1264
|
-
if (this.sealed) throw he(2);
|
|
1262
|
+
if (S$1) throw he$1(3);
|
|
1263
|
+
if (this.sealed) throw he$1(2);
|
|
1265
1264
|
this.seal();
|
|
1266
1265
|
var t = require("stream").Transform, n = e2, o2 = this.instance, r = this._emitSheetCSS, s = new t({ transform: function(e3, t2, n2) {
|
|
1267
1266
|
var s2 = e3.toString(), i = r();
|
|
@@ -1369,6 +1368,1093 @@ const SectionComponent = ({ children, title }) => {
|
|
|
1369
1368
|
/* @__PURE__ */ jsx(Container$2, { children })
|
|
1370
1369
|
] });
|
|
1371
1370
|
};
|
|
1371
|
+
function L() {
|
|
1372
|
+
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
1373
|
+
}
|
|
1374
|
+
var T = L();
|
|
1375
|
+
function G(u3) {
|
|
1376
|
+
T = u3;
|
|
1377
|
+
}
|
|
1378
|
+
var I = { exec: () => null };
|
|
1379
|
+
function h(u3, e = "") {
|
|
1380
|
+
let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
|
|
1381
|
+
let s = typeof i == "string" ? i : i.source;
|
|
1382
|
+
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
1383
|
+
}, getRegex: () => new RegExp(t, e) };
|
|
1384
|
+
return n;
|
|
1385
|
+
}
|
|
1386
|
+
var m = { 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, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ 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, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = h(ie).replace(/bull/g, F).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(), we = h(ie).replace(/bull/g, F).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(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ye = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $e = h("^ {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", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = h(j).replace("hr", E).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = { ...K, lheading: we, table: re, paragraph: h(j).replace("hr", E).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Me = { ...K, html: h(`^ *(?: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: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
|
|
1387
|
+
]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, qe = h(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ve = h(ce, "u").replace(/punct/g, D).getRegex(), De = h(ce, "u").replace(/punct/g, pe).getRegex(), he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = h(he, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = h(he, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ne = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = h(/^<(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(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Qe = h("^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", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = h("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I }, We = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: h(/^((?: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: h(/^([`~]+|[^`~])(?:(?= {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() }, Xe = { ...N, br: h(le).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Le, pedantic: Me }, M = { normal: X, gfm: N, breaks: Xe, pedantic: We };
|
|
1388
|
+
var Je = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (u3) => Je[u3];
|
|
1389
|
+
function w(u3, e) {
|
|
1390
|
+
if (e) {
|
|
1391
|
+
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
|
|
1392
|
+
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
|
|
1393
|
+
return u3;
|
|
1394
|
+
}
|
|
1395
|
+
function J(u3) {
|
|
1396
|
+
try {
|
|
1397
|
+
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
1398
|
+
} catch {
|
|
1399
|
+
return null;
|
|
1400
|
+
}
|
|
1401
|
+
return u3;
|
|
1402
|
+
}
|
|
1403
|
+
function V(u3, e) {
|
|
1404
|
+
let t = u3.replace(m.findPipe, (i, s, o2) => {
|
|
1405
|
+
let a = false, l = s;
|
|
1406
|
+
for (; --l >= 0 && o2[l] === "\\"; ) a = !a;
|
|
1407
|
+
return a ? "|" : " |";
|
|
1408
|
+
}), n = t.split(m.splitPipe), r = 0;
|
|
1409
|
+
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
1410
|
+
else for (; n.length < e; ) n.push("");
|
|
1411
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
1412
|
+
return n;
|
|
1413
|
+
}
|
|
1414
|
+
function z(u3, e, t) {
|
|
1415
|
+
let n = u3.length;
|
|
1416
|
+
if (n === 0) return "";
|
|
1417
|
+
let r = 0;
|
|
1418
|
+
for (; r < n; ) {
|
|
1419
|
+
let i = u3.charAt(n - r - 1);
|
|
1420
|
+
if (i === e && true) r++;
|
|
1421
|
+
else break;
|
|
1422
|
+
}
|
|
1423
|
+
return u3.slice(0, n - r);
|
|
1424
|
+
}
|
|
1425
|
+
function fe(u3, e) {
|
|
1426
|
+
if (u3.indexOf(e[1]) === -1) return -1;
|
|
1427
|
+
let t = 0;
|
|
1428
|
+
for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
|
|
1429
|
+
else if (u3[n] === e[0]) t++;
|
|
1430
|
+
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
1431
|
+
return t > 0 ? -2 : -1;
|
|
1432
|
+
}
|
|
1433
|
+
function me(u3, e, t, n, r) {
|
|
1434
|
+
let i = e.href, s = e.title || null, o2 = u3[1].replace(r.other.outputLinkReplace, "$1");
|
|
1435
|
+
n.state.inLink = true;
|
|
1436
|
+
let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o2, tokens: n.inlineTokens(o2) };
|
|
1437
|
+
return n.state.inLink = false, a;
|
|
1438
|
+
}
|
|
1439
|
+
function Ve(u3, e, t) {
|
|
1440
|
+
let n = u3.match(t.other.indentCodeCompensation);
|
|
1441
|
+
if (n === null) return e;
|
|
1442
|
+
let r = n[1];
|
|
1443
|
+
return e.split(`
|
|
1444
|
+
`).map((i) => {
|
|
1445
|
+
let s = i.match(t.other.beginningSpace);
|
|
1446
|
+
if (s === null) return i;
|
|
1447
|
+
let [o2] = s;
|
|
1448
|
+
return o2.length >= r.length ? i.slice(r.length) : i;
|
|
1449
|
+
}).join(`
|
|
1450
|
+
`);
|
|
1451
|
+
}
|
|
1452
|
+
var y = class {
|
|
1453
|
+
options;
|
|
1454
|
+
rules;
|
|
1455
|
+
lexer;
|
|
1456
|
+
constructor(e) {
|
|
1457
|
+
this.options = e || T;
|
|
1458
|
+
}
|
|
1459
|
+
space(e) {
|
|
1460
|
+
let t = this.rules.block.newline.exec(e);
|
|
1461
|
+
if (t && t[0].length > 0) return { type: "space", raw: t[0] };
|
|
1462
|
+
}
|
|
1463
|
+
code(e) {
|
|
1464
|
+
let t = this.rules.block.code.exec(e);
|
|
1465
|
+
if (t) {
|
|
1466
|
+
let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
1467
|
+
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : z(n, `
|
|
1468
|
+
`) };
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
fences(e) {
|
|
1472
|
+
let t = this.rules.block.fences.exec(e);
|
|
1473
|
+
if (t) {
|
|
1474
|
+
let n = t[0], r = Ve(n, t[3] || "", this.rules);
|
|
1475
|
+
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
heading(e) {
|
|
1479
|
+
let t = this.rules.block.heading.exec(e);
|
|
1480
|
+
if (t) {
|
|
1481
|
+
let n = t[2].trim();
|
|
1482
|
+
if (this.rules.other.endingHash.test(n)) {
|
|
1483
|
+
let r = z(n, "#");
|
|
1484
|
+
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
1485
|
+
}
|
|
1486
|
+
return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
hr(e) {
|
|
1490
|
+
let t = this.rules.block.hr.exec(e);
|
|
1491
|
+
if (t) return { type: "hr", raw: z(t[0], `
|
|
1492
|
+
`) };
|
|
1493
|
+
}
|
|
1494
|
+
blockquote(e) {
|
|
1495
|
+
let t = this.rules.block.blockquote.exec(e);
|
|
1496
|
+
if (t) {
|
|
1497
|
+
let n = z(t[0], `
|
|
1498
|
+
`).split(`
|
|
1499
|
+
`), r = "", i = "", s = [];
|
|
1500
|
+
for (; n.length > 0; ) {
|
|
1501
|
+
let o2 = false, a = [], l;
|
|
1502
|
+
for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o2 = true;
|
|
1503
|
+
else if (!o2) a.push(n[l]);
|
|
1504
|
+
else break;
|
|
1505
|
+
n = n.slice(l);
|
|
1506
|
+
let c = a.join(`
|
|
1507
|
+
`), p2 = c.replace(this.rules.other.blockquoteSetextReplace, `
|
|
1508
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
1509
|
+
r = r ? `${r}
|
|
1510
|
+
${c}` : c, i = i ? `${i}
|
|
1511
|
+
${p2}` : p2;
|
|
1512
|
+
let g2 = this.lexer.state.top;
|
|
1513
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(p2, s, true), this.lexer.state.top = g2, n.length === 0) break;
|
|
1514
|
+
let d = s.at(-1);
|
|
1515
|
+
if (d?.type === "code") break;
|
|
1516
|
+
if (d?.type === "blockquote") {
|
|
1517
|
+
let R2 = d, f2 = R2.raw + `
|
|
1518
|
+
` + n.join(`
|
|
1519
|
+
`), O2 = this.blockquote(f2);
|
|
1520
|
+
s[s.length - 1] = O2, r = r.substring(0, r.length - R2.raw.length) + O2.raw, i = i.substring(0, i.length - R2.text.length) + O2.text;
|
|
1521
|
+
break;
|
|
1522
|
+
} else if (d?.type === "list") {
|
|
1523
|
+
let R2 = d, f2 = R2.raw + `
|
|
1524
|
+
` + n.join(`
|
|
1525
|
+
`), O2 = this.list(f2);
|
|
1526
|
+
s[s.length - 1] = O2, r = r.substring(0, r.length - d.raw.length) + O2.raw, i = i.substring(0, i.length - R2.raw.length) + O2.raw, n = f2.substring(s.at(-1).raw.length).split(`
|
|
1527
|
+
`);
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
return { type: "blockquote", raw: r, tokens: s, text: i };
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
list(e) {
|
|
1535
|
+
let t = this.rules.block.list.exec(e);
|
|
1536
|
+
if (t) {
|
|
1537
|
+
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
1538
|
+
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
1539
|
+
let s = this.rules.other.listItemRegex(n), o2 = false;
|
|
1540
|
+
for (; e; ) {
|
|
1541
|
+
let l = false, c = "", p2 = "";
|
|
1542
|
+
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1543
|
+
c = t[0], e = e.substring(c.length);
|
|
1544
|
+
let g2 = t[2].split(`
|
|
1545
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H2) => " ".repeat(3 * H2.length)), d = e.split(`
|
|
1546
|
+
`, 1)[0], R2 = !g2.trim(), f2 = 0;
|
|
1547
|
+
if (this.options.pedantic ? (f2 = 2, p2 = g2.trimStart()) : R2 ? f2 = t[1].length + 1 : (f2 = t[2].search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p2 = g2.slice(f2), f2 += t[1].length), R2 && this.rules.other.blankLine.test(d) && (c += d + `
|
|
1548
|
+
`, e = e.substring(d.length + 1), l = true), !l) {
|
|
1549
|
+
let H2 = this.rules.other.nextBulletRegex(f2), ee2 = this.rules.other.hrRegex(f2), te2 = this.rules.other.fencesBeginRegex(f2), ne2 = this.rules.other.headingBeginRegex(f2), xe2 = this.rules.other.htmlBeginRegex(f2);
|
|
1550
|
+
for (; e; ) {
|
|
1551
|
+
let Z2 = e.split(`
|
|
1552
|
+
`, 1)[0], A2;
|
|
1553
|
+
if (d = Z2, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), A2 = d) : A2 = d.replace(this.rules.other.tabCharGlobal, " "), te2.test(d) || ne2.test(d) || xe2.test(d) || H2.test(d) || ee2.test(d)) break;
|
|
1554
|
+
if (A2.search(this.rules.other.nonSpaceChar) >= f2 || !d.trim()) p2 += `
|
|
1555
|
+
` + A2.slice(f2);
|
|
1556
|
+
else {
|
|
1557
|
+
if (R2 || g2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te2.test(g2) || ne2.test(g2) || ee2.test(g2)) break;
|
|
1558
|
+
p2 += `
|
|
1559
|
+
` + d;
|
|
1560
|
+
}
|
|
1561
|
+
!R2 && !d.trim() && (R2 = true), c += Z2 + `
|
|
1562
|
+
`, e = e.substring(Z2.length + 1), g2 = A2.slice(f2);
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
i.loose || (o2 ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o2 = true));
|
|
1566
|
+
let O2 = null, Y2;
|
|
1567
|
+
this.options.gfm && (O2 = this.rules.other.listIsTask.exec(p2), O2 && (Y2 = O2[0] !== "[ ] ", p2 = p2.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c, task: !!O2, checked: Y2, loose: false, text: p2, tokens: [] }), i.raw += c;
|
|
1568
|
+
}
|
|
1569
|
+
let a = i.items.at(-1);
|
|
1570
|
+
if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
|
|
1571
|
+
else return;
|
|
1572
|
+
i.raw = i.raw.trimEnd();
|
|
1573
|
+
for (let l = 0; l < i.items.length; l++) if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
|
|
1574
|
+
let c = i.items[l].tokens.filter((g2) => g2.type === "space"), p2 = c.length > 0 && c.some((g2) => this.rules.other.anyLine.test(g2.raw));
|
|
1575
|
+
i.loose = p2;
|
|
1576
|
+
}
|
|
1577
|
+
if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
|
|
1578
|
+
return i;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
html(e) {
|
|
1582
|
+
let t = this.rules.block.html.exec(e);
|
|
1583
|
+
if (t) return { type: "html", block: true, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] };
|
|
1584
|
+
}
|
|
1585
|
+
def(e) {
|
|
1586
|
+
let t = this.rules.block.def.exec(e);
|
|
1587
|
+
if (t) {
|
|
1588
|
+
let n = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), r = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
1589
|
+
return { type: "def", tag: n, raw: t[0], href: r, title: i };
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
table(e) {
|
|
1593
|
+
let t = this.rules.block.table.exec(e);
|
|
1594
|
+
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1595
|
+
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
1596
|
+
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
1597
|
+
if (n.length === r.length) {
|
|
1598
|
+
for (let o2 of r) this.rules.other.tableAlignRight.test(o2) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o2) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o2) ? s.align.push("left") : s.align.push(null);
|
|
1599
|
+
for (let o2 = 0; o2 < n.length; o2++) s.header.push({ text: n[o2], tokens: this.lexer.inline(n[o2]), header: true, align: s.align[o2] });
|
|
1600
|
+
for (let o2 of i) s.rows.push(V(o2, s.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[l] })));
|
|
1601
|
+
return s;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
lheading(e) {
|
|
1605
|
+
let t = this.rules.block.lheading.exec(e);
|
|
1606
|
+
if (t) return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: t[1], tokens: this.lexer.inline(t[1]) };
|
|
1607
|
+
}
|
|
1608
|
+
paragraph(e) {
|
|
1609
|
+
let t = this.rules.block.paragraph.exec(e);
|
|
1610
|
+
if (t) {
|
|
1611
|
+
let n = t[1].charAt(t[1].length - 1) === `
|
|
1612
|
+
` ? t[1].slice(0, -1) : t[1];
|
|
1613
|
+
return { type: "paragraph", raw: t[0], text: n, tokens: this.lexer.inline(n) };
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
text(e) {
|
|
1617
|
+
let t = this.rules.block.text.exec(e);
|
|
1618
|
+
if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) };
|
|
1619
|
+
}
|
|
1620
|
+
escape(e) {
|
|
1621
|
+
let t = this.rules.inline.escape.exec(e);
|
|
1622
|
+
if (t) return { type: "escape", raw: t[0], text: t[1] };
|
|
1623
|
+
}
|
|
1624
|
+
tag(e) {
|
|
1625
|
+
let t = this.rules.inline.tag.exec(e);
|
|
1626
|
+
if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t[0] };
|
|
1627
|
+
}
|
|
1628
|
+
link(e) {
|
|
1629
|
+
let t = this.rules.inline.link.exec(e);
|
|
1630
|
+
if (t) {
|
|
1631
|
+
let n = t[2].trim();
|
|
1632
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
1633
|
+
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
1634
|
+
let s = z(n.slice(0, -1), "\\");
|
|
1635
|
+
if ((n.length - s.length) % 2 === 0) return;
|
|
1636
|
+
} else {
|
|
1637
|
+
let s = fe(t[2], "()");
|
|
1638
|
+
if (s === -2) return;
|
|
1639
|
+
if (s > -1) {
|
|
1640
|
+
let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
1641
|
+
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, a).trim(), t[3] = "";
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
let r = t[2], i = "";
|
|
1645
|
+
if (this.options.pedantic) {
|
|
1646
|
+
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
1647
|
+
s && (r = s[1], i = s[3]);
|
|
1648
|
+
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
1649
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
reflink(e, t) {
|
|
1653
|
+
let n;
|
|
1654
|
+
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
1655
|
+
let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = t[r.toLowerCase()];
|
|
1656
|
+
if (!i) {
|
|
1657
|
+
let s = n[0].charAt(0);
|
|
1658
|
+
return { type: "text", raw: s, text: s };
|
|
1659
|
+
}
|
|
1660
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
emStrong(e, t, n = "") {
|
|
1664
|
+
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
1665
|
+
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
1666
|
+
if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
1667
|
+
let s = [...r[0]].length - 1, o2, a, l = s, c = 0, p2 = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
1668
|
+
for (p2.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p2.exec(t)) != null; ) {
|
|
1669
|
+
if (o2 = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o2) continue;
|
|
1670
|
+
if (a = [...o2].length, r[3] || r[4]) {
|
|
1671
|
+
l += a;
|
|
1672
|
+
continue;
|
|
1673
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
|
|
1674
|
+
c += a;
|
|
1675
|
+
continue;
|
|
1676
|
+
}
|
|
1677
|
+
if (l -= a, l > 0) continue;
|
|
1678
|
+
a = Math.min(a, a + l + c);
|
|
1679
|
+
let g2 = [...r[0]][0].length, d = e.slice(0, s + r.index + g2 + a);
|
|
1680
|
+
if (Math.min(s, a) % 2) {
|
|
1681
|
+
let f2 = d.slice(1, -1);
|
|
1682
|
+
return { type: "em", raw: d, text: f2, tokens: this.lexer.inlineTokens(f2) };
|
|
1683
|
+
}
|
|
1684
|
+
let R2 = d.slice(2, -2);
|
|
1685
|
+
return { type: "strong", raw: d, text: R2, tokens: this.lexer.inlineTokens(R2) };
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
codespan(e) {
|
|
1690
|
+
let t = this.rules.inline.code.exec(e);
|
|
1691
|
+
if (t) {
|
|
1692
|
+
let n = t[2].replace(this.rules.other.newLineCharGlobal, " "), r = this.rules.other.nonSpaceChar.test(n), i = this.rules.other.startingSpaceChar.test(n) && this.rules.other.endingSpaceChar.test(n);
|
|
1693
|
+
return r && i && (n = n.substring(1, n.length - 1)), { type: "codespan", raw: t[0], text: n };
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
br(e) {
|
|
1697
|
+
let t = this.rules.inline.br.exec(e);
|
|
1698
|
+
if (t) return { type: "br", raw: t[0] };
|
|
1699
|
+
}
|
|
1700
|
+
del(e) {
|
|
1701
|
+
let t = this.rules.inline.del.exec(e);
|
|
1702
|
+
if (t) return { type: "del", raw: t[0], text: t[2], tokens: this.lexer.inlineTokens(t[2]) };
|
|
1703
|
+
}
|
|
1704
|
+
autolink(e) {
|
|
1705
|
+
let t = this.rules.inline.autolink.exec(e);
|
|
1706
|
+
if (t) {
|
|
1707
|
+
let n, r;
|
|
1708
|
+
return t[2] === "@" ? (n = t[1], r = "mailto:" + n) : (n = t[1], r = n), { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
url(e) {
|
|
1712
|
+
let t;
|
|
1713
|
+
if (t = this.rules.inline.url.exec(e)) {
|
|
1714
|
+
let n, r;
|
|
1715
|
+
if (t[2] === "@") n = t[0], r = "mailto:" + n;
|
|
1716
|
+
else {
|
|
1717
|
+
let i;
|
|
1718
|
+
do
|
|
1719
|
+
i = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
|
|
1720
|
+
while (i !== t[0]);
|
|
1721
|
+
n = t[0], t[1] === "www." ? r = "http://" + t[0] : r = t[0];
|
|
1722
|
+
}
|
|
1723
|
+
return { type: "link", raw: t[0], text: n, href: r, tokens: [{ type: "text", raw: n, text: n }] };
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
inlineText(e) {
|
|
1727
|
+
let t = this.rules.inline.text.exec(e);
|
|
1728
|
+
if (t) {
|
|
1729
|
+
let n = this.lexer.state.inRawBlock;
|
|
1730
|
+
return { type: "text", raw: t[0], text: t[0], escaped: n };
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
var x = class u {
|
|
1735
|
+
tokens;
|
|
1736
|
+
options;
|
|
1737
|
+
state;
|
|
1738
|
+
tokenizer;
|
|
1739
|
+
inlineQueue;
|
|
1740
|
+
constructor(e) {
|
|
1741
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
1742
|
+
let t = { other: m, block: C.normal, inline: M.normal };
|
|
1743
|
+
this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
|
|
1744
|
+
}
|
|
1745
|
+
static get rules() {
|
|
1746
|
+
return { block: C, inline: M };
|
|
1747
|
+
}
|
|
1748
|
+
static lex(e, t) {
|
|
1749
|
+
return new u(t).lex(e);
|
|
1750
|
+
}
|
|
1751
|
+
static lexInline(e, t) {
|
|
1752
|
+
return new u(t).inlineTokens(e);
|
|
1753
|
+
}
|
|
1754
|
+
lex(e) {
|
|
1755
|
+
e = e.replace(m.carriageReturn, `
|
|
1756
|
+
`), this.blockTokens(e, this.tokens);
|
|
1757
|
+
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
1758
|
+
let n = this.inlineQueue[t];
|
|
1759
|
+
this.inlineTokens(n.src, n.tokens);
|
|
1760
|
+
}
|
|
1761
|
+
return this.inlineQueue = [], this.tokens;
|
|
1762
|
+
}
|
|
1763
|
+
blockTokens(e, t = [], n = false) {
|
|
1764
|
+
for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
1765
|
+
let r;
|
|
1766
|
+
if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
|
|
1767
|
+
if (r = this.tokenizer.space(e)) {
|
|
1768
|
+
e = e.substring(r.raw.length);
|
|
1769
|
+
let s = t.at(-1);
|
|
1770
|
+
r.raw.length === 1 && s !== void 0 ? s.raw += `
|
|
1771
|
+
` : t.push(r);
|
|
1772
|
+
continue;
|
|
1773
|
+
}
|
|
1774
|
+
if (r = this.tokenizer.code(e)) {
|
|
1775
|
+
e = e.substring(r.raw.length);
|
|
1776
|
+
let s = t.at(-1);
|
|
1777
|
+
s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
1778
|
+
`) ? "" : `
|
|
1779
|
+
`) + r.raw, s.text += `
|
|
1780
|
+
` + r.text, this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
1781
|
+
continue;
|
|
1782
|
+
}
|
|
1783
|
+
if (r = this.tokenizer.fences(e)) {
|
|
1784
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1785
|
+
continue;
|
|
1786
|
+
}
|
|
1787
|
+
if (r = this.tokenizer.heading(e)) {
|
|
1788
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1789
|
+
continue;
|
|
1790
|
+
}
|
|
1791
|
+
if (r = this.tokenizer.hr(e)) {
|
|
1792
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1793
|
+
continue;
|
|
1794
|
+
}
|
|
1795
|
+
if (r = this.tokenizer.blockquote(e)) {
|
|
1796
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1797
|
+
continue;
|
|
1798
|
+
}
|
|
1799
|
+
if (r = this.tokenizer.list(e)) {
|
|
1800
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1801
|
+
continue;
|
|
1802
|
+
}
|
|
1803
|
+
if (r = this.tokenizer.html(e)) {
|
|
1804
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1805
|
+
continue;
|
|
1806
|
+
}
|
|
1807
|
+
if (r = this.tokenizer.def(e)) {
|
|
1808
|
+
e = e.substring(r.raw.length);
|
|
1809
|
+
let s = t.at(-1);
|
|
1810
|
+
s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
1811
|
+
`) ? "" : `
|
|
1812
|
+
`) + r.raw, s.text += `
|
|
1813
|
+
` + r.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }, t.push(r));
|
|
1814
|
+
continue;
|
|
1815
|
+
}
|
|
1816
|
+
if (r = this.tokenizer.table(e)) {
|
|
1817
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1818
|
+
continue;
|
|
1819
|
+
}
|
|
1820
|
+
if (r = this.tokenizer.lheading(e)) {
|
|
1821
|
+
e = e.substring(r.raw.length), t.push(r);
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
let i = e;
|
|
1825
|
+
if (this.options.extensions?.startBlock) {
|
|
1826
|
+
let s = 1 / 0, o2 = e.slice(1), a;
|
|
1827
|
+
this.options.extensions.startBlock.forEach((l) => {
|
|
1828
|
+
a = l.call({ lexer: this }, o2), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
|
|
1829
|
+
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
1830
|
+
}
|
|
1831
|
+
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
1832
|
+
let s = t.at(-1);
|
|
1833
|
+
n && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
|
|
1834
|
+
`) ? "" : `
|
|
1835
|
+
`) + r.raw, s.text += `
|
|
1836
|
+
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
|
|
1837
|
+
continue;
|
|
1838
|
+
}
|
|
1839
|
+
if (r = this.tokenizer.text(e)) {
|
|
1840
|
+
e = e.substring(r.raw.length);
|
|
1841
|
+
let s = t.at(-1);
|
|
1842
|
+
s?.type === "text" ? (s.raw += (s.raw.endsWith(`
|
|
1843
|
+
`) ? "" : `
|
|
1844
|
+
`) + r.raw, s.text += `
|
|
1845
|
+
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : t.push(r);
|
|
1846
|
+
continue;
|
|
1847
|
+
}
|
|
1848
|
+
if (e) {
|
|
1849
|
+
let s = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
1850
|
+
if (this.options.silent) {
|
|
1851
|
+
console.error(s);
|
|
1852
|
+
break;
|
|
1853
|
+
} else throw new Error(s);
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
return this.state.top = true, t;
|
|
1857
|
+
}
|
|
1858
|
+
inline(e, t = []) {
|
|
1859
|
+
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
1860
|
+
}
|
|
1861
|
+
inlineTokens(e, t = []) {
|
|
1862
|
+
let n = e, r = null;
|
|
1863
|
+
if (this.tokens.links) {
|
|
1864
|
+
let o2 = Object.keys(this.tokens.links);
|
|
1865
|
+
if (o2.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o2.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
1866
|
+
}
|
|
1867
|
+
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
1868
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
1869
|
+
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
1870
|
+
let i = false, s = "";
|
|
1871
|
+
for (; e; ) {
|
|
1872
|
+
i || (s = ""), i = false;
|
|
1873
|
+
let o2;
|
|
1874
|
+
if (this.options.extensions?.inline?.some((l) => (o2 = l.call({ lexer: this }, e, t)) ? (e = e.substring(o2.raw.length), t.push(o2), true) : false)) continue;
|
|
1875
|
+
if (o2 = this.tokenizer.escape(e)) {
|
|
1876
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1877
|
+
continue;
|
|
1878
|
+
}
|
|
1879
|
+
if (o2 = this.tokenizer.tag(e)) {
|
|
1880
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1881
|
+
continue;
|
|
1882
|
+
}
|
|
1883
|
+
if (o2 = this.tokenizer.link(e)) {
|
|
1884
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1885
|
+
continue;
|
|
1886
|
+
}
|
|
1887
|
+
if (o2 = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
1888
|
+
e = e.substring(o2.raw.length);
|
|
1889
|
+
let l = t.at(-1);
|
|
1890
|
+
o2.type === "text" && l?.type === "text" ? (l.raw += o2.raw, l.text += o2.text) : t.push(o2);
|
|
1891
|
+
continue;
|
|
1892
|
+
}
|
|
1893
|
+
if (o2 = this.tokenizer.emStrong(e, n, s)) {
|
|
1894
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1895
|
+
continue;
|
|
1896
|
+
}
|
|
1897
|
+
if (o2 = this.tokenizer.codespan(e)) {
|
|
1898
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1899
|
+
continue;
|
|
1900
|
+
}
|
|
1901
|
+
if (o2 = this.tokenizer.br(e)) {
|
|
1902
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1903
|
+
continue;
|
|
1904
|
+
}
|
|
1905
|
+
if (o2 = this.tokenizer.del(e)) {
|
|
1906
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1907
|
+
continue;
|
|
1908
|
+
}
|
|
1909
|
+
if (o2 = this.tokenizer.autolink(e)) {
|
|
1910
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1911
|
+
continue;
|
|
1912
|
+
}
|
|
1913
|
+
if (!this.state.inLink && (o2 = this.tokenizer.url(e))) {
|
|
1914
|
+
e = e.substring(o2.raw.length), t.push(o2);
|
|
1915
|
+
continue;
|
|
1916
|
+
}
|
|
1917
|
+
let a = e;
|
|
1918
|
+
if (this.options.extensions?.startInline) {
|
|
1919
|
+
let l = 1 / 0, c = e.slice(1), p2;
|
|
1920
|
+
this.options.extensions.startInline.forEach((g2) => {
|
|
1921
|
+
p2 = g2.call({ lexer: this }, c), typeof p2 == "number" && p2 >= 0 && (l = Math.min(l, p2));
|
|
1922
|
+
}), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
|
|
1923
|
+
}
|
|
1924
|
+
if (o2 = this.tokenizer.inlineText(a)) {
|
|
1925
|
+
e = e.substring(o2.raw.length), o2.raw.slice(-1) !== "_" && (s = o2.raw.slice(-1)), i = true;
|
|
1926
|
+
let l = t.at(-1);
|
|
1927
|
+
l?.type === "text" ? (l.raw += o2.raw, l.text += o2.text) : t.push(o2);
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
if (e) {
|
|
1931
|
+
let l = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
1932
|
+
if (this.options.silent) {
|
|
1933
|
+
console.error(l);
|
|
1934
|
+
break;
|
|
1935
|
+
} else throw new Error(l);
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
return t;
|
|
1939
|
+
}
|
|
1940
|
+
};
|
|
1941
|
+
var P = class {
|
|
1942
|
+
options;
|
|
1943
|
+
parser;
|
|
1944
|
+
constructor(e) {
|
|
1945
|
+
this.options = e || T;
|
|
1946
|
+
}
|
|
1947
|
+
space(e) {
|
|
1948
|
+
return "";
|
|
1949
|
+
}
|
|
1950
|
+
code({ text: e, lang: t, escaped: n }) {
|
|
1951
|
+
let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
|
|
1952
|
+
`;
|
|
1953
|
+
return r ? '<pre><code class="language-' + w(r) + '">' + (n ? i : w(i, true)) + `</code></pre>
|
|
1954
|
+
` : "<pre><code>" + (n ? i : w(i, true)) + `</code></pre>
|
|
1955
|
+
`;
|
|
1956
|
+
}
|
|
1957
|
+
blockquote({ tokens: e }) {
|
|
1958
|
+
return `<blockquote>
|
|
1959
|
+
${this.parser.parse(e)}</blockquote>
|
|
1960
|
+
`;
|
|
1961
|
+
}
|
|
1962
|
+
html({ text: e }) {
|
|
1963
|
+
return e;
|
|
1964
|
+
}
|
|
1965
|
+
def(e) {
|
|
1966
|
+
return "";
|
|
1967
|
+
}
|
|
1968
|
+
heading({ tokens: e, depth: t }) {
|
|
1969
|
+
return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
1970
|
+
`;
|
|
1971
|
+
}
|
|
1972
|
+
hr(e) {
|
|
1973
|
+
return `<hr>
|
|
1974
|
+
`;
|
|
1975
|
+
}
|
|
1976
|
+
list(e) {
|
|
1977
|
+
let t = e.ordered, n = e.start, r = "";
|
|
1978
|
+
for (let o2 = 0; o2 < e.items.length; o2++) {
|
|
1979
|
+
let a = e.items[o2];
|
|
1980
|
+
r += this.listitem(a);
|
|
1981
|
+
}
|
|
1982
|
+
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
1983
|
+
return "<" + i + s + `>
|
|
1984
|
+
` + r + "</" + i + `>
|
|
1985
|
+
`;
|
|
1986
|
+
}
|
|
1987
|
+
listitem(e) {
|
|
1988
|
+
let t = "";
|
|
1989
|
+
if (e.task) {
|
|
1990
|
+
let n = this.checkbox({ checked: !!e.checked });
|
|
1991
|
+
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + w(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = true)) : e.tokens.unshift({ type: "text", raw: n + " ", text: n + " ", escaped: true }) : t += n + " ";
|
|
1992
|
+
}
|
|
1993
|
+
return t += this.parser.parse(e.tokens, !!e.loose), `<li>${t}</li>
|
|
1994
|
+
`;
|
|
1995
|
+
}
|
|
1996
|
+
checkbox({ checked: e }) {
|
|
1997
|
+
return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
|
|
1998
|
+
}
|
|
1999
|
+
paragraph({ tokens: e }) {
|
|
2000
|
+
return `<p>${this.parser.parseInline(e)}</p>
|
|
2001
|
+
`;
|
|
2002
|
+
}
|
|
2003
|
+
table(e) {
|
|
2004
|
+
let t = "", n = "";
|
|
2005
|
+
for (let i = 0; i < e.header.length; i++) n += this.tablecell(e.header[i]);
|
|
2006
|
+
t += this.tablerow({ text: n });
|
|
2007
|
+
let r = "";
|
|
2008
|
+
for (let i = 0; i < e.rows.length; i++) {
|
|
2009
|
+
let s = e.rows[i];
|
|
2010
|
+
n = "";
|
|
2011
|
+
for (let o2 = 0; o2 < s.length; o2++) n += this.tablecell(s[o2]);
|
|
2012
|
+
r += this.tablerow({ text: n });
|
|
2013
|
+
}
|
|
2014
|
+
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
2015
|
+
<thead>
|
|
2016
|
+
` + t + `</thead>
|
|
2017
|
+
` + r + `</table>
|
|
2018
|
+
`;
|
|
2019
|
+
}
|
|
2020
|
+
tablerow({ text: e }) {
|
|
2021
|
+
return `<tr>
|
|
2022
|
+
${e}</tr>
|
|
2023
|
+
`;
|
|
2024
|
+
}
|
|
2025
|
+
tablecell(e) {
|
|
2026
|
+
let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
|
|
2027
|
+
return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
|
|
2028
|
+
`;
|
|
2029
|
+
}
|
|
2030
|
+
strong({ tokens: e }) {
|
|
2031
|
+
return `<strong>${this.parser.parseInline(e)}</strong>`;
|
|
2032
|
+
}
|
|
2033
|
+
em({ tokens: e }) {
|
|
2034
|
+
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
2035
|
+
}
|
|
2036
|
+
codespan({ text: e }) {
|
|
2037
|
+
return `<code>${w(e, true)}</code>`;
|
|
2038
|
+
}
|
|
2039
|
+
br(e) {
|
|
2040
|
+
return "<br>";
|
|
2041
|
+
}
|
|
2042
|
+
del({ tokens: e }) {
|
|
2043
|
+
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
2044
|
+
}
|
|
2045
|
+
link({ href: e, title: t, tokens: n }) {
|
|
2046
|
+
let r = this.parser.parseInline(n), i = J(e);
|
|
2047
|
+
if (i === null) return r;
|
|
2048
|
+
e = i;
|
|
2049
|
+
let s = '<a href="' + e + '"';
|
|
2050
|
+
return t && (s += ' title="' + w(t) + '"'), s += ">" + r + "</a>", s;
|
|
2051
|
+
}
|
|
2052
|
+
image({ href: e, title: t, text: n, tokens: r }) {
|
|
2053
|
+
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
2054
|
+
let i = J(e);
|
|
2055
|
+
if (i === null) return w(n);
|
|
2056
|
+
e = i;
|
|
2057
|
+
let s = `<img src="${e}" alt="${n}"`;
|
|
2058
|
+
return t && (s += ` title="${w(t)}"`), s += ">", s;
|
|
2059
|
+
}
|
|
2060
|
+
text(e) {
|
|
2061
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : w(e.text);
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
var $ = class {
|
|
2065
|
+
strong({ text: e }) {
|
|
2066
|
+
return e;
|
|
2067
|
+
}
|
|
2068
|
+
em({ text: e }) {
|
|
2069
|
+
return e;
|
|
2070
|
+
}
|
|
2071
|
+
codespan({ text: e }) {
|
|
2072
|
+
return e;
|
|
2073
|
+
}
|
|
2074
|
+
del({ text: e }) {
|
|
2075
|
+
return e;
|
|
2076
|
+
}
|
|
2077
|
+
html({ text: e }) {
|
|
2078
|
+
return e;
|
|
2079
|
+
}
|
|
2080
|
+
text({ text: e }) {
|
|
2081
|
+
return e;
|
|
2082
|
+
}
|
|
2083
|
+
link({ text: e }) {
|
|
2084
|
+
return "" + e;
|
|
2085
|
+
}
|
|
2086
|
+
image({ text: e }) {
|
|
2087
|
+
return "" + e;
|
|
2088
|
+
}
|
|
2089
|
+
br() {
|
|
2090
|
+
return "";
|
|
2091
|
+
}
|
|
2092
|
+
};
|
|
2093
|
+
var b = class u2 {
|
|
2094
|
+
options;
|
|
2095
|
+
renderer;
|
|
2096
|
+
textRenderer;
|
|
2097
|
+
constructor(e) {
|
|
2098
|
+
this.options = e || 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 $();
|
|
2099
|
+
}
|
|
2100
|
+
static parse(e, t) {
|
|
2101
|
+
return new u2(t).parse(e);
|
|
2102
|
+
}
|
|
2103
|
+
static parseInline(e, t) {
|
|
2104
|
+
return new u2(t).parseInline(e);
|
|
2105
|
+
}
|
|
2106
|
+
parse(e, t = true) {
|
|
2107
|
+
let n = "";
|
|
2108
|
+
for (let r = 0; r < e.length; r++) {
|
|
2109
|
+
let i = e[r];
|
|
2110
|
+
if (this.options.extensions?.renderers?.[i.type]) {
|
|
2111
|
+
let o2 = i, a = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
|
|
2112
|
+
if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(o2.type)) {
|
|
2113
|
+
n += a || "";
|
|
2114
|
+
continue;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
let s = i;
|
|
2118
|
+
switch (s.type) {
|
|
2119
|
+
case "space": {
|
|
2120
|
+
n += this.renderer.space(s);
|
|
2121
|
+
continue;
|
|
2122
|
+
}
|
|
2123
|
+
case "hr": {
|
|
2124
|
+
n += this.renderer.hr(s);
|
|
2125
|
+
continue;
|
|
2126
|
+
}
|
|
2127
|
+
case "heading": {
|
|
2128
|
+
n += this.renderer.heading(s);
|
|
2129
|
+
continue;
|
|
2130
|
+
}
|
|
2131
|
+
case "code": {
|
|
2132
|
+
n += this.renderer.code(s);
|
|
2133
|
+
continue;
|
|
2134
|
+
}
|
|
2135
|
+
case "table": {
|
|
2136
|
+
n += this.renderer.table(s);
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
2139
|
+
case "blockquote": {
|
|
2140
|
+
n += this.renderer.blockquote(s);
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
case "list": {
|
|
2144
|
+
n += this.renderer.list(s);
|
|
2145
|
+
continue;
|
|
2146
|
+
}
|
|
2147
|
+
case "html": {
|
|
2148
|
+
n += this.renderer.html(s);
|
|
2149
|
+
continue;
|
|
2150
|
+
}
|
|
2151
|
+
case "def": {
|
|
2152
|
+
n += this.renderer.def(s);
|
|
2153
|
+
continue;
|
|
2154
|
+
}
|
|
2155
|
+
case "paragraph": {
|
|
2156
|
+
n += this.renderer.paragraph(s);
|
|
2157
|
+
continue;
|
|
2158
|
+
}
|
|
2159
|
+
case "text": {
|
|
2160
|
+
let o2 = s, a = this.renderer.text(o2);
|
|
2161
|
+
for (; r + 1 < e.length && e[r + 1].type === "text"; ) o2 = e[++r], a += `
|
|
2162
|
+
` + this.renderer.text(o2);
|
|
2163
|
+
t ? n += this.renderer.paragraph({ type: "paragraph", raw: a, text: a, tokens: [{ type: "text", raw: a, text: a, escaped: true }] }) : n += a;
|
|
2164
|
+
continue;
|
|
2165
|
+
}
|
|
2166
|
+
default: {
|
|
2167
|
+
let o2 = 'Token with "' + s.type + '" type was not found.';
|
|
2168
|
+
if (this.options.silent) return console.error(o2), "";
|
|
2169
|
+
throw new Error(o2);
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
return n;
|
|
2174
|
+
}
|
|
2175
|
+
parseInline(e, t = this.renderer) {
|
|
2176
|
+
let n = "";
|
|
2177
|
+
for (let r = 0; r < e.length; r++) {
|
|
2178
|
+
let i = e[r];
|
|
2179
|
+
if (this.options.extensions?.renderers?.[i.type]) {
|
|
2180
|
+
let o2 = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
2181
|
+
if (o2 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
2182
|
+
n += o2 || "";
|
|
2183
|
+
continue;
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
let s = i;
|
|
2187
|
+
switch (s.type) {
|
|
2188
|
+
case "escape": {
|
|
2189
|
+
n += t.text(s);
|
|
2190
|
+
break;
|
|
2191
|
+
}
|
|
2192
|
+
case "html": {
|
|
2193
|
+
n += t.html(s);
|
|
2194
|
+
break;
|
|
2195
|
+
}
|
|
2196
|
+
case "link": {
|
|
2197
|
+
n += t.link(s);
|
|
2198
|
+
break;
|
|
2199
|
+
}
|
|
2200
|
+
case "image": {
|
|
2201
|
+
n += t.image(s);
|
|
2202
|
+
break;
|
|
2203
|
+
}
|
|
2204
|
+
case "strong": {
|
|
2205
|
+
n += t.strong(s);
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2208
|
+
case "em": {
|
|
2209
|
+
n += t.em(s);
|
|
2210
|
+
break;
|
|
2211
|
+
}
|
|
2212
|
+
case "codespan": {
|
|
2213
|
+
n += t.codespan(s);
|
|
2214
|
+
break;
|
|
2215
|
+
}
|
|
2216
|
+
case "br": {
|
|
2217
|
+
n += t.br(s);
|
|
2218
|
+
break;
|
|
2219
|
+
}
|
|
2220
|
+
case "del": {
|
|
2221
|
+
n += t.del(s);
|
|
2222
|
+
break;
|
|
2223
|
+
}
|
|
2224
|
+
case "text": {
|
|
2225
|
+
n += t.text(s);
|
|
2226
|
+
break;
|
|
2227
|
+
}
|
|
2228
|
+
default: {
|
|
2229
|
+
let o2 = 'Token with "' + s.type + '" type was not found.';
|
|
2230
|
+
if (this.options.silent) return console.error(o2), "";
|
|
2231
|
+
throw new Error(o2);
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
return n;
|
|
2236
|
+
}
|
|
2237
|
+
};
|
|
2238
|
+
var S = class {
|
|
2239
|
+
options;
|
|
2240
|
+
block;
|
|
2241
|
+
constructor(e) {
|
|
2242
|
+
this.options = e || T;
|
|
2243
|
+
}
|
|
2244
|
+
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
2245
|
+
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
2246
|
+
preprocess(e) {
|
|
2247
|
+
return e;
|
|
2248
|
+
}
|
|
2249
|
+
postprocess(e) {
|
|
2250
|
+
return e;
|
|
2251
|
+
}
|
|
2252
|
+
processAllTokens(e) {
|
|
2253
|
+
return e;
|
|
2254
|
+
}
|
|
2255
|
+
emStrongMask(e) {
|
|
2256
|
+
return e;
|
|
2257
|
+
}
|
|
2258
|
+
provideLexer() {
|
|
2259
|
+
return this.block ? x.lex : x.lexInline;
|
|
2260
|
+
}
|
|
2261
|
+
provideParser() {
|
|
2262
|
+
return this.block ? b.parse : b.parseInline;
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2265
|
+
var B = class {
|
|
2266
|
+
defaults = L();
|
|
2267
|
+
options = this.setOptions;
|
|
2268
|
+
parse = this.parseMarkdown(true);
|
|
2269
|
+
parseInline = this.parseMarkdown(false);
|
|
2270
|
+
Parser = b;
|
|
2271
|
+
Renderer = P;
|
|
2272
|
+
TextRenderer = $;
|
|
2273
|
+
Lexer = x;
|
|
2274
|
+
Tokenizer = y;
|
|
2275
|
+
Hooks = S;
|
|
2276
|
+
constructor(...e) {
|
|
2277
|
+
this.use(...e);
|
|
2278
|
+
}
|
|
2279
|
+
walkTokens(e, t) {
|
|
2280
|
+
let n = [];
|
|
2281
|
+
for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
|
|
2282
|
+
case "table": {
|
|
2283
|
+
let i = r;
|
|
2284
|
+
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
2285
|
+
for (let s of i.rows) for (let o2 of s) n = n.concat(this.walkTokens(o2.tokens, t));
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2288
|
+
case "list": {
|
|
2289
|
+
let i = r;
|
|
2290
|
+
n = n.concat(this.walkTokens(i.items, t));
|
|
2291
|
+
break;
|
|
2292
|
+
}
|
|
2293
|
+
default: {
|
|
2294
|
+
let i = r;
|
|
2295
|
+
this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
2296
|
+
let o2 = i[s].flat(1 / 0);
|
|
2297
|
+
n = n.concat(this.walkTokens(o2, t));
|
|
2298
|
+
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
return n;
|
|
2302
|
+
}
|
|
2303
|
+
use(...e) {
|
|
2304
|
+
let t = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
2305
|
+
return e.forEach((n) => {
|
|
2306
|
+
let r = { ...n };
|
|
2307
|
+
if (r.async = this.defaults.async || r.async || false, n.extensions && (n.extensions.forEach((i) => {
|
|
2308
|
+
if (!i.name) throw new Error("extension name required");
|
|
2309
|
+
if ("renderer" in i) {
|
|
2310
|
+
let s = t.renderers[i.name];
|
|
2311
|
+
s ? t.renderers[i.name] = function(...o2) {
|
|
2312
|
+
let a = i.renderer.apply(this, o2);
|
|
2313
|
+
return a === false && (a = s.apply(this, o2)), a;
|
|
2314
|
+
} : t.renderers[i.name] = i.renderer;
|
|
2315
|
+
}
|
|
2316
|
+
if ("tokenizer" in i) {
|
|
2317
|
+
if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
|
|
2318
|
+
let s = t[i.level];
|
|
2319
|
+
s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
|
|
2320
|
+
}
|
|
2321
|
+
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
2322
|
+
}), r.extensions = t), n.renderer) {
|
|
2323
|
+
let i = this.defaults.renderer || new P(this.defaults);
|
|
2324
|
+
for (let s in n.renderer) {
|
|
2325
|
+
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
2326
|
+
if (["options", "parser"].includes(s)) continue;
|
|
2327
|
+
let o2 = s, a = n.renderer[o2], l = i[o2];
|
|
2328
|
+
i[o2] = (...c) => {
|
|
2329
|
+
let p2 = a.apply(i, c);
|
|
2330
|
+
return p2 === false && (p2 = l.apply(i, c)), p2 || "";
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
r.renderer = i;
|
|
2334
|
+
}
|
|
2335
|
+
if (n.tokenizer) {
|
|
2336
|
+
let i = this.defaults.tokenizer || new y(this.defaults);
|
|
2337
|
+
for (let s in n.tokenizer) {
|
|
2338
|
+
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
2339
|
+
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
2340
|
+
let o2 = s, a = n.tokenizer[o2], l = i[o2];
|
|
2341
|
+
i[o2] = (...c) => {
|
|
2342
|
+
let p2 = a.apply(i, c);
|
|
2343
|
+
return p2 === false && (p2 = l.apply(i, c)), p2;
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
r.tokenizer = i;
|
|
2347
|
+
}
|
|
2348
|
+
if (n.hooks) {
|
|
2349
|
+
let i = this.defaults.hooks || new S();
|
|
2350
|
+
for (let s in n.hooks) {
|
|
2351
|
+
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
2352
|
+
if (["options", "block"].includes(s)) continue;
|
|
2353
|
+
let o2 = s, a = n.hooks[o2], l = i[o2];
|
|
2354
|
+
S.passThroughHooks.has(s) ? i[o2] = (c) => {
|
|
2355
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
2356
|
+
let g2 = await a.call(i, c);
|
|
2357
|
+
return l.call(i, g2);
|
|
2358
|
+
})();
|
|
2359
|
+
let p2 = a.call(i, c);
|
|
2360
|
+
return l.call(i, p2);
|
|
2361
|
+
} : i[o2] = (...c) => {
|
|
2362
|
+
if (this.defaults.async) return (async () => {
|
|
2363
|
+
let g2 = await a.apply(i, c);
|
|
2364
|
+
return g2 === false && (g2 = await l.apply(i, c)), g2;
|
|
2365
|
+
})();
|
|
2366
|
+
let p2 = a.apply(i, c);
|
|
2367
|
+
return p2 === false && (p2 = l.apply(i, c)), p2;
|
|
2368
|
+
};
|
|
2369
|
+
}
|
|
2370
|
+
r.hooks = i;
|
|
2371
|
+
}
|
|
2372
|
+
if (n.walkTokens) {
|
|
2373
|
+
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
2374
|
+
r.walkTokens = function(o2) {
|
|
2375
|
+
let a = [];
|
|
2376
|
+
return a.push(s.call(this, o2)), i && (a = a.concat(i.call(this, o2))), a;
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
this.defaults = { ...this.defaults, ...r };
|
|
2380
|
+
}), this;
|
|
2381
|
+
}
|
|
2382
|
+
setOptions(e) {
|
|
2383
|
+
return this.defaults = { ...this.defaults, ...e }, this;
|
|
2384
|
+
}
|
|
2385
|
+
lexer(e, t) {
|
|
2386
|
+
return x.lex(e, t ?? this.defaults);
|
|
2387
|
+
}
|
|
2388
|
+
parser(e, t) {
|
|
2389
|
+
return b.parse(e, t ?? this.defaults);
|
|
2390
|
+
}
|
|
2391
|
+
parseMarkdown(e) {
|
|
2392
|
+
return (n, r) => {
|
|
2393
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, o2 = this.onError(!!s.silent, !!s.async);
|
|
2394
|
+
if (this.defaults.async === true && i.async === false) return o2(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."));
|
|
2395
|
+
if (typeof n > "u" || n === null) return o2(new Error("marked(): input parameter is undefined or null"));
|
|
2396
|
+
if (typeof n != "string") return o2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
2397
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
2398
|
+
let a = s.hooks ? await s.hooks.preprocess(n) : n, c = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s), p2 = s.hooks ? await s.hooks.processAllTokens(c) : c;
|
|
2399
|
+
s.walkTokens && await Promise.all(this.walkTokens(p2, s.walkTokens));
|
|
2400
|
+
let d = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p2, s);
|
|
2401
|
+
return s.hooks ? await s.hooks.postprocess(d) : d;
|
|
2402
|
+
})().catch(o2);
|
|
2403
|
+
try {
|
|
2404
|
+
s.hooks && (n = s.hooks.preprocess(n));
|
|
2405
|
+
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
2406
|
+
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
2407
|
+
let p2 = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
2408
|
+
return s.hooks && (p2 = s.hooks.postprocess(p2)), p2;
|
|
2409
|
+
} catch (a) {
|
|
2410
|
+
return o2(a);
|
|
2411
|
+
}
|
|
2412
|
+
};
|
|
2413
|
+
}
|
|
2414
|
+
onError(e, t) {
|
|
2415
|
+
return (n) => {
|
|
2416
|
+
if (n.message += `
|
|
2417
|
+
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
2418
|
+
let r = "<p>An error occurred:</p><pre>" + w(n.message + "", true) + "</pre>";
|
|
2419
|
+
return t ? Promise.resolve(r) : r;
|
|
2420
|
+
}
|
|
2421
|
+
if (t) return Promise.reject(n);
|
|
2422
|
+
throw n;
|
|
2423
|
+
};
|
|
2424
|
+
}
|
|
2425
|
+
};
|
|
2426
|
+
var _ = new B();
|
|
2427
|
+
function k(u3, e) {
|
|
2428
|
+
return _.parse(u3, e);
|
|
2429
|
+
}
|
|
2430
|
+
k.options = k.setOptions = function(u3) {
|
|
2431
|
+
return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
|
|
2432
|
+
};
|
|
2433
|
+
k.getDefaults = L;
|
|
2434
|
+
k.defaults = T;
|
|
2435
|
+
k.use = function(...u3) {
|
|
2436
|
+
return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
|
|
2437
|
+
};
|
|
2438
|
+
k.walkTokens = function(u3, e) {
|
|
2439
|
+
return _.walkTokens(u3, e);
|
|
2440
|
+
};
|
|
2441
|
+
k.parseInline = _.parseInline;
|
|
2442
|
+
k.Parser = b;
|
|
2443
|
+
k.parser = b.parse;
|
|
2444
|
+
k.Renderer = P;
|
|
2445
|
+
k.TextRenderer = $;
|
|
2446
|
+
k.Lexer = x;
|
|
2447
|
+
k.lexer = x.lex;
|
|
2448
|
+
k.Tokenizer = y;
|
|
2449
|
+
k.Hooks = S;
|
|
2450
|
+
k.parse = k;
|
|
2451
|
+
k.options;
|
|
2452
|
+
k.setOptions;
|
|
2453
|
+
k.use;
|
|
2454
|
+
k.walkTokens;
|
|
2455
|
+
k.parseInline;
|
|
2456
|
+
b.parse;
|
|
2457
|
+
x.lex;
|
|
1372
2458
|
const ListContainer = dt.ul`
|
|
1373
2459
|
padding-left: 20px;
|
|
1374
2460
|
line-height: 16px;
|
|
@@ -1385,7 +2471,7 @@ const List$1 = ({ items }) => {
|
|
|
1385
2471
|
return null;
|
|
1386
2472
|
}
|
|
1387
2473
|
return /* @__PURE__ */ jsx(ListContainer, { children: items.map((item, index) => {
|
|
1388
|
-
const htmlContent =
|
|
2474
|
+
const htmlContent = k.parseInline(item, { breaks: true });
|
|
1389
2475
|
return /* @__PURE__ */ jsx("li", { dangerouslySetInnerHTML: { __html: htmlContent } }, index);
|
|
1390
2476
|
}) });
|
|
1391
2477
|
};
|
|
@@ -1444,7 +2530,7 @@ const Experience = ({
|
|
|
1444
2530
|
summary,
|
|
1445
2531
|
highlights
|
|
1446
2532
|
}) => {
|
|
1447
|
-
const htmlSummary = summary ?
|
|
2533
|
+
const htmlSummary = summary ? k.parse(summary, { breaks: true }) : "";
|
|
1448
2534
|
return /* @__PURE__ */ jsxs(Container$1, { children: [
|
|
1449
2535
|
/* @__PURE__ */ jsxs(Meta, { children: [
|
|
1450
2536
|
/* @__PURE__ */ jsx(Title$1, { children: title }),
|
|
@@ -1555,7 +2641,7 @@ const HeroComponent = ({ basics }) => {
|
|
|
1555
2641
|
const Summary = dt.div``;
|
|
1556
2642
|
const SummaryComponent = ({ basics }) => {
|
|
1557
2643
|
const { summary } = basics;
|
|
1558
|
-
const htmlContent = summary ?
|
|
2644
|
+
const htmlContent = summary ? k.parse(summary, { breaks: true }) : "";
|
|
1559
2645
|
return /* @__PURE__ */ jsx(SectionComponent, { children: /* @__PURE__ */ jsx("div", { className: "secondary", children: /* @__PURE__ */ jsx(Summary, { dangerouslySetInnerHTML: { __html: htmlContent } }) }) });
|
|
1560
2646
|
};
|
|
1561
2647
|
const Education = ({ education }) => {
|