@likec4/core 1.48.0 → 1.49.0

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.
Files changed (134) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +1012 -0
  2. package/dist/_chunks/Builder.view-element.mjs +2 -3284
  3. package/dist/_chunks/LikeC4Model.d.mts +21 -25
  4. package/dist/_chunks/RichText.mjs +1 -148
  5. package/dist/_chunks/_types.d.mts +1 -5
  6. package/dist/_chunks/_types2.d.mts +2 -4
  7. package/dist/_chunks/assignTagColors.mjs +1 -24
  8. package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -379
  9. package/dist/_chunks/guards.d.mts +2026 -0
  10. package/dist/_chunks/guards.mjs +4 -0
  11. package/dist/_chunks/index.d.mts +255 -136
  12. package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -3403
  13. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  14. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -213
  15. package/dist/_chunks/libs/bail.mjs +1 -14
  16. package/dist/_chunks/libs/ccount.mjs +1 -25
  17. package/dist/_chunks/libs/character-entities-html4.mjs +1 -263
  18. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -117
  19. package/dist/_chunks/libs/character-entities.mjs +2 -2136
  20. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -18
  21. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -21
  22. package/dist/_chunks/libs/defu.mjs +1 -42
  23. package/dist/_chunks/libs/devlop.mjs +1 -5
  24. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -8
  25. package/dist/_chunks/libs/extend.mjs +1 -77
  26. package/dist/_chunks/libs/graphology-dag.mjs +1 -703
  27. package/dist/_chunks/libs/graphology.mjs +1 -4565
  28. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -863
  29. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -2696
  30. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  31. package/dist/_chunks/libs/longest-streak.mjs +1 -30
  32. package/dist/_chunks/libs/markdown-table.mjs +2 -290
  33. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -653
  34. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -8522
  35. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -2393
  36. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -1803
  37. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -2243
  38. package/dist/_chunks/libs/mnemonist.d.mts +1 -91
  39. package/dist/_chunks/libs/mnemonist.mjs +1 -1978
  40. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -42
  41. package/dist/_chunks/libs/ohash.mjs +1 -0
  42. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -29
  43. package/dist/_chunks/libs/rehype-stringify.mjs +1 -34
  44. package/dist/_chunks/libs/remark-gfm.mjs +1 -36
  45. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -100
  46. package/dist/_chunks/libs/remark-parse.mjs +1 -39
  47. package/dist/_chunks/libs/remark-rehype.mjs +1 -171
  48. package/dist/_chunks/libs/remeda.mjs +1 -702
  49. package/dist/_chunks/libs/trough.mjs +1 -158
  50. package/dist/_chunks/libs/unified.mjs +1 -2212
  51. package/dist/_chunks/rolldown-runtime.mjs +1 -42
  52. package/dist/_chunks/{index3.d.mts → theme.d.mts} +15 -13
  53. package/dist/_chunks/{index7.d.mts → to-text.d.mts} +165 -29
  54. package/dist/_chunks/to-text.mjs +1 -0
  55. package/dist/_chunks/vector.d.mts +198 -0
  56. package/dist/_chunks/vector.mjs +1 -0
  57. package/dist/builder/index.d.mts +2 -8
  58. package/dist/builder/index.mjs +1 -662
  59. package/dist/compute-view/index.d.mts +86 -15
  60. package/dist/compute-view/index.mjs +2 -262
  61. package/dist/geometry/index.d.mts +2 -2
  62. package/dist/geometry/index.mjs +1 -3
  63. package/dist/index.d.mts +9 -13
  64. package/dist/index.mjs +1 -27
  65. package/dist/model/index.d.mts +4 -14
  66. package/dist/model/index.mjs +1 -11
  67. package/dist/styles/index.d.mts +2 -8
  68. package/dist/styles/index.mjs +1 -30
  69. package/dist/types/index.d.mts +3 -9
  70. package/dist/types/index.mjs +1 -15
  71. package/dist/utils/graphology/index.d.mts +1 -1
  72. package/dist/utils/graphology/index.mjs +1 -3
  73. package/dist/utils/index.d.mts +4 -11
  74. package/dist/utils/index.mjs +1 -17
  75. package/package.json +13 -12
  76. package/dist/_chunks/LikeC4Styles.mjs +0 -691
  77. package/dist/_chunks/RichText.d.mts +0 -84
  78. package/dist/_chunks/_aux.d.mts +0 -289
  79. package/dist/_chunks/_aux.mjs +0 -18
  80. package/dist/_chunks/connection.mjs +0 -0
  81. package/dist/_chunks/const.d.mts +0 -43
  82. package/dist/_chunks/const.mjs +0 -33
  83. package/dist/_chunks/expression-model.d.mts +0 -192
  84. package/dist/_chunks/expression-model.mjs +0 -103
  85. package/dist/_chunks/expression.d.mts +0 -347
  86. package/dist/_chunks/expression.mjs +0 -107
  87. package/dist/_chunks/find.d.mts +0 -82
  88. package/dist/_chunks/find.mjs +0 -646
  89. package/dist/_chunks/find2.d.mts +0 -78
  90. package/dist/_chunks/find2.mjs +0 -287
  91. package/dist/_chunks/fqnRef.d.mts +0 -58
  92. package/dist/_chunks/fqnRef.mjs +0 -41
  93. package/dist/_chunks/geometry.mjs +0 -335
  94. package/dist/_chunks/index2.d.mts +0 -937
  95. package/dist/_chunks/index4.d.mts +0 -62
  96. package/dist/_chunks/index5.d.mts +0 -42
  97. package/dist/_chunks/index6.d.mts +0 -43
  98. package/dist/_chunks/index8.d.mts +0 -144
  99. package/dist/_chunks/invariant.mjs +0 -18
  100. package/dist/_chunks/iterable.mjs +0 -146
  101. package/dist/_chunks/libs/graphology-types.d.mts +0 -601
  102. package/dist/_chunks/libs/graphology.d.mts +0 -6
  103. package/dist/_chunks/mnemonist.d.mts +0 -1
  104. package/dist/_chunks/mnemonist.mjs +0 -0
  105. package/dist/_chunks/model.mjs +0 -1898
  106. package/dist/_chunks/model2.mjs +0 -0
  107. package/dist/_chunks/relationships-view.mjs +0 -132
  108. package/dist/_chunks/scalar.d.mts +0 -109
  109. package/dist/_chunks/scalar.mjs +0 -84
  110. package/dist/_chunks/utils.mjs +0 -483
  111. package/dist/compute-view/relationships-view/index.d.mts +0 -16
  112. package/dist/compute-view/relationships-view/index.mjs +0 -7
  113. package/dist/model/connection/deployment/index.d.mts +0 -12
  114. package/dist/model/connection/deployment/index.mjs +0 -9
  115. package/dist/model/connection/index.d.mts +0 -14
  116. package/dist/model/connection/index.mjs +0 -10
  117. package/dist/model/connection/model/index.d.mts +0 -12
  118. package/dist/model/connection/model/index.mjs +0 -8
  119. package/dist/types/RichText.d.mts +0 -3
  120. package/dist/types/RichText.mjs +0 -7
  121. package/dist/types/_aux.d.mts +0 -3
  122. package/dist/types/_aux.mjs +0 -3
  123. package/dist/types/expression-model.d.mts +0 -6
  124. package/dist/types/expression-model.mjs +0 -7
  125. package/dist/types/expression.d.mts +0 -5
  126. package/dist/types/expression.mjs +0 -7
  127. package/dist/types/fqnRef.d.mts +0 -4
  128. package/dist/types/fqnRef.mjs +0 -7
  129. package/dist/types/scalar.d.mts +0 -2
  130. package/dist/types/scalar.mjs +0 -7
  131. package/dist/utils/iterable/index.d.mts +0 -9
  132. package/dist/utils/iterable/index.mjs +0 -3
  133. package/dist/utils/mnemonist.d.mts +0 -2
  134. package/dist/utils/mnemonist.mjs +0 -12
