@seamline-kit/seamline-settings 0.0.1 → 0.0.2

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.
@@ -0,0 +1,1607 @@
1
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, n) => {
2
+ let r = {};
3
+ for (var i in e) t(r, i, {
4
+ get: e[i],
5
+ enumerable: !0
6
+ });
7
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
8
+ }, c = (e, i, o, s) => {
9
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
10
+ get: ((e) => i[e]).bind(null, d),
11
+ enumerable: !(s = n(i, d)) || s.enumerable
12
+ });
13
+ return e;
14
+ }, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
15
+ value: n,
16
+ enumerable: !0
17
+ }) : a, n)), u = class {
18
+ /**
19
+ * @param {SchemaType['property']} property
20
+ * Property.
21
+ * @param {SchemaType['normal']} normal
22
+ * Normal.
23
+ * @param {Space | undefined} [space]
24
+ * Space.
25
+ * @returns
26
+ * Schema.
27
+ */
28
+ constructor(e, t, n) {
29
+ this.normal = t, this.property = e, n && (this.space = n);
30
+ }
31
+ };
32
+ u.prototype.normal = {}, u.prototype.property = {}, u.prototype.space = void 0;
33
+ /**
34
+ * @import {Info, Space} from 'property-information'
35
+ */
36
+ /**
37
+ * @param {ReadonlyArray<Schema>} definitions
38
+ * Definitions.
39
+ * @param {Space | undefined} [space]
40
+ * Space.
41
+ * @returns {Schema}
42
+ * Schema.
43
+ */
44
+ function d(e, t) {
45
+ /** @type {Record<string, Info>} */
46
+ let n = {}, r = {};
47
+ for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
48
+ return new u(n, r, t);
49
+ }
50
+ /**
51
+ * Get the cleaned case insensitive form of an attribute or property.
52
+ *
53
+ * @param {string} value
54
+ * An attribute-like or property-like name.
55
+ * @returns {string}
56
+ * Value that can be used to look up the properly cased property on a
57
+ * `Schema`.
58
+ */
59
+ function f(e) {
60
+ return e.toLowerCase();
61
+ }
62
+ /**
63
+ * @import {Info as InfoType} from 'property-information'
64
+ */
65
+ /** @type {InfoType} */
66
+ var p = class {
67
+ /**
68
+ * @param {string} property
69
+ * Property.
70
+ * @param {string} attribute
71
+ * Attribute.
72
+ * @returns
73
+ * Info.
74
+ */
75
+ constructor(e, t) {
76
+ this.attribute = t, this.property = e;
77
+ }
78
+ };
79
+ p.prototype.attribute = "", p.prototype.booleanish = !1, p.prototype.boolean = !1, p.prototype.commaOrSpaceSeparated = !1, p.prototype.commaSeparated = !1, p.prototype.defined = !1, p.prototype.mustUseProperty = !1, p.prototype.number = !1, p.prototype.overloadedBoolean = !1, p.prototype.property = "", p.prototype.spaceSeparated = !1, p.prototype.space = void 0;
80
+ var m = /* @__PURE__ */ s({
81
+ boolean: () => h,
82
+ booleanish: () => g,
83
+ commaOrSpaceSeparated: () => x,
84
+ commaSeparated: () => b,
85
+ number: () => v,
86
+ overloadedBoolean: () => _,
87
+ spaceSeparated: () => y
88
+ }), ee = 0;
89
+ const h = S(), g = S(), _ = S(), v = S(), y = S(), b = S(), x = S();
90
+ function S() {
91
+ return 2 ** ++ee;
92
+ }
93
+ /**
94
+ * @import {Space} from 'property-information'
95
+ */
96
+ var C = Object.keys(m), w = class extends p {
97
+ /**
98
+ * @constructor
99
+ * @param {string} property
100
+ * Property.
101
+ * @param {string} attribute
102
+ * Attribute.
103
+ * @param {number | null | undefined} [mask]
104
+ * Mask.
105
+ * @param {Space | undefined} [space]
106
+ * Space.
107
+ * @returns
108
+ * Info.
109
+ */
110
+ constructor(e, t, n, r) {
111
+ let i = -1;
112
+ if (super(e, t), T(this, "space", r), typeof n == "number") for (; ++i < C.length;) {
113
+ let e = C[i];
114
+ T(this, C[i], (n & m[e]) === m[e]);
115
+ }
116
+ }
117
+ };
118
+ w.prototype.defined = !0;
119
+ /**
120
+ * @template {keyof DefinedInfo} Key
121
+ * Key type.
122
+ * @param {DefinedInfo} values
123
+ * Info.
124
+ * @param {Key} key
125
+ * Key.
126
+ * @param {DefinedInfo[Key]} value
127
+ * Value.
128
+ * @returns {undefined}
129
+ * Nothing.
130
+ */
131
+ function T(e, t, n) {
132
+ n && (e[t] = n);
133
+ }
134
+ /**
135
+ * @import {Info, Space} from 'property-information'
136
+ */
137
+ /**
138
+ * @typedef Definition
139
+ * Definition of a schema.
140
+ * @property {Record<string, string> | undefined} [attributes]
141
+ * Normalzed names to special attribute case.
142
+ * @property {ReadonlyArray<string> | undefined} [mustUseProperty]
143
+ * Normalized names that must be set as properties.
144
+ * @property {Record<string, number | null>} properties
145
+ * Property names to their types.
146
+ * @property {Space | undefined} [space]
147
+ * Space.
148
+ * @property {Transform} transform
149
+ * Transform a property name.
150
+ */
151
+ /**
152
+ * @callback Transform
153
+ * Transform.
154
+ * @param {Record<string, string>} attributes
155
+ * Attributes.
156
+ * @param {string} property
157
+ * Property.
158
+ * @returns {string}
159
+ * Attribute.
160
+ */
161
+ /**
162
+ * @param {Definition} definition
163
+ * Definition.
164
+ * @returns {Schema}
165
+ * Schema.
166
+ */
167
+ function E(e) {
168
+ /** @type {Record<string, Info>} */
169
+ let t = {}, n = {};
170
+ for (let [r, i] of Object.entries(e.properties)) {
171
+ let a = new w(r, e.transform(e.attributes || {}, r), i, e.space);
172
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[f(r)] = r, n[f(a.attribute)] = r;
173
+ }
174
+ return new u(t, n, e.space);
175
+ }
176
+ const D = E({
177
+ properties: {
178
+ ariaActiveDescendant: null,
179
+ ariaAtomic: g,
180
+ ariaAutoComplete: null,
181
+ ariaBusy: g,
182
+ ariaChecked: g,
183
+ ariaColCount: v,
184
+ ariaColIndex: v,
185
+ ariaColSpan: v,
186
+ ariaControls: y,
187
+ ariaCurrent: null,
188
+ ariaDescribedBy: y,
189
+ ariaDetails: null,
190
+ ariaDisabled: g,
191
+ ariaDropEffect: y,
192
+ ariaErrorMessage: null,
193
+ ariaExpanded: g,
194
+ ariaFlowTo: y,
195
+ ariaGrabbed: g,
196
+ ariaHasPopup: null,
197
+ ariaHidden: g,
198
+ ariaInvalid: null,
199
+ ariaKeyShortcuts: null,
200
+ ariaLabel: null,
201
+ ariaLabelledBy: y,
202
+ ariaLevel: v,
203
+ ariaLive: null,
204
+ ariaModal: g,
205
+ ariaMultiLine: g,
206
+ ariaMultiSelectable: g,
207
+ ariaOrientation: null,
208
+ ariaOwns: y,
209
+ ariaPlaceholder: null,
210
+ ariaPosInSet: v,
211
+ ariaPressed: g,
212
+ ariaReadOnly: g,
213
+ ariaRelevant: null,
214
+ ariaRequired: g,
215
+ ariaRoleDescription: y,
216
+ ariaRowCount: v,
217
+ ariaRowIndex: v,
218
+ ariaRowSpan: v,
219
+ ariaSelected: g,
220
+ ariaSetSize: v,
221
+ ariaSort: null,
222
+ ariaValueMax: v,
223
+ ariaValueMin: v,
224
+ ariaValueNow: v,
225
+ ariaValueText: null,
226
+ role: null
227
+ },
228
+ transform(e, t) {
229
+ return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
230
+ }
231
+ });
232
+ /**
233
+ * @param {Record<string, string>} attributes
234
+ * Attributes.
235
+ * @param {string} attribute
236
+ * Attribute.
237
+ * @returns {string}
238
+ * Transformed attribute.
239
+ */
240
+ function O(e, t) {
241
+ return t in e ? e[t] : t;
242
+ }
243
+ /**
244
+ * @param {Record<string, string>} attributes
245
+ * Attributes.
246
+ * @param {string} property
247
+ * Property.
248
+ * @returns {string}
249
+ * Transformed property.
250
+ */
251
+ function k(e, t) {
252
+ return O(e, t.toLowerCase());
253
+ }
254
+ const A = E({
255
+ attributes: {
256
+ acceptcharset: "accept-charset",
257
+ classname: "class",
258
+ htmlfor: "for",
259
+ httpequiv: "http-equiv"
260
+ },
261
+ mustUseProperty: [
262
+ "checked",
263
+ "multiple",
264
+ "muted",
265
+ "selected"
266
+ ],
267
+ properties: {
268
+ abbr: null,
269
+ accept: b,
270
+ acceptCharset: y,
271
+ accessKey: y,
272
+ action: null,
273
+ allow: null,
274
+ allowFullScreen: h,
275
+ allowPaymentRequest: h,
276
+ allowUserMedia: h,
277
+ alt: null,
278
+ as: null,
279
+ async: h,
280
+ autoCapitalize: null,
281
+ autoComplete: y,
282
+ autoFocus: h,
283
+ autoPlay: h,
284
+ blocking: y,
285
+ capture: null,
286
+ charSet: null,
287
+ checked: h,
288
+ cite: null,
289
+ className: y,
290
+ cols: v,
291
+ colSpan: null,
292
+ content: null,
293
+ contentEditable: g,
294
+ controls: h,
295
+ controlsList: y,
296
+ coords: v | b,
297
+ crossOrigin: null,
298
+ data: null,
299
+ dateTime: null,
300
+ decoding: null,
301
+ default: h,
302
+ defer: h,
303
+ dir: null,
304
+ dirName: null,
305
+ disabled: h,
306
+ download: _,
307
+ draggable: g,
308
+ encType: null,
309
+ enterKeyHint: null,
310
+ fetchPriority: null,
311
+ form: null,
312
+ formAction: null,
313
+ formEncType: null,
314
+ formMethod: null,
315
+ formNoValidate: h,
316
+ formTarget: null,
317
+ headers: y,
318
+ height: v,
319
+ hidden: _,
320
+ high: v,
321
+ href: null,
322
+ hrefLang: null,
323
+ htmlFor: y,
324
+ httpEquiv: y,
325
+ id: null,
326
+ imageSizes: null,
327
+ imageSrcSet: null,
328
+ inert: h,
329
+ inputMode: null,
330
+ integrity: null,
331
+ is: null,
332
+ isMap: h,
333
+ itemId: null,
334
+ itemProp: y,
335
+ itemRef: y,
336
+ itemScope: h,
337
+ itemType: y,
338
+ kind: null,
339
+ label: null,
340
+ lang: null,
341
+ language: null,
342
+ list: null,
343
+ loading: null,
344
+ loop: h,
345
+ low: v,
346
+ manifest: null,
347
+ max: null,
348
+ maxLength: v,
349
+ media: null,
350
+ method: null,
351
+ min: null,
352
+ minLength: v,
353
+ multiple: h,
354
+ muted: h,
355
+ name: null,
356
+ nonce: null,
357
+ noModule: h,
358
+ noValidate: h,
359
+ onAbort: null,
360
+ onAfterPrint: null,
361
+ onAuxClick: null,
362
+ onBeforeMatch: null,
363
+ onBeforePrint: null,
364
+ onBeforeToggle: null,
365
+ onBeforeUnload: null,
366
+ onBlur: null,
367
+ onCancel: null,
368
+ onCanPlay: null,
369
+ onCanPlayThrough: null,
370
+ onChange: null,
371
+ onClick: null,
372
+ onClose: null,
373
+ onContextLost: null,
374
+ onContextMenu: null,
375
+ onContextRestored: null,
376
+ onCopy: null,
377
+ onCueChange: null,
378
+ onCut: null,
379
+ onDblClick: null,
380
+ onDrag: null,
381
+ onDragEnd: null,
382
+ onDragEnter: null,
383
+ onDragExit: null,
384
+ onDragLeave: null,
385
+ onDragOver: null,
386
+ onDragStart: null,
387
+ onDrop: null,
388
+ onDurationChange: null,
389
+ onEmptied: null,
390
+ onEnded: null,
391
+ onError: null,
392
+ onFocus: null,
393
+ onFormData: null,
394
+ onHashChange: null,
395
+ onInput: null,
396
+ onInvalid: null,
397
+ onKeyDown: null,
398
+ onKeyPress: null,
399
+ onKeyUp: null,
400
+ onLanguageChange: null,
401
+ onLoad: null,
402
+ onLoadedData: null,
403
+ onLoadedMetadata: null,
404
+ onLoadEnd: null,
405
+ onLoadStart: null,
406
+ onMessage: null,
407
+ onMessageError: null,
408
+ onMouseDown: null,
409
+ onMouseEnter: null,
410
+ onMouseLeave: null,
411
+ onMouseMove: null,
412
+ onMouseOut: null,
413
+ onMouseOver: null,
414
+ onMouseUp: null,
415
+ onOffline: null,
416
+ onOnline: null,
417
+ onPageHide: null,
418
+ onPageShow: null,
419
+ onPaste: null,
420
+ onPause: null,
421
+ onPlay: null,
422
+ onPlaying: null,
423
+ onPopState: null,
424
+ onProgress: null,
425
+ onRateChange: null,
426
+ onRejectionHandled: null,
427
+ onReset: null,
428
+ onResize: null,
429
+ onScroll: null,
430
+ onScrollEnd: null,
431
+ onSecurityPolicyViolation: null,
432
+ onSeeked: null,
433
+ onSeeking: null,
434
+ onSelect: null,
435
+ onSlotChange: null,
436
+ onStalled: null,
437
+ onStorage: null,
438
+ onSubmit: null,
439
+ onSuspend: null,
440
+ onTimeUpdate: null,
441
+ onToggle: null,
442
+ onUnhandledRejection: null,
443
+ onUnload: null,
444
+ onVolumeChange: null,
445
+ onWaiting: null,
446
+ onWheel: null,
447
+ open: h,
448
+ optimum: v,
449
+ pattern: null,
450
+ ping: y,
451
+ placeholder: null,
452
+ playsInline: h,
453
+ popover: null,
454
+ popoverTarget: null,
455
+ popoverTargetAction: null,
456
+ poster: null,
457
+ preload: null,
458
+ readOnly: h,
459
+ referrerPolicy: null,
460
+ rel: y,
461
+ required: h,
462
+ reversed: h,
463
+ rows: v,
464
+ rowSpan: v,
465
+ sandbox: y,
466
+ scope: null,
467
+ scoped: h,
468
+ seamless: h,
469
+ selected: h,
470
+ shadowRootClonable: h,
471
+ shadowRootDelegatesFocus: h,
472
+ shadowRootMode: null,
473
+ shape: null,
474
+ size: v,
475
+ sizes: null,
476
+ slot: null,
477
+ span: v,
478
+ spellCheck: g,
479
+ src: null,
480
+ srcDoc: null,
481
+ srcLang: null,
482
+ srcSet: null,
483
+ start: v,
484
+ step: null,
485
+ style: null,
486
+ tabIndex: v,
487
+ target: null,
488
+ title: null,
489
+ translate: null,
490
+ type: null,
491
+ typeMustMatch: h,
492
+ useMap: null,
493
+ value: g,
494
+ width: v,
495
+ wrap: null,
496
+ writingSuggestions: null,
497
+ align: null,
498
+ aLink: null,
499
+ archive: y,
500
+ axis: null,
501
+ background: null,
502
+ bgColor: null,
503
+ border: v,
504
+ borderColor: null,
505
+ bottomMargin: v,
506
+ cellPadding: null,
507
+ cellSpacing: null,
508
+ char: null,
509
+ charOff: null,
510
+ classId: null,
511
+ clear: null,
512
+ code: null,
513
+ codeBase: null,
514
+ codeType: null,
515
+ color: null,
516
+ compact: h,
517
+ declare: h,
518
+ event: null,
519
+ face: null,
520
+ frame: null,
521
+ frameBorder: null,
522
+ hSpace: v,
523
+ leftMargin: v,
524
+ link: null,
525
+ longDesc: null,
526
+ lowSrc: null,
527
+ marginHeight: v,
528
+ marginWidth: v,
529
+ noResize: h,
530
+ noHref: h,
531
+ noShade: h,
532
+ noWrap: h,
533
+ object: null,
534
+ profile: null,
535
+ prompt: null,
536
+ rev: null,
537
+ rightMargin: v,
538
+ rules: null,
539
+ scheme: null,
540
+ scrolling: g,
541
+ standby: null,
542
+ summary: null,
543
+ text: null,
544
+ topMargin: v,
545
+ valueType: null,
546
+ version: null,
547
+ vAlign: null,
548
+ vLink: null,
549
+ vSpace: v,
550
+ allowTransparency: null,
551
+ autoCorrect: null,
552
+ autoSave: null,
553
+ disablePictureInPicture: h,
554
+ disableRemotePlayback: h,
555
+ prefix: null,
556
+ property: null,
557
+ results: v,
558
+ security: null,
559
+ unselectable: null
560
+ },
561
+ space: "html",
562
+ transform: k
563
+ }), j = E({
564
+ attributes: {
565
+ accentHeight: "accent-height",
566
+ alignmentBaseline: "alignment-baseline",
567
+ arabicForm: "arabic-form",
568
+ baselineShift: "baseline-shift",
569
+ capHeight: "cap-height",
570
+ className: "class",
571
+ clipPath: "clip-path",
572
+ clipRule: "clip-rule",
573
+ colorInterpolation: "color-interpolation",
574
+ colorInterpolationFilters: "color-interpolation-filters",
575
+ colorProfile: "color-profile",
576
+ colorRendering: "color-rendering",
577
+ crossOrigin: "crossorigin",
578
+ dataType: "datatype",
579
+ dominantBaseline: "dominant-baseline",
580
+ enableBackground: "enable-background",
581
+ fillOpacity: "fill-opacity",
582
+ fillRule: "fill-rule",
583
+ floodColor: "flood-color",
584
+ floodOpacity: "flood-opacity",
585
+ fontFamily: "font-family",
586
+ fontSize: "font-size",
587
+ fontSizeAdjust: "font-size-adjust",
588
+ fontStretch: "font-stretch",
589
+ fontStyle: "font-style",
590
+ fontVariant: "font-variant",
591
+ fontWeight: "font-weight",
592
+ glyphName: "glyph-name",
593
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
594
+ glyphOrientationVertical: "glyph-orientation-vertical",
595
+ hrefLang: "hreflang",
596
+ horizAdvX: "horiz-adv-x",
597
+ horizOriginX: "horiz-origin-x",
598
+ horizOriginY: "horiz-origin-y",
599
+ imageRendering: "image-rendering",
600
+ letterSpacing: "letter-spacing",
601
+ lightingColor: "lighting-color",
602
+ markerEnd: "marker-end",
603
+ markerMid: "marker-mid",
604
+ markerStart: "marker-start",
605
+ navDown: "nav-down",
606
+ navDownLeft: "nav-down-left",
607
+ navDownRight: "nav-down-right",
608
+ navLeft: "nav-left",
609
+ navNext: "nav-next",
610
+ navPrev: "nav-prev",
611
+ navRight: "nav-right",
612
+ navUp: "nav-up",
613
+ navUpLeft: "nav-up-left",
614
+ navUpRight: "nav-up-right",
615
+ onAbort: "onabort",
616
+ onActivate: "onactivate",
617
+ onAfterPrint: "onafterprint",
618
+ onBeforePrint: "onbeforeprint",
619
+ onBegin: "onbegin",
620
+ onCancel: "oncancel",
621
+ onCanPlay: "oncanplay",
622
+ onCanPlayThrough: "oncanplaythrough",
623
+ onChange: "onchange",
624
+ onClick: "onclick",
625
+ onClose: "onclose",
626
+ onCopy: "oncopy",
627
+ onCueChange: "oncuechange",
628
+ onCut: "oncut",
629
+ onDblClick: "ondblclick",
630
+ onDrag: "ondrag",
631
+ onDragEnd: "ondragend",
632
+ onDragEnter: "ondragenter",
633
+ onDragExit: "ondragexit",
634
+ onDragLeave: "ondragleave",
635
+ onDragOver: "ondragover",
636
+ onDragStart: "ondragstart",
637
+ onDrop: "ondrop",
638
+ onDurationChange: "ondurationchange",
639
+ onEmptied: "onemptied",
640
+ onEnd: "onend",
641
+ onEnded: "onended",
642
+ onError: "onerror",
643
+ onFocus: "onfocus",
644
+ onFocusIn: "onfocusin",
645
+ onFocusOut: "onfocusout",
646
+ onHashChange: "onhashchange",
647
+ onInput: "oninput",
648
+ onInvalid: "oninvalid",
649
+ onKeyDown: "onkeydown",
650
+ onKeyPress: "onkeypress",
651
+ onKeyUp: "onkeyup",
652
+ onLoad: "onload",
653
+ onLoadedData: "onloadeddata",
654
+ onLoadedMetadata: "onloadedmetadata",
655
+ onLoadStart: "onloadstart",
656
+ onMessage: "onmessage",
657
+ onMouseDown: "onmousedown",
658
+ onMouseEnter: "onmouseenter",
659
+ onMouseLeave: "onmouseleave",
660
+ onMouseMove: "onmousemove",
661
+ onMouseOut: "onmouseout",
662
+ onMouseOver: "onmouseover",
663
+ onMouseUp: "onmouseup",
664
+ onMouseWheel: "onmousewheel",
665
+ onOffline: "onoffline",
666
+ onOnline: "ononline",
667
+ onPageHide: "onpagehide",
668
+ onPageShow: "onpageshow",
669
+ onPaste: "onpaste",
670
+ onPause: "onpause",
671
+ onPlay: "onplay",
672
+ onPlaying: "onplaying",
673
+ onPopState: "onpopstate",
674
+ onProgress: "onprogress",
675
+ onRateChange: "onratechange",
676
+ onRepeat: "onrepeat",
677
+ onReset: "onreset",
678
+ onResize: "onresize",
679
+ onScroll: "onscroll",
680
+ onSeeked: "onseeked",
681
+ onSeeking: "onseeking",
682
+ onSelect: "onselect",
683
+ onShow: "onshow",
684
+ onStalled: "onstalled",
685
+ onStorage: "onstorage",
686
+ onSubmit: "onsubmit",
687
+ onSuspend: "onsuspend",
688
+ onTimeUpdate: "ontimeupdate",
689
+ onToggle: "ontoggle",
690
+ onUnload: "onunload",
691
+ onVolumeChange: "onvolumechange",
692
+ onWaiting: "onwaiting",
693
+ onZoom: "onzoom",
694
+ overlinePosition: "overline-position",
695
+ overlineThickness: "overline-thickness",
696
+ paintOrder: "paint-order",
697
+ panose1: "panose-1",
698
+ pointerEvents: "pointer-events",
699
+ referrerPolicy: "referrerpolicy",
700
+ renderingIntent: "rendering-intent",
701
+ shapeRendering: "shape-rendering",
702
+ stopColor: "stop-color",
703
+ stopOpacity: "stop-opacity",
704
+ strikethroughPosition: "strikethrough-position",
705
+ strikethroughThickness: "strikethrough-thickness",
706
+ strokeDashArray: "stroke-dasharray",
707
+ strokeDashOffset: "stroke-dashoffset",
708
+ strokeLineCap: "stroke-linecap",
709
+ strokeLineJoin: "stroke-linejoin",
710
+ strokeMiterLimit: "stroke-miterlimit",
711
+ strokeOpacity: "stroke-opacity",
712
+ strokeWidth: "stroke-width",
713
+ tabIndex: "tabindex",
714
+ textAnchor: "text-anchor",
715
+ textDecoration: "text-decoration",
716
+ textRendering: "text-rendering",
717
+ transformOrigin: "transform-origin",
718
+ typeOf: "typeof",
719
+ underlinePosition: "underline-position",
720
+ underlineThickness: "underline-thickness",
721
+ unicodeBidi: "unicode-bidi",
722
+ unicodeRange: "unicode-range",
723
+ unitsPerEm: "units-per-em",
724
+ vAlphabetic: "v-alphabetic",
725
+ vHanging: "v-hanging",
726
+ vIdeographic: "v-ideographic",
727
+ vMathematical: "v-mathematical",
728
+ vectorEffect: "vector-effect",
729
+ vertAdvY: "vert-adv-y",
730
+ vertOriginX: "vert-origin-x",
731
+ vertOriginY: "vert-origin-y",
732
+ wordSpacing: "word-spacing",
733
+ writingMode: "writing-mode",
734
+ xHeight: "x-height",
735
+ playbackOrder: "playbackorder",
736
+ timelineBegin: "timelinebegin"
737
+ },
738
+ properties: {
739
+ about: x,
740
+ accentHeight: v,
741
+ accumulate: null,
742
+ additive: null,
743
+ alignmentBaseline: null,
744
+ alphabetic: v,
745
+ amplitude: v,
746
+ arabicForm: null,
747
+ ascent: v,
748
+ attributeName: null,
749
+ attributeType: null,
750
+ azimuth: v,
751
+ bandwidth: null,
752
+ baselineShift: null,
753
+ baseFrequency: null,
754
+ baseProfile: null,
755
+ bbox: null,
756
+ begin: null,
757
+ bias: v,
758
+ by: null,
759
+ calcMode: null,
760
+ capHeight: v,
761
+ className: y,
762
+ clip: null,
763
+ clipPath: null,
764
+ clipPathUnits: null,
765
+ clipRule: null,
766
+ color: null,
767
+ colorInterpolation: null,
768
+ colorInterpolationFilters: null,
769
+ colorProfile: null,
770
+ colorRendering: null,
771
+ content: null,
772
+ contentScriptType: null,
773
+ contentStyleType: null,
774
+ crossOrigin: null,
775
+ cursor: null,
776
+ cx: null,
777
+ cy: null,
778
+ d: null,
779
+ dataType: null,
780
+ defaultAction: null,
781
+ descent: v,
782
+ diffuseConstant: v,
783
+ direction: null,
784
+ display: null,
785
+ dur: null,
786
+ divisor: v,
787
+ dominantBaseline: null,
788
+ download: h,
789
+ dx: null,
790
+ dy: null,
791
+ edgeMode: null,
792
+ editable: null,
793
+ elevation: v,
794
+ enableBackground: null,
795
+ end: null,
796
+ event: null,
797
+ exponent: v,
798
+ externalResourcesRequired: null,
799
+ fill: null,
800
+ fillOpacity: v,
801
+ fillRule: null,
802
+ filter: null,
803
+ filterRes: null,
804
+ filterUnits: null,
805
+ floodColor: null,
806
+ floodOpacity: null,
807
+ focusable: null,
808
+ focusHighlight: null,
809
+ fontFamily: null,
810
+ fontSize: null,
811
+ fontSizeAdjust: null,
812
+ fontStretch: null,
813
+ fontStyle: null,
814
+ fontVariant: null,
815
+ fontWeight: null,
816
+ format: null,
817
+ fr: null,
818
+ from: null,
819
+ fx: null,
820
+ fy: null,
821
+ g1: b,
822
+ g2: b,
823
+ glyphName: b,
824
+ glyphOrientationHorizontal: null,
825
+ glyphOrientationVertical: null,
826
+ glyphRef: null,
827
+ gradientTransform: null,
828
+ gradientUnits: null,
829
+ handler: null,
830
+ hanging: v,
831
+ hatchContentUnits: null,
832
+ hatchUnits: null,
833
+ height: null,
834
+ href: null,
835
+ hrefLang: null,
836
+ horizAdvX: v,
837
+ horizOriginX: v,
838
+ horizOriginY: v,
839
+ id: null,
840
+ ideographic: v,
841
+ imageRendering: null,
842
+ initialVisibility: null,
843
+ in: null,
844
+ in2: null,
845
+ intercept: v,
846
+ k: v,
847
+ k1: v,
848
+ k2: v,
849
+ k3: v,
850
+ k4: v,
851
+ kernelMatrix: x,
852
+ kernelUnitLength: null,
853
+ keyPoints: null,
854
+ keySplines: null,
855
+ keyTimes: null,
856
+ kerning: null,
857
+ lang: null,
858
+ lengthAdjust: null,
859
+ letterSpacing: null,
860
+ lightingColor: null,
861
+ limitingConeAngle: v,
862
+ local: null,
863
+ markerEnd: null,
864
+ markerMid: null,
865
+ markerStart: null,
866
+ markerHeight: null,
867
+ markerUnits: null,
868
+ markerWidth: null,
869
+ mask: null,
870
+ maskContentUnits: null,
871
+ maskUnits: null,
872
+ mathematical: null,
873
+ max: null,
874
+ media: null,
875
+ mediaCharacterEncoding: null,
876
+ mediaContentEncodings: null,
877
+ mediaSize: v,
878
+ mediaTime: null,
879
+ method: null,
880
+ min: null,
881
+ mode: null,
882
+ name: null,
883
+ navDown: null,
884
+ navDownLeft: null,
885
+ navDownRight: null,
886
+ navLeft: null,
887
+ navNext: null,
888
+ navPrev: null,
889
+ navRight: null,
890
+ navUp: null,
891
+ navUpLeft: null,
892
+ navUpRight: null,
893
+ numOctaves: null,
894
+ observer: null,
895
+ offset: null,
896
+ onAbort: null,
897
+ onActivate: null,
898
+ onAfterPrint: null,
899
+ onBeforePrint: null,
900
+ onBegin: null,
901
+ onCancel: null,
902
+ onCanPlay: null,
903
+ onCanPlayThrough: null,
904
+ onChange: null,
905
+ onClick: null,
906
+ onClose: null,
907
+ onCopy: null,
908
+ onCueChange: null,
909
+ onCut: null,
910
+ onDblClick: null,
911
+ onDrag: null,
912
+ onDragEnd: null,
913
+ onDragEnter: null,
914
+ onDragExit: null,
915
+ onDragLeave: null,
916
+ onDragOver: null,
917
+ onDragStart: null,
918
+ onDrop: null,
919
+ onDurationChange: null,
920
+ onEmptied: null,
921
+ onEnd: null,
922
+ onEnded: null,
923
+ onError: null,
924
+ onFocus: null,
925
+ onFocusIn: null,
926
+ onFocusOut: null,
927
+ onHashChange: null,
928
+ onInput: null,
929
+ onInvalid: null,
930
+ onKeyDown: null,
931
+ onKeyPress: null,
932
+ onKeyUp: null,
933
+ onLoad: null,
934
+ onLoadedData: null,
935
+ onLoadedMetadata: null,
936
+ onLoadStart: null,
937
+ onMessage: null,
938
+ onMouseDown: null,
939
+ onMouseEnter: null,
940
+ onMouseLeave: null,
941
+ onMouseMove: null,
942
+ onMouseOut: null,
943
+ onMouseOver: null,
944
+ onMouseUp: null,
945
+ onMouseWheel: null,
946
+ onOffline: null,
947
+ onOnline: null,
948
+ onPageHide: null,
949
+ onPageShow: null,
950
+ onPaste: null,
951
+ onPause: null,
952
+ onPlay: null,
953
+ onPlaying: null,
954
+ onPopState: null,
955
+ onProgress: null,
956
+ onRateChange: null,
957
+ onRepeat: null,
958
+ onReset: null,
959
+ onResize: null,
960
+ onScroll: null,
961
+ onSeeked: null,
962
+ onSeeking: null,
963
+ onSelect: null,
964
+ onShow: null,
965
+ onStalled: null,
966
+ onStorage: null,
967
+ onSubmit: null,
968
+ onSuspend: null,
969
+ onTimeUpdate: null,
970
+ onToggle: null,
971
+ onUnload: null,
972
+ onVolumeChange: null,
973
+ onWaiting: null,
974
+ onZoom: null,
975
+ opacity: null,
976
+ operator: null,
977
+ order: null,
978
+ orient: null,
979
+ orientation: null,
980
+ origin: null,
981
+ overflow: null,
982
+ overlay: null,
983
+ overlinePosition: v,
984
+ overlineThickness: v,
985
+ paintOrder: null,
986
+ panose1: null,
987
+ path: null,
988
+ pathLength: v,
989
+ patternContentUnits: null,
990
+ patternTransform: null,
991
+ patternUnits: null,
992
+ phase: null,
993
+ ping: y,
994
+ pitch: null,
995
+ playbackOrder: null,
996
+ pointerEvents: null,
997
+ points: null,
998
+ pointsAtX: v,
999
+ pointsAtY: v,
1000
+ pointsAtZ: v,
1001
+ preserveAlpha: null,
1002
+ preserveAspectRatio: null,
1003
+ primitiveUnits: null,
1004
+ propagate: null,
1005
+ property: x,
1006
+ r: null,
1007
+ radius: null,
1008
+ referrerPolicy: null,
1009
+ refX: null,
1010
+ refY: null,
1011
+ rel: x,
1012
+ rev: x,
1013
+ renderingIntent: null,
1014
+ repeatCount: null,
1015
+ repeatDur: null,
1016
+ requiredExtensions: x,
1017
+ requiredFeatures: x,
1018
+ requiredFonts: x,
1019
+ requiredFormats: x,
1020
+ resource: null,
1021
+ restart: null,
1022
+ result: null,
1023
+ rotate: null,
1024
+ rx: null,
1025
+ ry: null,
1026
+ scale: null,
1027
+ seed: null,
1028
+ shapeRendering: null,
1029
+ side: null,
1030
+ slope: null,
1031
+ snapshotTime: null,
1032
+ specularConstant: v,
1033
+ specularExponent: v,
1034
+ spreadMethod: null,
1035
+ spacing: null,
1036
+ startOffset: null,
1037
+ stdDeviation: null,
1038
+ stemh: null,
1039
+ stemv: null,
1040
+ stitchTiles: null,
1041
+ stopColor: null,
1042
+ stopOpacity: null,
1043
+ strikethroughPosition: v,
1044
+ strikethroughThickness: v,
1045
+ string: null,
1046
+ stroke: null,
1047
+ strokeDashArray: x,
1048
+ strokeDashOffset: null,
1049
+ strokeLineCap: null,
1050
+ strokeLineJoin: null,
1051
+ strokeMiterLimit: v,
1052
+ strokeOpacity: v,
1053
+ strokeWidth: null,
1054
+ style: null,
1055
+ surfaceScale: v,
1056
+ syncBehavior: null,
1057
+ syncBehaviorDefault: null,
1058
+ syncMaster: null,
1059
+ syncTolerance: null,
1060
+ syncToleranceDefault: null,
1061
+ systemLanguage: x,
1062
+ tabIndex: v,
1063
+ tableValues: null,
1064
+ target: null,
1065
+ targetX: v,
1066
+ targetY: v,
1067
+ textAnchor: null,
1068
+ textDecoration: null,
1069
+ textRendering: null,
1070
+ textLength: null,
1071
+ timelineBegin: null,
1072
+ title: null,
1073
+ transformBehavior: null,
1074
+ type: null,
1075
+ typeOf: x,
1076
+ to: null,
1077
+ transform: null,
1078
+ transformOrigin: null,
1079
+ u1: null,
1080
+ u2: null,
1081
+ underlinePosition: v,
1082
+ underlineThickness: v,
1083
+ unicode: null,
1084
+ unicodeBidi: null,
1085
+ unicodeRange: null,
1086
+ unitsPerEm: v,
1087
+ values: null,
1088
+ vAlphabetic: v,
1089
+ vMathematical: v,
1090
+ vectorEffect: null,
1091
+ vHanging: v,
1092
+ vIdeographic: v,
1093
+ version: null,
1094
+ vertAdvY: v,
1095
+ vertOriginX: v,
1096
+ vertOriginY: v,
1097
+ viewBox: null,
1098
+ viewTarget: null,
1099
+ visibility: null,
1100
+ width: null,
1101
+ widths: null,
1102
+ wordSpacing: null,
1103
+ writingMode: null,
1104
+ x: null,
1105
+ x1: null,
1106
+ x2: null,
1107
+ xChannelSelector: null,
1108
+ xHeight: v,
1109
+ y: null,
1110
+ y1: null,
1111
+ y2: null,
1112
+ yChannelSelector: null,
1113
+ z: null,
1114
+ zoomAndPan: null
1115
+ },
1116
+ space: "svg",
1117
+ transform: O
1118
+ }), M = E({
1119
+ properties: {
1120
+ xLinkActuate: null,
1121
+ xLinkArcRole: null,
1122
+ xLinkHref: null,
1123
+ xLinkRole: null,
1124
+ xLinkShow: null,
1125
+ xLinkTitle: null,
1126
+ xLinkType: null
1127
+ },
1128
+ space: "xlink",
1129
+ transform(e, t) {
1130
+ return "xlink:" + t.slice(5).toLowerCase();
1131
+ }
1132
+ }), N = E({
1133
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1134
+ properties: {
1135
+ xmlnsXLink: null,
1136
+ xmlns: null
1137
+ },
1138
+ space: "xmlns",
1139
+ transform: k
1140
+ }), P = E({
1141
+ properties: {
1142
+ xmlBase: null,
1143
+ xmlLang: null,
1144
+ xmlSpace: null
1145
+ },
1146
+ space: "xml",
1147
+ transform(e, t) {
1148
+ return "xml:" + t.slice(3).toLowerCase();
1149
+ }
1150
+ }), F = {
1151
+ classId: "classID",
1152
+ dataType: "datatype",
1153
+ itemId: "itemID",
1154
+ strokeDashArray: "strokeDasharray",
1155
+ strokeDashOffset: "strokeDashoffset",
1156
+ strokeLineCap: "strokeLinecap",
1157
+ strokeLineJoin: "strokeLinejoin",
1158
+ strokeMiterLimit: "strokeMiterlimit",
1159
+ typeOf: "typeof",
1160
+ xLinkActuate: "xlinkActuate",
1161
+ xLinkArcRole: "xlinkArcrole",
1162
+ xLinkHref: "xlinkHref",
1163
+ xLinkRole: "xlinkRole",
1164
+ xLinkShow: "xlinkShow",
1165
+ xLinkTitle: "xlinkTitle",
1166
+ xLinkType: "xlinkType",
1167
+ xmlnsXLink: "xmlnsXlink"
1168
+ };
1169
+ /**
1170
+ * @import {Schema} from 'property-information'
1171
+ */
1172
+ var I = /[A-Z]/g, L = /-[a-z]/g, R = /^data[-\w.:]+$/i;
1173
+ /**
1174
+ * Look up info on a property.
1175
+ *
1176
+ * In most cases the given `schema` contains info on the property.
1177
+ * All standard,
1178
+ * most legacy,
1179
+ * and some non-standard properties are supported.
1180
+ * For these cases,
1181
+ * the returned `Info` has hints about the value of the property.
1182
+ *
1183
+ * `name` can also be a valid data attribute or property,
1184
+ * in which case an `Info` object with the correctly cased `attribute` and
1185
+ * `property` is returned.
1186
+ *
1187
+ * `name` can be an unknown attribute,
1188
+ * in which case an `Info` object with `attribute` and `property` set to the
1189
+ * given name is returned.
1190
+ * It is not recommended to provide unsupported legacy or recently specced
1191
+ * properties.
1192
+ *
1193
+ *
1194
+ * @param {Schema} schema
1195
+ * Schema;
1196
+ * either the `html` or `svg` export.
1197
+ * @param {string} value
1198
+ * An attribute-like or property-like name;
1199
+ * it will be passed through `normalize` to hopefully find the correct info.
1200
+ * @returns {Info}
1201
+ * Info.
1202
+ */
1203
+ function z(e, t) {
1204
+ let n = f(t), r = t, i = p;
1205
+ if (n in e.normal) return e.property[e.normal[n]];
1206
+ if (n.length > 4 && n.slice(0, 4) === "data" && R.test(t)) {
1207
+ if (t.charAt(4) === "-") {
1208
+ let e = t.slice(5).replace(L, V);
1209
+ r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
1210
+ } else {
1211
+ let e = t.slice(4);
1212
+ if (!L.test(e)) {
1213
+ let n = e.replace(I, B);
1214
+ n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
1215
+ }
1216
+ }
1217
+ i = w;
1218
+ }
1219
+ return new i(r, t);
1220
+ }
1221
+ /**
1222
+ * @param {string} $0
1223
+ * Value.
1224
+ * @returns {string}
1225
+ * Kebab.
1226
+ */
1227
+ function B(e) {
1228
+ return "-" + e.toLowerCase();
1229
+ }
1230
+ /**
1231
+ * @param {string} $0
1232
+ * Value.
1233
+ * @returns {string}
1234
+ * Camel.
1235
+ */
1236
+ function V(e) {
1237
+ return e.charAt(1).toUpperCase();
1238
+ }
1239
+ const H = d([
1240
+ D,
1241
+ A,
1242
+ M,
1243
+ N,
1244
+ P
1245
+ ], "html"), U = d([
1246
+ D,
1247
+ j,
1248
+ M,
1249
+ N,
1250
+ P
1251
+ ], "svg");
1252
+ /**
1253
+ * @typedef Options
1254
+ * Configuration for `stringify`.
1255
+ * @property {boolean} [padLeft=true]
1256
+ * Whether to pad a space before a token.
1257
+ * @property {boolean} [padRight=false]
1258
+ * Whether to pad a space after a token.
1259
+ */
1260
+ /**
1261
+ * @typedef {Options} StringifyOptions
1262
+ * Please use `StringifyOptions` instead.
1263
+ */
1264
+ /**
1265
+ * Parse comma-separated tokens to an array.
1266
+ *
1267
+ * @param {string} value
1268
+ * Comma-separated tokens.
1269
+ * @returns {Array<string>}
1270
+ * List of tokens.
1271
+ */
1272
+ function W(e) {
1273
+ /** @type {Array<string>} */
1274
+ let t = [], n = String(e || ""), r = n.indexOf(","), i = 0, a = !1;
1275
+ for (; !a;) {
1276
+ r === -1 && (r = n.length, a = !0);
1277
+ let e = n.slice(i, r).trim();
1278
+ (e || !a) && t.push(e), i = r + 1, r = n.indexOf(",", i);
1279
+ }
1280
+ return t;
1281
+ }
1282
+ /**
1283
+ * Serialize an array of strings or numbers to comma-separated tokens.
1284
+ *
1285
+ * @param {Array<string|number>} values
1286
+ * List of tokens.
1287
+ * @param {Options} [options]
1288
+ * Configuration for `stringify` (optional).
1289
+ * @returns {string}
1290
+ * Comma-separated tokens.
1291
+ */
1292
+ function G(e, t) {
1293
+ let n = t || {};
1294
+ return (e[e.length - 1] === "" ? [...e, ""] : e).join((n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")).trim();
1295
+ }
1296
+ /**
1297
+ * @typedef {import('hast').Element} Element
1298
+ * @typedef {import('hast').Properties} Properties
1299
+ */
1300
+ /**
1301
+ * @template {string} SimpleSelector
1302
+ * Selector type.
1303
+ * @template {string} DefaultTagName
1304
+ * Default tag name.
1305
+ * @typedef {(
1306
+ * SimpleSelector extends ''
1307
+ * ? DefaultTagName
1308
+ * : SimpleSelector extends `${infer TagName}.${infer Rest}`
1309
+ * ? ExtractTagName<TagName, DefaultTagName>
1310
+ * : SimpleSelector extends `${infer TagName}#${infer Rest}`
1311
+ * ? ExtractTagName<TagName, DefaultTagName>
1312
+ * : SimpleSelector extends string
1313
+ * ? SimpleSelector
1314
+ * : DefaultTagName
1315
+ * )} ExtractTagName
1316
+ * Extract tag name from a simple selector.
1317
+ */
1318
+ var K = /[#.]/g;
1319
+ /**
1320
+ * Create a hast element from a simple CSS selector.
1321
+ *
1322
+ * @template {string} Selector
1323
+ * Type of selector.
1324
+ * @template {string} [DefaultTagName='div']
1325
+ * Type of default tag name (default: `'div'`).
1326
+ * @param {Selector | null | undefined} [selector]
1327
+ * Simple CSS selector (optional).
1328
+ *
1329
+ * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).
1330
+ * Multiple classes are allowed.
1331
+ * Uses the last ID if multiple IDs are found.
1332
+ * @param {DefaultTagName | null | undefined} [defaultTagName='div']
1333
+ * Tag name to use if `selector` does not specify one (default: `'div'`).
1334
+ * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}
1335
+ * Built element.
1336
+ */
1337
+ function q(e, t) {
1338
+ let n = e || "", r = {}, i = 0, a, o;
1339
+ for (; i < n.length;) {
1340
+ K.lastIndex = i;
1341
+ let e = K.exec(n), t = n.slice(i, e ? e.index : n.length);
1342
+ t && (a ? a === "#" ? r.id = t : Array.isArray(r.className) ? r.className.push(t) : r.className = [t] : o = t, i += t.length), e && (a = e[0], i++);
1343
+ }
1344
+ return {
1345
+ type: "element",
1346
+ tagName: o || t || "div",
1347
+ properties: r,
1348
+ children: []
1349
+ };
1350
+ }
1351
+ /**
1352
+ * Parse space-separated tokens to an array of strings.
1353
+ *
1354
+ * @param {string} value
1355
+ * Space-separated tokens.
1356
+ * @returns {Array<string>}
1357
+ * List of tokens.
1358
+ */
1359
+ function J(e) {
1360
+ let t = String(e || "").trim();
1361
+ return t ? t.split(/[ \t\n\r\f]+/g) : [];
1362
+ }
1363
+ /**
1364
+ * Serialize an array of strings as space separated-tokens.
1365
+ *
1366
+ * @param {Array<string|number>} values
1367
+ * List of tokens.
1368
+ * @returns {string}
1369
+ * Space-separated tokens.
1370
+ */
1371
+ function Y(e) {
1372
+ return e.join(" ").trim();
1373
+ }
1374
+ /**
1375
+ * @import {Element, Nodes, RootContent, Root} from 'hast'
1376
+ * @import {Info, Schema} from 'property-information'
1377
+ */
1378
+ /**
1379
+ * @typedef {Array<Nodes | PrimitiveChild>} ArrayChildNested
1380
+ * List of children (deep).
1381
+ */
1382
+ /**
1383
+ * @typedef {Array<ArrayChildNested | Nodes | PrimitiveChild>} ArrayChild
1384
+ * List of children.
1385
+ */
1386
+ /**
1387
+ * @typedef {Array<number | string>} ArrayValue
1388
+ * List of property values for space- or comma separated values (such as `className`).
1389
+ */
1390
+ /**
1391
+ * @typedef {ArrayChild | Nodes | PrimitiveChild} Child
1392
+ * Acceptable child value.
1393
+ */
1394
+ /**
1395
+ * @typedef {number | string | null | undefined} PrimitiveChild
1396
+ * Primitive children, either ignored (nullish), or turned into text nodes.
1397
+ */
1398
+ /**
1399
+ * @typedef {boolean | number | string | null | undefined} PrimitiveValue
1400
+ * Primitive property value.
1401
+ */
1402
+ /**
1403
+ * @typedef {Record<string, PropertyValue | Style>} Properties
1404
+ * Acceptable value for element properties.
1405
+ */
1406
+ /**
1407
+ * @typedef {ArrayValue | PrimitiveValue} PropertyValue
1408
+ * Primitive value or list value.
1409
+ */
1410
+ /**
1411
+ * @typedef {Element | Root} Result
1412
+ * Result from a `h` (or `s`) call.
1413
+ */
1414
+ /**
1415
+ * @typedef {number | string} StyleValue
1416
+ * Value for a CSS style field.
1417
+ */
1418
+ /**
1419
+ * @typedef {Record<string, StyleValue>} Style
1420
+ * Supported value of a `style` prop.
1421
+ */
1422
+ /**
1423
+ * @param {Schema} schema
1424
+ * Schema to use.
1425
+ * @param {string} defaultTagName
1426
+ * Default tag name.
1427
+ * @param {ReadonlyArray<string> | undefined} [caseSensitive]
1428
+ * Case-sensitive tag names (default: `undefined`).
1429
+ * @returns
1430
+ * `h`.
1431
+ */
1432
+ function X(e, t, n) {
1433
+ let r = n ? re(n) : void 0;
1434
+ /**
1435
+ * Hyperscript compatible DSL for creating virtual hast trees.
1436
+ *
1437
+ * @overload
1438
+ * @param {null | undefined} [selector]
1439
+ * @param {...Child} children
1440
+ * @returns {Root}
1441
+ *
1442
+ * @overload
1443
+ * @param {string} selector
1444
+ * @param {Properties} properties
1445
+ * @param {...Child} children
1446
+ * @returns {Element}
1447
+ *
1448
+ * @overload
1449
+ * @param {string} selector
1450
+ * @param {...Child} children
1451
+ * @returns {Element}
1452
+ *
1453
+ * @param {string | null | undefined} [selector]
1454
+ * Selector.
1455
+ * @param {Child | Properties | null | undefined} [properties]
1456
+ * Properties (or first child) (default: `undefined`).
1457
+ * @param {...Child} children
1458
+ * Children.
1459
+ * @returns {Result}
1460
+ * Result.
1461
+ */
1462
+ function i(n, i, ...a) {
1463
+ /** @type {Result} */
1464
+ let o;
1465
+ if (n == null) {
1466
+ o = {
1467
+ type: "root",
1468
+ children: []
1469
+ };
1470
+ let e = i;
1471
+ a.unshift(e);
1472
+ } else {
1473
+ o = q(n, t);
1474
+ let s = o.tagName.toLowerCase(), c = r ? r.get(s) : void 0;
1475
+ if (o.tagName = c || s, Z(i)) a.unshift(i);
1476
+ else for (let [t, n] of Object.entries(i)) te(e, o.properties, t, n);
1477
+ }
1478
+ for (let e of a) Q(o.children, e);
1479
+ return o.type === "element" && o.tagName === "template" && (o.content = {
1480
+ type: "root",
1481
+ children: o.children
1482
+ }, o.children = []), o;
1483
+ }
1484
+ return i;
1485
+ }
1486
+ /**
1487
+ * Check if something is properties or a child.
1488
+ *
1489
+ * @param {Child | Properties} value
1490
+ * Value to check.
1491
+ * @returns {value is Child}
1492
+ * Whether `value` is definitely a child.
1493
+ */
1494
+ function Z(e) {
1495
+ if (typeof e != "object" || !e || Array.isArray(e)) return !0;
1496
+ if (typeof e.type != "string") return !1;
1497
+ let t = e, n = Object.keys(e);
1498
+ for (let e of n) {
1499
+ let n = t[e];
1500
+ if (n && typeof n == "object") {
1501
+ if (!Array.isArray(n)) return !0;
1502
+ let e = n;
1503
+ for (let t of e) if (typeof t != "number" && typeof t != "string") return !0;
1504
+ }
1505
+ }
1506
+ return !!("children" in e && Array.isArray(e.children));
1507
+ }
1508
+ /**
1509
+ * @param {Schema} schema
1510
+ * Schema.
1511
+ * @param {Properties} properties
1512
+ * Properties object.
1513
+ * @param {string} key
1514
+ * Property name.
1515
+ * @param {PropertyValue | Style} value
1516
+ * Property value.
1517
+ * @returns {undefined}
1518
+ * Nothing.
1519
+ */
1520
+ function te(e, t, n, r) {
1521
+ let i = z(e, n), a;
1522
+ if (r != null) {
1523
+ if (typeof r == "number") {
1524
+ if (Number.isNaN(r)) return;
1525
+ a = r;
1526
+ } else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? J(r) : i.commaSeparated ? W(r) : i.commaOrSpaceSeparated ? J(W(r).join(" ")) : $(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? ne(r) : String(r);
1527
+ if (Array.isArray(a)) {
1528
+ /** @type {Array<number | string>} */
1529
+ let e = [];
1530
+ for (let t of a) e.push($(i, i.property, t));
1531
+ a = e;
1532
+ }
1533
+ i.property === "className" && Array.isArray(t.className) && (a = t.className.concat(a)), t[i.property] = a;
1534
+ }
1535
+ }
1536
+ /**
1537
+ * @param {Array<RootContent>} nodes
1538
+ * Children.
1539
+ * @param {Child} value
1540
+ * Child.
1541
+ * @returns {undefined}
1542
+ * Nothing.
1543
+ */
1544
+ function Q(e, t) {
1545
+ if (t != null) if (typeof t == "number" || typeof t == "string") e.push({
1546
+ type: "text",
1547
+ value: String(t)
1548
+ });
1549
+ else if (Array.isArray(t)) for (let n of t) Q(e, n);
1550
+ else if (typeof t == "object" && "type" in t) t.type === "root" ? Q(e, t.children) : e.push(t);
1551
+ else throw Error("Expected node, nodes, or string, got `" + t + "`");
1552
+ }
1553
+ /**
1554
+ * Parse a single primitives.
1555
+ *
1556
+ * @param {Info} info
1557
+ * Property information.
1558
+ * @param {string} name
1559
+ * Property name.
1560
+ * @param {PrimitiveValue} value
1561
+ * Property value.
1562
+ * @returns {PrimitiveValue}
1563
+ * Property value.
1564
+ */
1565
+ function $(e, t, n) {
1566
+ if (typeof n == "string") {
1567
+ if (e.number && n && !Number.isNaN(Number(n))) return Number(n);
1568
+ if ((e.boolean || e.overloadedBoolean) && (n === "" || f(n) === f(t))) return !0;
1569
+ }
1570
+ return n;
1571
+ }
1572
+ /**
1573
+ * Serialize a `style` object as a string.
1574
+ *
1575
+ * @param {Style} styles
1576
+ * Style object.
1577
+ * @returns {string}
1578
+ * CSS string.
1579
+ */
1580
+ function ne(e) {
1581
+ /** @type {Array<string>} */
1582
+ let t = [];
1583
+ for (let [n, r] of Object.entries(e)) t.push([n, r].join(": "));
1584
+ return t.join("; ");
1585
+ }
1586
+ /**
1587
+ * Create a map to adjust casing.
1588
+ *
1589
+ * @param {ReadonlyArray<string>} values
1590
+ * List of properly cased keys.
1591
+ * @returns {Map<string, string>}
1592
+ * Map of lowercase keys to uppercase keys.
1593
+ */
1594
+ function re(e) {
1595
+ /** @type {Map<string, string>} */
1596
+ let t = /* @__PURE__ */ new Map();
1597
+ for (let n of e) t.set(n.toLowerCase(), n);
1598
+ return t;
1599
+ }
1600
+ /**
1601
+ * List of case-sensitive SVG tag names.
1602
+ *
1603
+ * @type {ReadonlyArray<string>}
1604
+ */
1605
+ const ie = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), ae = X(H, "div");
1606
+ X(U, "g", ie);
1607
+ export { U as a, o as c, H as i, l, Y as n, z as o, G as r, F as s, ae as t };