@storybook/core
Version:
Storybook framework-agnostic API
1,630 lines (1,586 loc) • 942 kB
JavaScript
var I7 = Object.create;
var ui = Object.defineProperty;
var B7 = Object.getOwnPropertyDescriptor;
var M7 = Object.getOwnPropertyNames;
var _7 = Object.getPrototypeOf, P7 = Object.prototype.hasOwnProperty;
var a = (e, t) => ui(e, "name", { value: t, configurable: !0 }), ca = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
"u" ? new Proxy(e, {
get: (t, r) => (typeof require < "u" ? require : t)[r]
}) : e)(function(e) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + e + '" is not supported');
});
var S = (e, t) => () => (e && (t = e(e = 0)), t);
var M = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), hn = (e, t) => {
for (var r in t)
ui(e, r, { get: t[r], enumerable: !0 });
}, H7 = (e, t, r, n) => {
if (t && typeof t == "object" || typeof t == "function")
for (let o of M7(t))
!P7.call(e, o) && o !== r && ui(e, o, { get: () => t[o], enumerable: !(n = B7(t, o)) || n.enumerable });
return e;
};
var Re = (e, t, r) => (r = e != null ? I7(_7(e)) : {}, H7(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? ui(r, "default", { value: e, enumerable: !0 }) : r,
e
));
// ../node_modules/@babel/runtime/helpers/esm/extends.js
function be() {
return be = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, be.apply(null, arguments);
}
var pa = S(() => {
a(be, "_extends");
});
// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function Lp(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
var Tp = S(() => {
a(Lp, "_assertThisInitialized");
});
// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function er(e, t) {
return er = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
return r.__proto__ = n, r;
}, er(e, t);
}
var ci = S(() => {
a(er, "_setPrototypeOf");
});
// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function pi(e) {
return pi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, pi(e);
}
var Bp = S(() => {
a(pi, "_getPrototypeOf");
});
// ../node_modules/@storybook/global/dist/index.mjs
var mn, hi = S(() => {
mn = (() => {
let e;
return typeof window < "u" ? e = window : typeof globalThis < "u" ? e = globalThis : typeof global < "u" ? e = global : typeof self < "u" ?
e = self : e = {}, e;
})();
});
// ../node_modules/memoizerific/memoizerific.js
var ha = M((Vp, As) => {
(function(e) {
if (typeof Vp == "object" && typeof As < "u")
As.exports = e();
else if (typeof define == "function" && define.amd)
define([], e);
else {
var t;
typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = this, t.memoizerific = e();
}
})(function() {
var e, t, r;
return (/* @__PURE__ */ a(function n(o, i, l) {
function s(d, h) {
if (!i[d]) {
if (!o[d]) {
var f = typeof ca == "function" && ca;
if (!h && f) return f(d, !0);
if (c) return c(d, !0);
var g = new Error("Cannot find module '" + d + "'");
throw g.code = "MODULE_NOT_FOUND", g;
}
var w = i[d] = { exports: {} };
o[d][0].call(w.exports, function(m) {
var v = o[d][1][m];
return s(v || m);
}, w, w.exports, n, o, i, l);
}
return i[d].exports;
}
a(s, "s");
for (var c = typeof ca == "function" && ca, p = 0; p < l.length; p++) s(l[p]);
return s;
}, "e"))({ 1: [function(n, o, i) {
o.exports = function(l) {
if (typeof Map != "function" || l) {
var s = n("./similar");
return new s();
} else
return /* @__PURE__ */ new Map();
};
}, { "./similar": 2 }], 2: [function(n, o, i) {
function l() {
return this.list = [], this.lastItem = void 0, this.size = 0, this;
}
a(l, "Similar"), l.prototype.get = function(s) {
var c;
if (this.lastItem && this.isEqual(this.lastItem.key, s))
return this.lastItem.val;
if (c = this.indexOf(s), c >= 0)
return this.lastItem = this.list[c], this.list[c].val;
}, l.prototype.set = function(s, c) {
var p;
return this.lastItem && this.isEqual(this.lastItem.key, s) ? (this.lastItem.val = c, this) : (p = this.indexOf(s), p >= 0 ? (this.lastItem =
this.list[p], this.list[p].val = c, this) : (this.lastItem = { key: s, val: c }, this.list.push(this.lastItem), this.size++, this));
}, l.prototype.delete = function(s) {
var c;
if (this.lastItem && this.isEqual(this.lastItem.key, s) && (this.lastItem = void 0), c = this.indexOf(s), c >= 0)
return this.size--, this.list.splice(c, 1)[0];
}, l.prototype.has = function(s) {
var c;
return this.lastItem && this.isEqual(this.lastItem.key, s) ? !0 : (c = this.indexOf(s), c >= 0 ? (this.lastItem = this.list[c], !0) :
!1);
}, l.prototype.forEach = function(s, c) {
var p;
for (p = 0; p < this.size; p++)
s.call(c || this, this.list[p].val, this.list[p].key, this);
}, l.prototype.indexOf = function(s) {
var c;
for (c = 0; c < this.size; c++)
if (this.isEqual(this.list[c].key, s))
return c;
return -1;
}, l.prototype.isEqual = function(s, c) {
return s === c || s !== s && c !== c;
}, o.exports = l;
}, {}], 3: [function(n, o, i) {
var l = n("map-or-similar");
o.exports = function(d) {
var h = new l(!1), f = [];
return function(g) {
var w = /* @__PURE__ */ a(function() {
var m = h, v, y, b = arguments.length - 1, D = Array(b + 1), x = !0, C;
if ((w.numArgs || w.numArgs === 0) && w.numArgs !== b + 1)
throw new Error("Memoizerific functions should always be called with the same number of arguments");
for (C = 0; C < b; C++) {
if (D[C] = {
cacheItem: m,
arg: arguments[C]
}, m.has(arguments[C])) {
m = m.get(arguments[C]);
continue;
}
x = !1, v = new l(!1), m.set(arguments[C], v), m = v;
}
return x && (m.has(arguments[b]) ? y = m.get(arguments[b]) : x = !1), x || (y = g.apply(null, arguments), m.set(arguments[b], y)),
d > 0 && (D[b] = {
cacheItem: m,
arg: arguments[b]
}, x ? s(f, D) : f.push(D), f.length > d && c(f.shift())), w.wasMemoized = x, w.numArgs = b + 1, y;
}, "memoizerific");
return w.limit = d, w.wasMemoized = !1, w.cache = h, w.lru = f, w;
};
};
function s(d, h) {
var f = d.length, g = h.length, w, m, v;
for (m = 0; m < f; m++) {
for (w = !0, v = 0; v < g; v++)
if (!p(d[m][v].arg, h[v].arg)) {
w = !1;
break;
}
if (w)
break;
}
d.push(d.splice(m, 1)[0]);
}
a(s, "moveToMostRecentLru");
function c(d) {
var h = d.length, f = d[h - 1], g, w;
for (f.cacheItem.delete(f.arg), w = h - 2; w >= 0 && (f = d[w], g = f.cacheItem.get(f.arg), !g || !g.size); w--)
f.cacheItem.delete(f.arg);
}
a(c, "removeCachedResult");
function p(d, h) {
return d === h || d !== d && h !== h;
}
a(p, "isEqual");
}, { "map-or-similar": 1 }] }, {}, [3])(3);
});
});
// ../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function gn(e, t) {
if (e == null) return {};
var r = {};
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
if (t.indexOf(n) >= 0) continue;
r[n] = e[n];
}
return r;
}
var mi = S(() => {
a(gn, "_objectWithoutPropertiesLoose");
});
// ../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
function jp(e, t) {
if (e == null) return {};
var r, n, o = gn(e, t);
if (Object.getOwnPropertySymbols) {
var i = Object.getOwnPropertySymbols(e);
for (n = 0; n < i.length; n++) r = i[n], t.indexOf(r) >= 0 || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
}
return o;
}
var Wp = S(() => {
mi();
a(jp, "_objectWithoutProperties");
});
// ../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function ma(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
return n;
}
var Fs = S(() => {
a(ma, "_arrayLikeToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function qp(e) {
if (Array.isArray(e)) return ma(e);
}
var Up = S(() => {
Fs();
a(qp, "_arrayWithoutHoles");
});
// ../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function Gp(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
var Yp = S(() => {
a(Gp, "_iterableToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
function Xp(e, t) {
if (e) {
if (typeof e == "string") return ma(e, t);
var r = {}.toString.call(e).slice(8, -1);
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.
test(r) ? ma(e, t) : void 0;
}
}
var Zp = S(() => {
Fs();
a(Xp, "_unsupportedIterableToArray");
});
// ../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function Kp() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var Jp = S(() => {
a(Kp, "_nonIterableSpread");
});
// ../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function Qp(e) {
return qp(e) || Gp(e) || Xp(e) || Kp();
}
var ed = S(() => {
Up();
Yp();
Zp();
Jp();
a(Qp, "_toConsumableArray");
});
// ../node_modules/@babel/runtime/helpers/esm/typeof.js
function Sr(e) {
"@babel/helpers - typeof";
return Sr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
return typeof t;
} : function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, Sr(e);
}
var ks = S(() => {
a(Sr, "_typeof");
});
// ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function td(e, t) {
if (Sr(e) != "object" || !e) return e;
var r = e[Symbol.toPrimitive];
if (r !== void 0) {
var n = r.call(e, t || "default");
if (Sr(n) != "object") return n;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
var rd = S(() => {
ks();
a(td, "toPrimitive");
});
// ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function nd(e) {
var t = td(e, "string");
return Sr(t) == "symbol" ? t : t + "";
}
var od = S(() => {
ks();
rd();
a(nd, "toPropertyKey");
});
// ../node_modules/@babel/runtime/helpers/esm/defineProperty.js
function gi(e, t, r) {
return (t = nd(t)) in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e;
}
var Ls = S(() => {
od();
a(gi, "_defineProperty");
});
// ../node_modules/react-syntax-highlighter/dist/esm/create-element.js
import hw from "react";
function ad(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function(o) {
return Object.getOwnPropertyDescriptor(e, o).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function vn(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? ad(Object(r), !0).forEach(function(n) {
gi(e, n, r[n]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ad(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
});
}
return e;
}
function mw(e) {
var t = e.length;
if (t === 0 || t === 1) return e;
if (t === 2)
return [e[0], e[1], "".concat(e[0], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0])];
if (t === 3)
return [e[0], e[1], e[2], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0]), "".concat(
e[1], ".").concat(e[2]), "".concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(
e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0])];
if (t >= 4)
return [e[0], e[1], e[2], e[3], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[0], ".").concat(e[3]),
"".concat(e[1], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2]), "".concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[0]),
"".concat(e[2], ".").concat(e[1]), "".concat(e[2], ".").concat(e[3]), "".concat(e[3], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1]),
"".concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[3]),
"".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(e[3],
".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1],
".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2], ".").concat(
e[3]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[2], ".").concat(
e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0]), "".concat(
e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(
e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(
e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(
e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[0], ".").concat(
e[2], ".").concat(e[3], ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(
e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[1], ".").concat(
e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(
e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(
e[0], ".").concat(e[3], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(
e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(
e[3], ".").concat(e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[3], ".").concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(
e[2], ".").concat(e[1], ".").concat(e[0])];
}
function gw(e) {
if (e.length === 0 || e.length === 1) return e;
var t = e.join(".");
return Ts[t] || (Ts[t] = mw(e)), Ts[t];
}
function vw(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 ? arguments[2] : void 0, n = e.filter(
function(i) {
return i !== "token";
}), o = gw(n);
return o.reduce(function(i, l) {
return vn(vn({}, i), r[l]);
}, t);
}
function id(e) {
return e.join(" ");
}
function ww(e, t) {
var r = 0;
return function(n) {
return r += 1, n.map(function(o, i) {
return Ar({
node: o,
stylesheet: e,
useInlineStyles: t,
key: "code-segment-".concat(r, "-").concat(i)
});
});
};
}
function Ar(e) {
var t = e.node, r = e.stylesheet, n = e.style, o = n === void 0 ? {} : n, i = e.useInlineStyles, l = e.key, s = t.properties, c = t.type, p = t.
tagName, d = t.value;
if (c === "text")
return d;
if (p) {
var h = ww(r, i), f;
if (!i)
f = vn(vn({}, s), {}, {
className: id(s.className)
});
else {
var g = Object.keys(r).reduce(function(y, b) {
return b.split(".").forEach(function(D) {
y.includes(D) || y.push(D);
}), y;
}, []), w = s.className && s.className.includes("token") ? ["token"] : [], m = s.className && w.concat(s.className.filter(function(y) {
return !g.includes(y);
}));
f = vn(vn({}, s), {}, {
className: id(m) || void 0,
style: vw(s.className, Object.assign({}, s.style, o), r)
});
}
var v = h(t.children);
return /* @__PURE__ */ hw.createElement(p, be({
key: l
}, f), v);
}
}
var Ts, Is = S(() => {
pa();
Ls();
a(ad, "ownKeys");
a(vn, "_objectSpread");
a(mw, "powerSetPermutations");
Ts = {};
a(gw, "getClassNameCombinations");
a(vw, "createStyleObject");
a(id, "createClassNameString");
a(ww, "createChildren");
a(Ar, "createElement");
});
// ../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js
var ld, sd = S(() => {
ld = /* @__PURE__ */ a(function(e, t) {
var r = e.listLanguages();
return r.indexOf(t) !== -1;
}, "default");
});
// ../node_modules/react-syntax-highlighter/dist/esm/highlight.js
import Fr from "react";
function ud(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function(o) {
return Object.getOwnPropertyDescriptor(e, o).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function Et(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t] != null ? arguments[t] : {};
t % 2 ? ud(Object(r), !0).forEach(function(n) {
gi(e, n, r[n]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ud(Object(r)).forEach(function(n) {
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
});
}
return e;
}
function Dw(e) {
return e.match(yw);
}
function xw(e) {
var t = e.lines, r = e.startingLineNumber, n = e.style;
return t.map(function(o, i) {
var l = i + r;
return /* @__PURE__ */ Fr.createElement("span", {
key: "line-".concat(i),
className: "react-syntax-highlighter-line-number",
style: typeof n == "function" ? n(l) : n
}, "".concat(l, `
`));
});
}
function Cw(e) {
var t = e.codeString, r = e.codeStyle, n = e.containerStyle, o = n === void 0 ? {
float: "left",
paddingRight: "10px"
} : n, i = e.numberStyle, l = i === void 0 ? {} : i, s = e.startingLineNumber;
return /* @__PURE__ */ Fr.createElement("code", {
style: Object.assign({}, r, o)
}, xw({
lines: t.replace(/\n$/, "").split(`
`),
style: l,
startingLineNumber: s
}));
}
function Ew(e) {
return "".concat(e.toString().length, ".25em");
}
function cd(e, t) {
return {
type: "element",
tagName: "span",
properties: {
key: "line-number--".concat(e),
className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
style: t
},
children: [{
type: "text",
value: e
}]
};
}
function pd(e, t, r) {
var n = {
display: "inline-block",
minWidth: Ew(r),
paddingRight: "1em",
textAlign: "right",
userSelect: "none"
}, o = typeof e == "function" ? e(t) : e, i = Et(Et({}, n), o);
return i;
}
function vi(e) {
var t = e.children, r = e.lineNumber, n = e.lineNumberStyle, o = e.largestLineNumber, i = e.showInlineLineNumbers, l = e.lineProps, s = l ===
void 0 ? {} : l, c = e.className, p = c === void 0 ? [] : c, d = e.showLineNumbers, h = e.wrapLongLines, f = typeof s == "function" ? s(r) :
s;
if (f.className = p, r && i) {
var g = pd(n, r, o);
t.unshift(cd(r, g));
}
return h & d && (f.style = Et(Et({}, f.style), {}, {
display: "flex"
})), {
type: "element",
tagName: "span",
properties: f,
children: t
};
}
function dd(e) {
for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
[], n = 0; n < e.length; n++) {
var o = e[n];
if (o.type === "text")
r.push(vi({
children: [o],
className: Qp(new Set(t))
}));
else if (o.children) {
var i = t.concat(o.properties.className);
dd(o.children, i).forEach(function(l) {
return r.push(l);
});
}
}
return r;
}
function Rw(e, t, r, n, o, i, l, s, c) {
var p, d = dd(e.value), h = [], f = -1, g = 0;
function w(C, E) {
var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
return vi({
children: C,
lineNumber: E,
lineNumberStyle: s,
largestLineNumber: l,
showInlineLineNumbers: o,
lineProps: r,
className: R,
showLineNumbers: n,
wrapLongLines: c
});
}
a(w, "createWrappedLine");
function m(C, E) {
if (n && E && o) {
var R = pd(s, E, l);
C.unshift(cd(E, R));
}
return C;
}
a(m, "createUnwrappedLine");
function v(C, E) {
var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
return t || R.length > 0 ? w(C, E, R) : m(C, E);
}
a(v, "createLine");
for (var y = /* @__PURE__ */ a(function() {
var E = d[g], R = E.children[0].value, F = Dw(R);
if (F) {
var A = R.split(`
`);
A.forEach(function(k, B) {
var j = n && h.length + i, V = {
type: "text",
value: "".concat(k, `
`)
};
if (B === 0) {
var ee = d.slice(f + 1, g).concat(vi({
children: [V],
className: E.properties.className
})), I = v(ee, j);
h.push(I);
} else if (B === A.length - 1) {
var T = d[g + 1] && d[g + 1].children && d[g + 1].children[0], P = {
type: "text",
value: "".concat(k)
};
if (T) {
var q = vi({
children: [P],
className: E.properties.className
});
d.splice(g + 1, 0, q);
} else {
var $ = [P], U = v($, j, E.properties.className);
h.push(U);
}
} else {
var H = [V], X = v(H, j, E.properties.className);
h.push(X);
}
}), f = g;
}
g++;
}, "_loop"); g < d.length; )
y();
if (f !== d.length - 1) {
var b = d.slice(f + 1, d.length);
if (b && b.length) {
var D = n && h.length + i, x = v(b, D);
h.push(x);
}
}
return t ? h : (p = []).concat.apply(p, h);
}
function Sw(e) {
var t = e.rows, r = e.stylesheet, n = e.useInlineStyles;
return t.map(function(o, i) {
return Ar({
node: o,
stylesheet: r,
useInlineStyles: n,
key: "code-segement".concat(i)
});
});
}
function fd(e) {
return e && typeof e.highlightAuto < "u";
}
function Aw(e) {
var t = e.astGenerator, r = e.language, n = e.code, o = e.defaultCodeValue;
if (fd(t)) {
var i = ld(t, r);
return r === "text" ? {
value: o,
language: "text"
} : i ? t.highlight(r, n) : t.highlightAuto(n);
}
try {
return r && r !== "text" ? {
value: t.highlight(n, r)
} : {
value: o
};
} catch {
return {
value: o
};
}
}
function Bs(e, t) {
return /* @__PURE__ */ a(function(n) {
var o = n.language, i = n.children, l = n.style, s = l === void 0 ? t : l, c = n.customStyle, p = c === void 0 ? {} : c, d = n.codeTagProps,
h = d === void 0 ? {
className: o ? "language-".concat(o) : void 0,
style: Et(Et({}, s['code[class*="language-"]']), s['code[class*="language-'.concat(o, '"]')])
} : d, f = n.useInlineStyles, g = f === void 0 ? !0 : f, w = n.showLineNumbers, m = w === void 0 ? !1 : w, v = n.showInlineLineNumbers, y = v ===
void 0 ? !0 : v, b = n.startingLineNumber, D = b === void 0 ? 1 : b, x = n.lineNumberContainerStyle, C = n.lineNumberStyle, E = C === void 0 ?
{} : C, R = n.wrapLines, F = n.wrapLongLines, A = F === void 0 ? !1 : F, k = n.lineProps, B = k === void 0 ? {} : k, j = n.renderer, V = n.
PreTag, ee = V === void 0 ? "pre" : V, I = n.CodeTag, T = I === void 0 ? "code" : I, P = n.code, q = P === void 0 ? (Array.isArray(i) ? i[0] :
i) || "" : P, $ = n.astGenerator, U = jp(n, bw);
$ = $ || e;
var H = m ? /* @__PURE__ */ Fr.createElement(Cw, {
containerStyle: x,
codeStyle: h.style || {},
numberStyle: E,
startingLineNumber: D,
codeString: q
}) : null, X = s.hljs || s['pre[class*="language-"]'] || {
backgroundColor: "#fff"
}, He = fd($) ? "hljs" : "prismjs", Ee = g ? Object.assign({}, U, {
style: Object.assign({}, X, p)
}) : Object.assign({}, U, {
className: U.className ? "".concat(He, " ").concat(U.className) : He,
style: Object.assign({}, p)
});
if (A ? h.style = Et(Et({}, h.style), {}, {
whiteSpace: "pre-wrap"
}) : h.style = Et(Et({}, h.style), {}, {
whiteSpace: "pre"
}), !$)
return /* @__PURE__ */ Fr.createElement(ee, Ee, H, /* @__PURE__ */ Fr.createElement(T, h, q));
(R === void 0 && j || A) && (R = !0), j = j || Sw;
var we = [{
type: "text",
value: q
}], ke = Aw({
astGenerator: $,
language: o,
code: q,
defaultCodeValue: we
});
ke.language === null && (ke.value = we);
var ze = ke.value.length + D, Oe = Rw(ke, R, B, m, y, D, ze, E, A);
return /* @__PURE__ */ Fr.createElement(ee, Ee, /* @__PURE__ */ Fr.createElement(T, h, !y && H, j({
rows: Oe,
stylesheet: s,
useInlineStyles: g
})));
}, "SyntaxHighlighter");
}
var bw, yw, hd = S(() => {
Wp();
ed();
Ls();
Is();
sd();
bw = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "star\
tingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "\
code", "astGenerator"];
a(ud, "ownKeys");
a(Et, "_objectSpread");
yw = /\n/g;
a(Dw, "getNewLines");
a(xw, "getAllLineNumbers");
a(Cw, "AllLineNumbers");
a(Ew, "getEmWidthOfNumber");
a(cd, "getInlineLineNumber");
a(pd, "assembleLineNumberStyles");
a(vi, "createLineElement");
a(dd, "flattenCodeTree");
a(Rw, "processLines");
a(Sw, "defaultRenderer");
a(fd, "isHighlightJs");
a(Aw, "getCodeTree");
a(Bs, "default");
});
// ../node_modules/xtend/immutable.js
var gd = M((Mz, md) => {
md.exports = kw;
var Fw = Object.prototype.hasOwnProperty;
function kw() {
for (var e = {}, t = 0; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r)
Fw.call(r, n) && (e[n] = r[n]);
}
return e;
}
a(kw, "extend");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/schema.js
var _s = M((Pz, wd) => {
"use strict";
wd.exports = vd;
var Ms = vd.prototype;
Ms.space = null;
Ms.normal = {};
Ms.property = {};
function vd(e, t, r) {
this.property = e, this.normal = t, r && (this.space = r);
}
a(vd, "Schema");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/merge.js
var Dd = M((zz, yd) => {
"use strict";
var bd = gd(), Lw = _s();
yd.exports = Tw;
function Tw(e) {
for (var t = e.length, r = [], n = [], o = -1, i, l; ++o < t; )
i = e[o], r.push(i.property), n.push(i.normal), l = i.space;
return new Lw(
bd.apply(null, r),
bd.apply(null, n),
l
);
}
a(Tw, "merge");
});
// ../node_modules/hastscript/node_modules/property-information/normalize.js
var wi = M((Nz, xd) => {
"use strict";
xd.exports = Iw;
function Iw(e) {
return e.toLowerCase();
}
a(Iw, "normalize");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/info.js
var Ps = M((Vz, Ed) => {
"use strict";
Ed.exports = Cd;
var Qe = Cd.prototype;
Qe.space = null;
Qe.attribute = null;
Qe.property = null;
Qe.boolean = !1;
Qe.booleanish = !1;
Qe.overloadedBoolean = !1;
Qe.number = !1;
Qe.commaSeparated = !1;
Qe.spaceSeparated = !1;
Qe.commaOrSpaceSeparated = !1;
Qe.mustUseProperty = !1;
Qe.defined = !1;
function Cd(e, t) {
this.property = e, this.attribute = t;
}
a(Cd, "Info");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/types.js
var bi = M((rr) => {
"use strict";
var Bw = 0;
rr.boolean = kr();
rr.booleanish = kr();
rr.overloadedBoolean = kr();
rr.number = kr();
rr.spaceSeparated = kr();
rr.commaSeparated = kr();
rr.commaOrSpaceSeparated = kr();
function kr() {
return Math.pow(2, ++Bw);
}
a(kr, "increment");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js
var zs = M((Uz, kd) => {
"use strict";
var Ad = Ps(), Rd = bi();
kd.exports = Hs;
Hs.prototype = new Ad();
Hs.prototype.defined = !0;
var Fd = [
"boolean",
"booleanish",
"overloadedBoolean",
"number",
"commaSeparated",
"spaceSeparated",
"commaOrSpaceSeparated"
], Mw = Fd.length;
function Hs(e, t, r, n) {
var o = -1, i;
for (Sd(this, "space", n), Ad.call(this, e, t); ++o < Mw; )
i = Fd[o], Sd(this, i, (r & Rd[i]) === Rd[i]);
}
a(Hs, "DefinedInfo");
function Sd(e, t, r) {
r && (e[t] = r);
}
a(Sd, "mark");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/create.js
var wn = M((Yz, Td) => {
"use strict";
var Ld = wi(), _w = _s(), Pw = zs();
Td.exports = Hw;
function Hw(e) {
var t = e.space, r = e.mustUseProperty || [], n = e.attributes || {}, o = e.properties, i = e.transform, l = {}, s = {}, c, p;
for (c in o)
p = new Pw(
c,
i(n, c),
o[c],
t
), r.indexOf(c) !== -1 && (p.mustUseProperty = !0), l[c] = p, s[Ld(c)] = c, s[Ld(p.attribute)] = c;
return new _w(l, s, t);
}
a(Hw, "create");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xlink.js
var Bd = M((Zz, Id) => {
"use strict";
var zw = wn();
Id.exports = zw({
space: "xlink",
transform: Ow,
properties: {
xLinkActuate: null,
xLinkArcRole: null,
xLinkHref: null,
xLinkRole: null,
xLinkShow: null,
xLinkTitle: null,
xLinkType: null
}
});
function Ow(e, t) {
return "xlink:" + t.slice(5).toLowerCase();
}
a(Ow, "xlinkTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xml.js
var _d = M((Jz, Md) => {
"use strict";
var Nw = wn();
Md.exports = Nw({
space: "xml",
transform: $w,
properties: {
xmlLang: null,
xmlBase: null,
xmlSpace: null
}
});
function $w(e, t) {
return "xml:" + t.slice(3).toLowerCase();
}
a($w, "xmlTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js
var Hd = M((eO, Pd) => {
"use strict";
Pd.exports = Vw;
function Vw(e, t) {
return t in e ? e[t] : t;
}
a(Vw, "caseSensitiveTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js
var Os = M((rO, zd) => {
"use strict";
var jw = Hd();
zd.exports = Ww;
function Ww(e, t) {
return jw(e, t.toLowerCase());
}
a(Ww, "caseInsensitiveTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/xmlns.js
var Nd = M((oO, Od) => {
"use strict";
var qw = wn(), Uw = Os();
Od.exports = qw({
space: "xmlns",
attributes: {
xmlnsxlink: "xmlns:xlink"
},
transform: Uw,
properties: {
xmlns: null,
xmlnsXLink: null
}
});
});
// ../node_modules/hastscript/node_modules/property-information/lib/aria.js
var Vd = M((aO, $d) => {
"use strict";
var Ns = bi(), Gw = wn(), $e = Ns.booleanish, et = Ns.number, Lr = Ns.spaceSeparated;
$d.exports = Gw({
transform: Yw,
properties: {
ariaActiveDescendant: null,
ariaAtomic: $e,
ariaAutoComplete: null,
ariaBusy: $e,
ariaChecked: $e,
ariaColCount: et,
ariaColIndex: et,
ariaColSpan: et,
ariaControls: Lr,
ariaCurrent: null,
ariaDescribedBy: Lr,
ariaDetails: null,
ariaDisabled: $e,
ariaDropEffect: Lr,
ariaErrorMessage: null,
ariaExpanded: $e,
ariaFlowTo: Lr,
ariaGrabbed: $e,
ariaHasPopup: null,
ariaHidden: $e,
ariaInvalid: null,
ariaKeyShortcuts: null,
ariaLabel: null,
ariaLabelledBy: Lr,
ariaLevel: et,
ariaLive: null,
ariaModal: $e,
ariaMultiLine: $e,
ariaMultiSelectable: $e,
ariaOrientation: null,
ariaOwns: Lr,
ariaPlaceholder: null,
ariaPosInSet: et,
ariaPressed: $e,
ariaReadOnly: $e,
ariaRelevant: null,
ariaRequired: $e,
ariaRoleDescription: Lr,
ariaRowCount: et,
ariaRowIndex: et,
ariaRowSpan: et,
ariaSelected: $e,
ariaSetSize: et,
ariaSort: null,
ariaValueMax: et,
ariaValueMin: et,
ariaValueNow: et,
ariaValueText: null,
role: null
}
});
function Yw(e, t) {
return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
}
a(Yw, "ariaTransform");
});
// ../node_modules/hastscript/node_modules/property-information/lib/html.js
var Wd = M((lO, jd) => {
"use strict";
var bn = bi(), Xw = wn(), Zw = Os(), O = bn.boolean, Kw = bn.overloadedBoolean, ga = bn.booleanish, Z = bn.number, Be = bn.spaceSeparated,
yi = bn.commaSeparated;
jd.exports = Xw({
space: "html",
attributes: {
acceptcharset: "accept-charset",
classname: "class",
htmlfor: "for",
httpequiv: "http-equiv"
},
transform: Zw,
mustUseProperty: ["checked", "multiple", "muted", "selected"],
properties: {
// Standard Properties.
abbr: null,
accept: yi,
acceptCharset: Be,
accessKey: Be,
action: null,
allow: null,
allowFullScreen: O,
allowPaymentRequest: O,
allowUserMedia: O,
alt: null,
as: null,
async: O,
autoCapitalize: null,
autoComplete: Be,
autoFocus: O,
autoPlay: O,
capture: O,
charSet: null,
checked: O,
cite: null,
className: Be,
cols: Z,
colSpan: null,
content: null,
contentEditable: ga,
controls: O,
controlsList: Be,
coords: Z | yi,
crossOrigin: null,
data: null,
dateTime: null,
decoding: null,
default: O,
defer: O,
dir: null,
dirName: null,
disabled: O,
download: Kw,
draggable: ga,
encType: null,
enterKeyHint: null,
form: null,
formAction: null,
formEncType: null,
formMethod: null,
formNoValidate: O,
formTarget: null,
headers: Be,
height: Z,
hidden: O,
high: Z,
href: null,
hrefLang: null,
htmlFor: Be,
httpEquiv: Be,
id: null,
imageSizes: null,
imageSrcSet: yi,
inputMode: null,
integrity: null,
is: null,
isMap: O,
itemId: null,
itemProp: Be,
itemRef: Be,
itemScope: O,
itemType: Be,
kind: null,
label: null,
lang: null,
language: null,
list: null,
loading: null,
loop: O,
low: Z,
manifest: null,
max: null,
maxLength: Z,
media: null,
method: null,
min: null,
minLength: Z,
multiple: O,
muted: O,
name: null,
nonce: null,
noModule: O,
noValidate: O,
onAbort: null,
onAfterPrint: null,
onAuxClick: null,
onBeforePrint: null,
onBeforeUnload: null,
onBlur: null,
onCancel: null,
onCanPlay: null,
onCanPlayThrough: null,
onChange: null,
onClick: null,
onClose: null,
onContextMenu: null,
onCopy: null,
onCueChange: null,
onCut: null,
onDblClick: null,
onDrag: null,
onDragEnd: null,
onDragEnter: null,
onDragExit: null,
onDragLeave: null,
onDragOver: null,
onDragStart: null,
onDrop: null,
onDurationChange: null,
onEmptied: null,
onEnded: null,
onError: null,
onFocus: null,
onFormData: null,
onHashChange: null,
onInput: null,
onInvalid: null,
onKeyDown: null,
onKeyPress: null,
onKeyUp: null,
onLanguageChange: null,
onLoad: null,
onLoadedData: null,
onLoadedMetadata: null,
onLoadEnd: null,
onLoadStart: null,
onMessage: null,
onMessageError: null,
onMouseDown: null,
onMouseEnter: null,
onMouseLeave: null,
onMouseMove: null,
onMouseOut: null,
onMouseOver: null,
onMouseUp: null,
onOffline: null,
onOnline: null,
onPageHide: null,
onPageShow: null,
onPaste: null,
onPause: null,
onPlay: null,
onPlaying: null,
onPopState: null,
onProgress: null,
onRateChange: null,
onRejectionHandled: null,
onReset: null,
onResize: null,
onScroll: null,
onSecurityPolicyViolation: null,
onSeeked: null,
onSeeking: null,
onSelect: null,
onSlotChange: null,
onStalled: null,
onStorage: null,
onSubmit: null,
onSuspend: null,
onTimeUpdate: null,
onToggle: null,
onUnhandledRejection: null,
onUnload: null,
onVolumeChange: null,
onWaiting: null,
onWheel: null,
open: O,
optimum: Z,
pattern: null,
ping: Be,
placeholder: null,
playsInline: O,
poster: null,
preload: null,
readOnly: O,
referrerPolicy: null,
rel: Be,
required: O,
reversed: O,
rows: Z,
rowSpan: Z,
sandbox: Be,
scope: null,
scoped: O,
seamless: O,
selected: O,
shape: null,
size: Z,
sizes: null,
slot: null,
span: Z,
spellCheck: ga,
src: null,
srcDoc: null,
srcLang: null,
srcSet: yi,
start: Z,
step: null,
style: null,
tabIndex: Z,
target: null,
title: null,
translate: null,
type: null,
typeMustMatch: O,
useMap: null,
value: ga,
width: Z,
wrap: null,
// Legacy.
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
align: null,
// Several. Use CSS `text-align` instead,
aLink: null,
// `<body>`. Use CSS `a:active {color}` instead
archive: Be,
// `<object>`. List of URIs to archives
axis: null,
// `<td>` and `<th>`. Use `scope` on `<th>`
background: null,
// `<body>`. Use CSS `background-image` instead
bgColor: null,
// `<body>` and table elements. Use CSS `background-color` instead
border: Z,
// `<table>`. Use CSS `border-width` instead,
borderColor: null,
// `<table>`. Use CSS `border-color` instead,
bottomMargin: Z,
// `<body>`
cellPadding: null,
// `<table>`
cellSpacing: null,
// `<table>`
char: null,
// Several table elements. When `align=char`, sets the character to align on
charOff: null,
// Several table elements. When `char`, offsets the alignment
classId: null,
// `<object>`
clear: null,
// `<br>`. Use CSS `clear` instead
code: null,
// `<object>`
codeBase: null,
// `<object>`
codeType: null,
// `<object>`
color: null,
// `<font>` and `<hr>`. Use CSS instead
compact: O,
// Lists. Use CSS to reduce space between items instead
declare: O,
// `<object>`
event: null,
// `<script>`
face: null,
// `<font>`. Use CSS instead
frame: null,
// `<table>`
frameBorder: null,
// `<iframe>`. Use CSS `border` instead
hSpace: Z,
// `<img>` and `<object>`
leftMargin: Z,
// `<body>`
link: null,
// `<body>`. Use CSS `a:link {color: *}` instead
longDesc: null,
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
lowSrc: null,
// `<img>`. Use a `<picture>`
marginHeight: Z,
// `<body>`
marginWidth: Z,
// `<body>`
noResize: O,
// `<frame>`
noHref: O,
// `<area>`. Use no href instead of an explicit `nohref`
noShade: O,
// `<hr>`. Use background-color and height instead of borders
noWrap: O,
// `<td>` and `<th>`
object: null,
// `<applet>`
profile: null,
// `<head>`
prompt: null,
// `<isindex>`
rev: null,
// `<link>`
rightMargin: Z,
// `<body>`
rules: null,
// `<table>`
scheme: null,
// `<meta>`
scrolling: ga,
// `<frame>`. Use overflow in the child context
standby: null,
// `<object>`
summary: null,
// `<table>`
text: null,
// `<body>`. Use CSS `color` instead
topMargin: Z,
// `<body>`
valueType: null,
// `<param>`
version: null,
// `<html>`. Use a doctype.
vAlign: null,
// Several. Use CSS `vertical-align` instead
vLink: null,
// `<body>`. Use CSS `a:visited {color}` instead
vSpace: Z,
// `<img>` and `<object>`
// Non-standard Properties.
allowTransparency: null,
autoCorrect: null,
autoSave: null,
disablePictureInPicture: O,
disableRemotePlayback: O,
prefix: null,
property: null,
results: Z,
security: null,
unselectable: null
}
});
});
// ../node_modules/hastscript/node_modules/property-information/html.js
var Ud = M((sO, qd) => {
"use strict";
var Jw = Dd(), Qw = Bd(), e6 = _d(), t6 = Nd(), r6 = Vd(), n6 = Wd();
qd.exports = Jw([e6, Qw, t6, r6, n6]);
});
// ../node_modules/hastscript/node_modules/property-information/find.js
var Xd = M((uO, Yd) => {
"use strict";
var o6 = wi(), a6 = zs(), i6 = Ps(), $s = "data";
Yd.exports = u6;
var l6 = /^data[-\w.:]+$/i, Gd = /-[a-z]/g, s6 = /[A-Z]/g;
function u6(e, t) {
var r = o6(t), n = t, o = i6;
return r in e.normal ? e.property[e.normal[r]] : (r.length > 4 && r.slice(0, 4) === $s && l6.test(t) && (t.charAt(4) === "-" ? n = c6(t) :
t = p6(t), o = a6), new o(n, t));
}
a(u6, "find");
function c6(e) {
var t = e.slice(5).replace(Gd, f6);
return $s + t.charAt(0).toUpperCase() + t.slice(1);
}
a(c6, "datasetToProperty");
function p6(e) {
var t = e.slice(4);
return Gd.test(t) ? e : (t = t.replace(s6, d6), t.charAt(0) !== "-" && (t = "-" + t), $s + t);
}
a(p6, "datasetToAttribute");
function d6(e) {
return "-" + e.toLowerCase();
}
a(d6, "kebab");
function f6(e) {
return e.charAt(1).toUpperCase();
}
a(f6, "camelcase");
});
// ../node_modules/hast-util-parse-selector/index.js
var Jd = M((pO, Kd) => {
"use strict";
Kd.exports = h6;
var Zd = /[#.]/g;
function h6(e, t) {
for (var r = e || "", n = t || "div", o = {}, i = 0, l, s, c; i < r.length; )
Zd.lastIndex = i, c = Zd.exec(r), l = r.slice(i, c ? c.index : r.length), l && (s ? s === "#" ? o.id = l : o.className ? o.className.push(
l) : o.className = [l] : n = l, i += l.length), c && (s = c[0], i++);
return { type: "element", tagName: n, properties: o, children: [] };
}
a(h6, "parse");
});
// ../node_modules/hastscript/node_modules/space-separated-tokens/index.js
var ef = M((Vs) => {
"use strict";
Vs.parse = v6;
Vs.stringify = w6;
var Qd = "", m6 = " ", g6 = /[ \t\n\r\f]+/g;
function v6(e) {
var t = String(e || Qd).trim();
return t === Qd ? [] : t.split(g6);
}
a(v6, "parse");
function w6(e) {
return e.join(m6).trim();
}
a(w6, "stringify");
});
// ../node_modules/hastscript/node_modules/comma-separated-tokens/index.js
var rf = M((Ws) => {
"use strict";
Ws.parse = b6;
Ws.stringify = y6;
var js = ",", tf = " ", va = "";
function b6(e) {
for (var t = [], r = String(e || va), n = r.indexOf(js), o = 0, i = !1, l; !i; )
n === -1 && (n = r.length, i = !0), l = r.slice(o, n).trim(), (l || !i) && t.push(l), o = n + 1, n = r.indexOf(js, o);
return t;
}
a(b6, "parse");
function y6(e, t) {
var r = t || {}, n = r.padLeft === !1 ? va : tf, o = r.padRight ? tf : va;
return e[e.length - 1] === va && (e = e.concat(va)), e.join(o + js + n).trim();
}
a(y6, "stringify");
});
// ../node_modules/hastscript/factory.js
var cf = M((vO, uf) => {
"use strict";
var D6 = Xd(), nf = wi(), x6 = Jd(), of = ef().parse, af = rf().parse;
uf.exports = E6;
var C6 = {}.hasOwnProperty;
function E6(e, t, r) {
var n = r ? k6(r) : null;
return o;
function o(l, s) {
var c = x6(l, t), p = Array.prototype.slice.call(arguments, 2), d = c.tagName.toLowerCase(), h;
if (c.tagName = n && C6.call(n, d) ? n[d] : d, s && R6(s, c) && (p.unshift(s), s = null), s)
for (h in s)
i(c.properties, h, s[h]);
return sf(c.children, p), c.tagName === "template" && (c.content = { type: "root", children: c.children }, c.children = []), c;
}
function i(l, s, c) {
var p, d, h;
c == null || c !== c || (p = D6(e, s), d = p.property, h = c, typeof h == "string" && (p.spaceSeparated ? h = of(h) : p.commaSeparated ?
h = af(h) : p.commaOrSpaceSeparated && (h = of(af(h).join(" ")))), d === "style" && typeof c != "string" && (h = F6(h)), d === "classN\
ame" && l.className && (h = l.className.concat(h)), l[d] = A6(p, d, h));
}
}
a(E6, "factory");
function R6(e, t) {
return typeof e == "string" || "length" in e || S6(t.tagName, e);
}
a(R6, "isChildren");
function S6(e, t) {
var r = t.type;
return e === "input" || !r || typeof r != "string" ? !1 : typeof t.children == "object" && "length" in t.children ? !0 : (r = r.toLowerCase(),
e === "button" ? r !== "menu" && r !== "submit" && r !== "reset" && r !== "button" : "value" in t);
}
a(S6, "isNode");
function sf(e, t) {
var r, n;
if (typeof t == "string" || typeof t == "number") {
e.push({ type: "text", value: String(t) });
return;
}
if (typeof t == "object" && "length" in t) {
for (r = -1, n = t.length; ++r < n; )
sf(e, t[r]);
return;
}
if (typeof t != "object" || !("type" in t))
throw new Error("Expected node, nodes, or string, got `" + t + "`");
e.push(t);
}
a(sf, "addChild");
function A6(e, t, r) {
var n, o, i;
if (typeof r != "object" || !("length" in r))
return lf(e, t, r);
for (o = r.length, n = -1, i = []; ++n < o; )
i[n] = lf(e, t, r[n]);
return i;
}
a(A6, "parsePrimitives");
function lf(e, t, r) {
var n = r;
return e.number || e.positiveNumber ? !isNaN(n) && n !== "" && (n = Number(n)) : (e.boolean || e.overloadedBoolean) && typeof n == "stri\
ng" && (n === "" || nf(r) === nf(t)) && (n = !0), n;
}
a(lf, "parsePrimitive");
function F6(e) {
var t = [], r;
for (r in e)
t.push([r, e[r]].join(": "));
return t.join("; ");
}
a(F6, "style");
function k6(e) {
for (var t = e.length, r = -1, n = {}, o; ++r < t; )
o = e[r], n[o.toLowerCase()] = o;
return n;
}
a(k6, "createAdjustMap");
});
// ../node_modules/hastscript/html.js
var ff = M((bO, df) => {
"use strict";
var L6 = Ud(), T6 = cf(), pf = T6(L6, "div");
pf.displayName = "html";
df.exports = pf;
});
/