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