@@ -1,2696 +1,9 @@
1
- import { n as __exportAll } from "../rolldown-runtime.mjs";
2
- import { t as characterEntitiesLegacy } from "./character-entities-legacy.mjs";
3
- import { t as characterEntitiesHtml4 } from "./character-entities-html4.mjs";
4
- import { t as ccount } from "./ccount.mjs";
5
- import { t as stringify$1 } from "./comma-separated-tokens.mjs";
6
-
7
- //#region ../../node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js
8
- /**
9
- * List of HTML void tag names.
10
- *
11
- * @type {Array<string>}
12
- */
13
- const htmlVoidElements = [
14
- "area",
15
- "base",
16
- "basefont",
17
- "bgsound",
18
- "br",
19
- "col",
20
- "command",
21
- "embed",
22
- "frame",
23
- "hr",
24
- "image",
25
- "img",
26
- "input",
27
- "keygen",
28
- "link",
29
- "meta",
30
- "param",
31
- "source",
32
- "track",
33
- "wbr"
34
- ];
35
-
36
- //#endregion
37
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.js
38
- /**
39
- * @import {Schema as SchemaType, Space} from 'property-information'
40
- */
41
- /** @type {SchemaType} */
42
- var Schema = class {
43
- /**
44
- * @param {SchemaType['property']} property
45
- * Property.
46
- * @param {SchemaType['normal']} normal
47
- * Normal.
48
- * @param {Space | undefined} [space]
49
- * Space.
50
- * @returns
51
- * Schema.
52
- */
53
- constructor(property, normal, space) {
54
- this.normal = normal;
55
- this.property = property;
56
- if (space) this.space = space;
57
- }
58
- };
59
- Schema.prototype.normal = {};
60
- Schema.prototype.property = {};
61
- Schema.prototype.space = void 0;
62
-
63
- //#endregion
64
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.js
65
- /**
66
- * @import {Info, Space} from 'property-information'
67
- */
68
- /**
69
- * @param {ReadonlyArray<Schema>} definitions
70
- * Definitions.
71
- * @param {Space | undefined} [space]
72
- * Space.
73
- * @returns {Schema}
74
- * Schema.
75
- */
76
- function merge(definitions, space) {
77
- /** @type {Record<string, Info>} */
78
- const property = {};
79
- /** @type {Record<string, string>} */
80
- const normal = {};
81
- for (const definition of definitions) {
82
- Object.assign(property, definition.property);
83
- Object.assign(normal, definition.normal);
84
- }
85
- return new Schema(property, normal, space);
86
- }
87
-
88
- //#endregion
89
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.js
90
- /**
91
- * Get the cleaned case insensitive form of an attribute or property.
92
- *
93
- * @param {string} value
94
- * An attribute-like or property-like name.
95
- * @returns {string}
96
- * Value that can be used to look up the properly cased property on a
97
- * `Schema`.
98
- */
99
- function normalize(value) {
100
- return value.toLowerCase();
101
- }
102
-
103
- //#endregion
104
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.js
105
- /**
106
- * @import {Info as InfoType} from 'property-information'
107
- */
108
- /** @type {InfoType} */
109
- var Info = class {
110
- /**
111
- * @param {string} property
112
- * Property.
113
- * @param {string} attribute
114
- * Attribute.
115
- * @returns
116
- * Info.
117
- */
118
- constructor(property, attribute) {
119
- this.attribute = attribute;
120
- this.property = property;
121
- }
122
- };
123
- Info.prototype.attribute = "";
124
- Info.prototype.booleanish = false;
125
- Info.prototype.boolean = false;
126
- Info.prototype.commaOrSpaceSeparated = false;
127
- Info.prototype.commaSeparated = false;
128
- Info.prototype.defined = false;
129
- Info.prototype.mustUseProperty = false;
130
- Info.prototype.number = false;
131
- Info.prototype.overloadedBoolean = false;
132
- Info.prototype.property = "";
133
- Info.prototype.spaceSeparated = false;
134
- Info.prototype.space = void 0;
135
-
136
- //#endregion
137
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.js
138
- var types_exports = /* @__PURE__ */ __exportAll({
139
- boolean: () => boolean,
140
- booleanish: () => booleanish,
141
- commaOrSpaceSeparated: () => commaOrSpaceSeparated,
142
- commaSeparated: () => commaSeparated,
143
- number: () => number,
144
- overloadedBoolean: () => overloadedBoolean,
145
- spaceSeparated: () => spaceSeparated
146
- });
147
- let powers = 0;
148
- const boolean = increment();
149
- const booleanish = increment();
150
- const overloadedBoolean = increment();
151
- const number = increment();
152
- const spaceSeparated = increment();
153
- const commaSeparated = increment();
154
- const commaOrSpaceSeparated = increment();
155
- function increment() {
156
- return 2 ** ++powers;
157
- }
158
-
159
- //#endregion
160
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.js
161
- /**
162
- * @import {Space} from 'property-information'
163
- */
164
- const checks = Object.keys(types_exports);
165
- var DefinedInfo = class extends Info {
166
- /**
167
- * @constructor
168
- * @param {string} property
169
- * Property.
170
- * @param {string} attribute
171
- * Attribute.
172
- * @param {number | null | undefined} [mask]
173
- * Mask.
174
- * @param {Space | undefined} [space]
175
- * Space.
176
- * @returns
177
- * Info.
178
- */
179
- constructor(property, attribute, mask, space) {
180
- let index = -1;
181
- super(property, attribute);
182
- mark(this, "space", space);
183
- if (typeof mask === "number") while (++index < checks.length) {
184
- const check = checks[index];
185
- mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
186
- }
187
- }
188
- };
189
- DefinedInfo.prototype.defined = true;
190
- /**
191
- * @template {keyof DefinedInfo} Key
192
- * Key type.
193
- * @param {DefinedInfo} values
194
- * Info.
195
- * @param {Key} key
196
- * Key.
197
- * @param {DefinedInfo[Key]} value
198
- * Value.
199
- * @returns {undefined}
200
- * Nothing.
201
- */
202
- function mark(values, key, value) {
203
- if (value) values[key] = value;
204
- }
205
-
206
- //#endregion
207
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.js
208
- /**
209
- * @import {Info, Space} from 'property-information'
210
- */
211
- /**
212
- * @typedef Definition
213
- * Definition of a schema.
214
- * @property {Record<string, string> | undefined} [attributes]
215
- * Normalzed names to special attribute case.
216
- * @property {ReadonlyArray<string> | undefined} [mustUseProperty]
217
- * Normalized names that must be set as properties.
218
- * @property {Record<string, number | null>} properties
219
- * Property names to their types.
220
- * @property {Space | undefined} [space]
221
- * Space.
222
- * @property {Transform} transform
223
- * Transform a property name.
224
- */
225
- /**
226
- * @callback Transform
227
- * Transform.
228
- * @param {Record<string, string>} attributes
229
- * Attributes.
230
- * @param {string} property
231
- * Property.
232
- * @returns {string}
233
- * Attribute.
234
- */
235
- /**
236
- * @param {Definition} definition
237
- * Definition.
238
- * @returns {Schema}
239
- * Schema.
240
- */
241
- function create(definition) {
242
- /** @type {Record<string, Info>} */
243
- const properties = {};
244
- /** @type {Record<string, string>} */
245
- const normals = {};
246
- for (const [property, value] of Object.entries(definition.properties)) {
247
- const info = new DefinedInfo(property, definition.transform(definition.attributes || {}, property), value, definition.space);
248
- if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) info.mustUseProperty = true;
249
- properties[property] = info;
250
- normals[normalize(property)] = property;
251
- normals[normalize(info.attribute)] = property;
252
- }
253
- return new Schema(properties, normals, definition.space);
254
- }
255
-
256
- //#endregion
257
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.js
258
- const aria = create({
259
- properties: {
260
- ariaActiveDescendant: null,
261
- ariaAtomic: booleanish,
262
- ariaAutoComplete: null,
263
- ariaBusy: booleanish,
264
- ariaChecked: booleanish,
265
- ariaColCount: number,
266
- ariaColIndex: number,
267
- ariaColSpan: number,
268
- ariaControls: spaceSeparated,
269
- ariaCurrent: null,
270
- ariaDescribedBy: spaceSeparated,
271
- ariaDetails: null,
272
- ariaDisabled: booleanish,
273
- ariaDropEffect: spaceSeparated,
274
- ariaErrorMessage: null,
275
- ariaExpanded: booleanish,
276
- ariaFlowTo: spaceSeparated,
277
- ariaGrabbed: booleanish,
278
- ariaHasPopup: null,
279
- ariaHidden: booleanish,
280
- ariaInvalid: null,
281
- ariaKeyShortcuts: null,
282
- ariaLabel: null,
283
- ariaLabelledBy: spaceSeparated,
284
- ariaLevel: number,
285
- ariaLive: null,
286
- ariaModal: booleanish,
287
- ariaMultiLine: booleanish,
288
- ariaMultiSelectable: booleanish,
289
- ariaOrientation: null,
290
- ariaOwns: spaceSeparated,
291
- ariaPlaceholder: null,
292
- ariaPosInSet: number,
293
- ariaPressed: booleanish,
294
- ariaReadOnly: booleanish,
295
- ariaRelevant: null,
296
- ariaRequired: booleanish,
297
- ariaRoleDescription: spaceSeparated,
298
- ariaRowCount: number,
299
- ariaRowIndex: number,
300
- ariaRowSpan: number,
301
- ariaSelected: booleanish,
302
- ariaSetSize: number,
303
- ariaSort: null,
304
- ariaValueMax: number,
305
- ariaValueMin: number,
306
- ariaValueNow: number,
307
- ariaValueText: null,
308
- role: null
309
- },
310
- transform(_, property) {
311
- return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
312
- }
313
- });
314
-
315
- //#endregion
316
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.js
317
- /**
318
- * @param {Record<string, string>} attributes
319
- * Attributes.
320
- * @param {string} attribute
321
- * Attribute.
322
- * @returns {string}
323
- * Transformed attribute.
324
- */
325
- function caseSensitiveTransform(attributes, attribute) {
326
- return attribute in attributes ? attributes[attribute] : attribute;
327
- }
328
-
329
- //#endregion
330
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.js
331
- /**
332
- * @param {Record<string, string>} attributes
333
- * Attributes.
334
- * @param {string} property
335
- * Property.
336
- * @returns {string}
337
- * Transformed property.
338
- */
339
- function caseInsensitiveTransform(attributes, property) {
340
- return caseSensitiveTransform(attributes, property.toLowerCase());
341
- }
342
-
343
- //#endregion
344
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.js
345
- const html$3 = create({
346
- attributes: {
347
- acceptcharset: "accept-charset",
348
- classname: "class",
349
- htmlfor: "for",
350
- httpequiv: "http-equiv"
351
- },
352
- mustUseProperty: [
353
- "checked",
354
- "multiple",
355
- "muted",
356
- "selected"
357
- ],
358
- properties: {
359
- abbr: null,
360
- accept: commaSeparated,
361
- acceptCharset: spaceSeparated,
362
- accessKey: spaceSeparated,
363
- action: null,
364
- allow: null,
365
- allowFullScreen: boolean,
366
- allowPaymentRequest: boolean,
367
- allowUserMedia: boolean,
368
- alt: null,
369
- as: null,
370
- async: boolean,
371
- autoCapitalize: null,
372
- autoComplete: spaceSeparated,
373
- autoFocus: boolean,
374
- autoPlay: boolean,
375
- blocking: spaceSeparated,
376
- capture: null,
377
- charSet: null,
378
- checked: boolean,
379
- cite: null,
380
- className: spaceSeparated,
381
- cols: number,
382
- colSpan: null,
383
- content: null,
384
- contentEditable: booleanish,
385
- controls: boolean,
386
- controlsList: spaceSeparated,
387
- coords: number | commaSeparated,
388
- crossOrigin: null,
389
- data: null,
390
- dateTime: null,
391
- decoding: null,
392
- default: boolean,
393
- defer: boolean,
394
- dir: null,
395
- dirName: null,
396
- disabled: boolean,
397
- download: overloadedBoolean,
398
- draggable: booleanish,
399
- encType: null,
400
- enterKeyHint: null,
401
- fetchPriority: null,
402
- form: null,
403
- formAction: null,
404
- formEncType: null,
405
- formMethod: null,
406
- formNoValidate: boolean,
407
- formTarget: null,
408
- headers: spaceSeparated,
409
- height: number,
410
- hidden: boolean,
411
- high: number,
412
- href: null,
413
- hrefLang: null,
414
- htmlFor: spaceSeparated,
415
- httpEquiv: spaceSeparated,
416
- id: null,
417
- imageSizes: null,
418
- imageSrcSet: null,
419
- inert: boolean,
420
- inputMode: null,
421
- integrity: null,
422
- is: null,
423
- isMap: boolean,
424
- itemId: null,
425
- itemProp: spaceSeparated,
426
- itemRef: spaceSeparated,
427
- itemScope: boolean,
428
- itemType: spaceSeparated,
429
- kind: null,
430
- label: null,
431
- lang: null,
432
- language: null,
433
- list: null,
434
- loading: null,
435
- loop: boolean,
436
- low: number,
437
- manifest: null,
438
- max: null,
439
- maxLength: number,
440
- media: null,
441
- method: null,
442
- min: null,
443
- minLength: number,
444
- multiple: boolean,
445
- muted: boolean,
446
- name: null,
447
- nonce: null,
448
- noModule: boolean,
449
- noValidate: boolean,
450
- onAbort: null,
451
- onAfterPrint: null,
452
- onAuxClick: null,
453
- onBeforeMatch: null,
454
- onBeforePrint: null,
455
- onBeforeToggle: null,
456
- onBeforeUnload: null,
457
- onBlur: null,
458
- onCancel: null,
459
- onCanPlay: null,
460
- onCanPlayThrough: null,
461
- onChange: null,
462
- onClick: null,
463
- onClose: null,
464
- onContextLost: null,
465
- onContextMenu: null,
466
- onContextRestored: null,
467
- onCopy: null,
468
- onCueChange: null,
469
- onCut: null,
470
- onDblClick: null,
471
- onDrag: null,
472
- onDragEnd: null,
473
- onDragEnter: null,
474
- onDragExit: null,
475
- onDragLeave: null,
476
- onDragOver: null,
477
- onDragStart: null,
478
- onDrop: null,
479
- onDurationChange: null,
480
- onEmptied: null,
481
- onEnded: null,
482
- onError: null,
483
- onFocus: null,
484
- onFormData: null,
485
- onHashChange: null,
486
- onInput: null,
487
- onInvalid: null,
488
- onKeyDown: null,
489
- onKeyPress: null,
490
- onKeyUp: null,
491
- onLanguageChange: null,
492
- onLoad: null,
493
- onLoadedData: null,
494
- onLoadedMetadata: null,
495
- onLoadEnd: null,
496
- onLoadStart: null,
497
- onMessage: null,
498
- onMessageError: null,
499
- onMouseDown: null,
500
- onMouseEnter: null,
501
- onMouseLeave: null,
502
- onMouseMove: null,
503
- onMouseOut: null,
504
- onMouseOver: null,
505
- onMouseUp: null,
506
- onOffline: null,
507
- onOnline: null,
508
- onPageHide: null,
509
- onPageShow: null,
510
- onPaste: null,
511
- onPause: null,
512
- onPlay: null,
513
- onPlaying: null,
514
- onPopState: null,
515
- onProgress: null,
516
- onRateChange: null,
517
- onRejectionHandled: null,
518
- onReset: null,
519
- onResize: null,
520
- onScroll: null,
521
- onScrollEnd: null,
522
- onSecurityPolicyViolation: null,
523
- onSeeked: null,
524
- onSeeking: null,
525
- onSelect: null,
526
- onSlotChange: null,
527
- onStalled: null,
528
- onStorage: null,
529
- onSubmit: null,
530
- onSuspend: null,
531
- onTimeUpdate: null,
532
- onToggle: null,
533
- onUnhandledRejection: null,
534
- onUnload: null,
535
- onVolumeChange: null,
536
- onWaiting: null,
537
- onWheel: null,
538
- open: boolean,
539
- optimum: number,
540
- pattern: null,
541
- ping: spaceSeparated,
542
- placeholder: null,
543
- playsInline: boolean,
544
- popover: null,
545
- popoverTarget: null,
546
- popoverTargetAction: null,
547
- poster: null,
548
- preload: null,
549
- readOnly: boolean,
550
- referrerPolicy: null,
551
- rel: spaceSeparated,
552
- required: boolean,
553
- reversed: boolean,
554
- rows: number,
555
- rowSpan: number,
556
- sandbox: spaceSeparated,
557
- scope: null,
558
- scoped: boolean,
559
- seamless: boolean,
560
- selected: boolean,
561
- shadowRootClonable: boolean,
562
- shadowRootDelegatesFocus: boolean,
563
- shadowRootMode: null,
564
- shape: null,
565
- size: number,
566
- sizes: null,
567
- slot: null,
568
- span: number,
569
- spellCheck: booleanish,
570
- src: null,
571
- srcDoc: null,
572
- srcLang: null,
573
- srcSet: null,
574
- start: number,
575
- step: null,
576
- style: null,
577
- tabIndex: number,
578
- target: null,
579
- title: null,
580
- translate: null,
581
- type: null,
582
- typeMustMatch: boolean,
583
- useMap: null,
584
- value: booleanish,
585
- width: number,
586
- wrap: null,
587
- writingSuggestions: null,
588
- align: null,
589
- aLink: null,
590
- archive: spaceSeparated,
591
- axis: null,
592
- background: null,
593
- bgColor: null,
594
- border: number,
595
- borderColor: null,
596
- bottomMargin: number,
597
- cellPadding: null,
598
- cellSpacing: null,
599
- char: null,
600
- charOff: null,
601
- classId: null,
602
- clear: null,
603
- code: null,
604
- codeBase: null,
605
- codeType: null,
606
- color: null,
607
- compact: boolean,
608
- declare: boolean,
609
- event: null,
610
- face: null,
611
- frame: null,
612
- frameBorder: null,
613
- hSpace: number,
614
- leftMargin: number,
615
- link: null,
616
- longDesc: null,
617
- lowSrc: null,
618
- marginHeight: number,
619
- marginWidth: number,
620
- noResize: boolean,
621
- noHref: boolean,
622
- noShade: boolean,
623
- noWrap: boolean,
624
- object: null,
625
- profile: null,
626
- prompt: null,
627
- rev: null,
628
- rightMargin: number,
629
- rules: null,
630
- scheme: null,
631
- scrolling: booleanish,
632
- standby: null,
633
- summary: null,
634
- text: null,
635
- topMargin: number,
636
- valueType: null,
637
- version: null,
638
- vAlign: null,
639
- vLink: null,
640
- vSpace: number,
641
- allowTransparency: null,
642
- autoCorrect: null,
643
- autoSave: null,
644
- disablePictureInPicture: boolean,
645
- disableRemotePlayback: boolean,
646
- prefix: null,
647
- property: null,
648
- results: number,
649
- security: null,
650
- unselectable: null
651
- },
652
- space: "html",
653
- transform: caseInsensitiveTransform
654
- });
655
-
656
- //#endregion
657
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.js
658
- const svg$1 = create({
659
- attributes: {
660
- accentHeight: "accent-height",
661
- alignmentBaseline: "alignment-baseline",
662
- arabicForm: "arabic-form",
663
- baselineShift: "baseline-shift",
664
- capHeight: "cap-height",
665
- className: "class",
666
- clipPath: "clip-path",
667
- clipRule: "clip-rule",
668
- colorInterpolation: "color-interpolation",
669
- colorInterpolationFilters: "color-interpolation-filters",
670
- colorProfile: "color-profile",
671
- colorRendering: "color-rendering",
672
- crossOrigin: "crossorigin",
673
- dataType: "datatype",
674
- dominantBaseline: "dominant-baseline",
675
- enableBackground: "enable-background",
676
- fillOpacity: "fill-opacity",
677
- fillRule: "fill-rule",
678
- floodColor: "flood-color",
679
- floodOpacity: "flood-opacity",
680
- fontFamily: "font-family",
681
- fontSize: "font-size",
682
- fontSizeAdjust: "font-size-adjust",
683
- fontStretch: "font-stretch",
684
- fontStyle: "font-style",
685
- fontVariant: "font-variant",
686
- fontWeight: "font-weight",
687
- glyphName: "glyph-name",
688
- glyphOrientationHorizontal: "glyph-orientation-horizontal",
689
- glyphOrientationVertical: "glyph-orientation-vertical",
690
- hrefLang: "hreflang",
691
- horizAdvX: "horiz-adv-x",
692
- horizOriginX: "horiz-origin-x",
693
- horizOriginY: "horiz-origin-y",
694
- imageRendering: "image-rendering",
695
- letterSpacing: "letter-spacing",
696
- lightingColor: "lighting-color",
697
- markerEnd: "marker-end",
698
- markerMid: "marker-mid",
699
- markerStart: "marker-start",
700
- navDown: "nav-down",
701
- navDownLeft: "nav-down-left",
702
- navDownRight: "nav-down-right",
703
- navLeft: "nav-left",
704
- navNext: "nav-next",
705
- navPrev: "nav-prev",
706
- navRight: "nav-right",
707
- navUp: "nav-up",
708
- navUpLeft: "nav-up-left",
709
- navUpRight: "nav-up-right",
710
- onAbort: "onabort",
711
- onActivate: "onactivate",
712
- onAfterPrint: "onafterprint",
713
- onBeforePrint: "onbeforeprint",
714
- onBegin: "onbegin",
715
- onCancel: "oncancel",
716
- onCanPlay: "oncanplay",
717
- onCanPlayThrough: "oncanplaythrough",
718
- onChange: "onchange",
719
- onClick: "onclick",
720
- onClose: "onclose",
721
- onCopy: "oncopy",
722
- onCueChange: "oncuechange",
723
- onCut: "oncut",
724
- onDblClick: "ondblclick",
725
- onDrag: "ondrag",
726
- onDragEnd: "ondragend",
727
- onDragEnter: "ondragenter",
728
- onDragExit: "ondragexit",
729
- onDragLeave: "ondragleave",
730
- onDragOver: "ondragover",
731
- onDragStart: "ondragstart",
732
- onDrop: "ondrop",
733
- onDurationChange: "ondurationchange",
734
- onEmptied: "onemptied",
735
- onEnd: "onend",
736
- onEnded: "onended",
737
- onError: "onerror",
738
- onFocus: "onfocus",
739
- onFocusIn: "onfocusin",
740
- onFocusOut: "onfocusout",
741
- onHashChange: "onhashchange",
742
- onInput: "oninput",
743
- onInvalid: "oninvalid",
744
- onKeyDown: "onkeydown",
745
- onKeyPress: "onkeypress",
746
- onKeyUp: "onkeyup",
747
- onLoad: "onload",
748
- onLoadedData: "onloadeddata",
749
- onLoadedMetadata: "onloadedmetadata",
750
- onLoadStart: "onloadstart",
751
- onMessage: "onmessage",
752
- onMouseDown: "onmousedown",
753
- onMouseEnter: "onmouseenter",
754
- onMouseLeave: "onmouseleave",
755
- onMouseMove: "onmousemove",
756
- onMouseOut: "onmouseout",
757
- onMouseOver: "onmouseover",
758
- onMouseUp: "onmouseup",
759
- onMouseWheel: "onmousewheel",
760
- onOffline: "onoffline",
761
- onOnline: "ononline",
762
- onPageHide: "onpagehide",
763
- onPageShow: "onpageshow",
764
- onPaste: "onpaste",
765
- onPause: "onpause",
766
- onPlay: "onplay",
767
- onPlaying: "onplaying",
768
- onPopState: "onpopstate",
769
- onProgress: "onprogress",
770
- onRateChange: "onratechange",
771
- onRepeat: "onrepeat",
772
- onReset: "onreset",
773
- onResize: "onresize",
774
- onScroll: "onscroll",
775
- onSeeked: "onseeked",
776
- onSeeking: "onseeking",
777
- onSelect: "onselect",
778
- onShow: "onshow",
779
- onStalled: "onstalled",
780
- onStorage: "onstorage",
781
- onSubmit: "onsubmit",
782
- onSuspend: "onsuspend",
783
- onTimeUpdate: "ontimeupdate",
784
- onToggle: "ontoggle",
785
- onUnload: "onunload",
786
- onVolumeChange: "onvolumechange",
787
- onWaiting: "onwaiting",
788
- onZoom: "onzoom",
789
- overlinePosition: "overline-position",
790
- overlineThickness: "overline-thickness",
791
- paintOrder: "paint-order",
792
- panose1: "panose-1",
793
- pointerEvents: "pointer-events",
794
- referrerPolicy: "referrerpolicy",
795
- renderingIntent: "rendering-intent",
796
- shapeRendering: "shape-rendering",
797
- stopColor: "stop-color",
798
- stopOpacity: "stop-opacity",
799
- strikethroughPosition: "strikethrough-position",
800
- strikethroughThickness: "strikethrough-thickness",
801
- strokeDashArray: "stroke-dasharray",
802
- strokeDashOffset: "stroke-dashoffset",
803
- strokeLineCap: "stroke-linecap",
804
- strokeLineJoin: "stroke-linejoin",
805
- strokeMiterLimit: "stroke-miterlimit",
806
- strokeOpacity: "stroke-opacity",
807
- strokeWidth: "stroke-width",
808
- tabIndex: "tabindex",
809
- textAnchor: "text-anchor",
810
- textDecoration: "text-decoration",
811
- textRendering: "text-rendering",
812
- transformOrigin: "transform-origin",
813
- typeOf: "typeof",
814
- underlinePosition: "underline-position",
815
- underlineThickness: "underline-thickness",
816
- unicodeBidi: "unicode-bidi",
817
- unicodeRange: "unicode-range",
818
- unitsPerEm: "units-per-em",
819
- vAlphabetic: "v-alphabetic",
820
- vHanging: "v-hanging",
821
- vIdeographic: "v-ideographic",
822
- vMathematical: "v-mathematical",
823
- vectorEffect: "vector-effect",
824
- vertAdvY: "vert-adv-y",
825
- vertOriginX: "vert-origin-x",
826
- vertOriginY: "vert-origin-y",
827
- wordSpacing: "word-spacing",
828
- writingMode: "writing-mode",
829
- xHeight: "x-height",
830
- playbackOrder: "playbackorder",
831
- timelineBegin: "timelinebegin"
832
- },
833
- properties: {
834
- about: commaOrSpaceSeparated,
835
- accentHeight: number,
836
- accumulate: null,
837
- additive: null,
838
- alignmentBaseline: null,
839
- alphabetic: number,
840
- amplitude: number,
841
- arabicForm: null,
842
- ascent: number,
843
- attributeName: null,
844
- attributeType: null,
845
- azimuth: number,
846
- bandwidth: null,
847
- baselineShift: null,
848
- baseFrequency: null,
849
- baseProfile: null,
850
- bbox: null,
851
- begin: null,
852
- bias: number,
853
- by: null,
854
- calcMode: null,
855
- capHeight: number,
856
- className: spaceSeparated,
857
- clip: null,
858
- clipPath: null,
859
- clipPathUnits: null,
860
- clipRule: null,
861
- color: null,
862
- colorInterpolation: null,
863
- colorInterpolationFilters: null,
864
- colorProfile: null,
865
- colorRendering: null,
866
- content: null,
867
- contentScriptType: null,
868
- contentStyleType: null,
869
- crossOrigin: null,
870
- cursor: null,
871
- cx: null,
872
- cy: null,
873
- d: null,
874
- dataType: null,
875
- defaultAction: null,
876
- descent: number,
877
- diffuseConstant: number,
878
- direction: null,
879
- display: null,
880
- dur: null,
881
- divisor: number,
882
- dominantBaseline: null,
883
- download: boolean,
884
- dx: null,
885
- dy: null,
886
- edgeMode: null,
887
- editable: null,
888
- elevation: number,
889
- enableBackground: null,
890
- end: null,
891
- event: null,
892
- exponent: number,
893
- externalResourcesRequired: null,
894
- fill: null,
895
- fillOpacity: number,
896
- fillRule: null,
897
- filter: null,
898
- filterRes: null,
899
- filterUnits: null,
900
- floodColor: null,
901
- floodOpacity: null,
902
- focusable: null,
903
- focusHighlight: null,
904
- fontFamily: null,
905
- fontSize: null,
906
- fontSizeAdjust: null,
907
- fontStretch: null,
908
- fontStyle: null,
909
- fontVariant: null,
910
- fontWeight: null,
911
- format: null,
912
- fr: null,
913
- from: null,
914
- fx: null,
915
- fy: null,
916
- g1: commaSeparated,
917
- g2: commaSeparated,
918
- glyphName: commaSeparated,
919
- glyphOrientationHorizontal: null,
920
- glyphOrientationVertical: null,
921
- glyphRef: null,
922
- gradientTransform: null,
923
- gradientUnits: null,
924
- handler: null,
925
- hanging: number,
926
- hatchContentUnits: null,
927
- hatchUnits: null,
928
- height: null,
929
- href: null,
930
- hrefLang: null,
931
- horizAdvX: number,
932
- horizOriginX: number,
933
- horizOriginY: number,
934
- id: null,
935
- ideographic: number,
936
- imageRendering: null,
937
- initialVisibility: null,
938
- in: null,
939
- in2: null,
940
- intercept: number,
941
- k: number,
942
- k1: number,
943
- k2: number,
944
- k3: number,
945
- k4: number,
946
- kernelMatrix: commaOrSpaceSeparated,
947
- kernelUnitLength: null,
948
- keyPoints: null,
949
- keySplines: null,
950
- keyTimes: null,
951
- kerning: null,
952
- lang: null,
953
- lengthAdjust: null,
954
- letterSpacing: null,
955
- lightingColor: null,
956
- limitingConeAngle: number,
957
- local: null,
958
- markerEnd: null,
959
- markerMid: null,
960
- markerStart: null,
961
- markerHeight: null,
962
- markerUnits: null,
963
- markerWidth: null,
964
- mask: null,
965
- maskContentUnits: null,
966
- maskUnits: null,
967
- mathematical: null,
968
- max: null,
969
- media: null,
970
- mediaCharacterEncoding: null,
971
- mediaContentEncodings: null,
972
- mediaSize: number,
973
- mediaTime: null,
974
- method: null,
975
- min: null,
976
- mode: null,
977
- name: null,
978
- navDown: null,
979
- navDownLeft: null,
980
- navDownRight: null,
981
- navLeft: null,
982
- navNext: null,
983
- navPrev: null,
984
- navRight: null,
985
- navUp: null,
986
- navUpLeft: null,
987
- navUpRight: null,
988
- numOctaves: null,
989
- observer: null,
990
- offset: null,
991
- onAbort: null,
992
- onActivate: null,
993
- onAfterPrint: null,
994
- onBeforePrint: null,
995
- onBegin: null,
996
- onCancel: null,
997
- onCanPlay: null,
998
- onCanPlayThrough: null,
999
- onChange: null,
1000
- onClick: null,
1001
- onClose: null,
1002
- onCopy: null,
1003
- onCueChange: null,
1004
- onCut: null,
1005
- onDblClick: null,
1006
- onDrag: null,
1007
- onDragEnd: null,
1008
- onDragEnter: null,
1009
- onDragExit: null,
1010
- onDragLeave: null,
1011
- onDragOver: null,
1012
- onDragStart: null,
1013
- onDrop: null,
1014
- onDurationChange: null,
1015
- onEmptied: null,
1016
- onEnd: null,
1017
- onEnded: null,
1018
- onError: null,
1019
- onFocus: null,
1020
- onFocusIn: null,
1021
- onFocusOut: null,
1022
- onHashChange: null,
1023
- onInput: null,
1024
- onInvalid: null,
1025
- onKeyDown: null,
1026
- onKeyPress: null,
1027
- onKeyUp: null,
1028
- onLoad: null,
1029
- onLoadedData: null,
1030
- onLoadedMetadata: null,
1031
- onLoadStart: null,
1032
- onMessage: null,
1033
- onMouseDown: null,
1034
- onMouseEnter: null,
1035
- onMouseLeave: null,
1036
- onMouseMove: null,
1037
- onMouseOut: null,
1038
- onMouseOver: null,
1039
- onMouseUp: null,
1040
- onMouseWheel: null,
1041
- onOffline: null,
1042
- onOnline: null,
1043
- onPageHide: null,
1044
- onPageShow: null,
1045
- onPaste: null,
1046
- onPause: null,
1047
- onPlay: null,
1048
- onPlaying: null,
1049
- onPopState: null,
1050
- onProgress: null,
1051
- onRateChange: null,
1052
- onRepeat: null,
1053
- onReset: null,
1054
- onResize: null,
1055
- onScroll: null,
1056
- onSeeked: null,
1057
- onSeeking: null,
1058
- onSelect: null,
1059
- onShow: null,
1060
- onStalled: null,
1061
- onStorage: null,
1062
- onSubmit: null,
1063
- onSuspend: null,
1064
- onTimeUpdate: null,
1065
- onToggle: null,
1066
- onUnload: null,
1067
- onVolumeChange: null,
1068
- onWaiting: null,
1069
- onZoom: null,
1070
- opacity: null,
1071
- operator: null,
1072
- order: null,
1073
- orient: null,
1074
- orientation: null,
1075
- origin: null,
1076
- overflow: null,
1077
- overlay: null,
1078
- overlinePosition: number,
1079
- overlineThickness: number,
1080
- paintOrder: null,
1081
- panose1: null,
1082
- path: null,
1083
- pathLength: number,
1084
- patternContentUnits: null,
1085
- patternTransform: null,
1086
- patternUnits: null,
1087
- phase: null,
1088
- ping: spaceSeparated,
1089
- pitch: null,
1090
- playbackOrder: null,
1091
- pointerEvents: null,
1092
- points: null,
1093
- pointsAtX: number,
1094
- pointsAtY: number,
1095
- pointsAtZ: number,
1096
- preserveAlpha: null,
1097
- preserveAspectRatio: null,
1098
- primitiveUnits: null,
1099
- propagate: null,
1100
- property: commaOrSpaceSeparated,
1101
- r: null,
1102
- radius: null,
1103
- referrerPolicy: null,
1104
- refX: null,
1105
- refY: null,
1106
- rel: commaOrSpaceSeparated,
1107
- rev: commaOrSpaceSeparated,
1108
- renderingIntent: null,
1109
- repeatCount: null,
1110
- repeatDur: null,
1111
- requiredExtensions: commaOrSpaceSeparated,
1112
- requiredFeatures: commaOrSpaceSeparated,
1113
- requiredFonts: commaOrSpaceSeparated,
1114
- requiredFormats: commaOrSpaceSeparated,
1115
- resource: null,
1116
- restart: null,
1117
- result: null,
1118
- rotate: null,
1119
- rx: null,
1120
- ry: null,
1121
- scale: null,
1122
- seed: null,
1123
- shapeRendering: null,
1124
- side: null,
1125
- slope: null,
1126
- snapshotTime: null,
1127
- specularConstant: number,
1128
- specularExponent: number,
1129
- spreadMethod: null,
1130
- spacing: null,
1131
- startOffset: null,
1132
- stdDeviation: null,
1133
- stemh: null,
1134
- stemv: null,
1135
- stitchTiles: null,
1136
- stopColor: null,
1137
- stopOpacity: null,
1138
- strikethroughPosition: number,
1139
- strikethroughThickness: number,
1140
- string: null,
1141
- stroke: null,
1142
- strokeDashArray: commaOrSpaceSeparated,
1143
- strokeDashOffset: null,
1144
- strokeLineCap: null,
1145
- strokeLineJoin: null,
1146
- strokeMiterLimit: number,
1147
- strokeOpacity: number,
1148
- strokeWidth: null,
1149
- style: null,
1150
- surfaceScale: number,
1151
- syncBehavior: null,
1152
- syncBehaviorDefault: null,
1153
- syncMaster: null,
1154
- syncTolerance: null,
1155
- syncToleranceDefault: null,
1156
- systemLanguage: commaOrSpaceSeparated,
1157
- tabIndex: number,
1158
- tableValues: null,
1159
- target: null,
1160
- targetX: number,
1161
- targetY: number,
1162
- textAnchor: null,
1163
- textDecoration: null,
1164
- textRendering: null,
1165
- textLength: null,
1166
- timelineBegin: null,
1167
- title: null,
1168
- transformBehavior: null,
1169
- type: null,
1170
- typeOf: commaOrSpaceSeparated,
1171
- to: null,
1172
- transform: null,
1173
- transformOrigin: null,
1174
- u1: null,
1175
- u2: null,
1176
- underlinePosition: number,
1177
- underlineThickness: number,
1178
- unicode: null,
1179
- unicodeBidi: null,
1180
- unicodeRange: null,
1181
- unitsPerEm: number,
1182
- values: null,
1183
- vAlphabetic: number,
1184
- vMathematical: number,
1185
- vectorEffect: null,
1186
- vHanging: number,
1187
- vIdeographic: number,
1188
- version: null,
1189
- vertAdvY: number,
1190
- vertOriginX: number,
1191
- vertOriginY: number,
1192
- viewBox: null,
1193
- viewTarget: null,
1194
- visibility: null,
1195
- width: null,
1196
- widths: null,
1197
- wordSpacing: null,
1198
- writingMode: null,
1199
- x: null,
1200
- x1: null,
1201
- x2: null,
1202
- xChannelSelector: null,
1203
- xHeight: number,
1204
- y: null,
1205
- y1: null,
1206
- y2: null,
1207
- yChannelSelector: null,
1208
- z: null,
1209
- zoomAndPan: null
1210
- },
1211
- space: "svg",
1212
- transform: caseSensitiveTransform
1213
- });
1214
-
1215
- //#endregion
1216
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.js
1217
- const xlink = create({
1218
- properties: {
1219
- xLinkActuate: null,
1220
- xLinkArcRole: null,
1221
- xLinkHref: null,
1222
- xLinkRole: null,
1223
- xLinkShow: null,
1224
- xLinkTitle: null,
1225
- xLinkType: null
1226
- },
1227
- space: "xlink",
1228
- transform(_, property) {
1229
- return "xlink:" + property.slice(5).toLowerCase();
1230
- }
1231
- });
1232
-
1233
- //#endregion
1234
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.js
1235
- const xmlns = create({
1236
- attributes: { xmlnsxlink: "xmlns:xlink" },
1237
- properties: {
1238
- xmlnsXLink: null,
1239
- xmlns: null
1240
- },
1241
- space: "xmlns",
1242
- transform: caseInsensitiveTransform
1243
- });
1244
-
1245
- //#endregion
1246
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.js
1247
- const xml = create({
1248
- properties: {
1249
- xmlBase: null,
1250
- xmlLang: null,
1251
- xmlSpace: null
1252
- },
1253
- space: "xml",
1254
- transform(_, property) {
1255
- return "xml:" + property.slice(3).toLowerCase();
1256
- }
1257
- });
1258
-
1259
- //#endregion
1260
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.js
1261
- /**
1262
- * @import {Schema} from 'property-information'
1263
- */
1264
- const cap = /[A-Z]/g;
1265
- const dash = /-[a-z]/g;
1266
- const valid = /^data[-\w.:]+$/i;
1267
- /**
1268
- * Look up info on a property.
1269
- *
1270
- * In most cases the given `schema` contains info on the property.
1271
- * All standard,
1272
- * most legacy,
1273
- * and some non-standard properties are supported.
1274
- * For these cases,
1275
- * the returned `Info` has hints about the value of the property.
1276
- *
1277
- * `name` can also be a valid data attribute or property,
1278
- * in which case an `Info` object with the correctly cased `attribute` and
1279
- * `property` is returned.
1280
- *
1281
- * `name` can be an unknown attribute,
1282
- * in which case an `Info` object with `attribute` and `property` set to the
1283
- * given name is returned.
1284
- * It is not recommended to provide unsupported legacy or recently specced
1285
- * properties.
1286
- *
1287
- *
1288
- * @param {Schema} schema
1289
- * Schema;
1290
- * either the `html` or `svg` export.
1291
- * @param {string} value
1292
- * An attribute-like or property-like name;
1293
- * it will be passed through `normalize` to hopefully find the correct info.
1294
- * @returns {Info}
1295
- * Info.
1296
- */
1297
- function find(schema, value) {
1298
- const normal = normalize(value);
1299
- let property = value;
1300
- let Type = Info;
1301
- if (normal in schema.normal) return schema.property[schema.normal[normal]];
1302
- if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
1303
- if (value.charAt(4) === "-") {
1304
- const rest = value.slice(5).replace(dash, camelcase);
1305
- property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
1306
- } else {
1307
- const rest = value.slice(4);
1308
- if (!dash.test(rest)) {
1309
- let dashes = rest.replace(cap, kebab);
1310
- if (dashes.charAt(0) !== "-") dashes = "-" + dashes;
1311
- value = "data" + dashes;
1312
- }
1313
- }
1314
- Type = DefinedInfo;
1315
- }
1316
- return new Type(property, value);
1317
- }
1318
- /**
1319
- * @param {string} $0
1320
- * Value.
1321
- * @returns {string}
1322
- * Kebab.
1323
- */
1324
- function kebab($0) {
1325
- return "-" + $0.toLowerCase();
1326
- }
1327
- /**
1328
- * @param {string} $0
1329
- * Value.
1330
- * @returns {string}
1331
- * Camel.
1332
- */
1333
- function camelcase($0) {
1334
- return $0.charAt(1).toUpperCase();
1335
- }
1336
-
1337
- //#endregion
1338
- //#region ../../node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.js
1339
- const html$2 = merge([
1340
- aria,
1341
- html$3,
1342
- xlink,
1343
- xmlns,
1344
- xml
1345
- ], "html");
1346
- const svg = merge([
1347
- aria,
1348
- svg$1,
1349
- xlink,
1350
- xmlns,
1351
- xml
1352
- ], "svg");
1353
-
1354
- //#endregion
1355
- //#region ../../node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js
1356
- /**
1357
- * @callback Handler
1358
- * Handle a value, with a certain ID field set to a certain value.
1359
- * The ID field is passed to `zwitch`, and it’s value is this function’s
1360
- * place on the `handlers` record.
1361
- * @param {...any} parameters
1362
- * Arbitrary parameters passed to the zwitch.
1363
- * The first will be an object with a certain ID field set to a certain value.
1364
- * @returns {any}
1365
- * Anything!
1366
- */
1367
- /**
1368
- * @callback UnknownHandler
1369
- * Handle values that do have a certain ID field, but it’s set to a value
1370
- * that is not listed in the `handlers` record.
1371
- * @param {unknown} value
1372
- * An object with a certain ID field set to an unknown value.
1373
- * @param {...any} rest
1374
- * Arbitrary parameters passed to the zwitch.
1375
- * @returns {any}
1376
- * Anything!
1377
- */
1378
- /**
1379
- * @callback InvalidHandler
1380
- * Handle values that do not have a certain ID field.
1381
- * @param {unknown} value
1382
- * Any unknown value.
1383
- * @param {...any} rest
1384
- * Arbitrary parameters passed to the zwitch.
1385
- * @returns {void|null|undefined|never}
1386
- * This should crash or return nothing.
1387
- */
1388
- /**
1389
- * @template {InvalidHandler} [Invalid=InvalidHandler]
1390
- * @template {UnknownHandler} [Unknown=UnknownHandler]
1391
- * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
1392
- * @typedef Options
1393
- * Configuration (required).
1394
- * @property {Invalid} [invalid]
1395
- * Handler to use for invalid values.
1396
- * @property {Unknown} [unknown]
1397
- * Handler to use for unknown values.
1398
- * @property {Handlers} [handlers]
1399
- * Handlers to use.
1400
- */
1401
- const own$2 = {}.hasOwnProperty;
1402
- /**
1403
- * Handle values based on a field.
1404
- *
1405
- * @template {InvalidHandler} [Invalid=InvalidHandler]
1406
- * @template {UnknownHandler} [Unknown=UnknownHandler]
1407
- * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
1408
- * @param {string} key
1409
- * Field to switch on.
1410
- * @param {Options<Invalid, Unknown, Handlers>} [options]
1411
- * Configuration (required).
1412
- * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}
1413
- */
1414
- function zwitch(key, options) {
1415
- const settings = options || {};
1416
- /**
1417
- * Handle one value.
1418
- *
1419
- * Based on the bound `key`, a respective handler will be called.
1420
- * If `value` is not an object, or doesn’t have a `key` property, the special
1421
- * “invalid” handler will be called.
1422
- * If `value` has an unknown `key`, the special “unknown” handler will be
1423
- * called.
1424
- *
1425
- * All arguments, and the context object, are passed through to the handler,
1426
- * and it’s result is returned.
1427
- *
1428
- * @this {unknown}
1429
- * Any context object.
1430
- * @param {unknown} [value]
1431
- * Any value.
1432
- * @param {...unknown} parameters
1433
- * Arbitrary parameters passed to the zwitch.
1434
- * @property {Handler} invalid
1435
- * Handle for values that do not have a certain ID field.
1436
- * @property {Handler} unknown
1437
- * Handle values that do have a certain ID field, but it’s set to a value
1438
- * that is not listed in the `handlers` record.
1439
- * @property {Handlers} handlers
1440
- * Record of handlers.
1441
- * @returns {unknown}
1442
- * Anything.
1443
- */
1444
- function one(value, ...parameters) {
1445
- /** @type {Handler|undefined} */
1446
- let fn = one.invalid;
1447
- const handlers = one.handlers;
1448
- if (value && own$2.call(value, key)) {
1449
- const id = String(value[key]);
1450
- fn = own$2.call(handlers, id) ? handlers[id] : one.unknown;
1451
- }
1452
- if (fn) return fn.call(this, value, ...parameters);
1453
- }
1454
- one.handlers = settings.handlers || {};
1455
- one.invalid = settings.invalid;
1456
- one.unknown = settings.unknown;
1457
- return one;
1458
- }
1459
-
1460
- //#endregion
1461
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
1462
- /**
1463
- * @typedef CoreOptions
1464
- * @property {ReadonlyArray<string>} [subset=[]]
1465
- * Whether to only escape the given subset of characters.
1466
- * @property {boolean} [escapeOnly=false]
1467
- * Whether to only escape possibly dangerous characters.
1468
- * Those characters are `"`, `&`, `'`, `<`, `>`, and `` ` ``.
1469
- *
1470
- * @typedef FormatOptions
1471
- * @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format
1472
- * Format strategy.
1473
- *
1474
- * @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions
1475
- */
1476
- const defaultSubsetRegex = /["&'<>`]/g;
1477
- const surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
1478
- const controlCharactersRegex = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
1479
- const regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g;
1480
- /** @type {WeakMap<ReadonlyArray<string>, RegExp>} */
1481
- const subsetToRegexCache = /* @__PURE__ */ new WeakMap();
1482
- /**
1483
- * Encode certain characters in `value`.
1484
- *
1485
- * @param {string} value
1486
- * @param {CoreWithFormatOptions} options
1487
- * @returns {string}
1488
- */
1489
- function core(value, options) {
1490
- value = value.replace(options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex, basic);
1491
- if (options.subset || options.escapeOnly) return value;
1492
- return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);
1493
- /**
1494
- * @param {string} pair
1495
- * @param {number} index
1496
- * @param {string} all
1497
- */
1498
- function surrogate(pair, index, all) {
1499
- return options.format((pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536, all.charCodeAt(index + 2), options);
1500
- }
1501
- /**
1502
- * @param {string} character
1503
- * @param {number} index
1504
- * @param {string} all
1505
- */
1506
- function basic(character, index, all) {
1507
- return options.format(character.charCodeAt(0), all.charCodeAt(index + 1), options);
1508
- }
1509
- }
1510
- /**
1511
- * A wrapper function that caches the result of `charactersToExpression` with a WeakMap.
1512
- * This can improve performance when tooling calls `charactersToExpression` repeatedly
1513
- * with the same subset.
1514
- *
1515
- * @param {ReadonlyArray<string>} subset
1516
- * @returns {RegExp}
1517
- */
1518
- function charactersToExpressionCached(subset) {
1519
- let cached = subsetToRegexCache.get(subset);
1520
- if (!cached) {
1521
- cached = charactersToExpression(subset);
1522
- subsetToRegexCache.set(subset, cached);
1523
- }
1524
- return cached;
1525
- }
1526
- /**
1527
- * @param {ReadonlyArray<string>} subset
1528
- * @returns {RegExp}
1529
- */
1530
- function charactersToExpression(subset) {
1531
- /** @type {Array<string>} */
1532
- const groups = [];
1533
- let index = -1;
1534
- while (++index < subset.length) groups.push(subset[index].replace(regexEscapeRegex, "\\$&"));
1535
- return new RegExp("(?:" + groups.join("|") + ")", "g");
1536
- }
1537
-
1538
- //#endregion
1539
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
1540
- const hexadecimalRegex = /[\dA-Fa-f]/;
1541
- /**
1542
- * Configurable ways to encode characters as hexadecimal references.
1543
- *
1544
- * @param {number} code
1545
- * @param {number} next
1546
- * @param {boolean|undefined} omit
1547
- * @returns {string}
1548
- */
1549
- function toHexadecimal(code, next, omit) {
1550
- const value = "&#x" + code.toString(16).toUpperCase();
1551
- return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
1552
- }
1553
-
1554
- //#endregion
1555
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
1556
- const decimalRegex = /\d/;
1557
- /**
1558
- * Configurable ways to encode characters as decimal references.
1559
- *
1560
- * @param {number} code
1561
- * @param {number} next
1562
- * @param {boolean|undefined} omit
1563
- * @returns {string}
1564
- */
1565
- function toDecimal(code, next, omit) {
1566
- const value = "&#" + String(code);
1567
- return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
1568
- }
1569
-
1570
- //#endregion
1571
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js
1572
- /**
1573
- * List of legacy (that don’t need a trailing `;`) named references which could,
1574
- * depending on what follows them, turn into a different meaning
1575
- *
1576
- * @type {Array<string>}
1577
- */
1578
- const dangerous = [
1579
- "cent",
1580
- "copy",
1581
- "divide",
1582
- "gt",
1583
- "lt",
1584
- "not",
1585
- "para",
1586
- "times"
1587
- ];
1588
-
1589
- //#endregion
1590
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js
1591
- const own$1 = {}.hasOwnProperty;
1592
- /**
1593
- * `characterEntitiesHtml4` but inverted.
1594
- *
1595
- * @type {Record<string, string>}
1596
- */
1597
- const characters = {};
1598
- /** @type {string} */
1599
- let key;
1600
- for (key in characterEntitiesHtml4) if (own$1.call(characterEntitiesHtml4, key)) characters[characterEntitiesHtml4[key]] = key;
1601
- const notAlphanumericRegex = /[^\dA-Za-z]/;
1602
- /**
1603
- * Configurable ways to encode characters as named references.
1604
- *
1605
- * @param {number} code
1606
- * @param {number} next
1607
- * @param {boolean|undefined} omit
1608
- * @param {boolean|undefined} attribute
1609
- * @returns {string}
1610
- */
1611
- function toNamed(code, next, omit, attribute) {
1612
- const character = String.fromCharCode(code);
1613
- if (own$1.call(characters, character)) {
1614
- const name = characters[character];
1615
- const value = "&" + name;
1616
- if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next && next !== 61 && notAlphanumericRegex.test(String.fromCharCode(next)))) return value;
1617
- return value + ";";
1618
- }
1619
- return "";
1620
- }
1621
-
1622
- //#endregion
1623
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
1624
- /**
1625
- * @typedef FormatSmartOptions
1626
- * @property {boolean} [useNamedReferences=false]
1627
- * Prefer named character references (`&amp;`) where possible.
1628
- * @property {boolean} [useShortestReferences=false]
1629
- * Prefer the shortest possible reference, if that results in less bytes.
1630
- * **Note**: `useNamedReferences` can be omitted when using `useShortestReferences`.
1631
- * @property {boolean} [omitOptionalSemicolons=false]
1632
- * Whether to omit semicolons when possible.
1633
- * **Note**: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier.
1634
- * Omitting semicolons is possible for certain named and numeric references in some cases.
1635
- * @property {boolean} [attribute=false]
1636
- * Create character references which don’t fail in attributes.
1637
- * **Note**: `attribute` only applies when operating dangerously with
1638
- * `omitOptionalSemicolons: true`.
1639
- */
1640
- /**
1641
- * Configurable ways to encode a character yielding pretty or small results.
1642
- *
1643
- * @param {number} code
1644
- * @param {number} next
1645
- * @param {FormatSmartOptions} options
1646
- * @returns {string}
1647
- */
1648
- function formatSmart(code, next, options) {
1649
- let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons);
1650
- /** @type {string|undefined} */
1651
- let named;
1652
- if (options.useNamedReferences || options.useShortestReferences) named = toNamed(code, next, options.omitOptionalSemicolons, options.attribute);
1653
- if ((options.useShortestReferences || !named) && options.useShortestReferences) {
1654
- const decimal = toDecimal(code, next, options.omitOptionalSemicolons);
1655
- if (decimal.length < numeric.length) numeric = decimal;
1656
- }
1657
- return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
1658
- }
1659
-
1660
- //#endregion
1661
- //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
1662
- /**
1663
- * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options
1664
- * @typedef {import('./core.js').CoreOptions} LightOptions
1665
- */
1666
- /**
1667
- * Encode special characters in `value`.
1668
- *
1669
- * @param {string} value
1670
- * Value to encode.
1671
- * @param {Options} [options]
1672
- * Configuration.
1673
- * @returns {string}
1674
- * Encoded value.
1675
- */
1676
- function stringifyEntities(value, options) {
1677
- return core(value, Object.assign({ format: formatSmart }, options));
1678
- }
1679
-
1680
- //#endregion
1681
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js
1682
- /**
1683
- * @import {Comment, Parents} from 'hast'
1684
- * @import {State} from '../index.js'
1685
- */
1686
- const htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
1687
- const bogusCommentEntitySubset = [">"];
1688
- const commentEntitySubset = ["<", ">"];
1689
- /**
1690
- * Serialize a comment.
1691
- *
1692
- * @param {Comment} node
1693
- * Node to handle.
1694
- * @param {number | undefined} _1
1695
- * Index of `node` in `parent.
1696
- * @param {Parents | undefined} _2
1697
- * Parent of `node`.
1698
- * @param {State} state
1699
- * Info passed around about the current state.
1700
- * @returns {string}
1701
- * Serialized node.
1702
- */
1703
- function comment(node, _1, _2, state) {
1704
- return state.settings.bogusComments ? "<?" + stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: bogusCommentEntitySubset })) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
1705
- /**
1706
- * @param {string} $0
1707
- */
1708
- function encode($0) {
1709
- return stringifyEntities($0, Object.assign({}, state.settings.characterReferences, { subset: commentEntitySubset }));
1710
- }
1711
- }
1712
-
1713
- //#endregion
1714
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js
1715
- /**
1716
- * @import {Doctype, Parents} from 'hast'
1717
- * @import {State} from '../index.js'
1718
- */
1719
- /**
1720
- * Serialize a doctype.
1721
- *
1722
- * @param {Doctype} _1
1723
- * Node to handle.
1724
- * @param {number | undefined} _2
1725
- * Index of `node` in `parent.
1726
- * @param {Parents | undefined} _3
1727
- * Parent of `node`.
1728
- * @param {State} state
1729
- * Info passed around about the current state.
1730
- * @returns {string}
1731
- * Serialized node.
1732
- */
1733
- function doctype(_1, _2, _3, state) {
1734
- return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
1735
- }
1736
-
1737
- //#endregion
1738
- //#region ../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
1739
- /**
1740
- * Serialize an array of strings as space separated-tokens.
1741
- *
1742
- * @param {Array<string|number>} values
1743
- * List of tokens.
1744
- * @returns {string}
1745
- * Space-separated tokens.
1746
- */
1747
- function stringify(values) {
1748
- return values.join(" ").trim();
1749
- }
1750
-
1751
- //#endregion
1752
- //#region ../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js
1753
- /**
1754
- * @typedef {import('hast').Nodes} Nodes
1755
- */
1756
- const re = /[ \t\n\f\r]/g;
1757
- /**
1758
- * Check if the given value is *inter-element whitespace*.
1759
- *
1760
- * @param {Nodes | string} thing
1761
- * Thing to check (`Node` or `string`).
1762
- * @returns {boolean}
1763
- * Whether the `value` is inter-element whitespace (`boolean`): consisting of
1764
- * zero or more of space, tab (`\t`), line feed (`\n`), carriage return
1765
- * (`\r`), or form feed (`\f`); if a node is passed it must be a `Text` node,
1766
- * whose `value` field is checked.
1767
- */
1768
- function whitespace(thing) {
1769
- return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
1770
- }
1771
- /**
1772
- * @param {string} value
1773
- * @returns {boolean}
1774
- */
1775
- function empty(value) {
1776
- return value.replace(re, "") === "";
1777
- }
1778
-
1779
- //#endregion
1780
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js
1781
- /**
1782
- * @import {Parents, RootContent} from 'hast'
1783
- */
1784
- const siblingAfter = siblings(1);
1785
- const siblingBefore = siblings(-1);
1786
- /** @type {Array<RootContent>} */
1787
- const emptyChildren$1 = [];
1788
- /**
1789
- * Factory to check siblings in a direction.
1790
- *
1791
- * @param {number} increment
1792
- */
1793
- function siblings(increment) {
1794
- return sibling;
1795
- /**
1796
- * Find applicable siblings in a direction.
1797
- *
1798
- * @template {Parents} Parent
1799
- * Parent type.
1800
- * @param {Parent | undefined} parent
1801
- * Parent.
1802
- * @param {number | undefined} index
1803
- * Index of child in `parent`.
1804
- * @param {boolean | undefined} [includeWhitespace=false]
1805
- * Whether to include whitespace (default: `false`).
1806
- * @returns {Parent extends {children: Array<infer Child>} ? Child | undefined : never}
1807
- * Child of parent.
1808
- */
1809
- function sibling(parent, index, includeWhitespace) {
1810
- const siblings = parent ? parent.children : emptyChildren$1;
1811
- let offset = (index || 0) + increment;
1812
- let next = siblings[offset];
1813
- if (!includeWhitespace) while (next && whitespace(next)) {
1814
- offset += increment;
1815
- next = siblings[offset];
1816
- }
1817
- return next;
1818
- }
1819
- }
1820
-
1821
- //#endregion
1822
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
1823
- /**
1824
- * @import {Element, Parents} from 'hast'
1825
- */
1826
- /**
1827
- * @callback OmitHandle
1828
- * Check if a tag can be omitted.
1829
- * @param {Element} element
1830
- * Element to check.
1831
- * @param {number | undefined} index
1832
- * Index of element in parent.
1833
- * @param {Parents | undefined} parent
1834
- * Parent of element.
1835
- * @returns {boolean}
1836
- * Whether to omit a tag.
1837
- *
1838
- */
1839
- const own = {}.hasOwnProperty;
1840
- /**
1841
- * Factory to check if a given node can have a tag omitted.
1842
- *
1843
- * @param {Record<string, OmitHandle>} handlers
1844
- * Omission handlers, where each key is a tag name, and each value is the
1845
- * corresponding handler.
1846
- * @returns {OmitHandle}
1847
- * Whether to omit a tag of an element.
1848
- */
1849
- function omission(handlers) {
1850
- return omit;
1851
- /**
1852
- * Check if a given node can have a tag omitted.
1853
- *
1854
- * @type {OmitHandle}
1855
- */
1856
- function omit(node, index, parent) {
1857
- return own.call(handlers, node.tagName) && handlers[node.tagName](node, index, parent);
1858
- }
1859
- }
1860
-
1861
- //#endregion
1862
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js
1863
- /**
1864
- * @import {Element, Parents} from 'hast'
1865
- */
1866
- const closing = omission({
1867
- body: body$1,
1868
- caption: headOrColgroupOrCaption,
1869
- colgroup: headOrColgroupOrCaption,
1870
- dd,
1871
- dt,
1872
- head: headOrColgroupOrCaption,
1873
- html: html$1,
1874
- li,
1875
- optgroup,
1876
- option,
1877
- p,
1878
- rp: rubyElement,
1879
- rt: rubyElement,
1880
- tbody: tbody$1,
1881
- td: cells,
1882
- tfoot,
1883
- th: cells,
1884
- thead,
1885
- tr
1886
- });
1887
- /**
1888
- * Macro for `</head>`, `</colgroup>`, and `</caption>`.
1889
- *
1890
- * @param {Element} _
1891
- * Element.
1892
- * @param {number | undefined} index
1893
- * Index of element in parent.
1894
- * @param {Parents | undefined} parent
1895
- * Parent of element.
1896
- * @returns {boolean}
1897
- * Whether the closing tag can be omitted.
1898
- */
1899
- function headOrColgroupOrCaption(_, index, parent) {
1900
- const next = siblingAfter(parent, index, true);
1901
- return !next || next.type !== "comment" && !(next.type === "text" && whitespace(next.value.charAt(0)));
1902
- }
1903
- /**
1904
- * Whether to omit `</html>`.
1905
- *
1906
- * @param {Element} _
1907
- * Element.
1908
- * @param {number | undefined} index
1909
- * Index of element in parent.
1910
- * @param {Parents | undefined} parent
1911
- * Parent of element.
1912
- * @returns {boolean}
1913
- * Whether the closing tag can be omitted.
1914
- */
1915
- function html$1(_, index, parent) {
1916
- const next = siblingAfter(parent, index);
1917
- return !next || next.type !== "comment";
1918
- }
1919
- /**
1920
- * Whether to omit `</body>`.
1921
- *
1922
- * @param {Element} _
1923
- * Element.
1924
- * @param {number | undefined} index
1925
- * Index of element in parent.
1926
- * @param {Parents | undefined} parent
1927
- * Parent of element.
1928
- * @returns {boolean}
1929
- * Whether the closing tag can be omitted.
1930
- */
1931
- function body$1(_, index, parent) {
1932
- const next = siblingAfter(parent, index);
1933
- return !next || next.type !== "comment";
1934
- }
1935
- /**
1936
- * Whether to omit `</p>`.
1937
- *
1938
- * @param {Element} _
1939
- * Element.
1940
- * @param {number | undefined} index
1941
- * Index of element in parent.
1942
- * @param {Parents | undefined} parent
1943
- * Parent of element.
1944
- * @returns {boolean}
1945
- * Whether the closing tag can be omitted.
1946
- */
1947
- function p(_, index, parent) {
1948
- const next = siblingAfter(parent, index);
1949
- return next ? next.type === "element" && (next.tagName === "address" || next.tagName === "article" || next.tagName === "aside" || next.tagName === "blockquote" || next.tagName === "details" || next.tagName === "div" || next.tagName === "dl" || next.tagName === "fieldset" || next.tagName === "figcaption" || next.tagName === "figure" || next.tagName === "footer" || next.tagName === "form" || next.tagName === "h1" || next.tagName === "h2" || next.tagName === "h3" || next.tagName === "h4" || next.tagName === "h5" || next.tagName === "h6" || next.tagName === "header" || next.tagName === "hgroup" || next.tagName === "hr" || next.tagName === "main" || next.tagName === "menu" || next.tagName === "nav" || next.tagName === "ol" || next.tagName === "p" || next.tagName === "pre" || next.tagName === "section" || next.tagName === "table" || next.tagName === "ul") : !parent || !(parent.type === "element" && (parent.tagName === "a" || parent.tagName === "audio" || parent.tagName === "del" || parent.tagName === "ins" || parent.tagName === "map" || parent.tagName === "noscript" || parent.tagName === "video"));
1950
- }
1951
- /**
1952
- * Whether to omit `</li>`.
1953
- *
1954
- * @param {Element} _
1955
- * Element.
1956
- * @param {number | undefined} index
1957
- * Index of element in parent.
1958
- * @param {Parents | undefined} parent
1959
- * Parent of element.
1960
- * @returns {boolean}
1961
- * Whether the closing tag can be omitted.
1962
- */
1963
- function li(_, index, parent) {
1964
- const next = siblingAfter(parent, index);
1965
- return !next || next.type === "element" && next.tagName === "li";
1966
- }
1967
- /**
1968
- * Whether to omit `</dt>`.
1969
- *
1970
- * @param {Element} _
1971
- * Element.
1972
- * @param {number | undefined} index
1973
- * Index of element in parent.
1974
- * @param {Parents | undefined} parent
1975
- * Parent of element.
1976
- * @returns {boolean}
1977
- * Whether the closing tag can be omitted.
1978
- */
1979
- function dt(_, index, parent) {
1980
- const next = siblingAfter(parent, index);
1981
- return Boolean(next && next.type === "element" && (next.tagName === "dt" || next.tagName === "dd"));
1982
- }
1983
- /**
1984
- * Whether to omit `</dd>`.
1985
- *
1986
- * @param {Element} _
1987
- * Element.
1988
- * @param {number | undefined} index
1989
- * Index of element in parent.
1990
- * @param {Parents | undefined} parent
1991
- * Parent of element.
1992
- * @returns {boolean}
1993
- * Whether the closing tag can be omitted.
1994
- */
1995
- function dd(_, index, parent) {
1996
- const next = siblingAfter(parent, index);
1997
- return !next || next.type === "element" && (next.tagName === "dt" || next.tagName === "dd");
1998
- }
1999
- /**
2000
- * Whether to omit `</rt>` or `</rp>`.
2001
- *
2002
- * @param {Element} _
2003
- * Element.
2004
- * @param {number | undefined} index
2005
- * Index of element in parent.
2006
- * @param {Parents | undefined} parent
2007
- * Parent of element.
2008
- * @returns {boolean}
2009
- * Whether the closing tag can be omitted.
2010
- */
2011
- function rubyElement(_, index, parent) {
2012
- const next = siblingAfter(parent, index);
2013
- return !next || next.type === "element" && (next.tagName === "rp" || next.tagName === "rt");
2014
- }
2015
- /**
2016
- * Whether to omit `</optgroup>`.
2017
- *
2018
- * @param {Element} _
2019
- * Element.
2020
- * @param {number | undefined} index
2021
- * Index of element in parent.
2022
- * @param {Parents | undefined} parent
2023
- * Parent of element.
2024
- * @returns {boolean}
2025
- * Whether the closing tag can be omitted.
2026
- */
2027
- function optgroup(_, index, parent) {
2028
- const next = siblingAfter(parent, index);
2029
- return !next || next.type === "element" && next.tagName === "optgroup";
2030
- }
2031
- /**
2032
- * Whether to omit `</option>`.
2033
- *
2034
- * @param {Element} _
2035
- * Element.
2036
- * @param {number | undefined} index
2037
- * Index of element in parent.
2038
- * @param {Parents | undefined} parent
2039
- * Parent of element.
2040
- * @returns {boolean}
2041
- * Whether the closing tag can be omitted.
2042
- */
2043
- function option(_, index, parent) {
2044
- const next = siblingAfter(parent, index);
2045
- return !next || next.type === "element" && (next.tagName === "option" || next.tagName === "optgroup");
2046
- }
2047
- /**
2048
- * Whether to omit `</thead>`.
2049
- *
2050
- * @param {Element} _
2051
- * Element.
2052
- * @param {number | undefined} index
2053
- * Index of element in parent.
2054
- * @param {Parents | undefined} parent
2055
- * Parent of element.
2056
- * @returns {boolean}
2057
- * Whether the closing tag can be omitted.
2058
- */
2059
- function thead(_, index, parent) {
2060
- const next = siblingAfter(parent, index);
2061
- return Boolean(next && next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot"));
2062
- }
2063
- /**
2064
- * Whether to omit `</tbody>`.
2065
- *
2066
- * @param {Element} _
2067
- * Element.
2068
- * @param {number | undefined} index
2069
- * Index of element in parent.
2070
- * @param {Parents | undefined} parent
2071
- * Parent of element.
2072
- * @returns {boolean}
2073
- * Whether the closing tag can be omitted.
2074
- */
2075
- function tbody$1(_, index, parent) {
2076
- const next = siblingAfter(parent, index);
2077
- return !next || next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot");
2078
- }
2079
- /**
2080
- * Whether to omit `</tfoot>`.
2081
- *
2082
- * @param {Element} _
2083
- * Element.
2084
- * @param {number | undefined} index
2085
- * Index of element in parent.
2086
- * @param {Parents | undefined} parent
2087
- * Parent of element.
2088
- * @returns {boolean}
2089
- * Whether the closing tag can be omitted.
2090
- */
2091
- function tfoot(_, index, parent) {
2092
- return !siblingAfter(parent, index);
2093
- }
2094
- /**
2095
- * Whether to omit `</tr>`.
2096
- *
2097
- * @param {Element} _
2098
- * Element.
2099
- * @param {number | undefined} index
2100
- * Index of element in parent.
2101
- * @param {Parents | undefined} parent
2102
- * Parent of element.
2103
- * @returns {boolean}
2104
- * Whether the closing tag can be omitted.
2105
- */
2106
- function tr(_, index, parent) {
2107
- const next = siblingAfter(parent, index);
2108
- return !next || next.type === "element" && next.tagName === "tr";
2109
- }
2110
- /**
2111
- * Whether to omit `</td>` or `</th>`.
2112
- *
2113
- * @param {Element} _
2114
- * Element.
2115
- * @param {number | undefined} index
2116
- * Index of element in parent.
2117
- * @param {Parents | undefined} parent
2118
- * Parent of element.
2119
- * @returns {boolean}
2120
- * Whether the closing tag can be omitted.
2121
- */
2122
- function cells(_, index, parent) {
2123
- const next = siblingAfter(parent, index);
2124
- return !next || next.type === "element" && (next.tagName === "td" || next.tagName === "th");
2125
- }
2126
-
2127
- //#endregion
2128
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js
2129
- /**
2130
- * @import {Element, Parents} from 'hast'
2131
- */
2132
- const opening = omission({
2133
- body,
2134
- colgroup,
2135
- head,
2136
- html,
2137
- tbody
2138
- });
2139
- /**
2140
- * Whether to omit `<html>`.
2141
- *
2142
- * @param {Element} node
2143
- * Element.
2144
- * @returns {boolean}
2145
- * Whether the opening tag can be omitted.
2146
- */
2147
- function html(node) {
2148
- const head = siblingAfter(node, -1);
2149
- return !head || head.type !== "comment";
2150
- }
2151
- /**
2152
- * Whether to omit `<head>`.
2153
- *
2154
- * @param {Element} node
2155
- * Element.
2156
- * @returns {boolean}
2157
- * Whether the opening tag can be omitted.
2158
- */
2159
- function head(node) {
2160
- /** @type {Set<string>} */
2161
- const seen = /* @__PURE__ */ new Set();
2162
- for (const child of node.children) if (child.type === "element" && (child.tagName === "base" || child.tagName === "title")) {
2163
- if (seen.has(child.tagName)) return false;
2164
- seen.add(child.tagName);
2165
- }
2166
- const child = node.children[0];
2167
- return !child || child.type === "element";
2168
- }
2169
- /**
2170
- * Whether to omit `<body>`.
2171
- *
2172
- * @param {Element} node
2173
- * Element.
2174
- * @returns {boolean}
2175
- * Whether the opening tag can be omitted.
2176
- */
2177
- function body(node) {
2178
- const head = siblingAfter(node, -1, true);
2179
- return !head || head.type !== "comment" && !(head.type === "text" && whitespace(head.value.charAt(0))) && !(head.type === "element" && (head.tagName === "meta" || head.tagName === "link" || head.tagName === "script" || head.tagName === "style" || head.tagName === "template"));
2180
- }
2181
- /**
2182
- * Whether to omit `<colgroup>`.
2183
- * The spec describes some logic for the opening tag, but it’s easier to
2184
- * implement in the closing tag, to the same effect, so we handle it there
2185
- * instead.
2186
- *
2187
- * @param {Element} node
2188
- * Element.
2189
- * @param {number | undefined} index
2190
- * Index of element in parent.
2191
- * @param {Parents | undefined} parent
2192
- * Parent of element.
2193
- * @returns {boolean}
2194
- * Whether the opening tag can be omitted.
2195
- */
2196
- function colgroup(node, index, parent) {
2197
- const previous = siblingBefore(parent, index);
2198
- const head = siblingAfter(node, -1, true);
2199
- if (parent && previous && previous.type === "element" && previous.tagName === "colgroup" && closing(previous, parent.children.indexOf(previous), parent)) return false;
2200
- return Boolean(head && head.type === "element" && head.tagName === "col");
2201
- }
2202
- /**
2203
- * Whether to omit `<tbody>`.
2204
- *
2205
- * @param {Element} node
2206
- * Element.
2207
- * @param {number | undefined} index
2208
- * Index of element in parent.
2209
- * @param {Parents | undefined} parent
2210
- * Parent of element.
2211
- * @returns {boolean}
2212
- * Whether the opening tag can be omitted.
2213
- */
2214
- function tbody(node, index, parent) {
2215
- const previous = siblingBefore(parent, index);
2216
- const head = siblingAfter(node, -1);
2217
- if (parent && previous && previous.type === "element" && (previous.tagName === "thead" || previous.tagName === "tbody") && closing(previous, parent.children.indexOf(previous), parent)) return false;
2218
- return Boolean(head && head.type === "element" && head.tagName === "tr");
2219
- }
2220
-
2221
- //#endregion
2222
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js
2223
- /**
2224
- * @import {Element, Parents, Properties} from 'hast'
2225
- * @import {State} from '../index.js'
2226
- */
2227
- /**
2228
- * Maps of subsets.
2229
- *
2230
- * Each value is a matrix of tuples.
2231
- * The value at `0` causes parse errors, the value at `1` is valid.
2232
- * Of both, the value at `0` is unsafe, and the value at `1` is safe.
2233
- *
2234
- * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}
2235
- */
2236
- const constants = {
2237
- name: [[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")], ["\0 \n\f\r \"&'/<=>".split(""), "\0 \n\f\r \"&'/<=>`".split("")]],
2238
- unquoted: [[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")], ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]],
2239
- single: [["&'".split(""), "\"&'`".split("")], ["\0&'".split(""), "\0\"&'`".split("")]],
2240
- double: [["\"&".split(""), "\"&'`".split("")], ["\0\"&".split(""), "\0\"&'`".split("")]]
2241
- };
2242
- /**
2243
- * Serialize an element node.
2244
- *
2245
- * @param {Element} node
2246
- * Node to handle.
2247
- * @param {number | undefined} index
2248
- * Index of `node` in `parent.
2249
- * @param {Parents | undefined} parent
2250
- * Parent of `node`.
2251
- * @param {State} state
2252
- * Info passed around about the current state.
2253
- * @returns {string}
2254
- * Serialized node.
2255
- */
2256
- function element(node, index, parent, state) {
2257
- const schema = state.schema;
2258
- const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
2259
- let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
2260
- /** @type {Array<string>} */
2261
- const parts = [];
2262
- /** @type {string} */
2263
- let last;
2264
- if (schema.space === "html" && node.tagName === "svg") state.schema = svg;
2265
- const attributes = serializeAttributes(state, node.properties);
2266
- const content = state.all(schema.space === "html" && node.tagName === "template" ? node.content : node);
2267
- state.schema = schema;
2268
- if (content) selfClosing = false;
2269
- if (attributes || !omit || !opening(node, index, parent)) {
2270
- parts.push("<", node.tagName, attributes ? " " + attributes : "");
2271
- if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
2272
- last = attributes.charAt(attributes.length - 1);
2273
- if (!state.settings.tightSelfClosing || last === "/" || last && last !== "\"" && last !== "'") parts.push(" ");
2274
- parts.push("/");
2275
- }
2276
- parts.push(">");
2277
- }
2278
- parts.push(content);
2279
- if (!selfClosing && (!omit || !closing(node, index, parent))) parts.push("</" + node.tagName + ">");
2280
- return parts.join("");
2281
- }
2282
- /**
2283
- * @param {State} state
2284
- * @param {Properties | null | undefined} properties
2285
- * @returns {string}
2286
- */
2287
- function serializeAttributes(state, properties) {
2288
- /** @type {Array<string>} */
2289
- const values = [];
2290
- let index = -1;
2291
- /** @type {string} */
2292
- let key;
2293
- if (properties) {
2294
- for (key in properties) if (properties[key] !== null && properties[key] !== void 0) {
2295
- const value = serializeAttribute(state, key, properties[key]);
2296
- if (value) values.push(value);
2297
- }
2298
- }
2299
- while (++index < values.length) {
2300
- const last = state.settings.tightAttributes ? values[index].charAt(values[index].length - 1) : void 0;
2301
- if (index !== values.length - 1 && last !== "\"" && last !== "'") values[index] += " ";
2302
- }
2303
- return values.join("");
2304
- }
2305
- /**
2306
- * @param {State} state
2307
- * @param {string} key
2308
- * @param {Properties[keyof Properties]} value
2309
- * @returns {string}
2310
- */
2311
- function serializeAttribute(state, key, value) {
2312
- const info = find(state.schema, key);
2313
- const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
2314
- const y = state.settings.allowDangerousCharacters ? 0 : 1;
2315
- let quote = state.quote;
2316
- /** @type {string | undefined} */
2317
- let result;
2318
- if (info.overloadedBoolean && (value === info.attribute || value === "")) value = true;
2319
- else if ((info.boolean || info.overloadedBoolean) && (typeof value !== "string" || value === info.attribute || value === "")) value = Boolean(value);
2320
- if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) return "";
2321
- const name = stringifyEntities(info.attribute, Object.assign({}, state.settings.characterReferences, { subset: constants.name[x][y] }));
2322
- if (value === true) return name;
2323
- value = Array.isArray(value) ? (info.commaSeparated ? stringify$1 : stringify)(value, { padLeft: !state.settings.tightCommaSeparatedLists }) : String(value);
2324
- if (state.settings.collapseEmptyAttributes && !value) return name;
2325
- if (state.settings.preferUnquoted) result = stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {
2326
- attribute: true,
2327
- subset: constants.unquoted[x][y]
2328
- }));
2329
- if (result !== value) {
2330
- if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) quote = state.alternative;
2331
- result = quote + stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {
2332
- subset: (quote === "'" ? constants.single : constants.double)[x][y],
2333
- attribute: true
2334
- })) + quote;
2335
- }
2336
- return name + (result ? "=" + result : result);
2337
- }
2338
-
2339
- //#endregion
2340
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js
2341
- /**
2342
- * @import {Parents, Text} from 'hast'
2343
- * @import {Raw} from 'mdast-util-to-hast'
2344
- * @import {State} from '../index.js'
2345
- */
2346
- const textEntitySubset = ["<", "&"];
2347
- /**
2348
- * Serialize a text node.
2349
- *
2350
- * @param {Raw | Text} node
2351
- * Node to handle.
2352
- * @param {number | undefined} _
2353
- * Index of `node` in `parent.
2354
- * @param {Parents | undefined} parent
2355
- * Parent of `node`.
2356
- * @param {State} state
2357
- * Info passed around about the current state.
2358
- * @returns {string}
2359
- * Serialized node.
2360
- */
2361
- function text(node, _, parent, state) {
2362
- return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: textEntitySubset }));
2363
- }
2364
-
2365
- //#endregion
2366
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js
2367
- /**
2368
- * @import {Parents} from 'hast'
2369
- * @import {Raw} from 'mdast-util-to-hast'
2370
- * @import {State} from '../index.js'
2371
- */
2372
- /**
2373
- * Serialize a raw node.
2374
- *
2375
- * @param {Raw} node
2376
- * Node to handle.
2377
- * @param {number | undefined} index
2378
- * Index of `node` in `parent.
2379
- * @param {Parents | undefined} parent
2380
- * Parent of `node`.
2381
- * @param {State} state
2382
- * Info passed around about the current state.
2383
- * @returns {string}
2384
- * Serialized node.
2385
- */
2386
- function raw(node, index, parent, state) {
2387
- return state.settings.allowDangerousHtml ? node.value : text(node, index, parent, state);
2388
- }
2389
-
2390
- //#endregion
2391
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js
2392
- /**
2393
- * @import {Parents, Root} from 'hast'
2394
- * @import {State} from '../index.js'
2395
- */
2396
- /**
2397
- * Serialize a root.
2398
- *
2399
- * @param {Root} node
2400
- * Node to handle.
2401
- * @param {number | undefined} _1
2402
- * Index of `node` in `parent.
2403
- * @param {Parents | undefined} _2
2404
- * Parent of `node`.
2405
- * @param {State} state
2406
- * Info passed around about the current state.
2407
- * @returns {string}
2408
- * Serialized node.
2409
- */
2410
- function root(node, _1, _2, state) {
2411
- return state.all(node);
2412
- }
2413
-
2414
- //#endregion
2415
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js
2416
- /**
2417
- * @import {Nodes, Parents} from 'hast'
2418
- * @import {State} from '../index.js'
2419
- */
2420
- /**
2421
- * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}
2422
- */
2423
- const handle = zwitch("type", {
2424
- invalid,
2425
- unknown,
2426
- handlers: {
2427
- comment,
2428
- doctype,
2429
- element,
2430
- raw,
2431
- root,
2432
- text
2433
- }
2434
- });
2435
- /**
2436
- * Fail when a non-node is found in the tree.
2437
- *
2438
- * @param {unknown} node
2439
- * Unknown value.
2440
- * @returns {never}
2441
- * Never.
2442
- */
2443
- function invalid(node) {
2444
- throw new Error("Expected node, not `" + node + "`");
2445
- }
2446
- /**
2447
- * Fail when a node with an unknown type is found in the tree.
2448
- *
2449
- * @param {unknown} node_
2450
- * Unknown node.
2451
- * @returns {never}
2452
- * Never.
2453
- */
2454
- function unknown(node_) {
2455
- const node = node_;
2456
- throw new Error("Cannot compile unknown node `" + node.type + "`");
2457
- }
2458
-
2459
- //#endregion
2460
- //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js
2461
- /**
2462
- * @import {Nodes, Parents, RootContent} from 'hast'
2463
- * @import {Schema} from 'property-information'
2464
- * @import {Options as StringifyEntitiesOptions} from 'stringify-entities'
2465
- */
2466
- /**
2467
- * @typedef {Omit<StringifyEntitiesOptions, 'attribute' | 'escapeOnly' | 'subset'>} CharacterReferences
2468
- *
2469
- * @typedef Options
2470
- * Configuration.
2471
- * @property {boolean | null | undefined} [allowDangerousCharacters=false]
2472
- * Do not encode some characters which cause XSS vulnerabilities in older
2473
- * browsers (default: `false`).
2474
- *
2475
- * > ⚠️ **Danger**: only set this if you completely trust the content.
2476
- * @property {boolean | null | undefined} [allowDangerousHtml=false]
2477
- * Allow `raw` nodes and insert them as raw HTML (default: `false`).
2478
- *
2479
- * When `false`, `Raw` nodes are encoded.
2480
- *
2481
- * > ⚠️ **Danger**: only set this if you completely trust the content.
2482
- * @property {boolean | null | undefined} [allowParseErrors=false]
2483
- * Do not encode characters which cause parse errors (even though they work),
2484
- * to save bytes (default: `false`).
2485
- *
2486
- * Not used in the SVG space.
2487
- *
2488
- * > 👉 **Note**: intentionally creates parse errors in markup (how parse
2489
- * > errors are handled is well defined, so this works but isn’t pretty).
2490
- * @property {boolean | null | undefined} [bogusComments=false]
2491
- * Use “bogus comments” instead of comments to save byes: `<?charlie>`
2492
- * instead of `<!--charlie-->` (default: `false`).
2493
- *
2494
- * > 👉 **Note**: intentionally creates parse errors in markup (how parse
2495
- * > errors are handled is well defined, so this works but isn’t pretty).
2496
- * @property {CharacterReferences | null | undefined} [characterReferences]
2497
- * Configure how to serialize character references (optional).
2498
- * @property {boolean | null | undefined} [closeEmptyElements=false]
2499
- * Close SVG elements without any content with slash (`/`) on the opening tag
2500
- * instead of an end tag: `<circle />` instead of `<circle></circle>`
2501
- * (default: `false`).
2502
- *
2503
- * See `tightSelfClosing` to control whether a space is used before the
2504
- * slash.
2505
- *
2506
- * Not used in the HTML space.
2507
- * @property {boolean | null | undefined} [closeSelfClosing=false]
2508
- * Close self-closing nodes with an extra slash (`/`): `<img />` instead of
2509
- * `<img>` (default: `false`).
2510
- *
2511
- * See `tightSelfClosing` to control whether a space is used before the
2512
- * slash.
2513
- *
2514
- * Not used in the SVG space.
2515
- * @property {boolean | null | undefined} [collapseEmptyAttributes=false]
2516
- * Collapse empty attributes: get `class` instead of `class=""` (default:
2517
- * `false`).
2518
- *
2519
- * Not used in the SVG space.
2520
- *
2521
- * > 👉 **Note**: boolean attributes (such as `hidden`) are always collapsed.
2522
- * @property {boolean | null | undefined} [omitOptionalTags=false]
2523
- * Omit optional opening and closing tags (default: `false`).
2524
- *
2525
- * For example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>` closing
2526
- * tags can be omitted.
2527
- * The first because it’s followed by another `li`, the last because it’s
2528
- * followed by nothing.
2529
- *
2530
- * Not used in the SVG space.
2531
- * @property {boolean | null | undefined} [preferUnquoted=false]
2532
- * Leave attributes unquoted if that results in less bytes (default: `false`).
2533
- *
2534
- * Not used in the SVG space.
2535
- * @property {boolean | null | undefined} [quoteSmart=false]
2536
- * Use the other quote if that results in less bytes (default: `false`).
2537
- * @property {Quote | null | undefined} [quote='"']
2538
- * Preferred quote to use (default: `'"'`).
2539
- * @property {Space | null | undefined} [space='html']
2540
- * When an `<svg>` element is found in the HTML space, this package already
2541
- * automatically switches to and from the SVG space when entering and exiting
2542
- * it (default: `'html'`).
2543
- *
2544
- * > 👉 **Note**: hast is not XML.
2545
- * > It supports SVG as embedded in HTML.
2546
- * > It does not support the features available in XML.
2547
- * > Passing SVG might break but fragments of modern SVG should be fine.
2548
- * > Use [`xast`][xast] if you need to support SVG as XML.
2549
- * @property {boolean | null | undefined} [tightAttributes=false]
2550
- * Join attributes together, without whitespace, if possible: get
2551
- * `class="a b"title="c d"` instead of `class="a b" title="c d"` to save
2552
- * bytes (default: `false`).
2553
- *
2554
- * Not used in the SVG space.
2555
- *
2556
- * > 👉 **Note**: intentionally creates parse errors in markup (how parse
2557
- * > errors are handled is well defined, so this works but isn’t pretty).
2558
- * @property {boolean | null | undefined} [tightCommaSeparatedLists=false]
2559
- * Join known comma-separated attribute values with just a comma (`,`),
2560
- * instead of padding them on the right as well (`,␠`, where `␠` represents a
2561
- * space) (default: `false`).
2562
- * @property {boolean | null | undefined} [tightDoctype=false]
2563
- * Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of
2564
- * `<!doctype html>` to save bytes (default: `false`).
2565
- *
2566
- * > 👉 **Note**: intentionally creates parse errors in markup (how parse
2567
- * > errors are handled is well defined, so this works but isn’t pretty).
2568
- * @property {boolean | null | undefined} [tightSelfClosing=false]
2569
- * Do not use an extra space when closing self-closing elements: `<img/>`
2570
- * instead of `<img />` (default: `false`).
2571
- *
2572
- * > 👉 **Note**: only used if `closeSelfClosing: true` or
2573
- * > `closeEmptyElements: true`.
2574
- * @property {boolean | null | undefined} [upperDoctype=false]
2575
- * Use a `<!DOCTYPE…` instead of `<!doctype…` (default: `false`).
2576
- *
2577
- * Useless except for XHTML.
2578
- * @property {ReadonlyArray<string> | null | undefined} [voids]
2579
- * Tag names of elements to serialize without closing tag (default: `html-void-elements`).
2580
- *
2581
- * Not used in the SVG space.
2582
- *
2583
- * > 👉 **Note**: It’s highly unlikely that you want to pass this, because
2584
- * > hast is not for XML, and HTML will not add more void elements.
2585
- *
2586
- * @typedef {'"' | "'"} Quote
2587
- * HTML quotes for attribute values.
2588
- *
2589
- * @typedef {Omit<Required<{[key in keyof Options]: Exclude<Options[key], null | undefined>}>, 'space' | 'quote'>} Settings
2590
- *
2591
- * @typedef {'html' | 'svg'} Space
2592
- * Namespace.
2593
- *
2594
- * @typedef State
2595
- * Info passed around about the current state.
2596
- * @property {(node: Parents | undefined) => string} all
2597
- * Serialize the children of a parent node.
2598
- * @property {Quote} alternative
2599
- * Alternative quote.
2600
- * @property {(node: Nodes, index: number | undefined, parent: Parents | undefined) => string} one
2601
- * Serialize one node.
2602
- * @property {Quote} quote
2603
- * Preferred quote.
2604
- * @property {Schema} schema
2605
- * Current schema.
2606
- * @property {Settings} settings
2607
- * User configuration.
2608
- */
2609
- /** @type {Options} */
2610
- const emptyOptions = {};
2611
- /** @type {CharacterReferences} */
2612
- const emptyCharacterReferences = {};
2613
- /** @type {Array<never>} */
2614
- const emptyChildren = [];
2615
- /**
2616
- * Serialize hast as HTML.
2617
- *
2618
- * @param {Array<RootContent> | Nodes} tree
2619
- * Tree to serialize.
2620
- * @param {Options | null | undefined} [options]
2621
- * Configuration (optional).
2622
- * @returns {string}
2623
- * Serialized HTML.
2624
- */
2625
- function toHtml(tree, options) {
2626
- const options_ = options || emptyOptions;
2627
- const quote = options_.quote || "\"";
2628
- const alternative = quote === "\"" ? "'" : "\"";
2629
- if (quote !== "\"" && quote !== "'") throw new Error("Invalid quote `" + quote + "`, expected `'` or `\"`");
2630
- return {
2631
- one,
2632
- all,
2633
- settings: {
2634
- omitOptionalTags: options_.omitOptionalTags || false,
2635
- allowParseErrors: options_.allowParseErrors || false,
2636
- allowDangerousCharacters: options_.allowDangerousCharacters || false,
2637
- quoteSmart: options_.quoteSmart || false,
2638
- preferUnquoted: options_.preferUnquoted || false,
2639
- tightAttributes: options_.tightAttributes || false,
2640
- upperDoctype: options_.upperDoctype || false,
2641
- tightDoctype: options_.tightDoctype || false,
2642
- bogusComments: options_.bogusComments || false,
2643
- tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,
2644
- tightSelfClosing: options_.tightSelfClosing || false,
2645
- collapseEmptyAttributes: options_.collapseEmptyAttributes || false,
2646
- allowDangerousHtml: options_.allowDangerousHtml || false,
2647
- voids: options_.voids || htmlVoidElements,
2648
- characterReferences: options_.characterReferences || emptyCharacterReferences,
2649
- closeSelfClosing: options_.closeSelfClosing || false,
2650
- closeEmptyElements: options_.closeEmptyElements || false
2651
- },
2652
- schema: options_.space === "svg" ? svg : html$2,
2653
- quote,
2654
- alternative
2655
- }.one(Array.isArray(tree) ? {
2656
- type: "root",
2657
- children: tree
2658
- } : tree, void 0, void 0);
2659
- }
2660
- /**
2661
- * Serialize a node.
2662
- *
2663
- * @this {State}
2664
- * Info passed around about the current state.
2665
- * @param {Nodes} node
2666
- * Node to handle.
2667
- * @param {number | undefined} index
2668
- * Index of `node` in `parent.
2669
- * @param {Parents | undefined} parent
2670
- * Parent of `node`.
2671
- * @returns {string}
2672
- * Serialized node.
2673
- */
2674
- function one(node, index, parent) {
2675
- return handle(node, index, parent, this);
2676
- }
2677
- /**
2678
- * Serialize all children of `parent`.
2679
- *
2680
- * @this {State}
2681
- * Info passed around about the current state.
2682
- * @param {Parents | undefined} parent
2683
- * Parent whose children to serialize.
2684
- * @returns {string}
2685
- */
2686
- function all(parent) {
2687
- /** @type {Array<string>} */
2688
- const results = [];
2689
- const children = parent && parent.children || emptyChildren;
2690
- let index = -1;
2691
- while (++index < children.length) results[index] = this.one(children[index], index, parent);
2692
- return results.join("");
2693
- }
2694
-
2695
- //#endregion
2696
- export { toHtml as t };
1
+ import{n as __exportAll}from"../rolldown-runtime.mjs";import{t as characterEntitiesLegacy}from"./character-entities-legacy.mjs";import{t as characterEntitiesHtml4}from"./character-entities-html4.mjs";import{t as ccount}from"./ccount.mjs";import{t as stringify$1}from"./comma-separated-tokens.mjs";const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Schema(n,r,t)}function normalize(e){return e.toLowerCase()}var Info=class{constructor(e,t){this.attribute=t,this.property=e}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports=__exportAll({boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(e,t,n,r){let i=-1;if(super(e,t),mark(this,`space`,r),typeof n==`number`)for(;++i<checks.length;){let e=checks[i];mark(this,checks[i],(n&types_exports[e])===types_exports[e])}}};DefinedInfo.prototype.defined=!0;function mark(e,t,n){n&&(e[t]=n)}function create(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new DefinedInfo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[normalize(r)]=r,n[normalize(a.attribute)]=r}return new Schema(t,n,e.space)}const 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(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}const html$3=create({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],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:boolean,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,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null},space:`html`,transform:caseInsensitiveTransform}),svg$1=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`,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,keySplines:null,keyTimes:null,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}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),xmlns=create({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),cap=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(e,t){let n=normalize(t),r=t,i=Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&valid.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(dash,camelcase);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!dash.test(e)){let n=e.replace(cap,kebab);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=DefinedInfo}return new i(r,t)}function kebab(e){return`-`+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}const html$2=merge([aria,html$3,xlink,xmlns,xml],`html`),svg=merge([aria,svg$1,xlink,xmlns,xml],`svg`),own$2={}.hasOwnProperty;function zwitch(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&own$2.call(t,e)){let n=String(t[e]);i=own$2.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(e,t){if(e=e.replace(t.subset?charactersToExpressionCached(t.subset):defaultSubsetRegex,r),t.subset||t.escapeOnly)return e;return e.replace(surrogatePairsRegex,n).replace(controlCharactersRegex,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function charactersToExpressionCached(e){let t=subsetToRegexCache.get(e);return t||(t=charactersToExpression(e),subsetToRegexCache.set(e,t)),t}function charactersToExpression(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(regexEscapeRegex,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}const hexadecimalRegex=/[\dA-Fa-f]/;function toHexadecimal(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!hexadecimalRegex.test(String.fromCharCode(t))?r:r+`;`}const decimalRegex=/\d/;function toDecimal(e,t,n){let r=`&#`+String(e);return n&&t&&!decimalRegex.test(String.fromCharCode(t))?r:r+`;`}const dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$1={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$1.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(e,n,r,i){let a=String.fromCharCode(e);if(own$1.call(characters,a)){let e=characters[a],o=`&`+e;return r&&characterEntitiesLegacy.includes(e)&&!dangerous.includes(e)&&(!i||n&&n!==61&&notAlphanumericRegex.test(String.fromCharCode(n)))?o:o+`;`}return``}function formatSmart(e,t,n){let r=toHexadecimal(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=toNamed(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=toDecimal(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function stringifyEntities(e,t){return core(e,Object.assign({format:formatSmart},t))}const htmlCommentRegex=/^>|^->|<!--|-->|--!>|<!-$/g,bogusCommentEntitySubset=[`>`],commentEntitySubset=[`<`,`>`];function comment(e,t,n,r){return r.settings.bogusComments?`<?`+stringifyEntities(e.value,Object.assign({},r.settings.characterReferences,{subset:bogusCommentEntitySubset}))+`>`:`<!--`+e.value.replace(htmlCommentRegex,i)+`-->`;function i(e){return stringifyEntities(e,Object.assign({},r.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function stringify(e){return e.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(e){return typeof e==`object`?e.type===`text`?empty(e.value):!1:empty(e)}function empty(e){return e.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(e){return t;function t(t,n,r){let i=t?t.children:emptyChildren$1,a=(n||0)+e,o=i[a];if(!r)for(;o&&whitespace(o);)a+=e,o=i[a];return o}}const own={}.hasOwnProperty;function omission(e){return t;function t(t,n,r){return own.call(e,t.tagName)&&e[t.tagName](t,n,r)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$1,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(e,t,n){let r=siblingAfter(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&whitespace(r.value.charAt(0)))}function html$1(e,t,n){let r=siblingAfter(n,t);return!r||r.type!==`comment`}function body$1(e,t,n){let r=siblingAfter(n,t);return!r||r.type!==`comment`}function p(e,t,n){let r=siblingAfter(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function li(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&r.tagName===`li`}function dt(e,t,n){let r=siblingAfter(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function dd(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function rubyElement(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function optgroup(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function option(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function thead(e,t,n){let r=siblingAfter(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function tbody$1(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function tfoot(e,t,n){return!siblingAfter(n,t)}function tr(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function cells(e,t,n){let r=siblingAfter(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}const opening=omission({body,colgroup,head,html,tbody});function html(e){let t=siblingAfter(e,-1);return!t||t.type!==`comment`}function head(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function body(e){let t=siblingAfter(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&whitespace(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function colgroup(e,t,n){let r=siblingBefore(n,t),i=siblingAfter(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&closing(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function tbody(e,t,n){let r=siblingBefore(n,t),i=siblingAfter(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&closing(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}const constants={name:[[`
2
+ \f\r &/=>`.split(``),`
3
+ \f\r "&'/=>\``.split(``)],[`\0
4
+ \f\r "&'/<=>`.split(``),`\0
5
+ \f\r "&'/<=>\``.split(``)]],unquoted:[[`
6
+ \f\r &>`.split(``),`\0
7
+ \f\r "&'<=>\``.split(``)],[`\0
8
+ \f\r "&'<=>\``.split(``),`\0
9
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function element(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=svg);let l=serializeAttributes(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!opening(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!closing(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function serializeAttributes(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=serializeAttribute(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function serializeAttribute(e,t,n){let a=find(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,s=e.settings.allowDangerousCharacters?0:1,c=e.quote,l;if(a.overloadedBoolean&&(n===a.attribute||n===``)?n=!0:(a.boolean||a.overloadedBoolean)&&(typeof n!=`string`||n===a.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let u=stringifyEntities(a.attribute,Object.assign({},e.settings.characterReferences,{subset:constants.name[o][s]}));return n===!0||(n=Array.isArray(n)?(a.commaSeparated?stringify$1:stringify)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(l=stringifyEntities(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:constants.unquoted[o][s]}))),l!==n&&(e.settings.quoteSmart&&ccount(n,c)>ccount(n,e.alternative)&&(c=e.alternative),l=c+stringifyEntities(n,Object.assign({},e.settings.characterReferences,{subset:(c===`'`?constants.single:constants.double)[o][s],attribute:!0}))+c),u+(l&&`=`+l))}const textEntitySubset=[`<`,`&`];function text(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:stringifyEntities(e.value,Object.assign({},r.settings.characterReferences,{subset:textEntitySubset}))}function raw(e,t,n,r){return r.settings.allowDangerousHtml?e.value:text(e,t,n,r)}function root(e,t,n,r){return r.all(e)}const handle=zwitch(`type`,{invalid,unknown,handlers:{comment,doctype,element,raw,root,text}});function invalid(e){throw Error("Expected node, not `"+e+"`")}function unknown(e){let t=e;throw Error("Cannot compile unknown node `"+t.type+"`")}const emptyOptions={},emptyCharacterReferences={},emptyChildren=[];function toHtml(e,t){let n=t||emptyOptions,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one,all,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||htmlVoidElements,characterReferences:n.characterReferences||emptyCharacterReferences,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?svg:html$2,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function one(e,t,n){return handle(e,t,n,this)}function all(e){let t=[],n=e&&e.children||emptyChildren,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}export{toHtml as t};