1801 lines
46 KiB
JavaScript
Raw Permalink Normal View History

import {
__export
} from "./chunk-G3PMV62Z.js";
// node_modules/devlop/lib/development.js
var AssertionError = class extends Error {
name = (
/** @type {const} */
"Assertion"
);
code = (
/** @type {const} */
"ERR_ASSERTION"
);
/**
* Create an assertion error.
*
* @param {string} message
* Message explaining error.
* @param {unknown} actual
* Value.
* @param {unknown} expected
* Baseline.
* @param {string} operator
* Name of equality operation.
* @param {boolean} generated
* Whether `message` is a custom message or not
* @returns
* Instance.
*/
// eslint-disable-next-line max-params
constructor(message, actual, expected, operator, generated) {
super(message);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
this.actual = actual;
this.expected = expected;
this.generated = generated;
this.operator = operator;
}
};
function ok(value, message) {
assert(
Boolean(value),
false,
true,
"ok",
"Expected value to be truthy",
message
);
}
function unreachable(message) {
assert(false, false, true, "ok", "Unreachable", message);
}
function assert(bool, actual, expected, operator, defaultMessage, userMessage) {
if (!bool) {
throw userMessage instanceof Error ? userMessage : new AssertionError(
userMessage || defaultMessage,
actual,
expected,
operator,
!userMessage
);
}
}
// node_modules/unist-util-is/lib/index.js
var convert = (
// Note: overloads in JSDoc cant yet use different `@template`s.
/**
* @type {(
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
* ((test?: Test) => Check)
* )}
*/
/**
* @param {Test} [test]
* @returns {Check}
*/
function(test) {
if (test === null || test === void 0) {
return ok2;
}
if (typeof test === "function") {
return castFactory(test);
}
if (typeof test === "object") {
return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
}
if (typeof test === "string") {
return typeFactory(test);
}
throw new Error("Expected function, string, or object as test");
}
);
function anyFactory(tests) {
const checks2 = [];
let index = -1;
while (++index < tests.length) {
checks2[index] = convert(tests[index]);
}
return castFactory(any);
function any(...parameters) {
let index2 = -1;
while (++index2 < checks2.length) {
if (checks2[index2].apply(this, parameters)) return true;
}
return false;
}
}
function propsFactory(check) {
const checkAsRecord = (
/** @type {Record<string, unknown>} */
check
);
return castFactory(all);
function all(node) {
const nodeAsRecord = (
/** @type {Record<string, unknown>} */
/** @type {unknown} */
node
);
let key;
for (key in check) {
if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
}
return true;
}
}
function typeFactory(check) {
return castFactory(type);
function type(node) {
return node && node.type === check;
}
}
function castFactory(testFunction) {
return check;
function check(value, index, parent) {
return Boolean(
looksLikeANode(value) && testFunction.call(
this,
value,
typeof index === "number" ? index : void 0,
parent || void 0
)
);
}
}
function ok2() {
return true;
}
function looksLikeANode(value) {
return value !== null && typeof value === "object" && "type" in value;
}
// node_modules/unist-util-visit-parents/lib/color.js
function color(d) {
return d;
}
// node_modules/unist-util-visit-parents/lib/index.js
var empty = [];
var CONTINUE = true;
var EXIT = false;
var SKIP = "skip";
function visitParents(tree, test, visitor, reverse) {
let check;
if (typeof test === "function" && typeof visitor !== "function") {
reverse = visitor;
visitor = test;
} else {
check = test;
}
const is2 = convert(check);
const step = reverse ? -1 : 1;
factory(tree, void 0, [])();
function factory(node, index, parents) {
const value = (
/** @type {Record<string, unknown>} */
node && typeof node === "object" ? node : {}
);
if (typeof value.type === "string") {
const name = (
// `hast`
typeof value.tagName === "string" ? value.tagName : (
// `xast`
typeof value.name === "string" ? value.name : void 0
)
);
Object.defineProperty(visit2, "name", {
value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
});
}
return visit2;
function visit2() {
let result = empty;
let subresult;
let offset;
let grandparents;
if (!test || is2(node, index, parents[parents.length - 1] || void 0)) {
result = toResult(visitor(node, parents));
if (result[0] === EXIT) {
return result;
}
}
if ("children" in node && node.children) {
const nodeAsParent = (
/** @type {UnistParent} */
node
);
if (nodeAsParent.children && result[0] !== SKIP) {
offset = (reverse ? nodeAsParent.children.length : -1) + step;
grandparents = parents.concat(nodeAsParent);
while (offset > -1 && offset < nodeAsParent.children.length) {
const child = nodeAsParent.children[offset];
subresult = factory(child, offset, grandparents)();
if (subresult[0] === EXIT) {
return subresult;
}
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
}
}
}
return result;
}
}
}
function toResult(value) {
if (Array.isArray(value)) {
return value;
}
if (typeof value === "number") {
return [CONTINUE, value];
}
return value === null || value === void 0 ? empty : [value];
}
// node_modules/unist-util-visit/lib/index.js
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
let reverse;
let test;
let visitor;
if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
test = void 0;
visitor = testOrVisitor;
reverse = visitorOrReverse;
} else {
test = testOrVisitor;
visitor = visitorOrReverse;
reverse = maybeReverse;
}
visitParents(tree, test, overload, reverse);
function overload(node, parents) {
const parent = parents[parents.length - 1];
const index = parent ? parent.children.indexOf(node) : void 0;
return visitor(node, index, parent);
}
}
// node_modules/comma-separated-tokens/index.js
function parse(value) {
const tokens = [];
const input = String(value || "");
let index = input.indexOf(",");
let start = 0;
let end = false;
while (!end) {
if (index === -1) {
index = input.length;
end = true;
}
const token = input.slice(start, index).trim();
if (token || !end) {
tokens.push(token);
}
start = index + 1;
index = input.indexOf(",", start);
}
return tokens;
}
function stringify(values, options) {
const settings = options || {};
const input = values[values.length - 1] === "" ? [...values, ""] : values;
return input.join(
(settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
).trim();
}
// node_modules/property-information/lib/hast-to-react.js
var hastToReact = {
classId: "classID",
dataType: "datatype",
itemId: "itemID",
strokeDashArray: "strokeDasharray",
strokeDashOffset: "strokeDashoffset",
strokeLineCap: "strokeLinecap",
strokeLineJoin: "strokeLinejoin",
strokeMiterLimit: "strokeMiterlimit",
typeOf: "typeof",
xLinkActuate: "xlinkActuate",
xLinkArcRole: "xlinkArcrole",
xLinkHref: "xlinkHref",
xLinkRole: "xlinkRole",
xLinkShow: "xlinkShow",
xLinkTitle: "xlinkTitle",
xLinkType: "xlinkType",
xmlnsXLink: "xmlnsXlink"
};
// node_modules/property-information/lib/util/info.js
var Info = class {
/**
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @returns
* Info.
*/
constructor(property, attribute) {
this.attribute = attribute;
this.property = property;
}
};
Info.prototype.attribute = "";
Info.prototype.booleanish = false;
Info.prototype.boolean = false;
Info.prototype.commaOrSpaceSeparated = false;
Info.prototype.commaSeparated = false;
Info.prototype.defined = false;
Info.prototype.mustUseProperty = false;
Info.prototype.number = false;
Info.prototype.overloadedBoolean = false;
Info.prototype.property = "";
Info.prototype.spaceSeparated = false;
Info.prototype.space = void 0;
// node_modules/property-information/lib/util/types.js
var types_exports = {};
__export(types_exports, {
boolean: () => boolean,
booleanish: () => booleanish,
commaOrSpaceSeparated: () => commaOrSpaceSeparated,
commaSeparated: () => commaSeparated,
number: () => number,
overloadedBoolean: () => overloadedBoolean,
spaceSeparated: () => spaceSeparated
});
var powers = 0;
var boolean = increment();
var booleanish = increment();
var overloadedBoolean = increment();
var number = increment();
var spaceSeparated = increment();
var commaSeparated = increment();
var commaOrSpaceSeparated = increment();
function increment() {
return 2 ** ++powers;
}
// node_modules/property-information/lib/util/defined-info.js
var checks = (
/** @type {ReadonlyArray<keyof typeof types>} */
Object.keys(types_exports)
);
var DefinedInfo = class extends Info {
/**
* @constructor
* @param {string} property
* Property.
* @param {string} attribute
* Attribute.
* @param {number | null | undefined} [mask]
* Mask.
* @param {Space | undefined} [space]
* Space.
* @returns
* Info.
*/
constructor(property, attribute, mask, space) {
let index = -1;
super(property, attribute);
mark(this, "space", space);
if (typeof mask === "number") {
while (++index < checks.length) {
const check = checks[index];
mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
}
}
}
};
DefinedInfo.prototype.defined = true;
function mark(values, key, value) {
if (value) {
values[key] = value;
}
}
// node_modules/property-information/lib/normalize.js
function normalize(value) {
return value.toLowerCase();
}
// node_modules/property-information/lib/find.js
var cap = /[A-Z]/g;
var dash = /-[a-z]/g;
var valid = /^data[-\w.:]+$/i;
function find(schema, value) {
const normal = normalize(value);
let property = value;
let Type = Info;
if (normal in schema.normal) {
return schema.property[schema.normal[normal]];
}
if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
if (value.charAt(4) === "-") {
const rest = value.slice(5).replace(dash, camelcase);
property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
} else {
const rest = value.slice(4);
if (!dash.test(rest)) {
let dashes = rest.replace(cap, kebab);
if (dashes.charAt(0) !== "-") {
dashes = "-" + dashes;
}
value = "data" + dashes;
}
}
Type = DefinedInfo;
}
return new Type(property, value);
}
function kebab($0) {
return "-" + $0.toLowerCase();
}
function camelcase($0) {
return $0.charAt(1).toUpperCase();
}
// node_modules/property-information/lib/util/schema.js
var Schema = class {
/**
* @param {SchemaType['property']} property
* Property.
* @param {SchemaType['normal']} normal
* Normal.
* @param {Space | undefined} [space]
* Space.
* @returns
* Schema.
*/
constructor(property, normal, space) {
this.normal = normal;
this.property = property;
if (space) {
this.space = space;
}
}
};
Schema.prototype.normal = {};
Schema.prototype.property = {};
Schema.prototype.space = void 0;
// node_modules/property-information/lib/util/merge.js
function merge(definitions, space) {
const property = {};
const normal = {};
for (const definition of definitions) {
Object.assign(property, definition.property);
Object.assign(normal, definition.normal);
}
return new Schema(property, normal, space);
}
// node_modules/property-information/lib/util/create.js
function create(definition) {
const properties = {};
const normals = {};
for (const [property, value] of Object.entries(definition.properties)) {
const info = new DefinedInfo(
property,
definition.transform(definition.attributes || {}, property),
value,
definition.space
);
if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) {
info.mustUseProperty = true;
}
properties[property] = info;
normals[normalize(property)] = property;
normals[normalize(info.attribute)] = property;
}
return new Schema(properties, normals, definition.space);
}
// node_modules/property-information/lib/aria.js
var aria = create({
properties: {
ariaActiveDescendant: null,
ariaAtomic: booleanish,
ariaAutoComplete: null,
ariaBusy: booleanish,
ariaChecked: booleanish,
ariaColCount: number,
ariaColIndex: number,
ariaColSpan: number,
ariaControls: spaceSeparated,
ariaCurrent: null,
ariaDescribedBy: spaceSeparated,
ariaDetails: null,
ariaDisabled: booleanish,
ariaDropEffect: spaceSeparated,
ariaErrorMessage: null,
ariaExpanded: booleanish,
ariaFlowTo: spaceSeparated,
ariaGrabbed: booleanish,
ariaHasPopup: null,
ariaHidden: booleanish,
ariaInvalid: null,
ariaKeyShortcuts: null,
ariaLabel: null,
ariaLabelledBy: spaceSeparated,
ariaLevel: number,
ariaLive: null,
ariaModal: booleanish,
ariaMultiLine: booleanish,
ariaMultiSelectable: booleanish,
ariaOrientation: null,
ariaOwns: spaceSeparated,
ariaPlaceholder: null,
ariaPosInSet: number,
ariaPressed: booleanish,
ariaReadOnly: booleanish,
ariaRelevant: null,
ariaRequired: booleanish,
ariaRoleDescription: spaceSeparated,
ariaRowCount: number,
ariaRowIndex: number,
ariaRowSpan: number,
ariaSelected: booleanish,
ariaSetSize: number,
ariaSort: null,
ariaValueMax: number,
ariaValueMin: number,
ariaValueNow: number,
ariaValueText: null,
role: null
},
transform(_, property) {
return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
}
});
// node_modules/property-information/lib/util/case-sensitive-transform.js
function caseSensitiveTransform(attributes, attribute) {
return attribute in attributes ? attributes[attribute] : attribute;
}
// node_modules/property-information/lib/util/case-insensitive-transform.js
function caseInsensitiveTransform(attributes, property) {
return caseSensitiveTransform(attributes, property.toLowerCase());
}
// node_modules/property-information/lib/html.js
var html = create({
attributes: {
acceptcharset: "accept-charset",
classname: "class",
htmlfor: "for",
httpequiv: "http-equiv"
},
mustUseProperty: ["checked", "multiple", "muted", "selected"],
properties: {
// Standard Properties.
abbr: null,
accept: commaSeparated,
acceptCharset: spaceSeparated,
accessKey: spaceSeparated,
action: null,
allow: null,
allowFullScreen: boolean,
allowPaymentRequest: boolean,
allowUserMedia: boolean,
alt: null,
as: null,
async: boolean,
autoCapitalize: null,
autoComplete: spaceSeparated,
autoFocus: boolean,
autoPlay: boolean,
blocking: spaceSeparated,
capture: null,
charSet: null,
checked: boolean,
cite: null,
className: spaceSeparated,
cols: number,
colSpan: null,
content: null,
contentEditable: booleanish,
controls: boolean,
controlsList: spaceSeparated,
coords: number | commaSeparated,
crossOrigin: null,
data: null,
dateTime: null,
decoding: null,
default: boolean,
defer: boolean,
dir: null,
dirName: null,
disabled: boolean,
download: overloadedBoolean,
draggable: booleanish,
encType: null,
enterKeyHint: null,
fetchPriority: null,
form: null,
formAction: null,
formEncType: null,
formMethod: null,
formNoValidate: boolean,
formTarget: null,
headers: spaceSeparated,
height: number,
hidden: overloadedBoolean,
high: number,
href: null,
hrefLang: null,
htmlFor: spaceSeparated,
httpEquiv: spaceSeparated,
id: null,
imageSizes: null,
imageSrcSet: null,
inert: boolean,
inputMode: null,
integrity: null,
is: null,
isMap: boolean,
itemId: null,
itemProp: spaceSeparated,
itemRef: spaceSeparated,
itemScope: boolean,
itemType: spaceSeparated,
kind: null,
label: null,
lang: null,
language: null,
list: null,
loading: null,
loop: boolean,
low: number,
manifest: null,
max: null,
maxLength: number,
media: null,
method: null,
min: null,
minLength: number,
multiple: boolean,
muted: boolean,
name: null,
nonce: null,
noModule: boolean,
noValidate: boolean,
onAbort: null,
onAfterPrint: null,
onAuxClick: null,
onBeforeMatch: null,
onBeforePrint: null,
onBeforeToggle: null,
onBeforeUnload: null,
onBlur: null,
onCancel: null,
onCanPlay: null,
onCanPlayThrough: null,
onChange: null,
onClick: null,
onClose: null,
onContextLost: null,
onContextMenu: null,
onContextRestored: 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,
onScrollEnd: 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: boolean,
optimum: number,
pattern: null,
ping: spaceSeparated,
placeholder: null,
playsInline: boolean,
popover: null,
popoverTarget: null,
popoverTargetAction: null,
poster: null,
preload: null,
readOnly: boolean,
referrerPolicy: null,
rel: spaceSeparated,
required: boolean,
reversed: boolean,
rows: number,
rowSpan: number,
sandbox: spaceSeparated,
scope: null,
scoped: boolean,
seamless: boolean,
selected: boolean,
shadowRootClonable: boolean,
shadowRootDelegatesFocus: boolean,
shadowRootMode: null,
shape: null,
size: number,
sizes: null,
slot: null,
span: number,
spellCheck: booleanish,
src: null,
srcDoc: null,
srcLang: null,
srcSet: null,
start: number,
step: null,
style: null,
tabIndex: number,
target: null,
title: null,
translate: null,
type: null,
typeMustMatch: boolean,
useMap: null,
value: booleanish,
width: number,
wrap: null,
writingSuggestions: 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: spaceSeparated,
// `<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: number,
// `<table>`. Use CSS `border-width` instead,
borderColor: null,
// `<table>`. Use CSS `border-color` instead,
bottomMargin: number,
// `<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: boolean,
// Lists. Use CSS to reduce space between items instead
declare: boolean,
// `<object>`
event: null,
// `<script>`
face: null,
// `<font>`. Use CSS instead
frame: null,
// `<table>`
frameBorder: null,
// `<iframe>`. Use CSS `border` instead
hSpace: number,
// `<img>` and `<object>`
leftMargin: number,
// `<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: number,
// `<body>`
marginWidth: number,
// `<body>`
noResize: boolean,
// `<frame>`
noHref: boolean,
// `<area>`. Use no href instead of an explicit `nohref`
noShade: boolean,
// `<hr>`. Use background-color and height instead of borders
noWrap: boolean,
// `<td>` and `<th>`
object: null,
// `<applet>`
profile: null,
// `<head>`
prompt: null,
// `<isindex>`
rev: null,
// `<link>`
rightMargin: number,
// `<body>`
rules: null,
// `<table>`
scheme: null,
// `<meta>`
scrolling: booleanish,
// `<frame>`. Use overflow in the child context
standby: null,
// `<object>`
summary: null,
// `<table>`
text: null,
// `<body>`. Use CSS `color` instead
topMargin: number,
// `<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: number,
// `<img>` and `<object>`
// Non-standard Properties.
allowTransparency: null,
autoCorrect: null,
autoSave: null,
disablePictureInPicture: boolean,
disableRemotePlayback: boolean,
prefix: null,
property: null,
results: number,
security: null,
unselectable: null
},
space: "html",
transform: caseInsensitiveTransform
});
// node_modules/property-information/lib/svg.js
var svg = create({
attributes: {
accentHeight: "accent-height",
alignmentBaseline: "alignment-baseline",
arabicForm: "arabic-form",
baselineShift: "baseline-shift",
capHeight: "cap-height",
className: "class",
clipPath: "clip-path",
clipRule: "clip-rule",
colorInterpolation: "color-interpolation",
colorInterpolationFilters: "color-interpolation-filters",
colorProfile: "color-profile",
colorRendering: "color-rendering",
crossOrigin: "crossorigin",
dataType: "datatype",
dominantBaseline: "dominant-baseline",
enableBackground: "enable-background",
fillOpacity: "fill-opacity",
fillRule: "fill-rule",
floodColor: "flood-color",
floodOpacity: "flood-opacity",
fontFamily: "font-family",
fontSize: "font-size",
fontSizeAdjust: "font-size-adjust",
fontStretch: "font-stretch",
fontStyle: "font-style",
fontVariant: "font-variant",
fontWeight: "font-weight",
glyphName: "glyph-name",
glyphOrientationHorizontal: "glyph-orientation-horizontal",
glyphOrientationVertical: "glyph-orientation-vertical",
hrefLang: "hreflang",
horizAdvX: "horiz-adv-x",
horizOriginX: "horiz-origin-x",
horizOriginY: "horiz-origin-y",
imageRendering: "image-rendering",
letterSpacing: "letter-spacing",
lightingColor: "lighting-color",
markerEnd: "marker-end",
markerMid: "marker-mid",
markerStart: "marker-start",
navDown: "nav-down",
navDownLeft: "nav-down-left",
navDownRight: "nav-down-right",
navLeft: "nav-left",
navNext: "nav-next",
navPrev: "nav-prev",
navRight: "nav-right",
navUp: "nav-up",
navUpLeft: "nav-up-left",
navUpRight: "nav-up-right",
onAbort: "onabort",
onActivate: "onactivate",
onAfterPrint: "onafterprint",
onBeforePrint: "onbeforeprint",
onBegin: "onbegin",
onCancel: "oncancel",
onCanPlay: "oncanplay",
onCanPlayThrough: "oncanplaythrough",
onChange: "onchange",
onClick: "onclick",
onClose: "onclose",
onCopy: "oncopy",
onCueChange: "oncuechange",
onCut: "oncut",
onDblClick: "ondblclick",
onDrag: "ondrag",
onDragEnd: "ondragend",
onDragEnter: "ondragenter",
onDragExit: "ondragexit",
onDragLeave: "ondragleave",
onDragOver: "ondragover",
onDragStart: "ondragstart",
onDrop: "ondrop",
onDurationChange: "ondurationchange",
onEmptied: "onemptied",
onEnd: "onend",
onEnded: "onended",
onError: "onerror",
onFocus: "onfocus",
onFocusIn: "onfocusin",
onFocusOut: "onfocusout",
onHashChange: "onhashchange",
onInput: "oninput",
onInvalid: "oninvalid",
onKeyDown: "onkeydown",
onKeyPress: "onkeypress",
onKeyUp: "onkeyup",
onLoad: "onload",
onLoadedData: "onloadeddata",
onLoadedMetadata: "onloadedmetadata",
onLoadStart: "onloadstart",
onMessage: "onmessage",
onMouseDown: "onmousedown",
onMouseEnter: "onmouseenter",
onMouseLeave: "onmouseleave",
onMouseMove: "onmousemove",
onMouseOut: "onmouseout",
onMouseOver: "onmouseover",
onMouseUp: "onmouseup",
onMouseWheel: "onmousewheel",
onOffline: "onoffline",
onOnline: "ononline",
onPageHide: "onpagehide",
onPageShow: "onpageshow",
onPaste: "onpaste",
onPause: "onpause",
onPlay: "onplay",
onPlaying: "onplaying",
onPopState: "onpopstate",
onProgress: "onprogress",
onRateChange: "onratechange",
onRepeat: "onrepeat",
onReset: "onreset",
onResize: "onresize",
onScroll: "onscroll",
onSeeked: "onseeked",
onSeeking: "onseeking",
onSelect: "onselect",
onShow: "onshow",
onStalled: "onstalled",
onStorage: "onstorage",
onSubmit: "onsubmit",
onSuspend: "onsuspend",
onTimeUpdate: "ontimeupdate",
onToggle: "ontoggle",
onUnload: "onunload",
onVolumeChange: "onvolumechange",
onWaiting: "onwaiting",
onZoom: "onzoom",
overlinePosition: "overline-position",
overlineThickness: "overline-thickness",
paintOrder: "paint-order",
panose1: "panose-1",
pointerEvents: "pointer-events",
referrerPolicy: "referrerpolicy",
renderingIntent: "rendering-intent",
shapeRendering: "shape-rendering",
stopColor: "stop-color",
stopOpacity: "stop-opacity",
strikethroughPosition: "strikethrough-position",
strikethroughThickness: "strikethrough-thickness",
strokeDashArray: "stroke-dasharray",
strokeDashOffset: "stroke-dashoffset",
strokeLineCap: "stroke-linecap",
strokeLineJoin: "stroke-linejoin",
strokeMiterLimit: "stroke-miterlimit",
strokeOpacity: "stroke-opacity",
strokeWidth: "stroke-width",
tabIndex: "tabindex",
textAnchor: "text-anchor",
textDecoration: "text-decoration",
textRendering: "text-rendering",
transformOrigin: "transform-origin",
typeOf: "typeof",
underlinePosition: "underline-position",
underlineThickness: "underline-thickness",
unicodeBidi: "unicode-bidi",
unicodeRange: "unicode-range",
unitsPerEm: "units-per-em",
vAlphabetic: "v-alphabetic",
vHanging: "v-hanging",
vIdeographic: "v-ideographic",
vMathematical: "v-mathematical",
vectorEffect: "vector-effect",
vertAdvY: "vert-adv-y",
vertOriginX: "vert-origin-x",
vertOriginY: "vert-origin-y",
wordSpacing: "word-spacing",
writingMode: "writing-mode",
xHeight: "x-height",
// These were camelcased in Tiny. Now lowercased in SVG 2
playbackOrder: "playbackorder",
timelineBegin: "timelinebegin"
},
properties: {
about: commaOrSpaceSeparated,
accentHeight: number,
accumulate: null,
additive: null,
alignmentBaseline: null,
alphabetic: number,
amplitude: number,
arabicForm: null,
ascent: number,
attributeName: null,
attributeType: null,
azimuth: number,
bandwidth: null,
baselineShift: null,
baseFrequency: null,
baseProfile: null,
bbox: null,
begin: null,
bias: number,
by: null,
calcMode: null,
capHeight: number,
className: spaceSeparated,
clip: null,
clipPath: null,
clipPathUnits: null,
clipRule: null,
color: null,
colorInterpolation: null,
colorInterpolationFilters: null,
colorProfile: null,
colorRendering: null,
content: null,
contentScriptType: null,
contentStyleType: null,
crossOrigin: null,
cursor: null,
cx: null,
cy: null,
d: null,
dataType: null,
defaultAction: null,
descent: number,
diffuseConstant: number,
direction: null,
display: null,
dur: null,
divisor: number,
dominantBaseline: null,
download: boolean,
dx: null,
dy: null,
edgeMode: null,
editable: null,
elevation: number,
enableBackground: null,
end: null,
event: null,
exponent: number,
externalResourcesRequired: null,
fill: null,
fillOpacity: number,
fillRule: null,
filter: null,
filterRes: null,
filterUnits: null,
floodColor: null,
floodOpacity: null,
focusable: null,
focusHighlight: null,
fontFamily: null,
fontSize: null,
fontSizeAdjust: null,
fontStretch: null,
fontStyle: null,
fontVariant: null,
fontWeight: null,
format: null,
fr: null,
from: null,
fx: null,
fy: null,
g1: commaSeparated,
g2: commaSeparated,
glyphName: commaSeparated,
glyphOrientationHorizontal: null,
glyphOrientationVertical: null,
glyphRef: null,
gradientTransform: null,
gradientUnits: null,
handler: null,
hanging: number,
hatchContentUnits: null,
hatchUnits: null,
height: null,
href: null,
hrefLang: null,
horizAdvX: number,
horizOriginX: number,
horizOriginY: number,
id: null,
ideographic: number,
imageRendering: null,
initialVisibility: null,
in: null,
in2: null,
intercept: number,
k: number,
k1: number,
k2: number,
k3: number,
k4: number,
kernelMatrix: commaOrSpaceSeparated,
kernelUnitLength: null,
keyPoints: null,
// SEMI_COLON_SEPARATED
keySplines: null,
// SEMI_COLON_SEPARATED
keyTimes: null,
// SEMI_COLON_SEPARATED
kerning: null,
lang: null,
lengthAdjust: null,
letterSpacing: null,
lightingColor: null,
limitingConeAngle: number,
local: null,
markerEnd: null,
markerMid: null,
markerStart: null,
markerHeight: null,
markerUnits: null,
markerWidth: null,
mask: null,
maskContentUnits: null,
maskUnits: null,
mathematical: null,
max: null,
media: null,
mediaCharacterEncoding: null,
mediaContentEncodings: null,
mediaSize: number,
mediaTime: null,
method: null,
min: null,
mode: null,
name: null,
navDown: null,
navDownLeft: null,
navDownRight: null,
navLeft: null,
navNext: null,
navPrev: null,
navRight: null,
navUp: null,
navUpLeft: null,
navUpRight: null,
numOctaves: null,
observer: null,
offset: null,
onAbort: null,
onActivate: null,
onAfterPrint: null,
onBeforePrint: null,
onBegin: null,
onCancel: null,
onCanPlay: null,
onCanPlayThrough: null,
onChange: null,
onClick: null,
onClose: 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,
onEnd: null,
onEnded: null,
onError: null,
onFocus: null,
onFocusIn: null,
onFocusOut: null,
onHashChange: null,
onInput: null,
onInvalid: null,
onKeyDown: null,
onKeyPress: null,
onKeyUp: null,
onLoad: null,
onLoadedData: null,
onLoadedMetadata: null,
onLoadStart: null,
onMessage: null,
onMouseDown: null,
onMouseEnter: null,
onMouseLeave: null,
onMouseMove: null,
onMouseOut: null,
onMouseOver: null,
onMouseUp: null,
onMouseWheel: null,
onOffline: null,
onOnline: null,
onPageHide: null,
onPageShow: null,
onPaste: null,
onPause: null,
onPlay: null,
onPlaying: null,
onPopState: null,
onProgress: null,
onRateChange: null,
onRepeat: null,
onReset: null,
onResize: null,
onScroll: null,
onSeeked: null,
onSeeking: null,
onSelect: null,
onShow: null,
onStalled: null,
onStorage: null,
onSubmit: null,
onSuspend: null,
onTimeUpdate: null,
onToggle: null,
onUnload: null,
onVolumeChange: null,
onWaiting: null,
onZoom: null,
opacity: null,
operator: null,
order: null,
orient: null,
orientation: null,
origin: null,
overflow: null,
overlay: null,
overlinePosition: number,
overlineThickness: number,
paintOrder: null,
panose1: null,
path: null,
pathLength: number,
patternContentUnits: null,
patternTransform: null,
patternUnits: null,
phase: null,
ping: spaceSeparated,
pitch: null,
playbackOrder: null,
pointerEvents: null,
points: null,
pointsAtX: number,
pointsAtY: number,
pointsAtZ: number,
preserveAlpha: null,
preserveAspectRatio: null,
primitiveUnits: null,
propagate: null,
property: commaOrSpaceSeparated,
r: null,
radius: null,
referrerPolicy: null,
refX: null,
refY: null,
rel: commaOrSpaceSeparated,
rev: commaOrSpaceSeparated,
renderingIntent: null,
repeatCount: null,
repeatDur: null,
requiredExtensions: commaOrSpaceSeparated,
requiredFeatures: commaOrSpaceSeparated,
requiredFonts: commaOrSpaceSeparated,
requiredFormats: commaOrSpaceSeparated,
resource: null,
restart: null,
result: null,
rotate: null,
rx: null,
ry: null,
scale: null,
seed: null,
shapeRendering: null,
side: null,
slope: null,
snapshotTime: null,
specularConstant: number,
specularExponent: number,
spreadMethod: null,
spacing: null,
startOffset: null,
stdDeviation: null,
stemh: null,
stemv: null,
stitchTiles: null,
stopColor: null,
stopOpacity: null,
strikethroughPosition: number,
strikethroughThickness: number,
string: null,
stroke: null,
strokeDashArray: commaOrSpaceSeparated,
strokeDashOffset: null,
strokeLineCap: null,
strokeLineJoin: null,
strokeMiterLimit: number,
strokeOpacity: number,
strokeWidth: null,
style: null,
surfaceScale: number,
syncBehavior: null,
syncBehaviorDefault: null,
syncMaster: null,
syncTolerance: null,
syncToleranceDefault: null,
systemLanguage: commaOrSpaceSeparated,
tabIndex: number,
tableValues: null,
target: null,
targetX: number,
targetY: number,
textAnchor: null,
textDecoration: null,
textRendering: null,
textLength: null,
timelineBegin: null,
title: null,
transformBehavior: null,
type: null,
typeOf: commaOrSpaceSeparated,
to: null,
transform: null,
transformOrigin: null,
u1: null,
u2: null,
underlinePosition: number,
underlineThickness: number,
unicode: null,
unicodeBidi: null,
unicodeRange: null,
unitsPerEm: number,
values: null,
vAlphabetic: number,
vMathematical: number,
vectorEffect: null,
vHanging: number,
vIdeographic: number,
version: null,
vertAdvY: number,
vertOriginX: number,
vertOriginY: number,
viewBox: null,
viewTarget: null,
visibility: null,
width: null,
widths: null,
wordSpacing: null,
writingMode: null,
x: null,
x1: null,
x2: null,
xChannelSelector: null,
xHeight: number,
y: null,
y1: null,
y2: null,
yChannelSelector: null,
z: null,
zoomAndPan: null
},
space: "svg",
transform: caseSensitiveTransform
});
// node_modules/property-information/lib/xlink.js
var xlink = create({
properties: {
xLinkActuate: null,
xLinkArcRole: null,
xLinkHref: null,
xLinkRole: null,
xLinkShow: null,
xLinkTitle: null,
xLinkType: null
},
space: "xlink",
transform(_, property) {
return "xlink:" + property.slice(5).toLowerCase();
}
});
// node_modules/property-information/lib/xmlns.js
var xmlns = create({
attributes: { xmlnsxlink: "xmlns:xlink" },
properties: { xmlnsXLink: null, xmlns: null },
space: "xmlns",
transform: caseInsensitiveTransform
});
// node_modules/property-information/lib/xml.js
var xml = create({
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
space: "xml",
transform(_, property) {
return "xml:" + property.slice(3).toLowerCase();
}
});
// node_modules/property-information/index.js
var html2 = merge([aria, html, xlink, xmlns, xml], "html");
var svg2 = merge([aria, svg, xlink, xmlns, xml], "svg");
// node_modules/space-separated-tokens/index.js
function parse2(value) {
const input = String(value || "").trim();
return input ? input.split(/[ \t\n\r\f]+/g) : [];
}
function stringify2(values) {
return values.join(" ").trim();
}
// node_modules/unist-util-position/lib/index.js
var pointEnd = point("end");
var pointStart = point("start");
function point(type) {
return point2;
function point2(node) {
const point3 = node && node.position && node.position[type] || {};
if (typeof point3.line === "number" && point3.line > 0 && typeof point3.column === "number" && point3.column > 0) {
return {
line: point3.line,
column: point3.column,
offset: typeof point3.offset === "number" && point3.offset > -1 ? point3.offset : void 0
};
}
}
}
function position(node) {
const start = pointStart(node);
const end = pointEnd(node);
if (start && end) {
return { start, end };
}
}
// node_modules/@ungap/structured-clone/esm/types.js
var VOID = -1;
var PRIMITIVE = 0;
var ARRAY = 1;
var OBJECT = 2;
var DATE = 3;
var REGEXP = 4;
var MAP = 5;
var SET = 6;
var ERROR = 7;
var BIGINT = 8;
// node_modules/@ungap/structured-clone/esm/deserialize.js
var env = typeof self === "object" ? self : globalThis;
var deserializer = ($, _) => {
const as = (out, index) => {
$.set(index, out);
return out;
};
const unpair = (index) => {
if ($.has(index))
return $.get(index);
const [type, value] = _[index];
switch (type) {
case PRIMITIVE:
case VOID:
return as(value, index);
case ARRAY: {
const arr = as([], index);
for (const index2 of value)
arr.push(unpair(index2));
return arr;
}
case OBJECT: {
const object = as({}, index);
for (const [key, index2] of value)
object[unpair(key)] = unpair(index2);
return object;
}
case DATE:
return as(new Date(value), index);
case REGEXP: {
const { source, flags } = value;
return as(new RegExp(source, flags), index);
}
case MAP: {
const map = as(/* @__PURE__ */ new Map(), index);
for (const [key, index2] of value)
map.set(unpair(key), unpair(index2));
return map;
}
case SET: {
const set = as(/* @__PURE__ */ new Set(), index);
for (const index2 of value)
set.add(unpair(index2));
return set;
}
case ERROR: {
const { name, message } = value;
return as(new env[name](message), index);
}
case BIGINT:
return as(BigInt(value), index);
case "BigInt":
return as(Object(BigInt(value)), index);
case "ArrayBuffer":
return as(new Uint8Array(value).buffer, value);
case "DataView": {
const { buffer } = new Uint8Array(value);
return as(new DataView(buffer), value);
}
}
return as(new env[type](value), index);
};
return unpair;
};
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
// node_modules/@ungap/structured-clone/esm/serialize.js
var EMPTY = "";
var { toString } = {};
var { keys } = Object;
var typeOf = (value) => {
const type = typeof value;
if (type !== "object" || !value)
return [PRIMITIVE, type];
const asString = toString.call(value).slice(8, -1);
switch (asString) {
case "Array":
return [ARRAY, EMPTY];
case "Object":
return [OBJECT, EMPTY];
case "Date":
return [DATE, EMPTY];
case "RegExp":
return [REGEXP, EMPTY];
case "Map":
return [MAP, EMPTY];
case "Set":
return [SET, EMPTY];
case "DataView":
return [ARRAY, asString];
}
if (asString.includes("Array"))
return [ARRAY, asString];
if (asString.includes("Error"))
return [ERROR, asString];
return [OBJECT, asString];
};
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
var serializer = (strict, json, $, _) => {
const as = (out, value) => {
const index = _.push(out) - 1;
$.set(value, index);
return index;
};
const pair = (value) => {
if ($.has(value))
return $.get(value);
let [TYPE, type] = typeOf(value);
switch (TYPE) {
case PRIMITIVE: {
let entry = value;
switch (type) {
case "bigint":
TYPE = BIGINT;
entry = value.toString();
break;
case "function":
case "symbol":
if (strict)
throw new TypeError("unable to serialize " + type);
entry = null;
break;
case "undefined":
return as([VOID], value);
}
return as([TYPE, entry], value);
}
case ARRAY: {
if (type) {
let spread = value;
if (type === "DataView") {
spread = new Uint8Array(value.buffer);
} else if (type === "ArrayBuffer") {
spread = new Uint8Array(value);
}
return as([type, [...spread]], value);
}
const arr = [];
const index = as([TYPE, arr], value);
for (const entry of value)
arr.push(pair(entry));
return index;
}
case OBJECT: {
if (type) {
switch (type) {
case "BigInt":
return as([type, value.toString()], value);
case "Boolean":
case "Number":
case "String":
return as([type, value.valueOf()], value);
}
}
if (json && "toJSON" in value)
return pair(value.toJSON());
const entries = [];
const index = as([TYPE, entries], value);
for (const key of keys(value)) {
if (strict || !shouldSkip(typeOf(value[key])))
entries.push([pair(key), pair(value[key])]);
}
return index;
}
case DATE:
return as([TYPE, value.toISOString()], value);
case REGEXP: {
const { source, flags } = value;
return as([TYPE, { source, flags }], value);
}
case MAP: {
const entries = [];
const index = as([TYPE, entries], value);
for (const [key, entry] of value) {
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
entries.push([pair(key), pair(entry)]);
}
return index;
}
case SET: {
const entries = [];
const index = as([TYPE, entries], value);
for (const entry of value) {
if (strict || !shouldSkip(typeOf(entry)))
entries.push(pair(entry));
}
return index;
}
}
const { message } = value;
return as([TYPE, { name: type, message }], value);
};
return pair;
};
var serialize = (value, { json, lossy } = {}) => {
const _ = [];
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
};
// node_modules/@ungap/structured-clone/esm/index.js
var esm_default = typeof structuredClone === "function" ? (
/* c8 ignore start */
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
) : (any, options) => deserialize(serialize(any, options));
export {
ok,
unreachable,
parse,
stringify,
normalize,
hastToReact,
find,
html2 as html,
svg2 as svg,
parse2,
stringify2,
pointEnd,
pointStart,
position,
esm_default,
visit
};
//# sourceMappingURL=chunk-7JXXQILG.js.map